Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2184185rwa; Mon, 22 Aug 2022 03:48:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Kw5JRLMkuKIXBWa24A6oxCkRQZyjhXGLFieP2JK0tEyrMWZ8XSPqwdHGivv1pXWnG5vMU X-Received: by 2002:a17:907:1c01:b0:6f4:2692:e23 with SMTP id nc1-20020a1709071c0100b006f426920e23mr12319257ejc.243.1661165282565; Mon, 22 Aug 2022 03:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661165282; cv=none; d=google.com; s=arc-20160816; b=IuBBphGQTsgq0IrQS+TRP31d2dL3XdLmsDfBTSS7phv/z3UhUeOKzkTUgwCjo/31Td JLuhG8YNi1wrMYhX+DIHeJm3emgWEE+x8UxrgQEpmEjEqZna/9EEgjoiDKsBhej+ddEx fBcadn1DYlhUVSUSf5oB+tC6x5TLuXobANgbDAWOrQutvCykgmmgUII2NSWxdSofq5EJ KqlocFOlsZjZU/sj6C1ThmFDYBDwW91o4OKsAwLWmQkAAv++gJ2OyA/mGiAcnX5wubD1 ec6aZFXL5DDdCw9X/jlXljonoZRsBYbBWqAx/TaMLdkVLF5LamSok3DOZzeZKfJ3XrVT qXAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:hmm_source_type :hmm_attache_num:hmm_source_ip; bh=E50Y2IXGRt+rXUsL4VavVI5NE7r/jjl3cWWKD38bkXQ=; b=iJ6dwoZI6Mcd5bV0wxZ3hQQPRTKj45cMlKFr3bq4inB0XQAr0XnikALSWztjYPBU6M KI0++5uxVKK/2LWey4boG5947jhXZ6qG4QuenjKFhjgiz7IBWTLjfZFGU+fjbUTCpc94 vypvMHZCHkW9QeWMtOdwG4OZqqa/Jzo9mmUiCt3r0PVmnushxIr5/8YQ6GWtopydI2Rl Sv++hNQMVDFMmtOx7rcQYdawBnY7XocjZzEoimGprarBWH7clRWixH01faHi/TY2Gmc9 aRk7yKNQnGVARfxI1myR3mCA+4vKeq0Uu+UcCiKhaotTyk/0POea3nlU8cN2wD35PrIf +zPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs4-20020a0564020c4400b0043cc3404d7dsi1578112edb.84.2022.08.22.03.47.36; Mon, 22 Aug 2022 03:48:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbiHVKdw (ORCPT + 99 others); Mon, 22 Aug 2022 06:33:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233486AbiHVKdv (ORCPT ); Mon, 22 Aug 2022 06:33:51 -0400 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58147B4A7; Mon, 22 Aug 2022 03:33:42 -0700 (PDT) HMM_SOURCE_IP: 172.18.0.48:40060.967873379 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-10.133.8.199 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id C78612800A3; Mon, 22 Aug 2022 18:33:31 +0800 (CST) X-189-SAVE-TO-SEND: +sunshouxin@chinatelecom.cn Received: from ([172.18.0.48]) by app0024 with ESMTP id d3193f7cfc9d430590909a27ad267485 for j.vosburgh@gmail.com; Mon, 22 Aug 2022 18:33:37 CST X-Transaction-ID: d3193f7cfc9d430590909a27ad267485 X-Real-From: sunshouxin@chinatelecom.cn X-Receive-IP: 172.18.0.48 X-MEDUSA-Status: 0 Sender: sunshouxin@chinatelecom.cn From: Sun Shouxin To: j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, huyd12@chinatelecom.cn, sunshouxin@chinatelecom.cn Subject: [PATCH] bonding: Remove unnecessary check Date: Mon, 22 Aug 2022 03:31:29 -0700 Message-Id: <20220822103130.3466-1-sunshouxin@chinatelecom.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This check is not necessary since the commit d5410ac7b0ba ("net:bonding:support balance-alb interface with vlan to bridge"). Suggested-by: Hu Yadi Signed-off-by: Sun Shouxin --- drivers/net/bonding/bond_main.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 50e60843020c..6b0f0ce9b9a1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1578,19 +1578,6 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) skb->dev = bond->dev; - if (BOND_MODE(bond) == BOND_MODE_ALB && - netif_is_bridge_port(bond->dev) && - skb->pkt_type == PACKET_HOST) { - - if (unlikely(skb_cow_head(skb, - skb->data - skb_mac_header(skb)))) { - kfree_skb(skb); - return RX_HANDLER_CONSUMED; - } - bond_hw_addr_copy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, - bond->dev->addr_len); - } - return ret; } -- 2.27.0