sfc: Add XDP frame size

This driver uses RX page-split when possible. It was recently fixed
in commit 86e85bf698 ("sfc: fix XDP-redirect in this driver") to
add needed tailroom for XDP-redirect.

After the fix efx->rx_page_buf_step is the frame size, with enough
head and tail-room for XDP-redirect.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/158945335278.97035.14611425333184621652.stgit@firesoul
This commit is contained in:
Jesper Dangaard Brouer 2020-05-14 12:49:12 +02:00 committed by Alexei Starovoitov
parent 63fe91ab3d
commit 983e434518
1 changed files with 1 additions and 0 deletions

View File

@ -308,6 +308,7 @@ static bool efx_do_xdp(struct efx_nic *efx, struct efx_channel *channel,
xdp_set_data_meta_invalid(&xdp); xdp_set_data_meta_invalid(&xdp);
xdp.data_end = xdp.data + rx_buf->len; xdp.data_end = xdp.data + rx_buf->len;
xdp.rxq = &rx_queue->xdp_rxq_info; xdp.rxq = &rx_queue->xdp_rxq_info;
xdp.frame_sz = efx->rx_page_buf_step;
xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp); xdp_act = bpf_prog_run_xdp(xdp_prog, &xdp);
rcu_read_unlock(); rcu_read_unlock();