lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMfj=-ZzOLog6NQvgpThSOy_5od_dY4KHd0uojxRxaWQA9kKJg@mail.gmail.com>
Date:   Tue, 27 Apr 2021 19:11:32 -0400
From:   Tyler S <tylerjstachecki@...il.com>
To:     Kurt Kanzenbach <kurt@...utronix.de>
Cc:     alexander.duyck@...il.com, anthony.l.nguyen@...el.com,
        ast@...nel.org, bigeasy@...utronix.de, bpf@...r.kernel.org,
        daniel@...earbox.net, davem@...emloft.net, hawk@...nel.org,
        ilias.apalodimas@...aro.org, intel-wired-lan@...ts.osuosl.org,
        jesse.brandeburg@...el.com, john.fastabend@...il.com,
        kuba@...nel.org, lorenzo@...nel.org, netdev@...r.kernel.org,
        richardcochran@...il.com, sven.auhagen@...eatech.de,
        Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Subject: Re: [PATCH net v2] igb: Fix XDP with PTP enabled

On Mon, Apr 26, 2021 at 10:15 AM Kurt Kanzenbach <kurt@...utronix.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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