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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  9 Jan 2021 13:49:49 +1100
From:   Charlie Somerville <charlie@...rlie.bz>
To:     davem@...emloft.net, kuba@...nel.org, mst@...hat.com,
        jasowang@...hat.com
Cc:     netdev@...r.kernel.org, Charlie Somerville <charlie@...rlie.bz>
Subject: [PATCH net-next 1/2] xdp: Add XDP_FLAGS_NO_TX flag

Some network interfaces must allocate additional hardware resources to
support XDP filters retransmitting packets with XDP_TX.

However not all XDP filters do use XDP_TX, and there may not be any
additional send queues available for use.

XDP filters can indicate that they will never transmit by setting the
XDP_FLAGS_NO_TX flag in the IFLA_XDP_FLAGS attribute. This flag is
only advisory - some network drivers may still allocate send queues.

Signed-off-by: Charlie Somerville <charlie@...rlie.bz>
---
 include/uapi/linux/if_link.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 874cc12a34d9..b4ba4427cd98 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -1168,11 +1168,14 @@ enum {
 #define XDP_FLAGS_DRV_MODE		(1U << 2)
 #define XDP_FLAGS_HW_MODE		(1U << 3)
 #define XDP_FLAGS_REPLACE		(1U << 4)
+#define XDP_FLAGS_NO_TX			(1U << 5)
 #define XDP_FLAGS_MODES			(XDP_FLAGS_SKB_MODE | \
 					 XDP_FLAGS_DRV_MODE | \
 					 XDP_FLAGS_HW_MODE)
 #define XDP_FLAGS_MASK			(XDP_FLAGS_UPDATE_IF_NOEXIST | \
-					 XDP_FLAGS_MODES | XDP_FLAGS_REPLACE)
+					 XDP_FLAGS_MODES | \
+					 XDP_FLAGS_REPLACE | \
+					 XDP_FLAGS_NO_TX)
 
 /* These are stored into IFLA_XDP_ATTACHED on dump. */
 enum {
-- 
2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