Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp956567rwi; Thu, 20 Oct 2022 07:10:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5u+Yi7yMoTX3473k2QI+m9IIyYOBpMQ6Alrc2/8VglzmJSYysKtIHqy7ExIZs/wjj0Mjuu X-Received: by 2002:a17:90a:6405:b0:203:6eaa:4999 with SMTP id g5-20020a17090a640500b002036eaa4999mr51962415pjj.8.1666275010525; Thu, 20 Oct 2022 07:10:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666275010; cv=pass; d=google.com; s=arc-20160816; b=ed3jCEO8YqxnVW4BfNrP6Mar0C/yEKhS94IKfuSIdXV3bquJSfsSOxPD6jl9SJbsCJ 2g/+qxa5UHSRTygcYacOSFw9yDYjXa/Kqbssp41feXHejfffFKbccXRonVzHmQpfmIQr g3+IYWha+6vgfQ0FatHviANWOlc76RPMosENLCJAQcQYpYo/OJw8Bvycoj8xsJBypXy+ kUI9hwEu1+sZlyasJTrhiEEO7Xk5zBzz0jJUy5dQPzz2a15c29jN2a8VVD3hz1WD5V7+ bPH2MsH0VnvGvmUm+QMkfd0BG3smzZ7e0OALLaNMN/MTEq0RqKVoeH3D2xHYeoNrKNrS NsCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fyGVuHHKK3c1OMgGpArxlrEfKi/ijp99vW6r9U2jzFU=; b=uLcbhBtB9U+zVBUvoWgbmq5iHA6JyUEA4jh/5P0+SfCM25+PWrgOfWjUSb+14Pq4gr 8hq6XrnI+0h617TrFSv1mXJ02F4DmVYe1z4A5t2+WaW+5mJKQ8YYWONhtFH4sR7D6DUw qVUGKPQI0rZQCmGCzKOB2YuyNPeQvGuON7EVksNGq3Y7gQB/WVDDczQXIjNp/+5oHDza ncwZmidGqqQIydPtf2LppXymKgRtjHXcx/oRompoVMKMOxk5uYn4yTV7iknnP8HSP0uE VbPB8Y8X0jSK9N50nUK8lkUdKnuxg+kCCkuLFDqu+9LKpk6dIULvOwTJq/o57MW5Di2F eVFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=T98fhGBA; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020a633d0e000000b004391c09ba03si25819699pga.370.2022.10.20.07.09.57; Thu, 20 Oct 2022 07:10:10 -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=@Nvidia.com header.s=selector2 header.b=T98fhGBA; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230097AbiJTNGN (ORCPT + 99 others); Thu, 20 Oct 2022 09:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiJTNGL (ORCPT ); Thu, 20 Oct 2022 09:06:11 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2074.outbound.protection.outlook.com [40.107.92.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B62DB7F4F; Thu, 20 Oct 2022 06:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JR1JfS0TvlUEg5N8MLRsZz9h7p6lvH8IW96G3HtBvyIvQ/nBhXLynpHSqsoy1SSeCxvP8r90pxtvRGqmk5y+6tLl/y2TQpftPIDHqQwoL45vn1yq31TyN/FiJsWP7YqAeWaeL7wOnoJIbtvGQAew5PPLaXH3ho8tvs0MAIOGHXZrKY4TkbNr0Tm63Gvg5vrys4gygX71iHYaDYXB4ZKuhT3b2HE4Ix9shVmTTgGz2tmUSTL35VjECgY7duNSUty00pM0TtOD0WM0eVb5EhLulcnpc8yju+246c7tWQqjamqWXwpD72i85GgcpLNY5LFv7kYPuQW6A7+C2WrZOpRtWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fyGVuHHKK3c1OMgGpArxlrEfKi/ijp99vW6r9U2jzFU=; b=aVXCIZLXGcal/m75LzIaWMq3KOEhJwAYc4a7j2r25+cyyTa0DM0Yycsz7pbwREopxmbQgKlKL1zjuKU3v6GDUHk+j43/6XvDSXj5Dj4jomhWka7be08fCoFlCfGgbKxsqk5hMFMVA2x/tDSZuPtd3k4CPShXkRAJ1RWvZHtnlgel+O3B5yAZjViWnzAYnDUCizQM7IUew3zIH1meVmByFA1XmYSoH/iWQQjRjfGlisPwuuf4FfdDPzOjkhdhXlTJfo4fs0JkFrb/+XjXUuAnySxZg+RR54KeI85OkMiWqY1P13n4NBBmIlm7H7KEMXpLng6M8t2BB0bSO7FkGAapJw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fyGVuHHKK3c1OMgGpArxlrEfKi/ijp99vW6r9U2jzFU=; b=T98fhGBAntfJrhR1pwpRZytDN612QohpQO6RGvdsLiN1TY8xdV8SK/t+kctCLXrptSfwxkzpc0NbCgSkieynORiv95CzqvQauzW9dzG8ep7d4E8DiMhlQA48SEjs/pJdqCXcg2jvhe5dsnDGiOAaD68mwb8WynTLEEH7Dxdm5vkR00/yE3gjusOEtV6//kR0Q6DqarXyTc+hN90ll1Iv3Z7JPNMmn7YSJfKgEpwayf4R7GBoBE7a58NVAJohF7SR4KhXBQUNTa+BfqKNYluNw0DLWETIJWmu9Agf7HDWF8+U7FT7wBJAKbJjDZe+2xgksbXcUdL3ek8dOdl4oL7qqA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CY5PR12MB6179.namprd12.prod.outlook.com (2603:10b6:930:24::22) by DS7PR12MB6165.namprd12.prod.outlook.com (2603:10b6:8:9a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.33; Thu, 20 Oct 2022 13:06:08 +0000 Received: from CY5PR12MB6179.namprd12.prod.outlook.com ([fe80::4ff2:d93e:d200:227e]) by CY5PR12MB6179.namprd12.prod.outlook.com ([fe80::4ff2:d93e:d200:227e%7]) with mapi id 15.20.5723.033; Thu, 20 Oct 2022 13:06:08 +0000 Date: Thu, 20 Oct 2022 16:06:01 +0300 From: Ido Schimmel To: "Hans J. Schultz" Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , UNGLinuxDriver@microchip.com, Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Russell King , Christian Marangi , Daniel Borkmann , Yuwei Wang , Petr Machata , Florent Fourcot , Hans Schultz , Joachim Wiberg , Amit Cohen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v8 net-next 02/12] net: bridge: add blackhole fdb entry flag Message-ID: References: <20221018165619.134535-1-netdev@kapio-technology.com> <20221018165619.134535-3-netdev@kapio-technology.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018165619.134535-3-netdev@kapio-technology.com> X-ClientProxiedBy: VE1PR08CA0023.eurprd08.prod.outlook.com (2603:10a6:803:104::36) To CY5PR12MB6179.namprd12.prod.outlook.com (2603:10b6:930:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR12MB6179:EE_|DS7PR12MB6165:EE_ X-MS-Office365-Filtering-Correlation-Id: 43955a47-7593-4960-743c-08dab29bda5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6m6p9cKg+Ko0kWVTM7Knod+J7M43VKdLHsCJyYcB3HQiQxvDo1zxvLGnCcrp6x1OaOh9vGvKJAg26aeeYXkOYIWZXYMJgtSVb5+2rY4wWToRlTeCTbUkhY5oUf90jYHcfiQFUH89HLQvaOIgMEayowNQInZOnN6IjEp4828QXMRsKT/0uFxddyiZ38eQluc8pip0jK5LLFlbnQ35+PQ2Uq5oAF21jb2zsygxU3llK5mzqyJbb63p/U6nLMh1xZbQky8dHnVW0o9tKFFN4xArRIfYLlELfThNkwAXeo63BVm0ShzpNJzsY053Hb/fk4IX8Gs9V71lnHC419lfgnvnGPdxoqLSaC6WC4l0nxwLDGWCklMXxq9CBriaC0V9DShyAY1tSUDZu3FYZ0HPlgCKetVs0KzVxE9AghEdvtfrDfbk7QsCcY5M6InVFtekDRdFqvcPuFvuaM/r2S4Glshf8WRkzfI89fnEBREcX8pfqZmBlCen2hamDTpFxeGL/X6FlGi9rkTD1LJx+u9lxhOWQ6lIArIsjNBI417URxmzlBV0WIqKYziTa/lFRMRSR0tgI5FGTnJzNLi2J+1mHJ9yRL+kQY5pFXLff1KAO4/LmQWTKlNRvjxDJCOe7s/X1tihQdK0KJ4djRebSKGmcKQxRwZDC14VDeJ3q6WkWcLtre+g2zsmGQqpKHrtA1UCyc43Y0mQIyvb/gzlkbyULLNyFQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR12MB6179.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(7916004)(376002)(366004)(346002)(39860400002)(396003)(136003)(451199015)(7406005)(8936002)(5660300002)(2906002)(41300700001)(7416002)(66476007)(478600001)(33716001)(8676002)(6916009)(38100700002)(26005)(4326008)(6666004)(66556008)(66946007)(9686003)(54906003)(6512007)(6506007)(6486002)(316002)(83380400001)(86362001)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wM6/gX7mrhQtOTnUZO5ruqn0Gj/fuigwYg104YPz6a5Wwuv2P4Ap4vhHMtzU?= =?us-ascii?Q?o91JufsyQ3PmhcT20c+ikUc/lt/IlTyoiu8Sbj819oYvifyP6DdnMpBZRMnU?= =?us-ascii?Q?kDv0JaDOaxI2caONHOz5oORheLaHiSIhbLydKM6E5yHvHkeaqOuQkV/DbRqU?= =?us-ascii?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8WRAQ6TMrPc7jH+ixm?= =?us-ascii?Q?2zx7KOLkslN2+24zri295S0Pv/V5gb9ef8fMeULfBF3p/vdj1XDBqrtSYiTk?= =?us-ascii?Q?yIut73U+Pj7LLyxyDD9LbjGjcxA9/5umtmaq+JtpkeiR5ndzEyWd0yVg6Jf4?= =?us-ascii?Q?kk//Zk+2OZRKkoYW3BqFOAEDSd1TU1j+RVVobI8rbATvr8n8JOFgqNPaQtHr?= =?us-ascii?Q?P0IWJAU/DDrNEP+AJo6WNUaq/ZdTl9j6jBAi8bUcywW7ZwOQqhpnOkS8TGH+?= =?us-ascii?Q?UXhFkLqYtl+zyHVBDTMt3ztN/0ZIb0V+BIrb/p7D1mRVzZScfYCa97kI7Fg3?= =?us-ascii?Q?3vcMie+/avl+OmdpbMlaS8gCqflKUczwx3Kif69gU1WxSYIVryakzdvFsgLr?= =?us-ascii?Q?PqTIY8ZXEVsYLA99ZA4dXCGaFw83F870r8XMVvCbbRZxh7IQVrqzrp/rkQ2A?= =?us-ascii?Q?iF6AX6UwqoVl7l9UNkcjP696bi1/nIoGZXk48RtAUmydy/pcJIsUSd9UrcVa?= =?us-ascii?Q?RgfMxHxbq+UsjDFIVuKnW20wPMkG/k0j7AE2zG9d?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 43955a47-7593-4960-743c-08dab29bda5d X-MS-Exchange-CrossTenant-AuthSource: CY5PR12MB6179.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 13:06:08.0985 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4SOo4f4MvYCw/lSV/OInaDWknZq+y8qmVWevkUxBwWpm/MKlcVXyvYSgNw8NaKfSdxW6vxYEfcYB8qkFNe6ecg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6165 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no 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 Tue, Oct 18, 2022 at 06:56:09PM +0200, Hans J. Schultz wrote: > Add a 'blackhole' fdb flag, ensuring that no forwarding from any port > to a destination MAC that has a FDB entry with this flag on will occur. > The packets will thus be dropped. > > When the blackhole fdb flag is set, the 'local' flag will also be enabled > as blackhole entries are not associated with any port. It reads as if the kernel will enable the 'local' flag automatically, which is not true anymore. The bridge driver enforces that 'NUD_PERMANENT' is set if 'NTF_EXT_BLACKHOLE' is specified. > > Thus the command will be alike to: > bridge fdb add MAC dev br0 local blackhole > > Signed-off-by: Hans J. Schultz Looks OK to me. See one comment below. Reviewed-by: Ido Schimmel [...] > @@ -1140,7 +1148,7 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br, > err = br_fdb_external_learn_add(br, p, addr, vid, true); > } else { > spin_lock_bh(&br->hash_lock); > - err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, nfea_tb); > + err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, ext_flags, nfea_tb); I believe the preference is to wrap to 80 columns when possible. > spin_unlock_bh(&br->hash_lock); > }