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
This commit is contained in:
Родитель
7358877ac1
Коммит
bc1c5745d7
|
@ -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
|
||||
|
|
|
@ -1476,7 +1476,7 @@ static int qede_alloc_mem_rxq(struct qede_dev *edev, struct qede_rx_queue *rxq)
|
|||
if (rxq->rx_buf_size + size > PAGE_SIZE)
|
||||
rxq->rx_buf_size = PAGE_SIZE - size;
|
||||
|
||||
/* Segment size to spilt a page in multiple equal parts ,
|
||||
/* Segment size to split a page in multiple equal parts,
|
||||
* unless XDP is used in which case we'd use the entire page.
|
||||
*/
|
||||
if (!edev->xdp_prog) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче