Re: [Intel-wired-lan] [PATCH iwl-net 2/2] i40e: take into account XDP Tx queues when stopping rings

2024-02-01 Thread Seth Forshee
On Thu, Feb 01, 2024 at 04:42:19PM +0100, Maciej Fijalkowski wrote: > Seth reported that on his side XDP traffic can not survive a round of > down/up against i40e interface. Dmesg output was telling us that we were > not able to disable the very first XDP ring. That was due to the fact > that in i4

Re: [Intel-wired-lan] [PATCH net] ice: fix unaligned access in ice_create_lag_recipe

2024-02-01 Thread Michal Schmidt
On 1/31/24 17:59, Alexander Lobakin wrote: From: Jiri Pirko Date: Wed, 31 Jan 2024 13:17:44 +0100 Wed, Jan 31, 2024 at 12:58:23PM CET, mschm...@redhat.com wrote: diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c index 2a25323105e5..d4848f6fe919

Re: [Intel-wired-lan] [REGRESSION] Intel ICE Ethernet driver in linux >= 6.6.9 triggers extra memory consumption and cause continous kswapd* usage and continuous swapping

2024-02-01 Thread Jaroslav Pulchart
> > On Wed, 24 Jan 2024 15:29:38 +0100 Linux regression tracking (Thorsten > Leemhuis) wrote: > > >> I think that's a bad bisect. There is no reason I could understand for > > >> that change to cause a continuous or large leak, it really doesn't make > > >> any sense. Reverting it consistently help

Re: [Intel-wired-lan] [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read, write}()

2024-02-01 Thread Alexander Potapenko
On Thu, Feb 1, 2024 at 2:23 PM Arnd Bergmann wrote: > > On Thu, Feb 1, 2024, at 13:21, Alexander Lobakin wrote: > > From: Syed Nayyar Waris > > > > The two new functions allow reading/writing values of length up to > > BITS_PER_LONG bits at arbitrary position in the bitmap. > > > > The code was t

[Intel-wired-lan] [PATCH net-next v5 16/21] ip_tunnel: convert __be16 tunnel flags to bitmaps

2024-02-01 Thread Alexander Lobakin
Historically, tunnel flags like TUNNEL_CSUM or TUNNEL_ERSPAN_OPT have been defined as __be16. Now all of those 16 bits are occupied and there's no more free space for new flags. It can't be simply switched to a bigger container with no adjustments to the values, since it's an explicit Endian storag

Re: [Intel-wired-lan] [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read, write}()

2024-02-01 Thread Alexander Lobakin
From: Arnd Bergmann Date: Thu, 01 Feb 2024 14:23:33 +0100 > On Thu, Feb 1, 2024, at 13:21, Alexander Lobakin wrote: >> From: Syed Nayyar Waris >> >> The two new functions allow reading/writing values of length up to >> BITS_PER_LONG bits at arbitrary position in the bitmap. >> >> The code was ta

[Intel-wired-lan] [PATCH iwl-net 2/2] i40e: take into account XDP Tx queues when stopping rings

2024-02-01 Thread Maciej Fijalkowski
Seth reported that on his side XDP traffic can not survive a round of down/up against i40e interface. Dmesg output was telling us that we were not able to disable the very first XDP ring. That was due to the fact that in i40e_vsi_stop_rings() in a pre-work that is done before calling i40e_vsi_wait_

[Intel-wired-lan] [PATCH iwl-net 1/2] i40e: avoid double calling i40e_pf_rxq_wait()

2024-02-01 Thread Maciej Fijalkowski
Currently, when interface is being brought down and i40e_vsi_stop_rings() is called, i40e_pf_rxq_wait() is called two times, which is wrong. To showcase this scenario, simplified call stack looks as follows: i40e_vsi_stop_rings() i40e_control wait rx_q() i40e_control_rx_q()

[Intel-wired-lan] [PATCH iwl-net 0/2] i40e: disable XDP Tx queues on ifdown

2024-02-01 Thread Maciej Fijalkowski
Seth reported in [0] that he couldn't get traffic flowing again after a round of down/up of interface that i40e driver manages. While looking into fixing Tx disable timeout issue I also noticed that there is a doubled function call on Rx side which is fixed in patch 1. Thanks, Maciej [0]: https:

Re: [Intel-wired-lan] [REGRESSION] Intel ICE Ethernet driver in linux >= 6.6.9 triggers extra memory consumption and cause continous kswapd* usage and continuous swapping

