[PATCH net] net: atlantic: fix PTP on AQC10X

2020-07-22 Thread Mark Starovoytov
s are flowing. Fixes: 2deac71ac492a ("net: atlantic: QoS implementation: min_rate") Signed-off-by: Egor Pomozov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 7 ++- 1 file changed, 6 insertions(+), 1 de

[PATCH v3 net-next 05/13] net: atlantic: use u64_stats_update_* to protect access to 64-bit stats

2020-07-20 Thread Mark Starovoytov
stats are fetched directly from HW (under semaphore); * nic/ndev stats (aq_stats_s) are fetched directly from FW (under mutex). Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_ptp.c | 2 + .../net/ethernet/aquantia/atlantic/aq_ring.c | 46

[PATCH v3 net-next 07/13] net: atlantic: PTP statistics

2020-07-20 Thread Mark Starovoytov
From: Pavel Belous This patch adds PTP rings statistics. Before that these were missing from overall stats, hardening debugging and analysis. Signed-off-by: Pavel Belous Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/aq_ethtool.c | 37

[PATCH v3 net-next 10/13] net: atlantic: use U32_MAX in aq_hw_utils.c

2020-07-20 Thread Mark Starovoytov
This patch replaces magic constant ~0U usage with U32_MAX in aq_hw_utils.c Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet

[PATCH v3 net-next 13/13] net: atlantic: add hwmon getter for MAC temperature

2020-07-20 Thread Mark Starovoytov
This patch adds the possibility to obtain MAC temperature via hwmon. On A1 there are two separate temperature sensors. On A2 there's only one temperature sensor, which is used for reporting both MAC and PHY temperature. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Rus

[PATCH v3 net-next 04/13] net: atlantic: split rx and tx per-queue stats

2020-07-20 Thread Mark Starovoytov
This patch splits rx and tx per-queue stats. This change simplifies the follow-up introduction of PTP stats and u64_stats_update_* usage. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/aq_ethtool.c | 28 ++--- .../net/ethernet/aquantia

[PATCH v3 net-next 06/13] net: atlantic: additional per-queue stats

2020-07-20 Thread Mark Starovoytov
From: Dmitry Bogdanov This patch adds additional per-queue stats, these could be useful for debugging and diagnostics. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_ethtool.c| 3 +++ drivers/net

[PATCH v3 net-next 12/13] net: atlantic: A0 ntuple filters

2020-07-20 Thread Mark Starovoytov
From: Dmitry Bogdanov This patch adds support for ntuple filters on A0. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../aquantia/atlantic/hw_atl/hw_atl_a0.c | 116 +- 1 file changed, 88 insertions(+), 28 deletions

[PATCH v3 net-next 08/13] net: atlantic: enable ipv6 support for TCP LSO and UDP GSO

2020-07-20 Thread Mark Starovoytov
Igor Russkikh Signed-off-by: Mark Starovoytov --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/driver

[PATCH v3 net-next 00/13] net: atlantic: various features

2020-07-20 Thread Mark Starovoytov
per-queue stats net: atlantic: A0 ntuple filters Igor Russkikh (1): net: atlantic: enable ipv6 support for TCP LSO and UDP GSO Mark Starovoytov (7): net: atlantic: move FRAC_PER_NS to aq_hw.h net: atlantic: use simple assignment in _get_stats and _get_sw_stats net: atlantic: make

[PATCH v3 net-next 02/13] net: atlantic: use simple assignment in _get_stats and _get_sw_stats

2020-07-20 Thread Mark Starovoytov
This patch replaces addition assignment operator with a simple assignment in aq_vec_get_stats() and aq_vec_get_sw_stats(), because it is sufficient in both cases and this change simplifies the introduction of u64_stats_update_* in these functions. Signed-off-by: Mark Starovoytov Signed-off-by

[PATCH v3 net-next 01/13] net: atlantic: move FRAC_PER_NS to aq_hw.h

2020-07-20 Thread Mark Starovoytov
This patch moves FRAC_PER_NS to aq_hw.h so that it can be used in both hw_atl (A1) and hw_atl2 (A2) in the future. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 2 ++ .../aquantia/atlantic/hw_atl/hw_atl_b0.c | 20

[PATCH v3 net-next 03/13] net: atlantic: make _get_sw_stats return count as return value

2020-07-20 Thread Mark Starovoytov
This patch changes aq_vec_get_sw_stats() to return count as a return value (which was unused) instead of an out parameter. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 4 ++-- drivers/net/ethernet/aquantia/atlantic/aq_vec.c

[PATCH v3 net-next 09/13] net: atlantic: add support for 64-bit reads/writes

2020-07-20 Thread Mark Starovoytov
From: Pavel Belous This patch adds support for 64-bit reads/writes where applicable, e.g. A2 supports them. Signed-off-by: Pavel Belous Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 1 + .../ethernet/aquantia/atlantic

[PATCH v3 net-next 11/13] net: atlantic: use intermediate variable to improve readability a bit

2020-07-20 Thread Mark Starovoytov
From: Nikita Danilov This patch syncs up hw_atl_a0.c with an out-of-tree driver, where an intermediate variable was introduced in a couple of functions to improve the code readability a bit. Signed-off-by: Nikita Danilov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh

[PATCH net] net: atlantic: disable PTP on AQC111, AQC112

2020-07-17 Thread Mark Starovoytov
in the driver. Fixes: dbcd6806af420 ("net: aquantia: add support for Phy access") Signed-off-by: Nikita Danilov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 1 + .../net/ethernet/aquantia/atlantic/aq_ni

[PATCH net-next 2/2] net: atlantic: add support for FW 4.x

2020-07-17 Thread Mark Starovoytov
via capabilities. Note: 4.x targets specific products only. 3.x is still the main firmware branch, which should be used by most users (at least for now). Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../aquantia/atlantic/hw_atl/hw_atl_llh.c

[PATCH net-next 1/2] net: atlantic: align return value of ver_match function with function name

2020-07-17 Thread Mark Starovoytov
This patch aligns the return value of hw_atl_utils_ver_match function with its name. Change the return type to bool, because it's better aligned with the actual usage. Return true when the version matches, false otherwise. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Rus

[PATCH net-next 0/2] net: atlantic: add support for FW 4.x

2020-07-17 Thread Mark Starovoytov
. Note: 4.x targets specific products only. 3.x is still the main firmware branch, which should be used by most users (at least for now). Dmitry Bogdanov (1): net: atlantic: add support for FW 4.x Mark Starovoytov (1): net: atlantic: align return value of ver_match function with function name

RE: [EXT] Re: [PATCH v2 net-next 02/10] net: atlantic: additional per-queue stats

2020-07-16 Thread Mark Starovoytov
>> +int aq_nic_fill_stats_data(struct aq_ring_stats_rx_s *stats_rx, >> + struct aq_ring_stats_tx_s *stats_tx, >> + u64 *data, >> + unsigned int *p_count) >> +{ >> +unsigned int count = 0U; >> +/* This data should mimic aq_e

RE: [EXT] Re: [PATCH v2 net-next 01/12] net: atlantic: changes for multi-TC support

2020-05-22 Thread Mark Starovoytov
Hi Jakub, Thank you for the review. > > This patch contains the following changes: > > * access cfg via aq_nic_get_cfg() in aq_nic_start() and > > aq_nic_map_skb(); ... > > * use AQ_HW_*_TC instead of hardcoded magic numbers; > > * actually use the 'ret' value in aq_mdo_add_secy(); > > Whenever

RE: [EXT] Re: [PATCH net-next 03/12] net: atlantic: changes for multi-TC support

2020-05-21 Thread Mark Starovoytov
Hi Jakub, > > In the first generation of our hardware (A1), a whole traffic class is > > consumed for PTP handling in FW (FW uses it to send the ptp data and > > to send back timestamps). > > Since this conflicts with QoS (user is unable to use the reserved > > TC2), we suggest using module param