diff options
Diffstat (limited to 'drivers/net/sfc/rx.c')
-rw-r--r-- | drivers/net/sfc/rx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index 551299b462ae..670622373ddf 100644 --- a/drivers/net/sfc/rx.c +++ b/drivers/net/sfc/rx.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "rx.h" | 19 | #include "rx.h" |
20 | #include "efx.h" | 20 | #include "efx.h" |
21 | #include "falcon.h" | 21 | #include "falcon.h" |
22 | #include "selftest.h" | ||
22 | #include "workarounds.h" | 23 | #include "workarounds.h" |
23 | 24 | ||
24 | /* Number of RX descriptors pushed at once. */ | 25 | /* Number of RX descriptors pushed at once. */ |
@@ -683,6 +684,15 @@ void __efx_rx_packet(struct efx_channel *channel, | |||
683 | struct sk_buff *skb; | 684 | struct sk_buff *skb; |
684 | int lro = efx->net_dev->features & NETIF_F_LRO; | 685 | int lro = efx->net_dev->features & NETIF_F_LRO; |
685 | 686 | ||
687 | /* If we're in loopback test, then pass the packet directly to the | ||
688 | * loopback layer, and free the rx_buf here | ||
689 | */ | ||
690 | if (unlikely(efx->loopback_selftest)) { | ||
691 | efx_loopback_rx_packet(efx, rx_buf->data, rx_buf->len); | ||
692 | efx_free_rx_buffer(efx, rx_buf); | ||
693 | goto done; | ||
694 | } | ||
695 | |||
686 | if (rx_buf->skb) { | 696 | if (rx_buf->skb) { |
687 | prefetch(skb_shinfo(rx_buf->skb)); | 697 | prefetch(skb_shinfo(rx_buf->skb)); |
688 | 698 | ||
@@ -736,7 +746,6 @@ void __efx_rx_packet(struct efx_channel *channel, | |||
736 | /* Update allocation strategy method */ | 746 | /* Update allocation strategy method */ |
737 | channel->rx_alloc_level += RX_ALLOC_FACTOR_SKB; | 747 | channel->rx_alloc_level += RX_ALLOC_FACTOR_SKB; |
738 | 748 | ||
739 | /* fall-thru */ | ||
740 | done: | 749 | done: |
741 | efx->net_dev->last_rx = jiffies; | 750 | efx->net_dev->last_rx = jiffies; |
742 | } | 751 | } |