Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2780290rwa; Mon, 22 Aug 2022 13:44:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR5kXPz1yzsNU5wOEi5XWbPD0zi7T4a/pHPeb/6RsybFSYavNHWZakOWQ7fUpoUzWv6fHebg X-Received: by 2002:aa7:c84f:0:b0:446:2bfb:5a63 with SMTP id g15-20020aa7c84f000000b004462bfb5a63mr788380edt.172.1661201064196; Mon, 22 Aug 2022 13:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661201064; cv=none; d=google.com; s=arc-20160816; b=LXnd/+26QEyqgDbQ8pof1Gy19uDCDrlL4UsJwPmExLehQqE/kqGoDHVTB2gZ0m6GL1 /IRi7erB8XsARax1PYApOjELv39DV+YnTYe5xoxnXlHkOF1pVCO8CWOXxeGM80A9/YcQ ZlLKEhpYHmQhrYJEPHqvelWM5aCi0A4TIkDxHx68YepfxQHvj4X9SbgnYlcFsbpWUERB DDV0lNeE42ESgdg1qI5yAr8DodzjUg4EdO8yskOz9fY8ICo3prOGYeeRj8e9nM1RA0Bq RDJyuYJsx8GSMDzW4VE3HzQe/2dSmTG+3uizwjL05zDYoyP0Tle2rUjdr0fHbVnEY/RO 8idg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3ghqxlUVpYAPvNZ/Fd381BfRXG/4offmxhbYt9HADrc=; b=IgOqS5MfeAMyhkXWM2ZaNFlnMNJQvs3jbvSaJU/R6mQ8xiCZ597c9lsaKkbmXjWEmN fhrTZgh7zbQI3R8oZxLeetO8fmec3QNX5Dx8lLX22BQozY9ozMabTLUiC9EO7GU4lgkp qRqxM73ScHHJvW4h8m+jJoNbHPX1FDhGw6sTRak33ToOVlwztNHKqVHWe0qtct6DkOqb kJAfEzw32CmaCZ5mk1IRgu+sc23FcHSxXjDpiQ6Rh4fUZPsyT/X3Yg9FvSrNLjYVV825 OInwyYaAe1NpW9+7q60Po3SWjX5TfQH+EKYaZ9tE3m88tUwLCRzHxM1iKgDeg7o9GkuY X4cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s47Dap0x; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd23-20020a170907629700b0073c7d61182dsi8285351ejc.65.2022.08.22.13.43.57; Mon, 22 Aug 2022 13:44:24 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=s47Dap0x; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237131AbiHVU3j (ORCPT + 99 others); Mon, 22 Aug 2022 16:29:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237169AbiHVU3h (ORCPT ); Mon, 22 Aug 2022 16:29:37 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6F7B51A1E for ; Mon, 22 Aug 2022 13:29:35 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-334dc616f86so326344177b3.8 for ; Mon, 22 Aug 2022 13:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=3ghqxlUVpYAPvNZ/Fd381BfRXG/4offmxhbYt9HADrc=; b=s47Dap0xMD0o0a7vVi9aMnbkj5ze1IHKpyOsoauBFgvtF0z8zE1Gq6jXk0ySkQ8li6 tQXecAxQMOGmHlrmGoA8gNudrsQE9/klv6tpAeDw+uN9buGwppEP7D1BOAJL8sOU1WWs ChlWSnE00t7Pe2mRhadRJ7oaLER0hFNVmWZd+dVB9mUNzaHHOG9t6aMrWevepzsdim+q vdpEwlujfgeQImmGBidsNDOHp9CHmgAaKrBsqq/CrCjJXo4YkrR9RGaKZvvlmFq+nyCg BZORUkg1qYa8r4dbhqAZg/jv0iZz/B8dKdULef7T9H/mmpYaildEgimt3zXTw7rfCKoN MhZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=3ghqxlUVpYAPvNZ/Fd381BfRXG/4offmxhbYt9HADrc=; b=dfEzrm9TdkB3ERZFNtL5vBjJgim+DWE5+TlmOknz2n1MPYtor7QQ7fIbyYi9ZKjv/l 4Hx/H7zZXcYogVK3OuQH+JxvqUNE3HomG11qYH4iyA4J+I7u5H62YNBXnQPt7wvzyfvm Rkxmq2pHXkAzjHUxsudGvfG7GYwxKufvD/uYIeET5DGlw/nazmh6gjE6tCY2pNQRTMnG fQ1jK+rEDzF3oTBcCsPJ3WTBdCDez1UpNX7ZSEDl88ViHUyvA+BO/gtnPGcDQsF2w4Ph uAowOtELUA9oHkAqREyLXL2YxhkiAxoIhnbmi3VR+FINgjE9wIxL0pKDz6uCcjARfnvF UVXA== X-Gm-Message-State: ACgBeo2wV+M4MA71p/DVG8NNMTqgViQMNxTKAoLsioopPDt9/5UeDJVq GZAz9hgdRJnm1mNJ/C1JFXyULwtrpO+UxMo7A9E0sQ== X-Received: by 2002:a25:b083:0:b0:695:9a91:317d with SMTP id f3-20020a25b083000000b006959a91317dmr7417640ybj.387.1661200174730; Mon, 22 Aug 2022 13:29:34 -0700 (PDT) MIME-Version: 1.0 References: <20220822103130.3466-1-sunshouxin@chinatelecom.cn> In-Reply-To: <20220822103130.3466-1-sunshouxin@chinatelecom.cn> From: Eric Dumazet Date: Mon, 22 Aug 2022 13:29:23 -0700 Message-ID: Subject: Re: [PATCH] bonding: Remove unnecessary check To: Sun Shouxin Cc: Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , David Miller , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , netdev , LKML , bpf , huyd12@chinatelecom.cn Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Mon, Aug 22, 2022 at 3:33 AM Sun Shouxin wrote: > > This check is not necessary since the commit d5410ac7b0ba > ("net:bonding:support balance-alb interface with vlan to bridge"). Please provide more details. I fail to see the relation between d5410ac7b0ba and this patch, thanks. > > 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 >