Commit 082294f2 authored by Matteo Croce's avatar Matteo Croce Committed by David S. Miller

igc: use XDP helpers

Make use of the xdp_{init,prepare}_buff() helpers instead of
an open-coded version.
Signed-off-by: default avatarMatteo Croce <mcroce@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d172268f
...@@ -2151,12 +2151,9 @@ static int igc_clean_rx_irq(struct igc_q_vector *q_vector, const int budget) ...@@ -2151,12 +2151,9 @@ static int igc_clean_rx_irq(struct igc_q_vector *q_vector, const int budget)
} }
if (!skb) { if (!skb) {
xdp.data = pktbuf + pkt_offset; xdp_init_buff(&xdp, truesize, &rx_ring->xdp_rxq);
xdp.data_end = xdp.data + size; xdp_prepare_buff(&xdp, pktbuf - igc_rx_offset(rx_ring),
xdp.data_hard_start = pktbuf - igc_rx_offset(rx_ring); igc_rx_offset(rx_ring) + pkt_offset, size, false);
xdp_set_data_meta_invalid(&xdp);
xdp.frame_sz = truesize;
xdp.rxq = &rx_ring->xdp_rxq;
skb = igc_xdp_run_prog(adapter, &xdp); skb = igc_xdp_run_prog(adapter, &xdp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment