Re: [Intel-wired-lan] [PATCH net-next v9 7/9] libeth: add Rx buffer management

2024-04-10 Thread Alexander Lobakin
From: Przemek Kitszel Date: Tue, 9 Apr 2024 12:58:33 +0200 > On 4/8/24 11:09, Alexander Lobakin wrote: >> From: Przemek Kitszel >> Date: Fri, 5 Apr 2024 12:32:55 +0200 >> >>> On 4/4/24 17:44, Alexander Lobakin wrote: >>>> Add a couple intuitive helper

Re: [Intel-wired-lan] [PATCH net-next v9 7/9] libeth: add Rx buffer management

2024-04-10 Thread Alexander Lobakin
From: Przemek Kitszel Date: Wed, 10 Apr 2024 15:01:32 +0200 > On 4/10/24 13:49, Alexander Lobakin wrote: >> From: Przemek Kitszel >> Date: Tue, 9 Apr 2024 12:58:33 +0200 >> >>> On 4/8/24 11:09, Alexander Lobakin wrote: >>>> From: Przemek Kitszel

Re: [Intel-wired-lan] [PATCH net-next v9 7/9] libeth: add Rx buffer management

2024-04-10 Thread Alexander Lobakin
From: Kees Cook Date: Tue, 9 Apr 2024 09:17:53 -0700 > On Mon, Apr 08, 2024 at 11:45:32AM +0200, Alexander Lobakin wrote: >> From: Alexander Lobakin >> Date: Mon, 8 Apr 2024 11:11:12 +0200 >> >>> From: Jakub Kicinski >>> Date: Fri, 5 Apr 2024 21:25:13 -

Re: [Intel-wired-lan] [PATCH net-next v9 7/9] libeth: add Rx buffer management

2024-04-11 Thread Alexander Lobakin
From: Jakub Kicinski Date: Wed, 10 Apr 2024 17:54:24 -0700 > On Wed, 10 Apr 2024 15:36:13 +0200 Alexander Lobakin wrote: >> Which tree this should go through? Should I include this patch to this >> series with libeth or it's better to push this through kees/linux and >

[Intel-wired-lan] [PATCH net-next v10 00/10] net: intel: start The Great Code Dedup + Page Pool for iavf

2024-04-18 Thread Alexander Lobakin
27;s never gonna happen, right? But you still can at least try. PP conversion for iavf lands within the same series as these two are tied closely. libie will support Page Pool model only, so that a driver can't use much of the lib until it's converted. iavf is only the example, the rest will e

[Intel-wired-lan] [PATCH net-next v10 01/10] net: intel: introduce {, Intel} Ethernet common library

2024-04-18 Thread Alexander Lobakin
ule, libeth. This is done to easily distinguish pretty generic code ready for reusing by any other vendor and/or for moving the layer up from the code useful in Intel's 1-100G drivers only. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/Kconfig| 7 + drivers/net

[Intel-wired-lan] [PATCH net-next v10 02/10] iavf: kill "legacy-rx" for good

2024-04-18 Thread Alexander Lobakin
exander Duyck Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/iavf/iavf.h| 2 +- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 27 +--- .../net/ethernet/intel/iavf/iavf_ethtool.c| 140 -- drivers/net/ethernet/intel/iavf/

[Intel-wired-lan] [PATCH net-next v10 03/10] iavf: drop page splitting and recycling

2024-04-18 Thread Alexander Lobakin
_pg_*() definitions are left to reduce diffstat. They will be removed with the conversion to Page Pool. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 65 drivers/net/ethernet/intel/iavf/iavf_type.h | 2 - drivers/net/ethernet/intel/iavf/iavf

[Intel-wired-lan] [PATCH net-next v10 04/10] slab: introduce kvmalloc_array_node() and kvcalloc_node()

2024-04-18 Thread Alexander Lobakin
Add NUMA-aware counterparts for kvmalloc_array() and kvcalloc() to be able to flexibly allocate arrays for a particular node. Rewrite kvmalloc_array() to kvmalloc_array_node(NUMA_NO_NODE) call. Acked-by: Vlastimil Babka Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- include

[Intel-wired-lan] [PATCH net-next v10 05/10] page_pool: constify some read-only function arguments

2024-04-18 Thread Alexander Lobakin
sizes. Reviewed-by: Ilias Apalodimas Signed-off-by: Alexander Lobakin --- include/net/page_pool/types.h | 4 ++-- include/net/page_pool/helpers.h | 10 +- net/core/page_pool.c| 10 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/net/page_pool/ty

[Intel-wired-lan] [PATCH net-next v10 06/10] page_pool: add DMA-sync-for-CPU inline helper

2024-04-18 Thread Alexander Lobakin
synchronization for the size passed from the driver. It can be used even when the pool doesn't manage DMA-syncs-for-device, just make sure the page has a correct DMA address set via page_pool_set_dma_addr(). Signed-off-by: Alexander Lobakin --- include/net/page_pool/helpers.h | 24 ++

[Intel-wired-lan] [PATCH net-next v10 07/10] libeth: add Rx buffer management

2024-04-18 Thread Alexander Lobakin
ather a shim, but eventually the libeth-enabled drivers will move to it, with iavf being the first one. Signed-off-by: Alexander Lobakin --- kernel-doc for libeth_fq::fp generates an "Excess struct member" warning currently, here's patch which fixes the script: [0] [0] h

[Intel-wired-lan] [PATCH net-next v10 08/10] iavf: pack iavf_ring more efficiently

2024-04-18 Thread Alexander Lobakin
out of &iavf_tx_queue_stats -- it doesn't belong there (used for Tx stall detection). Place it next to the stats on the ring itself to fill the 4-byte slot. The result: no holes and all the hot fields fit into the first 64-byte cacheline. Signed-off-by: Alexander Lobakin --- drivers

[Intel-wired-lan] [PATCH net-next v10 09/10] iavf: switch to Page Pool

2024-04-18 Thread Alexander Lobakin
to allocating a page every second descriptor. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 34 +-- include/linux/net/intel/libie/rx.h| 17 ++ drivers/net/ethernet/intel/iavf/iavf_main.c | 7 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c

[Intel-wired-lan] [PATCH net-next v10 10/10] MAINTAINERS: add entry for libeth and libie

2024-04-18 Thread Alexander Lobakin
Add myself as a maintainer/supporter for libeth and libie. Let they have separate entries from the Intel ethernet code as it's a bit different case and all patches will go through me rather than Tony. Signed-off-by: Alexander Lobakin --- MAINTAINERS | 20 1 file change

[Intel-wired-lan] [PATCH iwl] idpf: don't enable NAPI and interrupts prior to allocating Rx buffers

