summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qede/qede_fp.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2020-05-14 13:50:03 +0300
committerAlexei Starovoitov <ast@kernel.org>2020-05-15 07:21:55 +0300
commitbc1c5745d77963a4f4684c78cc2b3323900af68b (patch)
tree1b289888a3954029c68fb965c13cca24566754a3 /drivers/net/ethernet/qlogic/qede/qede_fp.c
parent7358877ac11041a22ce1cb35c352809051eac48f (diff)
downloadlinux-bc1c5745d77963a4f4684c78cc2b3323900af68b.tar.xz
qlogic/qede: Add XDP frame size to driver
The driver qede uses a full page, when XDP is enabled. The drivers value in rx_buf_seg_size (struct qede_rx_queue) will be PAGE_SIZE when an XDP bpf_prog is attached. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Cc: Ariel Elior <aelior@marvell.com> Cc: GR-everest-linux-l2@marvell.com Link: https://lore.kernel.org/bpf/158945340366.97035.7764939691580349618.stgit@firesoul
Diffstat (limited to 'drivers/net/ethernet/qlogic/qede/qede_fp.c')
-rw-r--r--drivers/net/ethernet/qlogic/qede/qede_fp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index c6c20776b474..7598ebe0962a 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1066,6 +1066,7 @@ static bool qede_rx_xdp(struct qede_dev *edev,
xdp_set_data_meta_invalid(&xdp);
xdp.data_end = xdp.data + *len;
xdp.rxq = &rxq->xdp_rxq;
+ xdp.frame_sz = rxq->rx_buf_seg_size; /* PAGE_SIZE when XDP enabled */
/* Queues always have a full reset currently, so for the time
* being until there's atomic program replace just mark read