From patchwork Tue Oct 27 19:44:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 37024 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 9DA95B7BCB for ; Wed, 28 Oct 2009 06:44:57 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932068AbZJ0Tom (ORCPT ); Tue, 27 Oct 2009 15:44:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755602AbZJ0Tom (ORCPT ); Tue, 27 Oct 2009 15:44:42 -0400 Received: from exchange.solarflare.com ([216.237.3.220]:55912 "EHLO exchange.solarflare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753566AbZJ0Tom (ORCPT ); Tue, 27 Oct 2009 15:44:42 -0400 Received: from [10.17.20.50] ([10.17.20.50]) by exchange.solarflare.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 27 Oct 2009 12:44:36 -0700 Subject: [PATCH net-2.6] sfc: Really allow RX checksum offload to be disabled From: Ben Hutchings To: David Miller Cc: netdev@vger.kernel.org, linux-net-drivers@solarflare.com In-Reply-To: <1256655057.2794.4.camel@achroite> References: <1256655057.2794.4.camel@achroite> Organization: Solarflare Communications Date: Tue, 27 Oct 2009 19:44:33 +0000 Message-Id: <1256672673.2794.7.camel@achroite> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) X-OriginalArrivalTime: 27 Oct 2009 19:44:36.0827 (UTC) FILETIME=[EA419AB0:01CA573D] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.600.1016-16972.004 X-TM-AS-Result: No--9.455400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We have never checked the efx_nic::rx_checksum_enabled flag everywhere we should, and since the switch to GRO we don't check it anywhere. It's simplest to check it in the one place where we initialise the per-packet checksummed flag. Signed-off-by: Ben Hutchings Cc: stable@kernel.org --- I'm not sure whether this is serious enough to merit a stable update. It's not a recent regression. Ben. drivers/net/sfc/falcon.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 8776432..865638b 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -869,8 +869,9 @@ static void falcon_handle_rx_event(struct efx_channel *channel, * UDP/IPv4, then we can rely on the hardware checksum. */ checksummed = - rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_TCP || - rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_UDP; + efx->rx_checksum_enabled && + (rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_TCP || + rx_ev_hdr_type == FSE_AB_RX_EV_HDR_TYPE_IPV4_UDP); } else { falcon_handle_rx_not_ok(rx_queue, event, &rx_ev_pkt_ok, &discard);