projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d172268
)
igc: use XDP helpers
author
Matteo Croce
<mcroce@microsoft.com>
Fri, 14 May 2021 18:39:53 +0000
(20:39 +0200)
committer
David S. Miller
<davem@davemloft.net>
Fri, 14 May 2021 22:20:10 +0000
(15:20 -0700)
Make use of the xdp_{init,prepare}_buff() helpers instead of
an open-coded version.
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/igc/igc_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/igc/igc_main.c
b/drivers/net/ethernet/intel/igc/igc_main.c
index 069471b7ffb0ab5914c9014f42aa1d61a91f4fa8..92c0701e2a36091a25b614a388425e61dad730bc 100644
(file)
--- a/
drivers/net/ethernet/intel/igc/igc_main.c
+++ b/
drivers/net/ethernet/intel/igc/igc_main.c
@@
-2151,12
+2151,9
@@
static int igc_clean_rx_irq(struct igc_q_vector *q_vector, const int budget)
}
if (!skb) {
- xdp.data = pktbuf + pkt_offset;
- xdp.data_end = xdp.data + size;
- xdp.data_hard_start = pktbuf - igc_rx_offset(rx_ring);
- xdp_set_data_meta_invalid(&xdp);
- xdp.frame_sz = truesize;
- xdp.rxq = &rx_ring->xdp_rxq;
+ xdp_init_buff(&xdp, truesize, &rx_ring->xdp_rxq);
+ xdp_prepare_buff(&xdp, pktbuf - igc_rx_offset(rx_ring),
+ igc_rx_offset(rx_ring) + pkt_offset, size, false);
skb = igc_xdp_run_prog(adapter, &xdp);
}