diff options
Diffstat (limited to 'drivers/net/sfc/rx.c')
-rw-r--r-- | drivers/net/sfc/rx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index 9fd198442e8d..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 | ||