2024-02-01 Thread Jakub Kicinski
On Wed, 24 Jan 2024 15:29:38 +0100 Linux regression tracking (Thorsten Leemhuis) wrote: > >> I think that's a bad bisect. There is no reason I could understand for > >> that change to cause a continuous or large leak, it really doesn't make > >> any sense. Reverting it consistently helps? You're no

Re: [Intel-wired-lan] [PATCH net-next v7 2/2] ice: Implement RSS settings for GTP using ethtool

2024-02-01 Thread Marcin Szycik
On 01.02.2024 04:33, Takeru Hayasaka wrote: > Following the addition of new GTP RSS hash options to ethtool.h, this patch > implements the corresponding RSS settings for GTP packets in the Intel ice > driver. It enables users to configure RSS for GTP-U and GTP-C traffic over > IPv4 > and IPv6,

Re: [Intel-wired-lan] [PATCH net-next v7 1/2] ethtool: Add GTP RSS hash options to ethtool.h

2024-02-01 Thread Marcin Szycik
On 01.02.2024 04:33, Takeru Hayasaka wrote: > This is a patch that enables RSS functionality for GTP packets using ethtool. > > A user can include TEID and make RSS work for GTP-U over IPv4 by doing the > following:`ethtool -N ens3 rx-flow-hash gtpu4 sde` > > In addition to gtpu(4|6), we now s

Re: [Intel-wired-lan] [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read, write}()

2024-02-01 Thread Arnd Bergmann
On Thu, Feb 1, 2024, at 14:45, Alexander Potapenko wrote: > On Thu, Feb 1, 2024 at 2:23 PM Arnd Bergmann wrote: >> On Thu, Feb 1, 2024, at 13:21, Alexander Lobakin wrote: >> >> As far as I can tell, the header ends up being included >> indirectly almost everywhere, so just parsing these functions

Re: [Intel-wired-lan] [PATCH iwl-next v2] igc: Add support for LEDs on i225/i226

2024-02-01 Thread Kurt Kanzenbach
On Thu Feb 01 2024, Andrew Lunn wrote: > On Thu, Feb 01, 2024 at 01:59:46PM +0100, Kurt Kanzenbach wrote: >> Add support for LEDs on i225/i226. The LEDs can be controlled via sysfs >> from user space using the netdev trigger. The LEDs are named as >> igc-- to be easily identified. >> >> Offloading

Re: [Intel-wired-lan] [PATCH iwl-next v2] igc: Add support for LEDs on i225/i226

2024-02-01 Thread Andrew Lunn
On Thu, Feb 01, 2024 at 01:59:46PM +0100, Kurt Kanzenbach wrote: > Add support for LEDs on i225/i226. The LEDs can be controlled via sysfs > from user space using the netdev trigger. The LEDs are named as > igc-- to be easily identified. > > Offloading link speed is supported. Other modes are simu

Re: [Intel-wired-lan] [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read, write}()

2024-02-01 Thread Arnd Bergmann
On Thu, Feb 1, 2024, at 13:21, Alexander Lobakin wrote: > From: Syed Nayyar Waris > > The two new functions allow reading/writing values of length up to > BITS_PER_LONG bits at arbitrary position in the bitmap. > > The code was taken from "bitops: Introduce the for_each_set_clump macro" > by Syed

[Intel-wired-lan] [PATCH iwl-next v2] igc: Add support for LEDs on i225/i226

2024-02-01 Thread Kurt Kanzenbach
Add support for LEDs on i225/i226. The LEDs can be controlled via sysfs from user space using the netdev trigger. The LEDs are named as igc-- to be easily identified. Offloading link speed is supported. Other modes are simulated in software by using on/off. Tested on Intel i225. Signed-off-by: Ku

[Intel-wired-lan] [PATCH net-next v5 21/21] ice: Add support for PFCP hardware offload in switchdev

2024-02-01 Thread Alexander Lobakin
From: Marcin Szycik Add support for creating PFCP filters in switchdev mode. Add support for parsing PFCP-specific tc options: S flag and SEID. To create a PFCP filter, a special netdev must be created and passed to tc command: ip link add pfcp0 type pfcp tc filter add dev eth0 ingress prio

[Intel-wired-lan] [PATCH net-next v5 20/21] ice: refactor ICE_TC_FLWR_FIELD_ENC_OPTS

2024-02-01 Thread Alexander Lobakin
From: Marcin Szycik FLOW_DISSECTOR_KEY_ENC_OPTS can be used for multiple headers, but currently it is treated as GTP-exclusive in ice. Rename ICE_TC_FLWR_FIELD_ENC_OPTS to ICE_TC_FLWR_FIELD_GTP_OPTS and check for tunnel type earlier. After this refactor, it is easier to add new headers using FLOW

