summaryrefslogtreecommitdiff
path: root/include/net/xdp_sock_drv.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-08-03 08:50:42 +0200
committerPaolo Abeni <pabeni@redhat.com>2022-08-03 09:04:55 +0200
commit7c6327c77d509e78bff76f2a4551fcfee851682e (patch)
tree9e5e128945eadd50462620927ed915fb88fb6eb1 /include/net/xdp_sock_drv.h
parent6f63d04473f2bc973e24ff828a28a2bd5e41bb38 (diff)
parent8eaa1d110800fac050bab44001732747a1c39894 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts: net/ax25/af_ax25.c d7c4c9e075f8c ("ax25: fix incorrect dev_tracker usage") d62607c3fe459 ("net: rename reference+tracking helpers") drivers/net/netdevsim/fib.c 180a6a3ee60a ("netdevsim: fib: Fix reference count leak on route deletion failure") 012ec02ae441 ("netdevsim: convert driver to use unlocked devlink API during init/fini") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/xdp_sock_drv.h')
-rw-r--r--include/net/xdp_sock_drv.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
index 4277b0dcee05..0e58c38ce0c1 100644
--- a/include/net/xdp_sock_drv.h
+++ b/include/net/xdp_sock_drv.h
@@ -104,6 +104,13 @@ static inline void xsk_buff_free(struct xdp_buff *xdp)
xp_free(xskb);
}
+static inline void xsk_buff_discard(struct xdp_buff *xdp)
+{
+ struct xdp_buff_xsk *xskb = container_of(xdp, struct xdp_buff_xsk, xdp);
+
+ xp_release(xskb);
+}
+
static inline void xsk_buff_set_size(struct xdp_buff *xdp, u32 size)
{
xdp->data = xdp->data_hard_start + XDP_PACKET_HEADROOM;
@@ -252,6 +259,10 @@ static inline void xsk_buff_free(struct xdp_buff *xdp)
{
}
+static inline void xsk_buff_discard(struct xdp_buff *xdp)
+{
+}
+
static inline void xsk_buff_set_size(struct xdp_buff *xdp, u32 size)
{
}