From: Magnus Karlsson <magnus.karlsson@intel.com>
To: magnus.karlsson@intel.com, bjorn.topel@intel.com, ast@kernel.org,
daniel@iogearbox.net, netdev@vger.kernel.org, brouer@redhat.com
Cc: bpf@vger.kernel.org, bruce.richardson@intel.com,
ciara.loftus@intel.com, jakub.kicinski@netronome.com,
xiaolong.ye@intel.com, qi.z.zhang@intel.com,
maximmi@mellanox.com, sridhar.samudrala@intel.com,
kevin.laatz@intel.com
Subject: [RFC bpf-next 4/7] netdevice: introduce busy-poll setsockopt for AF_XDP
Date: Thu, 2 May 2019 10:39:20 +0200 [thread overview]
Message-ID: <1556786363-28743-5-git-send-email-magnus.karlsson@intel.com> (raw)
In-Reply-To: <1556786363-28743-1-git-send-email-magnus.karlsson@intel.com>
This patch introduces a new setsockopt that enables busy-poll for XDP
sockets. It is called XDP_BUSY_POLL_BATCH_SIZE and takes batch size as
an argument. A value between 1 and NAPI_WEIGHT (64) will turn it on, 0
will turn it off and any other value will return an error. There is
also a corresponding getsockopt implementation.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
---
include/uapi/linux/if_xdp.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h
index caed8b1..be28a78 100644
--- a/include/uapi/linux/if_xdp.h
+++ b/include/uapi/linux/if_xdp.h
@@ -46,6 +46,7 @@ struct xdp_mmap_offsets {
#define XDP_UMEM_FILL_RING 5
#define XDP_UMEM_COMPLETION_RING 6
#define XDP_STATISTICS 7
+#define XDP_BUSY_POLL_BATCH_SIZE 8
struct xdp_umem_reg {
__u64 addr; /* Start of packet data area */
--
2.7.4
next prev parent reply other threads:[~2019-05-02 8:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 8:39 [RFC bpf-next 0/7] busy poll support for AF_XDP sockets Magnus Karlsson
2019-05-02 8:39 ` [RFC bpf-next 1/7] net: fs: make busy poll budget configurable in napi_busy_loop Magnus Karlsson
2019-05-02 8:39 ` [RFC bpf-next 2/7] net: i40e: ixgbe: tun: veth: virtio-net: centralize xdp_rxq_info and add napi id Magnus Karlsson
2019-05-02 8:39 ` Magnus Karlsson [this message]
2019-05-03 0:13 ` [RFC bpf-next 4/7] netdevice: introduce busy-poll setsockopt for AF_XDP Samudrala, Sridhar
2019-05-03 6:35 ` Magnus Karlsson
2019-05-02 8:39 ` [RFC bpf-next 5/7] net: add busy-poll support for XDP sockets Magnus Karlsson
2019-05-03 0:23 ` Samudrala, Sridhar
2019-05-02 8:39 ` [RFC bpf-next 6/7] libbpf: add busy-poll support to " Magnus Karlsson
2019-05-02 8:39 ` [RFC bpf-next 7/7] samples/bpf: add busy-poll support to xdpsock sample Magnus Karlsson
2019-05-24 2:51 ` Ye Xiaolong
2019-05-27 6:58 ` Magnus Karlsson
2019-05-06 16:31 ` [RFC bpf-next 0/7] busy poll support for AF_XDP sockets Alexei Starovoitov
2019-05-07 11:51 ` Magnus Karlsson
2019-05-07 18:24 ` Alexei Starovoitov
2019-05-08 12:10 ` Magnus Karlsson
2019-05-16 12:37 ` Magnus Karlsson
2019-05-16 23:50 ` Samudrala, Sridhar
2019-05-17 7:50 ` Magnus Karlsson
2019-05-17 18:20 ` Jakub Kicinski
2019-05-18 8:49 ` Magnus Karlsson
2019-05-13 20:42 ` Jonathan Lemon
2019-05-13 23:30 ` Samudrala, Sridhar
2019-05-14 7:53 ` Björn Töpel
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=1556786363-28743-5-git-send-email-magnus.karlsson@intel.com \
--to=magnus.karlsson@intel.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=ciara.loftus@intel.com \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--cc=kevin.laatz@intel.com \
--cc=maximmi@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=qi.z.zhang@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=xiaolong.ye@intel.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).