@@ -37,6 +37,7 @@
#include <net/mpls.h>
#include <net/xdp_sock.h>
#include <net/xfrm.h>
+#include <linux/xdp_call.h>
#include "ixgbe.h"
#include "ixgbe_common.h"
@@ -2193,6 +2194,8 @@ static struct sk_buff *ixgbe_build_skb(struct ixgbe_ring *rx_ring,
return skb;
}
+DEFINE_XDP_CALL(ixgbe_xdp_call);
+
static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
struct ixgbe_ring *rx_ring,
struct xdp_buff *xdp)
@@ -2210,7 +2213,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
prefetchw(xdp->data_hard_start); /* xdp_frame write */
- act = bpf_prog_run_xdp(xdp_prog, xdp);
+ act = xdp_call_run(ixgbe_xdp_call, xdp_prog, xdp);
switch (act) {
case XDP_PASS:
break;
@@ -10273,6 +10276,8 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
adapter->xdp_prog);
}
+ xdp_call_update(ixgbe_xdp_call, old_prog, prog);
+
if (old_prog)
bpf_prog_put(old_prog);