|
@@ -151,6 +151,7 @@ int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr,
|
|
|
{
|
|
|
u32 size = kattr->test.data_size_in;
|
|
|
u32 repeat = kattr->test.repeat;
|
|
|
+ struct netdev_rx_queue *rxqueue;
|
|
|
struct xdp_buff xdp = {};
|
|
|
u32 retval, duration;
|
|
|
void *data;
|
|
@@ -165,6 +166,9 @@ int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr,
|
|
|
xdp.data_meta = xdp.data;
|
|
|
xdp.data_end = xdp.data + size;
|
|
|
|
|
|
+ rxqueue = __netif_get_rx_queue(current->nsproxy->net_ns->loopback_dev, 0);
|
|
|
+ xdp.rxq = &rxqueue->xdp_rxq;
|
|
|
+
|
|
|
retval = bpf_test_run(prog, &xdp, repeat, &duration);
|
|
|
if (xdp.data != data + XDP_PACKET_HEADROOM + NET_IP_ALIGN)
|
|
|
size = xdp.data_end - xdp.data;
|