From: Tyler S <tylerjstachecki@gmail.com>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: alexander.duyck@gmail.com, anthony.l.nguyen@intel.com,
ast@kernel.org, bigeasy@linutronix.de, bpf@vger.kernel.org,
daniel@iogearbox.net, davem@davemloft.net, hawk@kernel.org,
ilias.apalodimas@linaro.org, intel-wired-lan@lists.osuosl.org,
jesse.brandeburg@intel.com, john.fastabend@gmail.com,
kuba@kernel.org, lorenzo@kernel.org, netdev@vger.kernel.org,
richardcochran@gmail.com, sven.auhagen@voleatech.de,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: Re: [PATCH net v2] igb: Fix XDP with PTP enabled
Date: Tue, 27 Apr 2021 19:11:32 -0400 [thread overview]
Message-ID: <CAMfj=-ZzOLog6NQvgpThSOy_5od_dY4KHd0uojxRxaWQA9kKJg@mail.gmail.com> (raw)
In-Reply-To: <871rax9loz.fsf@kurt>
On Mon, Apr 26, 2021 at 10:15 AM Kurt Kanzenbach <kurt@linutronix.de> wrote:
>
> On Sun Apr 25 2021, Tyler S wrote:
> > Thanks for this work; I was having trouble using XDP on my I354 NIC until this.
> >
> > Hopefully I have not err'd backporting it to 5.10 -- but I'm seeing
> > jumbo frames dropped after applying this (though as previously
> > mentioned, non-skb/full driver XDP programs do now work).
> >
> > Looking at the code, I'm not sure why that is.
>
> I'm also not sure, yet.
>
> Can you try with version 3 of this patch [1] and see if there are still
> issues with jumbo frames? Can you also share the backported patch for
> v5.10?
>
> Thanks,
> Kurt
>
> [1] - https://lkml.kernel.org/netdev/20210422052617.17267-1-kurt@linutronix.de/
Sorry, I didn't see v3. I can confirm that v3 fixes the issue I was
seeing with jumbo frames.
The only part of the patch that differs for 5.10 is the hunk I'll
include inline. Thanks again for your work!
Cheers,
Tyler
@@ -8720,11 +8716,22 @@ static int igb_clean_rx_irq(struct
igb_q_vector *q_vector, const int budget)
dma_rmb();
rx_buffer = igb_get_rx_buffer(rx_ring, size, &rx_buf_pgcnt);
+ pktbuf = page_address(rx_buffer->page) + rx_buffer->page_offset;
+
+ /* pull rx packet timestamp if available and valid */
+ if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
+ timestamp = igb_ptp_rx_pktstamp(rx_ring->q_vector,
+ pktbuf);
+
+ if (timestamp) {
+ pkt_offset += IGB_TS_HDR_LEN;
+ size -= IGB_TS_HDR_LEN;
+ }
+ }
/* retrieve a buffer from the ring */
if (!skb) {
- xdp.data = page_address(rx_buffer->page) +
- rx_buffer->page_offset;
+ xdp.data = pktbuf + pkt_offset;
xdp.data_meta = xdp.data;
xdp.data_hard_start = xdp.data -
igb_rx_offset(rx_ring);
next prev parent reply other threads:[~2021-04-27 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-25 23:09 [PATCH net v2] igb: Fix XDP with PTP enabled Tyler S
2021-04-26 14:15 ` Kurt Kanzenbach
2021-04-27 23:11 ` Tyler S [this message]
2021-05-03 7:31 ` Kurt Kanzenbach
-- strict thread matches above, loose matches on Subject: below --
2021-04-19 7:23 Kurt Kanzenbach
2021-04-20 16:33 ` Nguyen, Anthony L
2021-04-21 6:35 ` Kurt Kanzenbach
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='CAMfj=-ZzOLog6NQvgpThSOy_5od_dY4KHd0uojxRxaWQA9kKJg@mail.gmail.com' \
--to=tylerjstachecki@gmail.com \
--cc=alexander.duyck@gmail.com \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=lorenzo@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sven.auhagen@voleatech.de \
/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).