[PATCH v2 net-next 07/15] qed: simplify initialization of the chains with an external PBL

2020-07-22 Thread Alexander Lobakin
Fill PBL table parameters for chains with an external PBL data earlier on qed_chain_init_params() rather than on allocation itself. This simplifies allocation code and allows to extend struct ext_pbl for other chain types. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off

[PATCH v2 net-next 04/15] qed: prevent possible double-frees of the chains

2020-07-22 Thread Alexander Lobakin
Zero-initialize chain on qed_chain_free(), so it couldn't be freed twice and provoke undefined behaviour. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/qed_chain.c | 4 +++- 1 file changed, 3 insertions(

[PATCH v2 net-next 09/15] qed: add support for different page sizes for chains

2020-07-22 Thread Alexander Lobakin
Extend current infrastructure to store chain page size in a struct and use it in all functions instead of fixed QED_CHAIN_PAGE_SIZE. Its value remains the default one, but can be overridden in qed_chain_init_params before chain allocation. Signed-off-by: Alexander Lobakin Signed-off-by: Igor

[PATCH v2 net-next 10/15] qed: optimize common chain accessors

2020-07-22 Thread Alexander Lobakin
Constify chain pointers and refactor qed_chain_get_elem_left{,u32}() a bit. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- include/linux/qed/qed_chain.h | 60 +++ 1 file changed, 33 insertions(+), 27 deletions

[PATCH v2 net-next 11/15] qed: introduce qed_chain_get_elem_used{,u32}()

2020-07-22 Thread Alexander Lobakin
Add reverse-variants of qed_chain_get_elem_left{,u32}() to be able to know current chain occupation. They will be used in the upcoming qede XDP_REDIRECT code. They share most of the logics with the mentioned ones, so were reused to collapse the latters. Signed-off-by: Alexander Lobakin Signed

[PATCH v2 net-next 13/15] qede: reformat net_device_ops declarations

2020-07-22 Thread Alexander Lobakin
Correct the indentation of net_device_ops declarations for fancier look. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qede/qede_main.c | 122 +-- 1 file changed, 61 insertions(+), 61 deletions

[PATCH v2 net-next 15/15] qede: add .ndo_xdp_xmit() and XDP_REDIRECT support

2020-07-22 Thread Alexander Lobakin
Add XDP_REDIRECT case handling and the corresponding NDO to support redirecting XDP frames. This also includes registering driver memory model (currently order-0 page mode) in BPF subsystem. The total number of XDP queues is usually 1:1 with Rx ones. Signed-off-by: Alexander Lobakin Signed-off

[PATCH v2 net-next 14/15] qede: refactor XDP Tx processing

2020-07-22 Thread Alexander Lobakin
Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qede/qede.h| 1 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 89 +++--- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/drivers/net/

[PATCH v2 net-next 12/15] qede: reformat several structures in "qede.h"

2020-07-22 Thread Alexander Lobakin
Make the file more readable and easier for adding new fields. Misc: use IFNAMSIZ and netdev_name() instead of sizeof_field() and direct net_device::name dereferencing. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic

[PATCH v2 net-next 08/15] qed: simplify chain allocation with init params struct

2020-07-22 Thread Alexander Lobakin
To simplify qed_chain_alloc() prototype and call sites, introduce struct qed_chain_init_params to specify chain params, and pass a pointer to filled struct to the actual qed_chain_alloc() instead of a long list of separate arguments. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh

[PATCH v2 net-next 01/15] qed: reformat "qed_chain.h" a bit

2020-07-22 Thread Alexander Lobakin
Reformat structs and macros definitions a bit prior to making functional changes. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- include/linux/qed/qed_chain.h | 126 ++ 1 file changed, 66 insertions(+), 60

[PATCH v2 net-next 02/15] qed: reformat Makefile

2020-07-22 Thread Alexander Lobakin
List one entry per line and sort them alphabetically to simplify the addition of the new ones. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/Makefile | 36 +++- 1 file changed, 29 insertions

[PATCH v2 net-next 00/15] qed, qede: improve chain API and add XDP_REDIRECT support

2020-07-22 Thread Alexander Lobakin
changes. [1] https://lore.kernel.org/netdev/20200722155349.747-1-aloba...@marvell.com/ Alexander Lobakin (15): qed: reformat "qed_chain.h" a bit qed: reformat Makefile qed: move chain methods to a separate file qed: prevent possible double-frees of the chains qed: sanitize

