History

Merge branch 'netkit-support-for-io_uring-zero-copy-and-af_xdp'

Daniel Borkmann says: ==================== netkit: Support for io_uring zero-copy and AF_XDP Containers use virtual netdevs to route traffic from a physical netdev in the host namespace. They do not have access to the physical netdev in the host and thus can't use memory providers or AF_XDP that require reconfiguring/restarting queues in the physical netdev. This patchset adds the concept of queue leasing to virtual netdevs that allow containers to use memory providers and AF_XDP at native speed. Leased queues are bound to a real queue in a physical netdev and act as a proxy. Memory providers and AF_XDP operations take an ifindex and queue id, so containers would pass in an ifindex for a virtual netdev and a queue id of a leased queue, which then gets proxied to the underlying real queue. We have implemented support for this concept in netkit and tested the latter against Nvidia ConnectX-6 (mlx5) as well as Broadcom BCM957504 (bnxt_en) 100G NICs. For more details see the individual patches. ====================

Jakub Kicinski committed 7 months ago

Commit 15089222 parents b6e39e4 65d657d26 files · +2558 −165Browse files

Showing the changes to include/uapi (2 of 26 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/if_link.h +6 −0
  2. include/uapi/linux/netdev.h +11 −0
include/uapi/linux/if_link.h+6−0
@@ -1296,6 +1296,11 @@ enum netkit_mode { · 1295 unmodified lines
12961296 NETKIT_L3,
12971297 };
12981298
1299+enum netkit_pairing {
1300+ NETKIT_DEVICE_PAIR,
1301+ NETKIT_DEVICE_SINGLE,
1302+};
1303+
12991304 /* NETKIT_SCRUB_NONE leaves clearing skb->{mark,priority} up to
13001305 * the BPF program if attached. This also means the latter can
13011306 * consume the two fields if they were populated earlier.
@@ -1320,6 +1325,7 @@ enum { · 18 unmodified lines
13201325 IFLA_NETKIT_PEER_SCRUB,
13211326 IFLA_NETKIT_HEADROOM,
13221327 IFLA_NETKIT_TAILROOM,
1328+ IFLA_NETKIT_PAIRING,
13231329 __IFLA_NETKIT_MAX,
13241330 };
13251331 #define IFLA_NETKIT_MAX (__IFLA_NETKIT_MAX - 1)
include/uapi/linux/netdev.h+11−0
@@ -160,6 +160,7 @@ enum { · 159 unmodified lines
160160 NETDEV_A_QUEUE_DMABUF,
161161 NETDEV_A_QUEUE_IO_URING,
162162 NETDEV_A_QUEUE_XSK,
163+ NETDEV_A_QUEUE_LEASE,
163164
164165 __NETDEV_A_QUEUE_MAX,
165166 NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1)
@@ -202,6 +203,15 @@ enum { · 36 unmodified lines
202203 NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1)
203204 };
204205
206+enum {
207+ NETDEV_A_LEASE_IFINDEX = 1,
208+ NETDEV_A_LEASE_QUEUE,
209+ NETDEV_A_LEASE_NETNS_ID,
210+
211+ __NETDEV_A_LEASE_MAX,
212+ NETDEV_A_LEASE_MAX = (__NETDEV_A_LEASE_MAX - 1)
213+};
214+
205215 enum {
206216 NETDEV_A_DMABUF_IFINDEX = 1,
207217 NETDEV_A_DMABUF_QUEUES,
@@ -228,6 +238,7 @@ enum { · 20 unmodified lines
228238 NETDEV_CMD_BIND_RX,
229239 NETDEV_CMD_NAPI_SET,
230240 NETDEV_CMD_BIND_TX,
241+ NETDEV_CMD_QUEUE_CREATE,
231242
232243 __NETDEV_CMD_MAX,
233244 NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1)