2024-04-26 Thread Alexander Lobakin
: Michal Kubiak Reviewed-by: Wojciech Drewek Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 1 + drivers/net/ethernet/intel/idpf/idpf_lib.c | 1 + drivers/net/ethernet/intel/idpf/idpf_txrx.c | 12 +++- 3 files changed, 9 insertions(+), 5 deletions(-

Re: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel: Use *-y instead of *-objs in Makefile

2024-05-08 Thread Alexander Lobakin
From: Andy Shevchenko Date: Wed, 8 May 2024 16:23:15 +0300 > *-objs suffix is reserved rather for (user-space) host programs while > usually *-y suffix is used for kernel drivers (although *-objs works > for that purpose for now). > > Let's correct the old usages of *-objs in Makefiles. Wait, I

Re: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel: Use *-y instead of *-objs in Makefile

2024-05-08 Thread Alexander Lobakin
From: Andy Shevchenko Date: Wed, 8 May 2024 17:25:31 +0300 > On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin wrote: >>> *-objs suffix is reserved rather for (user-space) host programs while >>> usually *-y suffix is used for kernel drivers (although *-objs works

Re: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel: Use *-y instead of *-objs in Makefile

2024-05-08 Thread Alexander Lobakin
From: Alexander Lobakin Date: Wed, 8 May 2024 16:39:21 +0200 > From: Andy Shevchenko > Date: Wed, 8 May 2024 17:25:31 +0300 > >> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin wrote: >>>> *-objs suffix is reserved rather for (user-space) host programs wh

[Intel-wired-lan] [PATCH RFC iwl-next 00/12] idpf: XDP chapter I: convert Rx to libeth

2024-05-10 Thread Alexander Lobakin
uses napi_build_skb() instead of in-place short skb allocation. Most idpf patches, except for the queue split, removes more lines than adds. Expect far better memory utilization and +5-8% on Rx depending on the case (+17% on skb XDP_DROP :>). Alexander Lobakin (12): libeth: add cacheline / str

[Intel-wired-lan] [PATCH RFC iwl-next 01/12] libeth: add cacheline / struct alignment helpers

2024-05-10 Thread Alexander Lobakin
they don't cross the specified bound. Signed-off-by: Alexander Lobakin --- include/net/libeth/cache.h | 64 ++ 1 file changed, 64 insertions(+) create mode 100644 include/net/libeth/cache.h diff --git a/include/net/libeth/cache.h b/include/net/libeth/ca

[Intel-wired-lan] [PATCH RFC iwl-next 02/12] idpf: stop using macros for accessing queue descriptors

2024-05-10 Thread Alexander Lobakin
In C, we have structures and unions. Casting `void *` via macros is not only error-prone, but also looks confusing and awful in general. In preparation for splitting the queue structs, replace it with a union and direct array dereferences. Signed-off-by: Alexander Lobakin --- drivers/net

[Intel-wired-lan] [PATCH RFC iwl-next 04/12] idpf: avoid bloating &idpf_q_vector with big %NR_CPUS

2024-05-10 Thread Alexander Lobakin
masks and put &idpf_q_vector on a good diet. Also remove redundant pointer to the interrupt name from the structure. request_irq() saves it and free_irq() returns it on deinit, so that you can free the memory. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_tx

[Intel-wired-lan] [PATCH RFC iwl-next 05/12] idpf: strictly assert cachelines of queue and queue vector structures

2024-05-10 Thread Alexander Lobakin
this gives up to 2% of perf bump on Rx. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 370 +++- 1 file changed, 205 insertions(+), 165 deletions(-) diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.h b/drivers/net/ethernet/intel

intel-wired-lan@osuosl.org

2024-05-10 Thread Alexander Lobakin
ng is the same, just call either idpf_tx_splitq_frame() or idpf_tx_singleq_frame() depending on the active model to actually map and send the skb. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 7 ++--- drivers/net/ethernet/intel/idpf/idpf_lib.

[Intel-wired-lan] [PATCH RFC iwl-next 07/12] idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ

2024-05-10 Thread Alexander Lobakin
's enabled manually. This corresponds to -10 Kb of object code size and a good bunch of hotpath checks. idpf_is_queue_model_split() works as a gate and compiles out to `true` when the config option is disabled. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/Kconfig

[Intel-wired-lan] [PATCH RFC iwl-next 09/12] idpf: remove legacy Page Pool Ethtool stats

2024-05-10 Thread Alexander Lobakin
TATS unconditionally, while the latter is often turned off for better performance. Remove all the references to PP stats from the Ethtool code. The stats are still available in their full via the generic Netlink interface. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig

[Intel-wired-lan] [PATCH RFC iwl-next 08/12] idpf: reuse libeth's definitions of parsed ptype structures

2024-05-10 Thread Alexander Lobakin
ed in &idpf_rx_queue. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 + drivers/net/ethernet/intel/idpf/idpf.h| 2 +- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 88 +--- drivers/net/ethernet/intel/idpf/idpf_lib.c| 3 +

[Intel-wired-lan] [PATCH RFC iwl-next 10/12] libeth: support different types of buffers for Rx

2024-05-10 Thread Alexander Lobakin
accordingly. All the HW-related details like buffer alignment are still accounted. For the header buffers, pick 256 bytes as in most places in the kernel (have you ever seen frames with bigger headers?). Signed-off-by: Alexander Lobakin --- include/net/libeth/rx.h| 19

[Intel-wired-lan] [PATCH RFC iwl-next 11/12] idpf: convert header split mode to libeth + napi_build_skb()

2024-05-10 Thread Alexander Lobakin
more from the data buffer later. This W/A will hopefully be removed one day. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 54 ++-- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 1 + drivers/net/ethernet/intel/idpf/idpf_txrx.c | 237 +++--

[Intel-wired-lan] [PATCH RFC iwl-next 12/12] idpf: use libeth Rx buffer management for payload buffer

2024-05-10 Thread Alexander Lobakin
nly after 4 HW writes rather than two. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 - drivers/net/ethernet/intel/idpf/idpf.h| 1 - drivers/net/ethernet/intel/idpf/idpf_txrx.h | 88 ++- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 25 +-

[Intel-wired-lan] [PATCH RFC iwl-next 03/12] idpf: split &idpf_queue into 4 strictly-typed queue structures

2024-05-10 Thread Alexander Lobakin
ame as Rx). This HT is used only for OOO completions, which aren't really hotpath anyway. Note that this change must be done atomically, otherwise it's really easy to get lost and miss something. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf.h| 3 +-

Re: [Intel-wired-lan] [PATCH net] idpf: don't skip over ethtool tcp-data-split setting

2024-05-15 Thread Alexander Lobakin
ported-by: Xu Du > Closes: https://issues.redhat.com/browse/RHEL-36182 > Signed-off-by: Michal Schmidt Reviewed-by: Alexander Lobakin > --- > drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/dr

Re: [Intel-wired-lan] [PATCH RFC iwl-next 07/12] idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ

2024-05-16 Thread Alexander Lobakin
From: Tantilov, Emil S Date: Mon, 13 May 2024 19:01:30 -0700 > On 5/10/2024 8:26 AM, Alexander Lobakin wrote: >> Currently, there's no HW supporting idpf in the singleq model. Still, >> this dead code is supported by the driver and often times add hotpath > The driver su

Re: [Intel-wired-lan] [PATCH RFC iwl-next 08/12] idpf: reuse libeth's definitions of parsed ptype structures

2024-05-27 Thread Alexander Lobakin
From: Mina Almasry Date: Fri, 10 May 2024 09:22:05 -0700 > On Fri, May 10, 2024 at 8:30 AM Alexander Lobakin > wrote: >> >> idpf's in-kernel parsed ptype structure is almost identical to the one >> used in the previous Intel drivers, which means it can be

[Intel-wired-lan] [PATCH iwl-next 00/12] idpf: XDP chapter I: convert Rx to libeth

2024-05-28 Thread Alexander Lobakin
nt DMA uses on hotpath, uses napi_build_skb() instead of in-place short skb allocation. Most idpf patches, except for the queue split, removes more lines than adds. Expect far better memory utilization and +5-8% on Rx depending on the case (+17% on skb XDP_DROP :>). Alexander Lobakin (12): libe

[Intel-wired-lan] [PATCH iwl-next 01/12] libeth: add cacheline / struct alignment helpers

2024-05-28 Thread Alexander Lobakin
they don't cross the specified bound. Signed-off-by: Alexander Lobakin --- scripts/kernel-doc | 1 + include/net/libeth/cache.h | 100 + 2 files changed, 101 insertions(+) create mode 100644 include/net/libeth/cache.h diff --git a/scripts/kerne

[Intel-wired-lan] [PATCH iwl-next 02/12] idpf: stop using macros for accessing queue descriptors

2024-05-28 Thread Alexander Lobakin
Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf.h| 1 - .../net/ethernet/intel/idpf/idpf_lan_txrx.h | 2 + drivers/net/ethernet/intel/idpf/idpf_txrx.h | 47 ++- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 20 drivers/net/ethernet

intel-wired-lan@osuosl.org

2024-05-28 Thread Alexander Lobakin
ng is the same, just call either idpf_tx_splitq_frame() or idpf_tx_singleq_frame() depending on the active model to actually map and send the skb. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 9 ++ drivers/net/ethernet/i

[Intel-wired-lan] [PATCH iwl-next 04/12] idpf: avoid bloating &idpf_q_vector with big %NR_CPUS

2024-05-28 Thread Alexander Lobakin
masks and put &idpf_q_vector on a good diet. Also remove redundant pointer to the interrupt name from the structure. request_irq() saves it and free_irq() returns it on deinit, so that you can free the memory. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net

[Intel-wired-lan] [PATCH iwl-next 05/12] idpf: strictly assert cachelines of queue and queue vector structures

2024-05-28 Thread Alexander Lobakin
this gives up to 2% of perf bump on Rx. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 443 +++- 1 file changed, 250 insertions(+), 193 deletions(-) diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.h b/dr

[Intel-wired-lan] [PATCH iwl-next 08/12] idpf: reuse libeth's definitions of parsed ptype structures

2024-05-28 Thread Alexander Lobakin
in &idpf_rx_queue. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 + drivers/net/ethernet/intel/idpf/idpf.h| 2 +- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 88 +--- drivers/net/ethernet/intel/id

[Intel-wired-lan] [PATCH iwl-next 07/12] idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ

2024-05-28 Thread Alexander Lobakin
y: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/Kconfig| 13 + drivers/net/ethernet/intel/idpf/Kconfig | 27 +++ drivers/net/ethernet/intel/idpf/Makefile | 3 ++- drivers/net/ethernet/intel/idpf/idpf.h| 3 ++- d

[Intel-wired-lan] [PATCH iwl-next 10/12] libeth: support different types of buffers for Rx

2024-05-28 Thread Alexander Lobakin
accordingly. All the HW-related details like buffer alignment are still accounted. For the header buffers, pick 256 bytes as in most places in the kernel (have you ever seen frames with bigger headers?). Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- include/net/libeth/rx.h

[Intel-wired-lan] [PATCH iwl-next 09/12] idpf: remove legacy Page Pool Ethtool stats

2024-05-28 Thread Alexander Lobakin
TATS unconditionally, while the latter is often turned off for better performance. Remove all the references to PP stats from the Ethtool code. The stats are still available in their full via the generic Netlink interface. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethe

[Intel-wired-lan] [PATCH iwl-next 11/12] idpf: convert header split mode to libeth + napi_build_skb()

2024-05-28 Thread Alexander Lobakin
more from the data buffer later. This W/A will hopefully be removed one day. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 52 ++-- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 1 + drivers/net/ethernet/intel/idpf/idpf_txrx.c | 253 -

[Intel-wired-lan] [PATCH iwl-next 12/12] idpf: use libeth Rx buffer management for payload buffer

2024-05-28 Thread Alexander Lobakin
nly after 4 HW writes rather than two. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 - drivers/net/ethernet/intel/idpf/idpf.h| 2 - drivers/net/ethernet/intel/idpf/idpf_txrx.h | 86 +-- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 25 +-

[Intel-wired-lan] [PATCH iwl-next 03/12] idpf: split &idpf_queue into 4 strictly-typed queue structures

2024-05-28 Thread Alexander Lobakin
ame as Rx). This HT is used only for OOO completions, which aren't really hotpath anyway. Note that this change must be done atomically, otherwise it's really easy to get lost and miss something. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf.h| 3 +-

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: extend tx watchdog timeout

