Commit 788f87ac authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

xdp: export the DEV_MAP_BULK_SIZE macro

Export the DEV_MAP_BULK_SIZE macro to the header file so that drivers
can directly use it as the maximum number of xdp_frames received in the
.ndo_xdp_xmit() callback.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 493f3cc7
...@@ -181,4 +181,6 @@ bool xdp_attachment_flags_ok(struct xdp_attachment_info *info, ...@@ -181,4 +181,6 @@ bool xdp_attachment_flags_ok(struct xdp_attachment_info *info,
void xdp_attachment_setup(struct xdp_attachment_info *info, void xdp_attachment_setup(struct xdp_attachment_info *info,
struct netdev_bpf *bpf); struct netdev_bpf *bpf);
#define DEV_MAP_BULK_SIZE 16
#endif /* __LINUX_NET_XDP_H__ */ #endif /* __LINUX_NET_XDP_H__ */
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#define DEV_CREATE_FLAG_MASK \ #define DEV_CREATE_FLAG_MASK \
(BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY) (BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY)
#define DEV_MAP_BULK_SIZE 16
struct xdp_dev_bulk_queue { struct xdp_dev_bulk_queue {
struct xdp_frame *q[DEV_MAP_BULK_SIZE]; struct xdp_frame *q[DEV_MAP_BULK_SIZE];
struct list_head flush_node; struct list_head flush_node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment