From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Brandon Cazander <brandon.cazander@multapplied.net>,
"xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>,
David Miller <davem@davemloft.net>,
brouer@redhat.com
Subject: Re: xdpgeneric, XDP_PASS, and bpf_xdp_adjust_head decapsulation dropping packets
Date: Thu, 1 Aug 2019 18:05:16 +0200 [thread overview]
Message-ID: <20190801180512.163c471c@carbon> (raw)
In-Reply-To: <20190801165408.5cac9287@carbon>
On Thu, 1 Aug 2019 16:54:33 +0200
Jesper Dangaard Brouer <brouer@redhat.com> wrote:
> On Thu, 1 Aug 2019 10:18:49 +0200
> Jesper Dangaard Brouer <brouer@redhat.com> wrote:
>
> [...]
> > Cc. Stephen as this might be related to:
> > commit 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") (Author: Stephen Hemminger).
> >
> > On Wed, 31 Jul 2019 21:12:23 +0000 Brandon Cazander <brandon.cazander@multapplied.net> wrote:
> >
> > > I am having an issue with xdpgeneric specifically when using XDP_PASS after
> > > bpf_xdp_adjust_head to pop some headers off. My test environment is qemu using
> > > virtio_net specifically, but it also happens with e1000 in qemu/physical devices.
> > >
> > > On a real NIC (ixgbe), the same program is successfully passing decapsulated
> > > traffic, but fails in the same way when forcing xdpgeneric mode.
> >
> [...]
> > > Kernel is 5.2.2-1-debug, OS is openSUSE Tumbleweed 20190724.
> >
> > Can you test an earlier kernel, specifically before: commit
> > 458bf2f224f0 ("net: core: support XDP generic on stacked devices.")
> > (Author: Stephen Hemminger)
> >
> > $ git describe --contains 458bf2f224f04
> > v5.2-rc3~26^2~11^2
> >
> > I fear that this commit, which moved generic-XDP to a later call point,
> > might cause this. Because it could be that the SKB network_header
> > update, is now done before calling XDP program (... still looking at
> > code details).
>
> I now have a reproducer myself, and I can confirm that this commit
> 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") is
> the issue... reverting it fixes the problem. (I don't have a fix yet)
I do have a fix now... It was a matter of calling skb_reset_network_header()
which will fix the issue with ip_hdr(skb) as I suspect was wrong (as
explained earlier).
I wonder if we also need to call skb_reset_transport_header(skb) ?
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2019-08-01 16:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 21:12 xdpgeneric, XDP_PASS, and bpf_xdp_adjust_head decapsulation dropping packets Brandon Cazander
2019-08-01 8:18 ` Jesper Dangaard Brouer
2019-08-01 14:54 ` Jesper Dangaard Brouer
2019-08-01 16:05 ` Jesper Dangaard Brouer [this message]
2019-08-01 17:33 ` Brandon Cazander
2019-08-01 18:16 ` Jesper Dangaard Brouer
2019-08-01 18:53 ` Brandon Cazander
2019-08-01 18:00 ` [net v1 PATCH 0/4] net: fix regressions for generic-XDP Jesper Dangaard Brouer
2019-08-01 18:00 ` [net v1 PATCH 1/4] bpf: fix XDP vlan selftests test_xdp_vlan.sh Jesper Dangaard Brouer
2019-08-01 18:00 ` [net v1 PATCH 2/4] selftests/bpf: add wrapper scripts for test_xdp_vlan.sh Jesper Dangaard Brouer
2019-08-01 18:00 ` [net v1 PATCH 3/4] selftests/bpf: reduce time to execute test_xdp_vlan.sh Jesper Dangaard Brouer
2019-08-01 18:00 ` [net v1 PATCH 4/4] net: fix bpf_xdp_adjust_head regression for generic-XDP Jesper Dangaard Brouer
2019-08-02 0:44 ` Jakub Kicinski
2019-08-02 7:53 ` Jesper Dangaard Brouer
2019-08-02 17:08 ` Jakub Kicinski
2019-08-05 18:19 ` [net v1 PATCH 0/4] net: fix regressions " David Miller
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=20190801180512.163c471c@carbon \
--to=brouer@redhat.com \
--cc=brandon.cazander@multapplied.net \
--cc=davem@davemloft.net \
--cc=stephen@networkplumber.org \
--cc=xdp-newbies@vger.kernel.org \
/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