From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Magnus Karlsson <magnus.karlsson@gmail.com>
Cc: magnus.karlsson@intel.com, intel-wired-lan@lists.osuosl.org,
anthony.l.nguyen@intel.com, maciej.fijalkowski@intel.com,
netdev@vger.kernel.org, brouer@redhat.com
Subject: Re: [PATCH intel-net] i40e: fix broken XDP support
Date: Fri, 23 Apr 2021 13:04:27 +0200 [thread overview]
Message-ID: <20210423130427.1bbe4df2@carbon> (raw)
In-Reply-To: <20210423095955.15207-1-magnus.karlsson@gmail.com>
On Fri, 23 Apr 2021 11:59:55 +0200
Magnus Karlsson <magnus.karlsson@gmail.com> wrote:
> From: Magnus Karlsson <magnus.karlsson@intel.com>
>
> Commit 12738ac4754e ("i40e: Fix sparse errors in i40e_txrx.c") broke
> XDP support in the i40e driver. That commit was fixing a sparse error
> in the code by introducing a new variable xdp_res instead of
> overloading this into the skb pointer. The problem is that the code
> later uses the skb pointer in if statements and these where not
> extended to also test for the new xdp_res variable. Fix this by adding
> the correct tests for xdp_res in these places.
>
> Fixes: 12738ac4754e ("i40e: Fix sparse errors in i40e_txrx.c")
> Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
I also tested that i40e works on my system again.
Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz
Running XDP on dev:i40e2 (ifindex:8) action:XDP_DROP options:no_touch
XDP stats CPU pps issue-pps
XDP-RX CPU 4 33,670,895 0
XDP-RX CPU total 33,670,895
RXQ stats RXQ:CPU pps issue-pps
rx_queue_index 4:4 33,670,900 0
rx_queue_index 4:sum 33,670,900
Running XDP on dev:i40e2 (ifindex:8) action:XDP_DROP options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 4 31,424,994 0
XDP-RX CPU total 31,424,994
RXQ stats RXQ:CPU pps issue-pps
rx_queue_index 4:4 31,424,997 0
rx_queue_index 4:sum 31,424,997
Running XDP on dev:i40e2 (ifindex:8) action:XDP_TX options:swapmac
XDP stats CPU pps issue-pps
XDP-RX CPU 4 14,777,900 0
XDP-RX CPU total 14,777,900
RXQ stats RXQ:CPU pps issue-pps
rx_queue_index 4:4 14,777,893 0
rx_queue_index 4:sum 14,777,893
$ sudo ./xdp_redirect_map i40e2 i40e2
input: 8 output: 8
libbpf: elf: skipping unrecognized data section(24) .eh_frame
libbpf: elf: skipping relo section(25) .rel.eh_frame for section(24) .eh_frame
libbpf: Kernel error message: XDP program already attached
WARN: link set xdp fd failed on 8
ifindex 8: 8212980 pkt/s
ifindex 8: 11725145 pkt/s
ifindex 8: 11727939 pkt/s
ifindex 8: 11727640 pkt/s
ifindex 8: 11729593 pkt/s
--
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:[~2021-04-23 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 9:59 [PATCH intel-net] i40e: fix broken XDP support Magnus Karlsson
2021-04-23 11:04 ` Jesper Dangaard Brouer [this message]
2021-04-23 11:49 ` Maciej Fijalkowski
-- strict thread matches above, loose matches on Subject: below --
2021-04-26 11:14 Magnus Karlsson
2021-04-29 9:10 ` Jesper Dangaard Brouer
2021-04-29 16:15 ` Nguyen, Anthony L
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=20210423130427.1bbe4df2@carbon \
--to=brouer@redhat.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).