[PATCH net-next 02/13] qed: reformat public_port::transceiver_data a bit

2020-07-16 Thread Alexander Lobakin
Prior to adding new bitfields, reformat the existing ones from spaces to tabs, and unify all hex values to lowercase. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 108 +++--- 1 file changed, 55 insertions(+), 53

[PATCH net-next 01/13] qed: convert link mode from u32 to bitmap

2020-07-16 Thread Alexander Lobakin
tions from shared "qed_if.h". Misc: add build-time check that qed_lm_map[] is always synchronized with enum qed_link_mode_bits. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_main.c| 287 ++ .../net/ether

[PATCH net-next 00/13] qed/qede: add support for new operating modes

2020-07-16 Thread Alexander Lobakin
This series covers the support for the following: - new port modes; - loopback modes, previously missing; - new speed/link modes; - several FEC modes; - multi-rate transceivers; and also cleans up and optimizes several related parts of code. Alexander Lobakin (13): qed: convert link mode

[PATCH net-next 13/13] qed/qede: add support for the extended speed and FEC modes

2020-07-16 Thread Alexander Lobakin
Add all necessary code (NVM parsing, MFW and Ethtool reports etc.) to support extended speed and FEC modes. These new modes are supported by the new boards revisions and newer MFW versions. Misc: correct port type for MEDIA_KR. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh

[PATCH net-next 08/13] qede: introduce support for FEC control

2020-07-16 Thread Alexander Lobakin
Add Ethtool callbacks for querying and setting FEC parameters if it's supported by the underlying qed module and MFW version running on the device. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- .../net/ethernet/qlogic/qede/qede_ethtool.c | 74 +++ 1

[PATCH net-next 11/13] qed: add missing loopback modes

2020-07-16 Thread Alexander Lobakin
These modes are relevant only for several boards, but may be reported by MFW as well as the others. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 5 + drivers/net/ethernet/qlogic/qed/qed_main.c | 19

[PATCH net-next 06/13] qed: add support for Forward Error Correction

2020-07-16 Thread Alexander Lobakin
Add all necessary routines for reading supported FEC modes from NVM and querying FEC control to the MFW (if the running version supports it). Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 54 +++--- drivers/net

[PATCH net-next 10/13] qed: add support for new port modes

2020-07-16 Thread Alexander Lobakin
These ports ship on new boards revisions and are supported by newer firmware versions. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed.h | 5 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 15 +++ drivers/net/ethernet

[PATCH net-next 12/13] qed: populate supported link modes maps on module init

2020-07-16 Thread Alexander Lobakin
-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_main.c | 194 + 1 file changed, 123 insertions(+), 71 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c index

[PATCH net-next 05/13] qed: reformat several structures a bit

2020-07-16 Thread Alexander Lobakin
Prior to adding new fields and bitfields, reformat the related structures according to the Linux style (spaces to tabs, lowercase hex, indentation etc.). Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 256

[PATCH net-next 03/13] qed: add support for multi-rate transceivers

2020-07-16 Thread Alexander Lobakin
Set the corresponding advertised and supported link modes according to the detected transceiver type and device capabilities. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 4 + drivers/net/ethernet/qlogic/qed/qed_main.c | 112

[PATCH net-next 04/13] qed: use transceiver data to fill link partner's advertising speeds

2020-07-16 Thread Alexander Lobakin
partner's abilities to fix it. Misc: fix a couple of comments nearby. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed_main.c | 49 +- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethe

[PATCH net-next 07/13] qede: format qede{,_vf}_ethtool_ops

2020-07-16 Thread Alexander Lobakin
Prior to adding new callbacks, format qede ethtool_ops structs to make declarations more fancy and readable. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- .../net/ethernet/qlogic/qede/qede_ethtool.c | 137 +- 1 file changed, 68 insertions(+), 69 deletions

[PATCH net-next 09/13] qed: reformat several structures a bit

2020-07-16 Thread Alexander Lobakin
Reformat a few nvm_cfg* structures (and partly qed_dev) prior to adding new fields and definitions. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed.h | 62 ++-- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 345

Re: [PATCH net-next 10/13] qed: add support for new port modes

2020-07-17 Thread Alexander Lobakin
From: Jakub Kicinski Date: Thu, 16 Jul 2020 18:18:57 -0700 Hi Jakub, > On Thu, 16 Jul 2020 14:54:43 +0300 Alexander Lobakin wrote: >> These ports ship on new boards revisions and are supported by newer >> firmware versions. >> >> Signed-off-by: Alexander Loba

[PATCH resend net] net: ethtool: add missing NETIF_F_GSO_FRAGLIST feature string

2020-06-17 Thread Alexander Lobakin
265ed ("net: Add fraglist GRO/GSO feature flags") Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 423e640e3876..47f63526818e 100644 --- a/net/ethtool/common.c +++ b/net/ethto

Re: [PATCH resend net] net: ethtool: add missing NETIF_F_GSO_FRAGLIST feature string

2020-06-17 Thread Alexander Lobakin
Hi Michal, On Thursday, 18 June 2020, 0:18, Michal Kubecek wrote: > On Wed, Jun 17, 2020 at 08:42:47PM +0000, Alexander Lobakin wrote: > > > Commit 3b33583265ed ("net: Add fraglist GRO/GSO feature flags") missed > > an entry for NETIF_F_GSO_FRAGLIST in netdev_feat

[PATCH net-next 6/6] net: qede: update copyright years

2020-06-29 Thread Alexander Lobakin
Set the actual copyright holder and years in all qede source files. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qede/Makefile | 1 + drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_dcbnl.c

[PATCH net-next 4/6] net: qede: correct existing SPDX tags

2020-06-29 Thread Alexander Lobakin
QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Correct already existing but wrong SPDX tags to match the actual license. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qede/Makefile | 3 ++- drivers/net/ethernet

[PATCH net-next 2/6] net: qed: convert to SPDX License Identifiers

2020-06-29 Thread Alexander Lobakin
QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Remove all the boilerplates in the existing code and replace it with the correct SPDX tag. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed.h | 29

[PATCH net-next 3/6] net: qed: update copyright years

2020-06-29 Thread Alexander Lobakin
Set the actual copyright holder and years in all qed source files. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/Makefile| 1 + drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_cxt.c

[PATCH net-next 0/6] net: qed/qede: license cleanup

2020-06-29 Thread Alexander Lobakin
QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Correct already existing but wrong SPDX tags to match the actual license. Remove the license boilerplates and replace them with the correct SPDX tag. Update copyright years in all source files. Alexander Lobakin (6

[PATCH net-next 1/6] net: qed: correct existing SPDX tags

2020-06-29 Thread Alexander Lobakin
QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Correct already existing but wrong SPDX tags to match the actual license. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/Makefile | 3 ++- drivers/net/ethernet

[PATCH net-next 5/6] net: qede: convert to SPDX License Identifiers

2020-06-29 Thread Alexander Lobakin
QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Remove all the boilerplates in the existing code and replace it with the correct SPDX tag. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qede/qede.h | 30

[PATCH net 0/3] net: ethtool: netdev_features_strings[] cleanup

2020-06-19 Thread Alexander Lobakin
s thinking about some kind of static assertion to have an early prevention mechanism for this, but the existing of 2 intended holes (former NO_CSUM and UFO) makes this problematic, at least at first sight. Alexander Lobakin (3): net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM ne

[PATCH net 2/3] net: ethtool: fix indentation of netdev_features_strings

2020-06-19 Thread Alexander Lobakin
The current indentation is an absolute mess of tabs, spaces and their mixes in different proportions. Convert it all to plain tabs and move assignment operation char to the right, which is the most commonly used style in Linux code. Signed-off-by: Alexander Lobakin --- net/ethtool/common.c

[PATCH net 1/3] net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM

2020-06-19 Thread Alexander Lobakin
for manual configuration. Fixes: e585f2363637 ("udp: Changes to udp_offload to support remote checksum offload") Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 47f63526818e..aa

[PATCH net 3/3] net: ethtool: sync netdev_features_strings order with enum netdev_features

2020-06-19 Thread Alexander Lobakin
source code and can help not to miss or forget anything. Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index c8e3fce6e48d..24f35d47832d 100644 --

[PATCH net 3/3] net: ethtool: sync netdev_features_strings order with enum netdev_features

2020-06-19 Thread Alexander Lobakin
source code and can help not to miss or forget anything. Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index c8e3fce6e48d..24f35d47832d 100644 --

[PATCH net 1/3] net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM

2020-06-19 Thread Alexander Lobakin
for manual configuration. Fixes: e585f2363637 ("udp: Changes to udp_offload to support remote checksum offload") Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 47f63526818e..aa

[PATCH net 2/3] net: ethtool: fix indentation of netdev_features_strings

2020-06-19 Thread Alexander Lobakin
The current indentation is an absolute mess of tabs, spaces and their mixes in different proportions. Convert it all to plain tabs and move assignment operation char to the right, which is the most commonly used style in Linux code. Signed-off-by: Alexander Lobakin --- net/ethtool/common.c

[PATCH mips-next 0/3] MIPS: fix the two most annoying sparse floods

2020-06-20 Thread Alexander Lobakin
files, so not a real problem. It can be issued separately anyway), while objdump doesn't see any difference at all. Alexander Lobakin (3): MIPS: generic/ip32: io: fix __mem_ioswabq() MIPS: io: fix sparse flood on asm/io.h MIPS: checksum: fix sparse flooding on asm/checksum.h arch/m

