From: Jakub Kicinski <kuba@kernel.org>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: <intel-wired-lan@lists.osuosl.org>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<bpf@vger.kernel.org>, <magnus.karlsson@intel.com>,
Michal Kubiak <michal.kubiak@intel.com>
Subject: Re: [PATCH iwl-net 0/3] ice: fix synchronization between .ndo_bpf() and reset
Date: Thu, 13 Jun 2024 08:40:42 -0700 [thread overview]
Message-ID: <20240613084042.7db4c410@kernel.org> (raw)
In-Reply-To: <ZmsR8F9GFgxgBXfV@lzaremba-mobl.ger.corp.intel.com>
On Thu, 13 Jun 2024 17:36:16 +0200 Larysa Zaremba wrote:
> > > AFAIK, netif_device_detach() does not affect .ndo_bpf() calls. We were trying
> > > such approach with idpf and it does work for ethtool, but not for XDP.
> >
> > I reckon that's an unintentional omission. In theory XDP is "pure
> > software" but if the device is running driver will likely have to
> > touch HW to reconfigure. So, if you're willing, do send a ndo_bpf
> > patch to add a detached check.
>
> This does not seem that simple. In cases of program/pool detachment,
> .ndo_bpf() does not accept 'no' as an answer, so there is no easy existing way
> of handling !netif_device_present() either. And we have to notify the driver
> that pool/program is no longer needed no matter what. So what is left is somehow
> postpone pool/prog removal to after the netdev gets attached again.
I see, thanks for investigating!
WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
netdev@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Michal Kubiak <michal.kubiak@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
magnus.karlsson@intel.com, intel-wired-lan@lists.osuosl.org,
bpf@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 0/3] ice: fix synchronization between .ndo_bpf() and reset
Date: Thu, 13 Jun 2024 08:40:42 -0700 [thread overview]
Message-ID: <20240613084042.7db4c410@kernel.org> (raw)
In-Reply-To: <ZmsR8F9GFgxgBXfV@lzaremba-mobl.ger.corp.intel.com>
On Thu, 13 Jun 2024 17:36:16 +0200 Larysa Zaremba wrote:
> > > AFAIK, netif_device_detach() does not affect .ndo_bpf() calls. We were trying
> > > such approach with idpf and it does work for ethtool, but not for XDP.
> >
> > I reckon that's an unintentional omission. In theory XDP is "pure
> > software" but if the device is running driver will likely have to
> > touch HW to reconfigure. So, if you're willing, do send a ndo_bpf
> > patch to add a detached check.
>
> This does not seem that simple. In cases of program/pool detachment,
> .ndo_bpf() does not accept 'no' as an answer, so there is no easy existing way
> of handling !netif_device_present() either. And we have to notify the driver
> that pool/program is no longer needed no matter what. So what is left is somehow
> postpone pool/prog removal to after the netdev gets attached again.
I see, thanks for investigating!
next prev parent reply other threads:[~2024-06-13 15:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 15:37 [PATCH iwl-net 0/3] ice: fix synchronization between .ndo_bpf() and reset Larysa Zaremba
2024-06-10 15:37 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-10 15:37 ` [PATCH iwl-net 1/3] ice: synchronize XDP setup with reset Larysa Zaremba
2024-06-10 15:37 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-10 15:37 ` [PATCH iwl-net 2/3] ice: fix locking in ice_xsk_pool_setup() Larysa Zaremba
2024-06-10 15:37 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-10 15:37 ` [PATCH iwl-net 3/3] ice: make NAPI setting code aware that rtnl-locked request is waiting Larysa Zaremba
2024-06-10 15:37 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-12 2:38 ` [PATCH iwl-net 0/3] ice: fix synchronization between .ndo_bpf() and reset Jakub Kicinski
2024-06-12 2:38 ` [Intel-wired-lan] " Jakub Kicinski
2024-06-12 6:56 ` Larysa Zaremba
2024-06-12 6:56 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-12 21:09 ` Jakub Kicinski
2024-06-12 21:09 ` [Intel-wired-lan] " Jakub Kicinski
2024-06-13 8:54 ` Larysa Zaremba
2024-06-13 8:54 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-13 10:44 ` Przemek Kitszel
2024-06-13 10:44 ` Przemek Kitszel
2024-06-13 14:13 ` Jakub Kicinski
2024-06-13 14:13 ` [Intel-wired-lan] " Jakub Kicinski
2024-06-13 15:36 ` Larysa Zaremba
2024-06-13 15:36 ` [Intel-wired-lan] " Larysa Zaremba
2024-06-13 15:40 ` Jakub Kicinski [this message]
2024-06-13 15:40 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240613084042.7db4c410@kernel.org \
--to=kuba@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.fastabend@gmail.com \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.