netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Revert "veth: Avoid drop packets when xdp_redirect performs" and its fix
@ 2022-11-22  3:50 Heng Qi
  2022-11-22  3:50 ` [PATCH 1/2] Revert "bpf: veth driver panics when xdp prog attached before veth_open" Heng Qi
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Heng Qi @ 2022-11-22  3:50 UTC (permalink / raw)
  To: netdev, bpf; +Cc: Paolo Abeni, Jakub Kicinski, Xuan Zhuo, John Fastabend, toke

This patch 2e0de6366ac16 enables napi of the peer veth automatically when the
veth loads the xdp, but it breaks down as reported by Paolo and John. So reverting
it and its fix, we will rework the patch and make it more robust based on comments.

Heng Qi (2):
  Revert "bpf: veth driver panics when xdp prog attached before
    veth_open"
  Revert "veth: Avoid drop packets when xdp_redirect performs"

 drivers/net/veth.c | 88 +++++++---------------------------------------
 1 file changed, 12 insertions(+), 76 deletions(-)

-- 
Previous discussion in
https://lore.kernel.org/all/ce5fe56b-bf1b-71c0-1e96-cff6fde40ff3@linux.alibaba.com/

2.19.1.6.gb485710b


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/2] veth: a couple of fixes
@ 2022-11-21 10:11 Paolo Abeni
  2022-11-21 11:28 ` [PATCH 0/2] Revert "veth: Avoid drop packets when xdp_redirect performs" and its fix Heng Qi
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Abeni @ 2022-11-21 10:11 UTC (permalink / raw)
  To: Heng Qi, Xuan Zhuo; +Cc: bpf, netdev, Jakub Kicinski, John Fastabend

On Mon, 2022-11-21 at 11:55 +0800, Heng Qi wrote:
> 在 2022/11/21 上午11:33, Xuan Zhuo 写道:
> > On Fri, 18 Nov 2022 09:41:05 +0100, Paolo Abeni <pabeni@redhat.com> wrote:
> > > On Fri, 2022-11-18 at 00:33 +0100, Paolo Abeni wrote:
> > > > Recent changes in the veth driver caused a few regressions
> > > > this series addresses a couple of them, causing oops.
> > > > 
> > > > Paolo Abeni (2):
> > > >    veth: fix uninitialized napi disable
> > > >    veth: fix double napi enable
> > > > 
> > > >   drivers/net/veth.c | 6 ++++--
> > > >   1 file changed, 4 insertions(+), 2 deletions(-)
> > > @Xuan Zhuo: another option would be reverting 2e0de6366ac1 ("veth:
> > > Avoid drop packets when xdp_redirect performs") and its follow-up
> > > 5e5dc33d5dac ("bpf: veth driver panics when xdp prog attached before
> > > veth_open").
> > >  option would be possibly safer, because I feel there are other
> > > issues with 2e0de6366ac1, and would offer the opportunity to refactor
> > > its logic a bit: the napi enable/disable condition is quite complex and
> > > not used consistently mixing and alternating the gro/xdp/peer xdp check
> > > with the napi ptr dereference.
> > > 
> > > Ideally it would be better to have an helper alike
> > > napi_should_be_enabled(), use it everywhere, and pair the new code with
> > > some selftests, extending the existing ones.
> > > 
> > > WDYT?
> > I take your point.
> 
> I'll rewrite a patch as soon as possible and resubmit it.

Could you please first send the revert?

Thanks!

Paolo


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-23  4:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22  3:50 [PATCH 0/2] Revert "veth: Avoid drop packets when xdp_redirect performs" and its fix Heng Qi
2022-11-22  3:50 ` [PATCH 1/2] Revert "bpf: veth driver panics when xdp prog attached before veth_open" Heng Qi
2022-11-22  3:50 ` [PATCH 2/2] Revert "veth: Avoid drop packets when xdp_redirect performs" Heng Qi
2022-11-22  4:35 ` [PATCH 0/2] Revert "veth: Avoid drop packets when xdp_redirect performs" and its fix Jakub Kicinski
2022-11-22  7:57   ` Heng Qi
2022-11-23  4:52 ` patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2022-11-21 10:11 [PATCH net-next 0/2] veth: a couple of fixes Paolo Abeni
2022-11-21 11:28 ` [PATCH 0/2] Revert "veth: Avoid drop packets when xdp_redirect performs" and its fix Heng Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).