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: <1556786363-28743-5-git-send-email-magnus.karlsson@intel.com>
Date:   Thu,  2 May 2019 10:39:20 +0200
From:   Magnus Karlsson <magnus.karlsson@...el.com>
To:     magnus.karlsson@...el.com, bjorn.topel@...el.com, ast@...nel.org,
        daniel@...earbox.net, netdev@...r.kernel.org, brouer@...hat.com
Cc:     bpf@...r.kernel.org, bruce.richardson@...el.com,
        ciara.loftus@...el.com, jakub.kicinski@...ronome.com,
        xiaolong.ye@...el.com, qi.z.zhang@...el.com, maximmi@...lanox.com,
        sridhar.samudrala@...el.com, kevin.laatz@...el.com
Subject: [RFC bpf-next 4/7] netdevice: introduce busy-poll setsockopt for AF_XDP

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