[Intel-wired-lan] [PATCH net-next v5 19/21] pfcp: always set pfcp metadata

2024-02-01 Thread Alexander Lobakin
From: Michal Swiatkowski In PFCP receive path set metadata needed by flower code to do correct classification based on this metadata. Signed-off-by: Michal Swiatkowski Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Alexander Lobakin --- include/net/ip_tunnels.h

[Intel-wired-lan] [PATCH net-next v5 18/21] pfcp: add PFCP module

2024-02-01 Thread Alexander Lobakin
From: Wojciech Drewek Packet Forwarding Control Protocol (PFCP) is a 3GPP Protocol used between the control plane and the user plane function. It is specified in TS 29.244[1]. Note that this module is not designed to support this Protocol in the kernel space. There is no support for parsing any

[Intel-wired-lan] [PATCH net-next v5 17/21] lib/bitmap: add tests for IP tunnel flags conversion helpers

2024-02-01 Thread Alexander Lobakin
Now that there are helpers for converting IP tunnel flags between the old __be16 format and the bitmap format, make sure they work as expected by adding a couple of tests to the bitmap testing suite. The helpers are all inline, so no dependencies on the related CONFIG_* (or a standalone module) are

[Intel-wired-lan] [PATCH net-next v5 15/21] ip_tunnel: use a separate struct to store tunnel params in the kernel

2024-02-01 Thread Alexander Lobakin
Unlike IPv6 tunnels which use purely-kernel __ip6_tnl_parm structure to store params inside the kernel, IPv4 tunnel code uses the same ip_tunnel_parm which is being used to talk with the userspace. This makes it difficult to alter or add any fields or use a different format for whatever data. Defin

[Intel-wired-lan] [PATCH net-next v5 14/21] lib/bitmap: add compile-time test for __assign_bit() optimization

2024-02-01 Thread Alexander Lobakin
Commit dc34d5036692 ("lib: test_bitmap: add compile-time optimization/evaluations assertions") initially missed __assign_bit(), which led to that quite a time passed before I realized it doesn't get optimized at compilation time. Now that it does, add test for that just to make sure nothing will br

[Intel-wired-lan] [PATCH net-next v5 13/21] bitmap: make bitmap_{get, set}_value8() use bitmap_{read, write}()

2024-02-01 Thread Alexander Lobakin
Now that we have generic bitmap_read() and bitmap_write(), which are inline and try to take care of non-bound-crossing and aligned cases to keep them optimized, collapse bitmap_{get,set}_value8() into simple wrappers around the former ones. bloat-o-meter shows no difference in vmlinux and -2 bytes

[Intel-wired-lan] [PATCH net-next v5 12/21] bitmap: introduce generic optimized bitmap_size()

2024-02-01 Thread Alexander Lobakin
The number of times yet another open coded `BITS_TO_LONGS(nbits) * sizeof(long)` can be spotted is huge. Some generic helper is long overdue. Add one, bitmap_size(), but with one detail. BITS_TO_LONGS() uses DIV_ROUND_UP(). The latter works well when both divident and divisor are compile-time cons

[Intel-wired-lan] [PATCH net-next v5 11/21] tools: move alignment-related macros to new

2024-02-01 Thread Alexander Lobakin
Currently, tools have *ALIGN*() macros scattered across the unrelated headers, as there are only 3 of them and they were added separately each time on an as-needed basis. Anyway, let's make it more consistent with the kernel headers and allow using those macros outside of the mentioned headers. Cre

[Intel-wired-lan] [PATCH net-next v5 10/21] btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()

2024-02-01 Thread Alexander Lobakin
bitmap_set_bits() does not start with the FS' prefix and may collide with a new generic helper one day. It operates with the FS-specific types, so there's no change those two could do the same thing. Just add the prefix to exclude such possible conflict. Reviewed-by: Przemek Kitszel Acked-by: Dav

[Intel-wired-lan] [PATCH net-next v5 09/21] fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64()

2024-02-01 Thread Alexander Lobakin
bitmap_size() is a pretty generic name and one may want to use it for a generic bitmap API function. At the same time, its logic is NTFS-specific, as it aligns to the sizeof(u64), not the sizeof(long) (although it uses ideologically right ALIGN() instead of division). Add the prefix 'ntfs3_' used f

[Intel-wired-lan] [PATCH net-next v5 08/21] s390/cio: rename bitmap_size() -> idset_bitmap_size()

