From: "Björn Töpel" <bjorn.topel@intel.com>
To: William Tu <u9012063@gmail.com>,
Alexander Duyck <alexander.duyck@gmail.com>
Cc: Ilya Maximets <i.maximets@samsung.com>,
Netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Magnus Karlsson <magnus.karlsson@intel.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
Eelco Chaudron <echaudro@redhat.com>
Subject: Re: [PATCH net v3] ixgbe: fix double clean of tx descriptors with xdp
Date: Fri, 23 Aug 2019 08:10:25 +0200 [thread overview]
Message-ID: <217e90f5-206a-bb80-6699-f6dd750b57d9@intel.com> (raw)
In-Reply-To: <CALDO+SYhU4krmBO8d4hsDGm+BuUAR4qMv=WzVa=jAx27+g9KnA@mail.gmail.com>
On 2019-08-22 19:32, William Tu wrote:
> On Thu, Aug 22, 2019 at 10:21 AM Alexander Duyck
> <alexander.duyck@gmail.com> wrote:
>>
>> On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets <i.maximets@samsung.com> wrote:
>>>
>>> Tx code doesn't clear the descriptors' status after cleaning.
>>> So, if the budget is larger than number of used elems in a ring, some
>>> descriptors will be accounted twice and xsk_umem_complete_tx will move
>>> prod_tail far beyond the prod_head breaking the completion queue ring.
>>>
>>> Fix that by limiting the number of descriptors to clean by the number
>>> of used descriptors in the tx ring.
>>>
>>> 'ixgbe_clean_xdp_tx_irq()' function refactored to look more like
>>> 'ixgbe_xsk_clean_tx_ring()' since we're allowed to directly use
>>> 'next_to_clean' and 'next_to_use' indexes.
>>>
>>> Fixes: 8221c5eba8c1 ("ixgbe: add AF_XDP zero-copy Tx support")
>>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>>> ---
>>>
>>> Version 3:
>>> * Reverted some refactoring made for v2.
>>> * Eliminated 'budget' for tx clean.
>>> * prefetch returned.
>>>
>>> Version 2:
>>> * 'ixgbe_clean_xdp_tx_irq()' refactored to look more like
>>> 'ixgbe_xsk_clean_tx_ring()'.
>>>
>>> drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 29 ++++++++------------
>>> 1 file changed, 11 insertions(+), 18 deletions(-)
>>
>> Thanks for addressing my concerns.
>>
>> Acked-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> Thanks.
>
> Tested-by: William Tu <u9012063@gmail.com>
>
Will, thanks for testing! For this patch, did you notice any performance
degradation?
Cheers,
Björn
next prev parent reply other threads:[~2019-08-23 6:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190822171243eucas1p12213f2239d6c36be515dade41ed7470b@eucas1p1.samsung.com>
2019-08-22 17:12 ` [PATCH net v3] ixgbe: fix double clean of tx descriptors with xdp Ilya Maximets
2019-08-22 17:21 ` Alexander Duyck
2019-08-22 17:32 ` William Tu
2019-08-23 6:10 ` Björn Töpel [this message]
2019-08-23 13:19 ` William Tu
2019-08-23 12:10 ` Eelco Chaudron
2019-08-26 13:40 ` Maciej Fijalkowski
2019-08-27 11:00 ` Ilya Maximets
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=217e90f5-206a-bb80-6699-f6dd750b57d9@intel.com \
--to=bjorn.topel@intel.com \
--cc=alexander.duyck@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=echaudro@redhat.com \
--cc=i.maximets@samsung.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jakub.kicinski@netronome.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=u9012063@gmail.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;
as well as URLs for NNTP newsgroup(s).