From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-net-drivers@solarflare.com
Subject: [PATCHv2 net-next-2.6 1/7] sfc: Move test of rx_checksum_enabled from nic.c to rx.c
Date: Tue, 05 Apr 2011 19:02:09 +0100 [thread overview]
Message-ID: <1302026529.2932.57.camel@bwh-desktop> (raw)
In-Reply-To: <1302026446.2932.56.camel@bwh-desktop>
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>
---
drivers/net/sfc/nic.c | 6 ++----
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 e839661..2594f39 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)
unsigned expected_ptr;
bool rx_ev_pkt_ok, discard = false, checksummed;
struct efx_rx_queue *rx_queue;
- struct efx_nic *efx = channel->efx;
/* Basic packet information */
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)
* UDP/IP, then we can rely on the hardware checksum.
*/
checksummed =
- likely(efx->rx_checksum_enabled) &&
- (rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_TCP ||
- rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_UDP);
+ rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_TCP ||
+ rx_ev_hdr_type == FSE_CZ_RX_EV_HDR_TYPE_IPV4V6_UDP;
} else {
efx_handle_rx_not_ok(rx_queue, event, &rx_ev_pkt_ok, &discard);
checksummed = false;
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index c0fdb59..fb402c5 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,
skb_record_rx_queue(skb, channel->channel);
}
+ if (unlikely(!efx->rx_checksum_enabled))
+ checksummed = false;
+
if (likely(checksummed || rx_buf->is_page)) {
efx_rx_packet_gro(channel, rx_buf, eh, checksummed);
return;
--
1.7.4
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-04-05 18:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 18:00 pull request: sfc-next-2.6 2011-04-05 Ben Hutchings
2011-04-05 18:02 ` Ben Hutchings [this message]
2011-04-05 18:02 ` [PATCHv2 net-next-2.6 2/7] sfc: Enable all TSO features on VLANs Ben Hutchings
2011-04-05 18:03 ` [PATCHv2 net-next-2.6 3/7] sfc: Implement generic features interface Ben Hutchings
2011-04-05 18:15 ` Michał Mirosław
2011-04-05 18:20 ` Ben Hutchings
2011-04-05 18:29 ` Michał Mirosław
2011-04-05 18:03 ` [PATCHv2 net-next-2.6 4/7] ethtool: Convert struct ethtool_ops comment to kernel-doc format Ben Hutchings
2011-04-05 18:04 ` [PATCH net-next-2.6 5/7] ethtool: Fill out and update comment for struct ethtool_ops Ben Hutchings
2011-04-05 18:05 ` [PATCHv2 net-next-2.6 6/7] ethtool: Change ETHTOOL_PHYS_ID implementation to allow dropping RTNL Ben Hutchings
2011-04-05 18:07 ` [PATCHv2 net-next-2.6 7/7] sfc: Implement ethtool_ops::set_phys_id instead of ethtool_ops::phys_id Ben Hutchings
2011-04-06 19:29 ` pull request: sfc-next-2.6 2011-04-05 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302026529.2932.57.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).