2024-02-01 Thread Alexander Lobakin
bitmap_size() is a pretty generic name and one may want to use it for a generic bitmap API function. At the same time, its logic is not "generic", i.e. it's not just `nbits -> size of bitmap in bytes` converter as it would be expected from its name. Add the prefix 'idset_' used throughout the file

[Intel-wired-lan] [PATCH net-next v5 07/21] linkmode: convert linkmode_{test, set, clear, mod}_bit() to macros

2024-02-01 Thread Alexander Lobakin
Since commit b03fc1173c0c ("bitops: let optimize out non-atomic bitops on compile-time constants"), the non-atomic bitops are macros which can be expanded by the compilers into compile-time expressions, which will result in better optimized object code. Unfortunately, turned out that passing `volat

[Intel-wired-lan] [PATCH net-next v5 06/21] bitops: let the compiler optimize {__, }assign_bit()

2024-02-01 Thread Alexander Lobakin
Since commit b03fc1173c0c ("bitops: let optimize out non-atomic bitops on compile-time constants"), the compilers are able to expand inline bitmap operations to compile-time initializers when possible. However, during the round of replacement if-__set-else-__clear with __assign_bit() as per Andy's

[Intel-wired-lan] [PATCH net-next v5 05/21] bitops: make BYTES_TO_BITS() treewide-available

2024-02-01 Thread Alexander Lobakin
Avoid open-coding that simple expression each time by moving BYTES_TO_BITS() from the probes code to to export it to the rest of the kernel. Simplify the macro while at it. `BITS_PER_LONG / sizeof(long)` always equals to %BITS_PER_BYTE, regardless of the target architecture. Do the same for the to

[Intel-wired-lan] [PATCH net-next v5 04/21] bitops: add missing prototype check

2024-02-01 Thread Alexander Lobakin
Commit 8238b4579866 ("wait_on_bit: add an acquire memory barrier") added a new bitop, test_bit_acquire(), with proper wrapping in order to try to optimize it at compile-time, but missed the list of bitops used for checking their prototypes a bit below. The functions added have consistent prototypes

[Intel-wired-lan] [PATCH net-next v5 03/21] lib/test_bitmap: use pr_info() for non-error messages

2024-02-01 Thread Alexander Lobakin
From: Alexander Potapenko pr_err() messages may be treated as errors by some log readers, so let us only use them for test failures. For non-error messages, replace them with pr_info(). Suggested-by: Alexander Lobakin Signed-off-by: Alexander Potapenko Acked-by: Yury Norov Signed-off-by: Alex

[Intel-wired-lan] [PATCH net-next v5 02/21] lib/test_bitmap: add tests for bitmap_{read, write}()

2024-02-01 Thread Alexander Lobakin
From: Alexander Potapenko Add basic tests ensuring that values can be added at arbitrary positions of the bitmap, including those spanning into the adjacent unsigned longs. Two new performance tests, test_bitmap_read_perf() and test_bitmap_write_perf(), can be used to assess future performance i

[Intel-wired-lan] [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read, write}()

2024-02-01 Thread Alexander Lobakin
From: Syed Nayyar Waris The two new functions allow reading/writing values of length up to BITS_PER_LONG bits at arbitrary position in the bitmap. The code was taken from "bitops: Introduce the for_each_set_clump macro" by Syed Nayyar Waris with a number of changes and simplifications: - instea

[Intel-wired-lan] [PATCH net-next v5 00/21] ice: add PFCP filter support

2024-02-01 Thread Alexander Lobakin
Add support for creating PFCP filters in switchdev mode. Add pfcp module that allows to create a PFCP-type netdev. The netdev then can be passed to tc when creating a filter to indicate that PFCP filter should be created. To add a PFCP filter, a special netdev must be created and passed to tc comm

Re: [Intel-wired-lan] [PATCH RESEND iwl-next 2/2] ice: Add switch recipe reusing feature

2024-02-01 Thread Simon Horman
On Tue, Jan 30, 2024 at 10:51:46AM +0800, Steven Zou wrote: > New E810 firmware supports the corresponding functionality, so the driver > allows PFs to subscribe the same switch recipes. Then when the PF is done > with a switch recipes, the PF can ask firmware to free that switch recipe. > > When

Re: [Intel-wired-lan] [PATCH] ice: Add get/set hw address for VF representor ports

2024-02-01 Thread Paul Menzel
Dear Jiri, Am 01.02.24 um 08:40 schrieb Jiri Pirko: Wed, Jan 31, 2024 at 05:15:46PM CET, pmen...@molgen.mpg.de wrote: […] Am 31.01.24 um 09:08 schrieb karthiksundaravel: Changing the mac address of the VF representor ports are not Do you mean “is not possible”? available via devlink. A