diff mbox series

[RFC,11/24] netdevice: added ndo for transmitting a packet from an XDP socket

Message ID 20180131135356.19134-12-bjorn.topel@gmail.com
State RFC, archived
Delegated to: David Miller
Headers show
Series Introducing AF_XDP support | expand

Commit Message

Björn Töpel Jan. 31, 2018, 1:53 p.m. UTC
From: Magnus Karlsson <magnus.karlsson@intel.com>

Only used when a zero copy allocator is used.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
---
 include/linux/netdevice.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a997649dd5cc..2b196fa8db6a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1178,6 +1178,9 @@  struct dev_ifalias {
  * int (*ndo_xdp_xmit)(struct net_device *dev, struct xdp_buff *xdp);
  *	This function is used to submit a XDP packet for transmit on a
  *	netdevice.
+ * int	(*ndo_xdp_xmit_xsk)(struct net_device *dev, u32 queue_id);
+ *      This function is used to transmit a packet from an XDP socket
+ *      when a zero copy allocator is used.
  * void (*ndo_xdp_flush)(struct net_device *dev);
  *	This function is used to inform the driver to flush a particular
  *	xdp tx queue. Must be called on same CPU as xdp_xmit.
@@ -1367,6 +1370,8 @@  struct net_device_ops {
 					   struct netdev_bpf *bpf);
 	int			(*ndo_xdp_xmit)(struct net_device *dev,
 						struct xdp_buff *xdp);
+	int			(*ndo_xdp_xmit_xsk)(struct net_device *dev,
+						    u32 queue_id);
 	void			(*ndo_xdp_flush)(struct net_device *dev);
 };