Re: [Intel-wired-lan] [RFC net-next 0/6] Cleanup IRQ affinity checks in several drivers

2024-08-19 Thread Shay Drori
On 15/08/2024 13:22, Joe Damato wrote: External email: Use caution opening links or attachments On Wed, Aug 14, 2024 at 05:20:46PM -0700, Jakub Kicinski wrote: On Wed, 14 Aug 2024 19:01:40 +0100 Joe Damato wrote: If it is, then the only option is to have the drivers pass in their IRQ affin

Re: [Intel-wired-lan] [PATCH net-next] igbvf: Remove two unused declarations

2024-08-19 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 16 Aug 2024 18:16:38 +0800 you wrote: > There is no caller and implementations in tree. > > Signed-off-by: Yue Haibing > --- > drivers/net/ethernet/intel/igbvf/igbvf.h | 1 - > drivers/net/ethernet/intel/ig

Re: [Intel-wired-lan] [PATCH iwl-next v3] ice: add E830 HW VF mailbox message limit support

2024-08-19 Thread Greenwalt, Paul
On 8/15/2024 12:58 AM, Paul Menzel wrote: > Dear Paul, > > > Thank you for the patch. > > Am 13.08.24 um 00:15 schrieb Paul Greenwalt: >> E830 adds hardware support to prevent the VF from overflowing the PF >> mailbox with VIRTCHNL messages. E830 will use the hardware feature >> (ICE_F_MBX_LI

Re: [Intel-wired-lan] [PATCH iwl-next v6 4/6] igb: Introduce XSK data structures and helpers

2024-08-19 Thread Sriram Yagnaraman
> -Original Message- > From: Maciej Fijalkowski > Sent: Monday, 19 August 2024 16:11 > To: Kurt Kanzenbach > Cc: Tony Nguyen ; Przemek Kitszel > ; David S. Miller ; > Eric Dumazet ; Jakub Kicinski ; > Paolo Abeni ; Alexei Starovoitov ; > Daniel Borkmann ; Jesper Dangaard Brouer > ; John

Re: [Intel-wired-lan] ACPI IRQ storm with 6.10

2024-08-19 Thread Bjorn Helgaas
On Mon, Aug 19, 2024 at 07:23:42AM +0200, Jiri Slaby wrote: > On 19. 08. 24, 6:50, Jiri Slaby wrote: > > CC e1000e guys + Jesse (due to 75a3f93b5383) + Bjorn (due to b2c289415b2b) > > Bjorn, > > I am confused by these changes: > == > @@ -291,16 +288,13 @@ s

Re: [Intel-wired-lan] [PATCH iwl-next v6 6/6] igb: Add AF_XDP zero-copy Tx support

2024-08-19 Thread Maciej Fijalkowski
On Fri, Aug 16, 2024 at 11:24:05AM +0200, Kurt Kanzenbach wrote: > From: Sriram Yagnaraman > > Add support for AF_XDP zero-copy transmit path. > > A new TX buffer type IGB_TYPE_XSK is introduced to indicate that the Tx > frame was allocated from the xsk buff pool, so igb_clean_tx_ring() and > ig

Re: [Intel-wired-lan] [PATCH net-next v13 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-19 Thread Alexander Duyck
On Fri, Aug 16, 2024 at 4:55 AM Yunsheng Lin wrote: > > On 2024/8/15 23:00, Alexander Duyck wrote: > > On Wed, Aug 14, 2024 at 8:00 PM Yunsheng Lin wrote: > >> > >> On 2024/8/14 23:49, Alexander H Duyck wrote: > >>> On Thu, 2024-08-08 at 20:37 +0800, Yunsheng Lin wrote: > Currently the page_

Re: [Intel-wired-lan] ACPI IRQ storm with 6.10

2024-08-19 Thread Jiri Slaby
On 19. 08. 24, 6:50, Jiri Slaby wrote: CC e1000e guys + Jesse (due to 75a3f93b5383) + Bjorn (due to b2c289415b2b) Bjorn, I am confused by these changes: == @@ -291,16 +288,13 @@ static int e1000_set_link_ksettings(struct net_device *net dev, *

Re: [Intel-wired-lan] ACPI IRQ storm with 6.10

2024-08-19 Thread Jiri Slaby
CC e1000e guys + Jesse (due to 75a3f93b5383) + Bjorn (due to b2c289415b2b) On 17. 08. 24, 19:57, Petr Valenta wrote: Dne 16. 08. 24 v 20:29 Rafael J. Wysocki napsal(a): On Wed, Aug 14, 2024 at 8:48 AM Jiri Slaby wrote: On 14. 08. 24, 7:22, Jiri Slaby wrote: Hi, one openSUSE's user report

Re: [Intel-wired-lan] [PATCH iwl-next v6 5/6] igb: Add AF_XDP zero-copy Rx support

2024-08-19 Thread Maciej Fijalkowski
On Fri, Aug 16, 2024 at 11:24:04AM +0200, Kurt Kanzenbach wrote: > From: Sriram Yagnaraman > > Add support for AF_XDP zero-copy receive path. > > When AF_XDP zero-copy is enabled, the rx buffers are allocated from the > xsk buff pool using igb_alloc_rx_buffers_zc(). > > Use xsk_pool_get_rx_fram

Re: [Intel-wired-lan] [PATCH iwl-next v6 4/6] igb: Introduce XSK data structures and helpers

2024-08-19 Thread Kurt Kanzenbach
On Mon Aug 19 2024, Maciej Fijalkowski wrote: > On Mon, Aug 19, 2024 at 03:41:20PM +0200, Kurt Kanzenbach wrote: >> On Mon Aug 19 2024, Maciej Fijalkowski wrote: >> > On Fri, Aug 16, 2024 at 11:24:03AM +0200, Kurt Kanzenbach wrote: >> >> From: Sriram Yagnaraman >> >> >> >> Add the following ring

Re: [Intel-wired-lan] [PATCH iwl-next v6 2/6] igb: Remove static qualifiers

2024-08-19 Thread Kurt Kanzenbach
On Mon Aug 19 2024, Maciej Fijalkowski wrote: > On Fri, Aug 16, 2024 at 11:24:01AM +0200, Kurt Kanzenbach wrote: >> From: Sriram Yagnaraman >> >> Remove static qualifiers on the following functions to be able to call >> from XSK specific file that is added in the later patches: >> - igb_xdp_tx_qu

Re: [Intel-wired-lan] [PATCH iwl-next v6 1/6] igb: Always call igb_xdp_ring_update_tail() under Tx lock

2024-08-19 Thread Kurt Kanzenbach
On Mon Aug 19 2024, Maciej Fijalkowski wrote: > On Fri, Aug 16, 2024 at 11:24:00AM +0200, Kurt Kanzenbach wrote: >> From: Sriram Yagnaraman >> >> Always call igb_xdp_ring_update_tail() under __netif_tx_lock(), add a >> comment to indicate that. This is needed to share the same TX ring between >>

Re: [Intel-wired-lan] [PATCH iwl-next v6 4/6] igb: Introduce XSK data structures and helpers

2024-08-19 Thread Maciej Fijalkowski
On Mon, Aug 19, 2024 at 03:41:20PM +0200, Kurt Kanzenbach wrote: > On Mon Aug 19 2024, Maciej Fijalkowski wrote: > > On Fri, Aug 16, 2024 at 11:24:03AM +0200, Kurt Kanzenbach wrote: > >> From: Sriram Yagnaraman > >> > >> Add the following ring flag: > >> - IGB_RING_FLAG_TX_DISABLED (when xsk pool

Re: [Intel-wired-lan] [PATCH iwl-next v6 4/6] igb: Introduce XSK data structures and helpers

2024-08-19 Thread Kurt Kanzenbach
On Mon Aug 19 2024, Maciej Fijalkowski wrote: > On Fri, Aug 16, 2024 at 11:24:03AM +0200, Kurt Kanzenbach wrote: >> From: Sriram Yagnaraman >> >> Add the following ring flag: >> - IGB_RING_FLAG_TX_DISABLED (when xsk pool is being setup) >> >> Add a xdp_buff array for use with XSK receive batch A

Re: [Intel-wired-lan] [PATCH iwl-next v6 4/6] igb: Introduce XSK data structures and helpers

2024-08-19 Thread Maciej Fijalkowski
On Fri, Aug 16, 2024 at 11:24:03AM +0200, Kurt Kanzenbach wrote: > From: Sriram Yagnaraman > > Add the following ring flag: > - IGB_RING_FLAG_TX_DISABLED (when xsk pool is being setup) > > Add a xdp_buff array for use with XSK receive batch API, and a pointer > to xsk_pool in igb_adapter. > > A

Re: [Intel-wired-lan] [PATCH iwl-next v6 3/6] igb: Introduce igb_xdp_is_enabled()

2024-08-19 Thread Maciej Fijalkowski
On Fri, Aug 16, 2024 at 11:24:02AM +0200, Kurt Kanzenbach wrote: > From: Sriram Yagnaraman > > Introduce igb_xdp_is_enabled() to check if an XDP program is assigned to > the device. Use that wherever xdp_prog is read and evaluated. > > Signed-off-by: Sriram Yagnaraman > [Kurt: Split patches and

Re: [Intel-wired-lan] [PATCH iwl-next v6 2/6] igb: Remove static qualifiers

2024-08-19 Thread Maciej Fijalkowski
On Fri, Aug 16, 2024 at 11:24:01AM +0200, Kurt Kanzenbach wrote: > From: Sriram Yagnaraman > > Remove static qualifiers on the following functions to be able to call > from XSK specific file that is added in the later patches: > - igb_xdp_tx_queue_mapping() > - igb_xdp_ring_update_tail() > - igb_

Re: [Intel-wired-lan] [PATCH iwl-next v6 1/6] igb: Always call igb_xdp_ring_update_tail() under Tx lock

2024-08-19 Thread Maciej Fijalkowski
On Fri, Aug 16, 2024 at 11:24:00AM +0200, Kurt Kanzenbach wrote: > From: Sriram Yagnaraman > > Always call igb_xdp_ring_update_tail() under __netif_tx_lock(), add a > comment to indicate that. This is needed to share the same TX ring between > XDP, XSK and slow paths. Sorry for being a-hole here

[Intel-wired-lan] [PATCH iwl-net v3 6/6] ice: do not bring the VSI up, if it was down before the XDP setup

2024-08-19 Thread Larysa Zaremba
After XDP configuration is completed, we bring the interface up unconditionally, regardless of its state before the call to .ndo_bpf(). Preserve the information whether the interface had to be brought down and later bring it up only in such case. Fixes: efc2214b6047 ("ice: Add support for XDP") R

[Intel-wired-lan] [PATCH iwl-net v3 5/6] ice: remove ICE_CFG_BUSY locking from AF_XDP code

2024-08-19 Thread Larysa Zaremba
Locking used in ice_qp_ena() and ice_qp_dis() does pretty much nothing, because ICE_CFG_BUSY is a state flag that is supposed to be set in a PF state, not VSI one. Therefore it does not protect the queue pair from e.g. reset. Despite being useless, it still can deadlock the unfortunate functions t

[Intel-wired-lan] [PATCH iwl-net v3 3/6] ice: check for XDP rings instead of bpf program when unconfiguring

2024-08-19 Thread Larysa Zaremba
If VSI rebuild is pending, .ndo_bpf() can attach/detach the XDP program on VSI without applying new ring configuration. When unconfiguring the VSI, we can encounter the state in which there is an XDP program but no XDP rings to destroy or there will be XDP rings that need to be destroyed, but no XD

[Intel-wired-lan] [PATCH iwl-net v3 2/6] ice: protect XDP configuration with a mutex

2024-08-19 Thread Larysa Zaremba
The main threat to data consistency in ice_xdp() is a possible asynchronous PF reset. It can be triggered by a user or by TX timeout handler. XDP setup and PF reset code access the same resources in the following sections: * ice_vsi_close() in ice_prepare_for_reset() - already rtnl-locked * ice_vs

[Intel-wired-lan] [PATCH iwl-net v3 4/6] ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset

2024-08-19 Thread Larysa Zaremba
Consider the following scenario: .ndo_bpf() | ice_prepare_for_reset() | |___| rtnl_lock() | | ice_down() | |

[Intel-wired-lan] [PATCH iwl-net v3 1/6] ice: move netif_queue_set_napi to rtnl-protected sections

2024-08-19 Thread Larysa Zaremba
Currently, netif_queue_set_napi() is called from ice_vsi_rebuild() that is not rtnl-locked when called from the reset. This creates the need to take the rtnl_lock just for a single function and complicates the synchronization with .ndo_bpf. At the same time, there no actual need to fill napi-to-que

[Intel-wired-lan] [PATCH iwl-net v3 0/6] ice: fix synchronization between .ndo_bpf() and reset

2024-08-19 Thread Larysa Zaremba
PF reset can be triggered asynchronously, by tx_timeout or by a user. With some unfortunate timings both ice_vsi_rebuild() and .ndo_bpf will try to access and modify XDP rings at the same time, causing system crash. The first patch factors out rtnl-locked code from VSI rebuild code to avoid deadlo

[Intel-wired-lan] [iwl-next v1] ice: set correct dst VSI in only LAN filters

2024-08-19 Thread Michal Swiatkowski
The filters set that will reproduce the problem: $ tc filter add dev $VF0_PR ingress protocol arp prio 0 flower \ skip_sw dst_mac ff:ff:ff:ff:ff:ff action mirred egress \ redirect dev $PF0 $ tc filter add dev $VF0_PR ingress protocol arp prio 0 flower \ skip_sw dst_mac ff:ff

[Intel-wired-lan] [PATCH iwl-next v3] i40e: Add Energy Efficient Ethernet ability for X710 Base-T/KR/KX cards

2024-08-19 Thread Aleksandr Loktionov
Add "EEE: Enabled/Disabled" to dmesg for supported X710 Base-T/KR/KX cards. According to the IEEE standard report the EEE ability and and the EEE Link Partner ability. Use the kernel's 'ethtool_keee' structure and report EEE link modes. Example: dmesg | grep 'NIC Link is' ethtool --show-eee Befo

Re: [Intel-wired-lan] [PATCH iwl-net v3] ice: Add netif_device_attach/detach into PF reset flow

2024-08-19 Thread Przemek Kitszel
On 8/19/24 10:21, Dawid Osuchowski wrote: Ethtool callbacks can be executed while reset is in progress and try to access deleted resources, e.g. getting coalesce settings can result in a NULL pointer dereference seen below. Reproduction steps: Once the driver is fully initialized, trigger reset:

[Intel-wired-lan] [PATCH iwl-net v3] ice: Add netif_device_attach/detach into PF reset flow

2024-08-19 Thread Dawid Osuchowski
Ethtool callbacks can be executed while reset is in progress and try to access deleted resources, e.g. getting coalesce settings can result in a NULL pointer dereference seen below. Reproduction steps: Once the driver is fully initialized, trigger reset: # echo 1 > /sys/class/net//device/r

[Intel-wired-lan] [iwl-net v2] ice: use internal pf id instead of function number

2024-08-19 Thread Michal Swiatkowski
Use always the same pf id in devlink port number. When doing pass-through the PF to VM bus info func number can be any value. Fixes: 2ae0aa4758b0 ("ice: Move devlink port to PF/VF struct") Reviewed-by: Wojciech Drewek Suggested-by: Jiri Pirko Signed-off-by: Michal Swiatkowski --- v1 --> v2: ht