2024-06-11 Thread Alexander Lobakin
to an OOO or due to that something went bad with the HW? Note that there are several patches fixing Tx (incl. timeouts) in my tree, including yours (Joshua's) which you somehow didn't send yet ._. Maybe start from them first? I don't buy 30 seconds, at least for now. Maybe I'm missing something. Nacked-by: Alexander Lobakin Thanks, Olek

Re: [Intel-wired-lan] [PATCH iwl-next v7 09/12] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors

2024-06-11 Thread Alexander Lobakin
From: Mateusz Polchlopek Date: Tue, 4 Jun 2024 09:13:57 -0400 > From: Jacob Keller > > Using VIRTCHNL_VF_OFFLOAD_FLEX_DESC, the iAVF driver is capable of > negotiating to enable the advanced flexible descriptor layout. Add the > flexible NIC layout (RXDID=2) as a member of the Rx descriptor un

Re: [Intel-wired-lan] [PATCH v3 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's

2024-06-11 Thread Alexander Lobakin
From: Maciej Fijalkowski Date: Tue, 4 Jun 2024 15:21:48 +0200 > From: Michal Kubiak > > Address a scenario in which XSK ZC Tx produces descriptors to XDP Tx > ring when link is either not yet fully initialized or process of > stopping the netdev has already started. To avoid this, add checks >

Re: [Intel-wired-lan] [PATCH v3 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's

2024-06-12 Thread Alexander Lobakin
From: Maciej Fijalkowski Date: Tue, 11 Jun 2024 16:21:27 +0200 > On Tue, Jun 11, 2024 at 01:59:37PM +0200, Alexander Lobakin wrote: >> From: Maciej Fijalkowski >> Date: Tue, 4 Jun 2024 15:21:48 +0200 >> >>> From: Michal Kubiak >>> >>> Address a

Re: [Intel-wired-lan] [PATCH v3 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's

2024-06-12 Thread Alexander Lobakin
From: Alexander Lobakin Date: Wed, 12 Jun 2024 11:09:10 +0200 > From: Maciej Fijalkowski > Date: Tue, 11 Jun 2024 16:21:27 +0200 [...] >>>> diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c >>>> b/drivers/net/ethernet/intel/ice/ice_xsk.c >>>&g

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: extend tx watchdog timeout

2024-06-12 Thread Alexander Lobakin
From: Josh Hay Date: Tue, 11 Jun 2024 11:13:53 -0700 > > > On 6/11/2024 3:44 AM, Alexander Lobakin wrote: >> From: David Decotigny >> Date: Tue, 4 Jun 2024 16:34:48 -0700 [...] >> Note that there are several patches fixing Tx (incl. timeouts) in my >> tree,

Re: [Intel-wired-lan] [PATCH iwl-next v7 09/12] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors

2024-06-12 Thread Alexander Lobakin
From: Jacob Keller Date: Tue, 11 Jun 2024 13:52:57 -0700 > > > On 6/11/2024 4:47 AM, Alexander Lobakin wrote: >> From: Mateusz Polchlopek >> Date: Tue, 4 Jun 2024 09:13:57 -0400 >> >>> From: Jacob Keller >>> >>> Using VIRTCH

Re: [Intel-wired-lan] [PATCH iwl-next 05/12] idpf: strictly assert cachelines of queue and queue vector structures

2024-06-12 Thread Alexander Lobakin
From: Jacob Keller Date: Tue, 28 May 2024 17:43:34 -0700 > > > On 5/28/2024 6:48 AM, Alexander Lobakin wrote: >> Now that the queue and queue vector structures are separated and laid >> out optimally, group the fields as read-mostly, read-write, and cold >> cacheli

Re: [Intel-wired-lan] [PATCH iwl-next 05/12] idpf: strictly assert cachelines of queue and queue vector structures

2024-06-12 Thread Alexander Lobakin
From: Alexander Lobakin Date: Wed, 12 Jun 2024 15:03:07 +0200 > From: Jacob Keller > Date: Tue, 28 May 2024 17:43:34 -0700 > >> >> >> On 5/28/2024 6:48 AM, Alexander Lobakin wrote: >>> Now that the queue and queue vector structures are separated and laid &g

Re: [Intel-wired-lan] [PATCH iwl-next 07/12] idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ

2024-06-12 Thread Alexander Lobakin
From: Jacob Keller Date: Tue, 28 May 2024 17:47:32 -0700 > > > On 5/28/2024 6:48 AM, Alexander Lobakin wrote: >> Currently, all HW supporting idpf supports the singleq model, but none >> of it advertises it by default, as splitq is supported and preferred >> for mu

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: extend tx watchdog timeout

2024-06-13 Thread Alexander Lobakin
From: David Decotigny Date: Wed, 12 Jun 2024 11:01:46 -0700 > On Tue, Jun 11, 2024 at 11:13 AM Josh Hay wrote: >> >> >> >> On 6/11/2024 3:44 AM, Alexander Lobakin wrote: >>> From: David Decotigny >>> Date: Tue, 4 Jun 2024 16:34:48 -0700 >>>

Re: [Intel-wired-lan] [PATCH iwl-next 01/12] libeth: add cacheline / struct alignment helpers

2024-06-13 Thread Alexander Lobakin
From: Jakub Kicinski Date: Wed, 29 May 2024 18:34:09 -0700 > On Tue, 28 May 2024 15:48:35 +0200 Alexander Lobakin wrote: >> diff --git a/scripts/kernel-doc b/scripts/kernel-doc >> index 95a59ac78f82..d0cf9a2d82de 100755 >> --- a/scripts/kernel-doc >> +++ b/scrip

Re: [Intel-wired-lan] [PATCH iwl-next 11/12] idpf: convert header split mode to libeth + napi_build_skb()

2024-06-13 Thread Alexander Lobakin
From: Jakub Kicinski Date: Wed, 29 May 2024 18:40:12 -0700 > On Tue, 28 May 2024 15:48:45 +0200 Alexander Lobakin wrote: >> Currently, idpf uses the following model for the header buffers: >> >> * buffers are allocated via dma_alloc_coherent(); >> * when receiving, nap

Re: [Intel-wired-lan] [PATCH iwl-next 03/12] idpf: split &idpf_queue into 4 strictly-typed queue structures

2024-06-13 Thread Alexander Lobakin
From: Simon Horman Date: Sat, 1 Jun 2024 09:53:08 +0100 > On Tue, May 28, 2024 at 03:48:37PM +0200, Alexander Lobakin wrote: >> Currently, sizeof(struct idpf_queue) is 32 Kb. >> This is due to the 12-bit hashtable declaration at the end of the queue. >> This HT is needed on

Re: [Intel-wired-lan] [PATCH iwl-next 12/12] idpf: use libeth Rx buffer management for payload buffer

2024-06-13 Thread Alexander Lobakin
From: Simon Horman Date: Sat, 1 Jun 2024 10:08:42 +0100 > + Dan Carpenter > > On Tue, May 28, 2024 at 03:48:46PM +0200, Alexander Lobakin wrote: >> idpf uses Page Pool for data buffers with hardcoded buffer lengths of >> 4k for "classic" buffers and 2k for &qu

Re: [Intel-wired-lan] [PATCH iwl-net] idpf: extend tx watchdog timeout

2024-06-13 Thread Alexander Lobakin
From: Josh Hay Date: Wed, 12 Jun 2024 23:36:29 -0700 > > > On 6/12/2024 2:34 AM, Alexander Lobakin wrote: >> From: Josh Hay >> Date: Tue, 11 Jun 2024 11:13:53 -0700 >> >>> >>> >>> On 6/11/2024 3:44 AM, Alexander Lobakin wrote: >>&

Re: [Intel-wired-lan] [PATCH v3 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's

2024-06-14 Thread Alexander Lobakin
From: Maciej Fijalkowski Date: Thu, 13 Jun 2024 18:07:53 +0200 > On Thu, Jun 13, 2024 at 05:51:25PM +0200, Maciej Fijalkowski wrote: >> On Wed, Jun 12, 2024 at 11:15:31AM +0200, Alexander Lobakin wrote: >>> From: Alexander Lobakin >>> Date: Wed, 12 Jun 2024 11:09:10

Re: [Intel-wired-lan] [PATCH iwl-next 11/12] idpf: convert header split mode to libeth + napi_build_skb()

2024-06-17 Thread Alexander Lobakin
From: Willem De Bruijn Date: Thu, 30 May 2024 09:46:46 -0400 > Alexander Lobakin wrote: >> Currently, idpf uses the following model for the header buffers: >> >> * buffers are allocated via dma_alloc_coherent(); >> * when receiving, napi_alloc_skb() is called and the

Re: [Intel-wired-lan] [PATCH net v2] ice: use proper macro for testing bit

2024-06-17 Thread Alexander Lobakin
d internal temperature sensor") >> Signed-off-by: Petr Oros >> Acked-by: Ivan Vecera To be added to v2: Reviewed-by: Alexander Lobakin Thanks, Olek

Re: [Intel-wired-lan] [PATCH iwl-next 3/6] ice: Simplify bitmap setting in adding recipe

2024-06-19 Thread Alexander Lobakin
From: Marcin Szycik Date: Tue, 18 Jun 2024 16:11:54 +0200 > From: Michal Swiatkowski > > Remove unnecessary size checks when copying bitmaps in ice_add_sw_recipe() > and replace them with compile time assert. Check if the bitmaps are equal > size, as they are copied both ways. > > Signed-off-b

Re: [Intel-wired-lan] [PATCH iwl-next 11/12] idpf: convert header split mode to libeth + napi_build_skb()

2024-06-20 Thread Alexander Lobakin
From: Willem De Bruijn Date: Mon, 17 Jun 2024 14:13:07 -0400 > Alexander Lobakin wrote: >> From: Willem De Bruijn >> Date: Thu, 30 May 2024 09:46:46 -0400 >> >>> Alexander Lobakin wrote: >>>> Currently, idpf uses the following model for the header buff

[Intel-wired-lan] [PATCH iwl-next v2 00/14] idpf: XDP chapter I: convert Rx to libeth

2024-06-20 Thread Alexander Lobakin
nt DMA uses on hotpath, uses napi_build_skb() instead of in-place short skb allocation. Most idpf patches, except for the queue split, removes more lines than adds. Expect far better memory utilization and +5-8% on Rx depending on the case (+17% on skb XDP_DROP :>). Alexander Lobakin (

[Intel-wired-lan] [PATCH iwl-next v2 01/14] cache: add __cacheline_group_{begin, end}_aligned() (+ couple more)

2024-06-20 Thread Alexander Lobakin
E_BYTES`` instead of ``L1_CACHE_BYTES`` as the former also accounts L2, needed in some cases. Signed-off-by: Alexander Lobakin --- include/linux/cache.h | 59 +++ 1 file changed, 59 insertions(+) diff --git a/include/linux/cache.h b/include/linux/cache.

[Intel-wired-lan] [PATCH iwl-next v2 02/14] page_pool: use __cacheline_group_{begin, end}_aligned()

2024-06-20 Thread Alexander Lobakin
Instead of doing __cacheline_group_begin() __aligned(), use the new __cacheline_group_{begin,end}_aligned(), so that it will take care of the group alignment itself. Also replace open-coded `4 * sizeof(long)` in two places with a definition. Signed-off-by: Alexander Lobakin --- include/net

[Intel-wired-lan] [PATCH iwl-next v2 03/14] libeth: add cacheline / struct layout assertion helpers

2024-06-20 Thread Alexander Lobakin
possible, as the size can then be easily predicted. For the rest, make sure they don't cross the specified bound. Signed-off-by: Alexander Lobakin --- include/net/libeth/cache.h | 66 ++ 1 file changed, 66 insertions(+) create mode 100644 include/net/libeth/ca

[Intel-wired-lan] [PATCH iwl-next v2 04/14] idpf: stop using macros for accessing queue descriptors

2024-06-20 Thread Alexander Lobakin
Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf.h| 1 - .../net/ethernet/intel/idpf/idpf_lan_txrx.h | 2 + drivers/net/ethernet/intel/idpf/idpf_txrx.h | 47 ++- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 20 drivers/net/ethernet

[Intel-wired-lan] [PATCH iwl-next v2 06/14] idpf: avoid bloating &idpf_q_vector with big %NR_CPUS

2024-06-20 Thread Alexander Lobakin
masks and put &idpf_q_vector on a good diet. Also remove redundant pointer to the interrupt name from the structure. request_irq() saves it and free_irq() returns it on deinit, so that you can free the memory. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net

[Intel-wired-lan] [PATCH iwl-next v2 07/14] idpf: strictly assert cachelines of queue and queue vector structures

2024-06-20 Thread Alexander Lobakin
this gives up to 2% of perf bump on Rx. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 185 +--- 1 file changed, 118 insertions(+), 67 deletions(-) diff --git a/drivers/net/ethernet/intel

intel-wired-lan@osuosl.org

2024-06-20 Thread Alexander Lobakin
ng is the same, just call either idpf_tx_splitq_frame() or idpf_tx_singleq_frame() depending on the active model to actually map and send the skb. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 9 ++

[Intel-wired-lan] [PATCH iwl-next v2 09/14] idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ

2024-06-20 Thread Alexander Lobakin
y: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/Kconfig| 13 + drivers/net/ethernet/intel/idpf/Kconfig | 27 +++ drivers/net/ethernet/intel/idpf/Makefile | 3 ++- drivers/net/ethernet/intel/idpf/idpf.h| 3 ++- d

[Intel-wired-lan] [PATCH iwl-next v2 10/14] idpf: reuse libeth's definitions of parsed ptype structures

2024-06-20 Thread Alexander Lobakin
in &idpf_rx_queue. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 + drivers/net/ethernet/intel/idpf/idpf.h| 2 +- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 88 +---

[Intel-wired-lan] [PATCH iwl-next v2 11/14] idpf: remove legacy Page Pool Ethtool stats

2024-06-20 Thread Alexander Lobakin
TATS unconditionally, while the latter is often turned off for better performance. Remove all the references to PP stats from the Ethtool code. The stats are still available in their full via the generic Netlink interface. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lob

[Intel-wired-lan] [PATCH iwl-next v2 12/14] libeth: support different types of buffers for Rx

2024-06-20 Thread Alexander Lobakin
accordingly. All the HW-related details like buffer alignment are still accounted. For the header buffers, pick 256 bytes as in most places in the kernel (have you ever seen frames with bigger headers?). Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- include/net/libeth/rx.h

[Intel-wired-lan] [PATCH iwl-next v2 13/14] idpf: convert header split mode to libeth + napi_build_skb()

2024-06-20 Thread Alexander Lobakin
more from the data buffer later. This W/A will hopefully be removed one day. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf_txrx.h | 52 ++-- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 1 + drivers/net/ethernet/intel/idpf/idpf_txrx.c | 253 -

[Intel-wired-lan] [PATCH iwl-next v2 14/14] idpf: use libeth Rx buffer management for payload buffer

2024-06-20 Thread Alexander Lobakin
nly after 4 HW writes rather than two. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 - drivers/net/ethernet/intel/idpf/idpf.h| 2 - drivers/net/ethernet/intel/idpf/idpf_txrx.h | 86 +-- .../ethernet/intel/idpf/idpf_singleq_txrx.c | 27 +-

[Intel-wired-lan] [PATCH iwl-next v2 05/14] idpf: split &idpf_queue into 4 strictly-typed queue structures

2024-06-20 Thread Alexander Lobakin
ame as Rx). This HT is used only for OOO completions, which aren't really hotpath anyway. Note that this change must be done atomically, otherwise it's really easy to get lost and miss something. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/idpf.h| 3 +-

Re: [Intel-wired-lan] [RFC net-next 5/9] ice: apply XDP offloading fixup when building skb

2024-06-21 Thread Alexander Lobakin
From: Yan Zhai Date: Thu, 20 Jun 2024 15:19:22 -0700 > Add a common point to transfer offloading info from XDP context to skb. > > Signed-off-by: Yan Zhai > Signed-off-by: Jesper Dangaard Brouer > --- > drivers/net/ethernet/intel/ice/ice_txrx.c | 2 ++ > drivers/net/ethernet/intel/ice/ice_xsk

Re: [Intel-wired-lan] [PATCH iwl-next v7 09/12] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors

2024-06-21 Thread Alexander Lobakin
From: Alexander Lobakin Date: Wed, 12 Jun 2024 14:33:17 +0200 > From: Jacob Keller > Date: Tue, 11 Jun 2024 13:52:57 -0700 > >> >> >> On 6/11/2024 4:47 AM, Alexander Lobakin wrote: >>> From: Mateusz Polchlopek >>> Date: Tue, 4 Jun 20

Re: [Intel-wired-lan] [PATCH iwl-next v2 01/14] cache: add __cacheline_group_{begin, end}_aligned() (+ couple more)

2024-06-25 Thread Alexander Lobakin
From: Przemek Kitszel Date: Thu, 20 Jun 2024 17:15:53 +0200 > On 6/20/24 15:53, Alexander Lobakin wrote: >> __cacheline_group_begin(), unfortunately, doesn't align the group >> anyhow. If it is wanted, then you need to do something like >> >> __cacheline_

[Intel-wired-lan] [PATCH iwl-net 0/3] idpf: fix 3 bugs revealed by the Chapter I

2024-07-24 Thread Alexander Lobakin
after the conversion is applied anyway. Alexander Lobakin (2): idpf: fix memory leaks and crashes while performing a soft reset idpf: fix UAFs when destroying the queues Michal Kubiak (1): idpf: fix memleak in vport interrupt configuration drivers/net/ethernet/intel/idpf/idpf_lib.c | 48

[Intel-wired-lan] [PATCH iwl-net 1/3] idpf: fix memory leaks and crashes while performing a soft reset

2024-07-24 Thread Alexander Lobakin
e number and reopen the interface on rollback - that solves limbo states when the device is left disabled and/or without HW queues enabled. Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks") Fixes: e4891e4687c8 ("idpf: split &idpf_queue into 4 strictly-typed queue str

[Intel-wired-lan] [PATCH iwl-net 2/3] idpf: fix memleak in vport interrupt configuration

2024-07-24 Thread Alexander Lobakin
base name separately, considering that the function 2) is never called out of idpf_vport_intr_init() context. Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport") Cc: sta...@vger.kernel.org # 6.7 Signed-off-by: Michal Kubiak Reviewed-by: Pavan Kumar Linga Signed-off-b

[Intel-wired-lan] [PATCH iwl-net 3/3] idpf: fix UAFs when destroying the queues

2024-07-24 Thread Alexander Lobakin
the queues (+ both are freed within one function, so it's not clear why nullify the pointers at all). Fixes: 1c325aac10a8 ("idpf: configure resources for TX queues") Fixes: 90912f9f4f2d ("idpf: convert header split mode to libeth + napi_build_skb()") Reported-by: Mich

Re: [Intel-wired-lan] [PATCH v3 iwl-next 1/4] ice: Implement PTP support for E830 devices

2024-07-26 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 25 Jul 2024 11:34:48 +0200 > From: Michal Michalik > > Add specific functions and definitions for E830 devices to enable > PTP support. > Introduce new PHY model ICE_PHY_E830. > E830 devices support direct write to GLTSYN_ registers without shadow > registers a

Re: [Intel-wired-lan] [PATCH v3 iwl-next 2/4] ice: Process TSYN IRQ in a separate function

2024-07-26 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 25 Jul 2024 11:34:49 +0200 > Simplify TSYN IRQ processing by moving it to a separate function and > having appropriate behavior per PHY model, instead of multiple > conditions not related to HW, but to specific timestamping modes. > > Reviewed-by: Przemek Kitsze

Re: [Intel-wired-lan] [PATCH v3 iwl-next 3/4] ice: Add timestamp ready bitmap for E830 products

2024-07-26 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 25 Jul 2024 11:34:50 +0200 > E830 PHY supports timestamp ready bitmap. > Enable the bitmap by refactoring tx init function. > > Reviewed-by: Przemek Kitszel > Signed-off-by: Karol Kolacinski [...] > @@ -987,24 +965,25 @@ ice_ptp_init_tx_e82x(struct ice_pf *p

Re: [Intel-wired-lan] [PATCH v3 iwl-next 4/4] ice: combine cross timestamp functions for E82x and E830

2024-07-26 Thread Alexander Lobakin
From: Karol Kolacinski Date: Thu, 25 Jul 2024 11:34:51 +0200 > From: Jacob Keller > > The E830 and E82x devices use essentially the same logic for performing > a crosstimestamp. The only difference is that E830 hardware has > different offsets. Instead of having two implementations, combine the

Re: [Intel-wired-lan] [PATCH iwl-net 1/3] idpf: fix memory leaks and crashes while performing a soft reset

2024-07-29 Thread Alexander Lobakin
From: Simon Horman Date: Fri, 26 Jul 2024 17:09:54 +0100 > On Wed, Jul 24, 2024 at 03:40:22PM +0200, Alexander Lobakin wrote: >> The second tagged commit introduced a UAF, as it removed restoring >> q_vector->vport pointers after reinitializating the structures. >> This

Re: [Intel-wired-lan] [PATCH iwl-next v8 00/14] Add support for Rx timestamping for both ice and iavf drivers.

2024-07-30 Thread Alexander Lobakin
From: Mateusz Polchlopek Date: Tue, 30 Jul 2024 05:14:55 -0400 > [PATCH iwl-next v8 00/14] Add support for Rx timestamping for both ice > and iavf drivers. Oops, please remove that period at the end of the sentence when sending next version. > Initially, during VF creation it registers the PTP

Re: [Intel-wired-lan] [PATCH iwl-next v8 02/14] ice: support Rx timestamp on flex descriptor

2024-07-30 Thread Alexander Lobakin
From: Mateusz Polchlopek Date: Tue, 30 Jul 2024 05:14:57 -0400 > From: Simei Su > > To support Rx timestamp offload, VIRTCHNL_OP_1588_PTP_CAPS is sent by > the VF to request PTP capability and responded by the PF what capability > is enabled for that VF. [...] > diff --git a/drivers/net/ether

Re: [Intel-wired-lan] [PATCH iwl-next v8 03/14] virtchnl: add enumeration for the rxdid format

2024-07-30 Thread Alexander Lobakin
From: Mateusz Polchlopek Date: Tue, 30 Jul 2024 05:14:58 -0400 > From: Jacob Keller > > Support for allowing VF to negotiate the descriptor format requires that > the VF specify which descriptor format to use when requesting Rx queues. > The VF is supposed to request the set of supported format

Re: [Intel-wired-lan] [PATCH iwl-next v8 04/14] iavf: add support for negotiating flexible RXDID format

2024-07-30 Thread Alexander Lobakin
From: Mateusz Polchlopek Date: Tue, 30 Jul 2024 05:14:59 -0400 > From: Jacob Keller > > Enable support for VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC, to enable the VF > driver the ability to determine what Rx descriptor formats are > available. This requires sending an additional message during > initia

  1   2   3   4   5   >