[PATCH mips-next 2/3] MIPS: io: fix sparse flood on asm/io.h

2020-06-20 Thread Alexander Lobakin
uplication. Instead, just expand the existing *ioswab*() macros with forced typecasting to stop floods. Signed-off-by: Alexander Lobakin --- .../include/asm/mach-cavium-octeon/mangle-port.h | 12 +--- arch/mips/include/asm/mach-generic/mangle-port.h | 12 ++-- arch/mips/includ

[PATCH mips-next 1/3] MIPS: generic/ip32: io: fix __mem_ioswabq()

2020-06-20 Thread Alexander Lobakin
*readq() family operates with u64 arguments, so they need 64-bit byteswaps. Correct macros for Generic MIPS and IP-32 to match other machines' implementations. Signed-off-by: Alexander Lobakin --- arch/mips/include/asm/mach-generic/mangle-port.h | 2 +- arch/mips/include/asm/mach-ip32/m

[PATCH mips-next 3/3] MIPS: checksum: fix sparse flooding on asm/checksum.h

2020-06-20 Thread Alexander Lobakin
lify actual bug hunting. Signed-off-by: Alexander Lobakin --- arch/mips/include/asm/checksum.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h index dcebaaf8c862..181f7d14efb9 100644 --- a/arch/mips/

[PATCH v2 net 0/3] net: ethtool: netdev_features_strings[] cleanup

2020-06-21 Thread Alexander Lobakin
g in the first patch; - no functional changes. Alexander Lobakin (3): net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM net: ethtool: fix indentation of netdev_features_strings net: ethtool: sync netdev_features_strings order with enum netdev_features net/et

[PATCH v2 net 2/3] net: ethtool: fix indentation of netdev_features_strings

2020-06-21 Thread Alexander Lobakin
The current indentation is an absolute mess of tabs, spaces and their mixes in different proportions. Convert it all to plain tabs and move assignment operation char to the right, which is the most commonly used style in Linux code. Signed-off-by: Alexander Lobakin --- net/ethtool/common.c

[PATCH v2 net 1/3] net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM

2020-06-21 Thread Alexander Lobakin
for manual configuration. Fixes: e585f2363637 ("udp: Changes to udp_offload to support remote checksum offload") Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 47f63526818e..aa

[PATCH v2 net 3/3] net: ethtool: sync netdev_features_strings order with enum netdev_features

2020-06-21 Thread Alexander Lobakin
source code and can help not to miss or forget anything. Signed-off-by: Alexander Lobakin --- net/ethtool/common.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index c8e3fce6e48d..24f35d47832d 100644 --

Re: [PATCH] bpf: Fix mix-up of 4096 and page size.

2025-02-04 Thread Alexander Lobakin
From: Saket Kumar Bhaskar Date: Tue, 4 Feb 2025 12:27:52 +0530 > On Tue, Jan 28, 2025 at 04:03:11PM +0100, Alexander Lobakin wrote: >> From: Alexei Starovoitov >> Date: Thu, 23 Jan 2025 21:14:04 -0800 >> >>> On Wed, Jan 22, 2025 at 10:38 AM Saket Kumar Bha

Re: [PATCH] bpf: Fix mix-up of 4096 and page size.

2025-01-28 Thread Alexander Lobakin
From: Alexei Starovoitov Date: Thu, 23 Jan 2025 21:14:04 -0800 > On Wed, Jan 22, 2025 at 10:38 AM Saket Kumar Bhaskar > wrote: >> >> For platforms on powerpc architecture with a default page size greater >> than 4096, there was an inconsistency in fragment size calculation. >> This caused the BP

<    1   2   3   4   5   6