From patchwork Fri Feb 13 04:18:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 23100 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 89C43DDEE7 for ; Fri, 13 Feb 2009 15:18:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758855AbZBMES1 (ORCPT ); Thu, 12 Feb 2009 23:18:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758850AbZBMES1 (ORCPT ); Thu, 12 Feb 2009 23:18:27 -0500 Received: from qmta04.westchester.pa.mail.comcast.net ([76.96.62.40]:42459 "EHLO QMTA04.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758776AbZBMES0 (ORCPT ); Thu, 12 Feb 2009 23:18:26 -0500 Received: from OMTA10.westchester.pa.mail.comcast.net ([76.96.62.28]) by QMTA04.westchester.pa.mail.comcast.net with comcast id FD1D1b00B0cZkys54GJSL5; Fri, 13 Feb 2009 04:18:26 +0000 Received: from lost.foo-projects.org ([63.64.152.142]) by OMTA10.westchester.pa.mail.comcast.net with comcast id FGJ61b00234bfcX3WGJ9Go; Fri, 13 Feb 2009 04:18:24 +0000 From: Jeff Kirsher Subject: [net-next PATCH 4/6] igb: misc cleanup to combine one if statement and set last_rx To: davem@davemloft.net Cc: netdev@vger.kernel.org, jeff@garzik.org, gospo@redhat.com, Alexander Duyck , Jeff Kirsher Date: Thu, 12 Feb 2009 20:18:05 -0800 Message-ID: <20090213041804.3848.73723.stgit@lost.foo-projects.org> In-Reply-To: <20090213041654.3848.39227.stgit@lost.foo-projects.org> References: <20090213041654.3848.39227.stgit@lost.foo-projects.org> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexander Duyck This patch combines a pair of if statements into one and adds a line to update netdev->last_rx. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher --- drivers/net/igb/igb_main.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 5a6bcef..712cfd6 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -2981,9 +2981,9 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb, if (tso) tx_flags |= IGB_TX_FLAGS_TSO; - else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags)) - if (skb->ip_summed == CHECKSUM_PARTIAL) - tx_flags |= IGB_TX_FLAGS_CSUM; + else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags) && + (skb->ip_summed == CHECKSUM_PARTIAL)) + tx_flags |= IGB_TX_FLAGS_CSUM; igb_tx_queue_adv(adapter, tx_ring, tx_flags, igb_tx_map_adv(adapter, tx_ring, skb, first), @@ -3886,6 +3886,7 @@ send_up: igb_receive_skb(rx_ring, staterr, rx_desc, skb); + netdev->last_rx = jiffies; next_desc: rx_desc->wb.upper.status_error = 0;