From patchwork Sun May 24 15:27:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brice Goglin X-Patchwork-Id: 27580 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 29551B6F35 for ; Mon, 25 May 2009 01:27:58 +1000 (EST) Received: by ozlabs.org (Postfix) id 1CF14DE0D2; Mon, 25 May 2009 01:27:58 +1000 (EST) 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 AE069DE0CD for ; Mon, 25 May 2009 01:27:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753214AbZEXP1Z (ORCPT ); Sun, 24 May 2009 11:27:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752782AbZEXP1Y (ORCPT ); Sun, 24 May 2009 11:27:24 -0400 Received: from mailbox2.myri.com ([64.172.73.26]:1964 "EHLO myri.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752721AbZEXP1Y (ORCPT ); Sun, 24 May 2009 11:27:24 -0400 Received: from [172.31.134.203] (brice-ovpn.sw.myri.com [172.31.134.203]) by myri.com (8.13.7+Sun/8.13.7) with ESMTP id n4OFRLwY026759; Sun, 24 May 2009 08:27:21 -0700 (PDT) Message-ID: <4A19676D.5020606@myri.com> Date: Sun, 24 May 2009 17:27:41 +0200 From: Brice Goglin User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "David S. Miller" CC: Linux Network Development list Subject: [PATCH 1/3] myri10ge: fix the invokation of lro_flush_all X-Enigmail-Version: 0.95.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix the way we check whether lro_flush_all should be called in the myri10ge driver. Signed-off-by: Brice Goglin --- drivers/net/myri10ge/myri10ge.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index c9a9aca..d317011 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -1422,6 +1422,7 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget) { struct myri10ge_rx_done *rx_done = &ss->rx_done; struct myri10ge_priv *mgp = ss->mgp; + struct net_device *netdev = mgp->dev; unsigned long rx_bytes = 0; unsigned long rx_packets = 0; unsigned long rx_ok; @@ -1455,7 +1456,7 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget) ss->stats.rx_packets += rx_packets; ss->stats.rx_bytes += rx_bytes; - if (myri10ge_lro) + if (netdev->features & NETIF_F_LRO) lro_flush_all(&rx_done->lro_mgr); /* restock receive rings if needed */