From: Bowers, AndrewX <andrewx.bowers@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH v2] i40e: fix potential RX buffer starvation for AF_XDP
Date: Mon, 9 Sep 2019 21:19:17 +0000 [thread overview]
Message-ID: <f8652db1a7654dc6940cb0ebc194278a@intel.com> (raw)
In-Reply-To: <20190909165538.8125-1-jeffrey.t.kirsher@intel.com>
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Jeff Kirsher
> Sent: Monday, September 9, 2019 9:56 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Karlsson, Magnus <magnus.karlsson@intel.com>
> Subject: [Intel-wired-lan] [PATCH v2] i40e: fix potential RX buffer starvation
> for AF_XDP
>
> From: Magnus Karlsson <magnus.karlsson@intel.com>
>
> When the RX rings are created they are also populated with buffers so that
> packets can be received. Usually these are kernel buffers, but for AF_XDP in
> zero-copy mode, these are user-space buffers and in this case the
> application might not have sent down any buffers to the driver at this point.
> And if no buffers are allocated at ring creation time, no packets can be
> received and no interrupts will be generated so the NAPI poll function that
> allocates buffers to the rings will never get executed.
>
> To rectify this, we kick the NAPI context of any queue with an attached
> AF_XDP zero-copy socket in two places in the code. Once after an XDP
> program has loaded and once after the umem is registered.
> This take care of both cases: XDP program gets loaded first then AF_XDP
> socket is created, and the reverse, AF_XDP socket is created first, then XDP
> program is loaded.
>
> Fixes: 0a714186d3c0 ("i40e: add AF_XDP zero-copy Rx support")
> Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 5 +++++
> 1 file changed, 5 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
prev parent reply other threads:[~2019-09-09 21:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 16:55 [Intel-wired-lan] [PATCH v2] i40e: fix potential RX buffer starvation for AF_XDP Jeff Kirsher
2019-09-09 21:19 ` Bowers, AndrewX [this message]
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=f8652db1a7654dc6940cb0ebc194278a@intel.com \
--to=andrewx.bowers@intel.com \
--cc=intel-wired-lan@osuosl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.