BPF List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: Heng Qi <henqqi@linux.alibaba.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	bpf@vger.kernel.org
Subject: Re: [PATCH net-next 0/2] veth: a couple of fixes
Date: Fri, 18 Nov 2022 09:41:05 +0100	[thread overview]
Message-ID: <edc73e5d5cdb06460aea9931a6c644daa409da48.camel@redhat.com> (raw)
In-Reply-To: <cover.1668727939.git.pabeni@redhat.com>

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").

That 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?

Side notes:
- Heng Qi address is bouncing 
- the existing veth self-tests would have caught the bug addressed
here, if commit afef88e65554 ("selftests/bpf: Store BPF object files
with .bpf.o extension") would not have broken them meanwhile :(

/P


  parent reply	other threads:[~2022-11-18  8:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 23:33 [PATCH net-next 0/2] veth: a couple of fixes Paolo Abeni
2022-11-17 23:33 ` [PATCH net-next 1/2] veth: fix uninitialized napi disable Paolo Abeni
2022-11-17 23:33 ` [PATCH net-next 2/2] veth: fix double napi enable Paolo Abeni
2022-11-18 14:24   ` Heng Qi
2022-11-18  8:41 ` Paolo Abeni [this message]
2022-11-18 11:05   ` [PATCH net-next 0/2] veth: a couple of fixes Toke Høiland-Jørgensen
2022-11-19  1:06     ` Jakub Kicinski
2022-11-21  6:15       ` John Fastabend
2022-11-21  3:33   ` Xuan Zhuo
2022-11-21  3:55     ` Heng Qi
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
2022-11-21 11:28           ` [PATCH 1/2] Revert "bpf: veth driver panics when xdp prog attached before veth_open" Heng Qi
2022-11-21 11:28           ` [PATCH 2/2] Revert "veth: Avoid drop packets when xdp_redirect performs" Heng Qi

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=edc73e5d5cdb06460aea9931a6c644daa409da48.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=henqqi@linux.alibaba.com \
    --cc=netdev@vger.kernel.org \
    --cc=xuanzhuo@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox