From patchwork Fri Sep 19 13:04:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 37640 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AC4EA2054D for ; Fri, 19 Sep 2014 13:05:28 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id n12sf1553838wgh.1 for ; Fri, 19 Sep 2014 06:05:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:subject:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=LIdElib9lclO+c8S/yVv7kJF5UdZPQrpDz5zT+TUXKk=; b=aIHdSS2x5rvRlp2abcO1direfep19lJYjlIDnqBZxTAqA9woaWEQW9V1tJm3dYisfz utfE2NSpJw9UC3q/5W99Q2wbFobu6ZptS8Ne46YB39sPjLIyVFnypfvojzhhkwllqyej GI08I7+PwCxKBytdYJ19oh9bW+fQ4zqGO1A5/6ERfyWTonYFkDKjj51eSr7rjCMrkQqt /iJYzUKmifm2bkLwPsgXv2bFeWK2MfoDYbGpjzF7HFv7Z9lAlWWTH4D9zI0aMhtGwZY3 rqqghf18o8k/T939Axv8/Z4kvdyX7HTSilFg0YI7l/9qRaBtlnB44V0Tk4g6GIcsfBmH nySA== X-Gm-Message-State: ALoCoQnrosXvvpWCDb3C+Wi6S3O0XVTGnxNxNXJmqe4dQVymOnfiNEQfimqrjWV8wOchXo/SFM54 X-Received: by 10.180.108.70 with SMTP id hi6mr333311wib.4.1411131927918; Fri, 19 Sep 2014 06:05:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.141 with SMTP id j13ls337369laa.5.gmail; Fri, 19 Sep 2014 06:05:27 -0700 (PDT) X-Received: by 10.152.30.100 with SMTP id r4mr6409341lah.87.1411131927605; Fri, 19 Sep 2014 06:05:27 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by mx.google.com with ESMTPS id dy7si2531236lac.28.2014.09.19.06.05.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Sep 2014 06:05:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id hz20so3160502lab.29 for ; Fri, 19 Sep 2014 06:05:27 -0700 (PDT) X-Received: by 10.112.200.134 with SMTP id js6mr6472341lbc.0.1411131927516; Fri, 19 Sep 2014 06:05:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp927989lbb; Fri, 19 Sep 2014 06:05:26 -0700 (PDT) X-Received: by 10.70.118.9 with SMTP id ki9mr1084920pdb.104.1411131925788; Fri, 19 Sep 2014 06:05:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si3018746pde.6.2014.09.19.06.05.25 for ; Fri, 19 Sep 2014 06:05:25 -0700 (PDT) Received-SPF: none (google.com: netdev-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756624AbaISNFW (ORCPT + 3 others); Fri, 19 Sep 2014 09:05:22 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:35170 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756513AbaISNFV (ORCPT ); Fri, 19 Sep 2014 09:05:21 -0400 Received: from 172.24.2.119 (EHLO SZXEML414-HUB.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBW92548; Fri, 19 Sep 2014 21:05:04 +0800 (CST) Received: from [127.0.0.1] (10.177.22.246) by SZXEML414-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.158.1; Fri, 19 Sep 2014 21:05:01 +0800 Message-ID: <541C29F9.6020001@huawei.com> Date: Fri, 19 Sep 2014 21:04:57 +0800 From: Ding Tianhong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Nikolay Aleksandrov , Andy Gospodarek , Jay Vosburgh , Veaceslav Falico , "David S. Miller" , Netdev Subject: [PATCH net-next 1/2] bonding: slight optimization for bond_xmit_roundrobin() X-Originating-IP: [10.177.22.246] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: netdev@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dingtianhong@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When the slave is the curr_active_slave, no need to check whether the slave is active or not, it is always active. Signed-off-by: Ding Tianhong --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b43b2df..0324603 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3624,7 +3624,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev */ if (iph->protocol == IPPROTO_IGMP && skb->protocol == htons(ETH_P_IP)) { slave = rcu_dereference(bond->curr_active_slave); - if (slave && bond_slave_can_tx(slave)) + if (slave) bond_dev_queue_xmit(bond, skb, slave->dev); else bond_xmit_slave_id(bond, skb, 0);