diff options
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_main.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c index c325bc0c8338..e2c27ba11470 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c | |||
@@ -209,7 +209,7 @@ static inline bool fm10k_page_is_reserved(struct page *page) | |||
209 | 209 | ||
210 | static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer, | 210 | static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer, |
211 | struct page *page, | 211 | struct page *page, |
212 | unsigned int truesize) | 212 | unsigned int __maybe_unused truesize) |
213 | { | 213 | { |
214 | /* avoid re-using remote pages */ | 214 | /* avoid re-using remote pages */ |
215 | if (unlikely(fm10k_page_is_reserved(page))) | 215 | if (unlikely(fm10k_page_is_reserved(page))) |
@@ -240,7 +240,6 @@ static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer, | |||
240 | 240 | ||
241 | /** | 241 | /** |
242 | * fm10k_add_rx_frag - Add contents of Rx buffer to sk_buff | 242 | * fm10k_add_rx_frag - Add contents of Rx buffer to sk_buff |
243 | * @rx_ring: rx descriptor ring to transact packets on | ||
244 | * @rx_buffer: buffer containing page to add | 243 | * @rx_buffer: buffer containing page to add |
245 | * @rx_desc: descriptor containing length of buffer written by hardware | 244 | * @rx_desc: descriptor containing length of buffer written by hardware |
246 | * @skb: sk_buff to place the data into | 245 | * @skb: sk_buff to place the data into |
@@ -253,8 +252,7 @@ static bool fm10k_can_reuse_rx_page(struct fm10k_rx_buffer *rx_buffer, | |||
253 | * The function will then update the page offset if necessary and return | 252 | * The function will then update the page offset if necessary and return |
254 | * true if the buffer can be reused by the interface. | 253 | * true if the buffer can be reused by the interface. |
255 | **/ | 254 | **/ |
256 | static bool fm10k_add_rx_frag(struct fm10k_ring *rx_ring, | 255 | static bool fm10k_add_rx_frag(struct fm10k_rx_buffer *rx_buffer, |
257 | struct fm10k_rx_buffer *rx_buffer, | ||
258 | union fm10k_rx_desc *rx_desc, | 256 | union fm10k_rx_desc *rx_desc, |
259 | struct sk_buff *skb) | 257 | struct sk_buff *skb) |
260 | { | 258 | { |
@@ -330,7 +328,7 @@ static struct sk_buff *fm10k_fetch_rx_buffer(struct fm10k_ring *rx_ring, | |||
330 | DMA_FROM_DEVICE); | 328 | DMA_FROM_DEVICE); |
331 | 329 | ||
332 | /* pull page into skb */ | 330 | /* pull page into skb */ |
333 | if (fm10k_add_rx_frag(rx_ring, rx_buffer, rx_desc, skb)) { | 331 | if (fm10k_add_rx_frag(rx_buffer, rx_desc, skb)) { |
334 | /* hand second half of page back to the ring */ | 332 | /* hand second half of page back to the ring */ |
335 | fm10k_reuse_rx_page(rx_ring, rx_buffer); | 333 | fm10k_reuse_rx_page(rx_ring, rx_buffer); |
336 | } else { | 334 | } else { |
@@ -412,7 +410,7 @@ static void fm10k_rx_hwtstamp(struct fm10k_ring *rx_ring, | |||
412 | } | 410 | } |
413 | 411 | ||
414 | static void fm10k_type_trans(struct fm10k_ring *rx_ring, | 412 | static void fm10k_type_trans(struct fm10k_ring *rx_ring, |
415 | union fm10k_rx_desc *rx_desc, | 413 | union fm10k_rx_desc __maybe_unused *rx_desc, |
416 | struct sk_buff *skb) | 414 | struct sk_buff *skb) |
417 | { | 415 | { |
418 | struct net_device *dev = rx_ring->netdev; | 416 | struct net_device *dev = rx_ring->netdev; |
@@ -509,8 +507,6 @@ static bool fm10k_is_non_eop(struct fm10k_ring *rx_ring, | |||
509 | 507 | ||
510 | /** | 508 | /** |
511 | * fm10k_pull_tail - fm10k specific version of skb_pull_tail | 509 | * fm10k_pull_tail - fm10k specific version of skb_pull_tail |
512 | * @rx_ring: rx descriptor ring packet is being transacted on | ||
513 | * @rx_desc: pointer to the EOP Rx descriptor | ||
514 | * @skb: pointer to current skb being adjusted | 510 | * @skb: pointer to current skb being adjusted |
515 | * | 511 | * |
516 | * This function is an fm10k specific version of __pskb_pull_tail. The | 512 | * This function is an fm10k specific version of __pskb_pull_tail. The |
@@ -520,9 +516,7 @@ static bool fm10k_is_non_eop(struct fm10k_ring *rx_ring, | |||
520 | * As a result we can do things like drop a frag and maintain an accurate | 516 | * As a result we can do things like drop a frag and maintain an accurate |
521 | * truesize for the skb. | 517 | * truesize for the skb. |
522 | */ | 518 | */ |
523 | static void fm10k_pull_tail(struct fm10k_ring *rx_ring, | 519 | static void fm10k_pull_tail(struct sk_buff *skb) |
524 | union fm10k_rx_desc *rx_desc, | ||
525 | struct sk_buff *skb) | ||
526 | { | 520 | { |
527 | struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0]; | 521 | struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0]; |
528 | unsigned char *va; | 522 | unsigned char *va; |
@@ -576,7 +570,7 @@ static bool fm10k_cleanup_headers(struct fm10k_ring *rx_ring, | |||
576 | 570 | ||
577 | /* place header in linear portion of buffer */ | 571 | /* place header in linear portion of buffer */ |
578 | if (skb_is_nonlinear(skb)) | 572 | if (skb_is_nonlinear(skb)) |
579 | fm10k_pull_tail(rx_ring, rx_desc, skb); | 573 | fm10k_pull_tail(skb); |
580 | 574 | ||
581 | /* if eth_skb_pad returns an error the skb was freed */ | 575 | /* if eth_skb_pad returns an error the skb was freed */ |
582 | if (eth_skb_pad(skb)) | 576 | if (eth_skb_pad(skb)) |