diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-04-01 17:20:06 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2011-04-01 17:20:06 -0400 |
commit | ab3cf6d0f3d2daeef2101a2a97b6c0beee6b70cf (patch) | |
tree | bfb5bcb59d036db722020e94948f37255b093415 /drivers/net | |
parent | 9b12c75bf4d58dd85c987ee7b6a4356fdc7c1222 (diff) |
sfc: Move test of rx_checksum_enabled from nic.c to rx.c
This is preparation for using the generic netdev features interface,
and should have no effect in itself.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sfc/nic.c | 6 | ||||
-rw-r--r-- | drivers/net/sfc/rx.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c index e8396614daf3..2594f39c3ba4 100644 --- a/drivers/net/sfc/nic.c +++ b/drivers/net/sfc/nic.c | |||
@@ -850,7 +850,6 @@ efx_handle_rx_event(struct efx_channel *channel, const efx_qword_t *event) | |||
850 | unsigned expected_ptr; | 850 | unsigned expected_ptr; |
851 | bool rx_ev_pkt_ok, discard = false, checksummed; | 851 | bool rx_ev_pkt_ok, discard = false, checksummed; |
852 | struct efx_rx_queue *rx_queue; | 852 | struct efx_rx_queue *rx_queue; |
853 | struct efx_nic *efx = channel->efx; | ||
854 | 853 | ||
855 | /* Basic packet information */ | 854 | /* Basic packet information */ |
856 | rx_ev_byte_cnt = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_BYTE_CNT); | 855 | rx_ev_byte_cnt = EFX_QWORD_FIELD(*event, FSF_AZ_RX_EV_BYTE_CNT); |
@@ -873,9 +872,8 @@ efx_handle_rx_event(struct efx_channel *channel, const efx_qword_t *event) | |||
873 | * UDP/IP, then we can rely on the hardware checksum. | 872 | * UDP/IP, then we can rely on the hardware checksum. |
874 | */ | 873 | */ |
875 | checksummed = | 874 | checksummed = |
876 | likely(efx->rx_checksum_enabled) && | 875 | rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_TCP || |
877 | (rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_TCP || | 876 | rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_UDP; |
878 | rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_UDP); | ||
879 | } else { | 877 | } else { |
880 | efx_handle_rx_not_ok(rx_queue, event, &rx_ev_pkt_ok, &discard); | 878 | efx_handle_rx_not_ok(rx_queue, event, &rx_ev_pkt_ok, &discard); |
881 | checksummed = false; | 879 | checksummed = false; |
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index c0fdb59030fb..fb402c52aaff 100644 --- a/drivers/net/sfc/rx.c +++ b/drivers/net/sfc/rx.c | |||
@@ -605,6 +605,9 @@ void __efx_rx_packet(struct efx_channel *channel, | |||
605 | skb_record_rx_queue(skb, channel->channel); | 605 | skb_record_rx_queue(skb, channel->channel); |
606 | } | 606 | } |
607 | 607 | ||
608 | if (unlikely(!efx->rx_checksum_enabled)) | ||
609 | checksummed = false; | ||
610 | |||
608 | if (likely(checksummed || rx_buf->is_page)) { | 611 | if (likely(checksummed || rx_buf->is_page)) { |
609 | efx_rx_packet_gro(channel, rx_buf, eh, checksummed); | 612 | efx_rx_packet_gro(channel, rx_buf, eh, checksummed); |
610 | return; | 613 | return; |