Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7126611ioo; Thu, 2 Jun 2022 23:34:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0rCwkePQis3ThDsOXS8m8BkDMvtLHJrmewZ7dA7YZGf9zOLVnNuSFsm2FbT3RAtBZiN+c X-Received: by 2002:a05:6402:1914:b0:42b:73ae:e082 with SMTP id e20-20020a056402191400b0042b73aee082mr9154906edz.31.1654238096174; Thu, 02 Jun 2022 23:34:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654238096; cv=pass; d=google.com; s=arc-20160816; b=Ab37iPP3wP1SEAiAd1WDW8lRzNdt+tzYQN13b1JnPQRCLQGxVJkX2hRIUMj5oIJ11k QeH1lva96mpfIpj8dT3S7Dv9q1IhVC989SdhtLZF7GpyY0qojB754tvzBXuDyWeH4R6J p/jbMd8JJ32W3ESGjbMijE66wYZtVrl1UubZrp3VW/1PDeJAemTIOaEs1k1iBYwjXmdH uHoXJG4mKbLFGuCm/5G7oq6pza0pAADhwqA+HbxAUAFBU7lNxmCJawy1rQW/NOdSSCth P4LkIGQ9sZznb7M4CtHB16HhsARRKJ0Hpt5nq9MfZXryTfHNr9LJjB5iCa5wKBD0dhps algQ== 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=b9kZhFWd/1xWGauzcAV7xzrvbmjGqdFbwJMrVUn0+o4=; b=us8ZRp2zMXfvQBWgFmWNcLOGwmas86z4LgfqUhmDD1hpDeQyjtugbKkkk4rXfyBBuT ZBkwoqvmZl0SaqxwtWzNvDBCMsyegK/d1jL9qeAkJQZwFGxqwVxJK/glBdlFpQfKW74S c9v9EirCDz/pyGDqCVoUWrPDP0xo1kjBjGdYsuVs6+eNrAPAQjTZ6xoLLzh/kEL7jDbp otBDAciM9GK8JOvZ5V6uUXMEmI/DwpKfN5IfVvOgA2bkEe50UEjLlMa9TrJOU340vUzz A+YYOKvDDBVor40GmvFR8jztQpMThz4jxEXP9j5l4QUo31VFN5aabuJvckX7iuAK6Kcj 77FQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=NUQ5HuNK; 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 pv2-20020a170907208200b006e839d9ca07si5602734ejb.156.2022.06.02.23.34.22; Thu, 02 Jun 2022 23:34:56 -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=NUQ5HuNK; 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 S234874AbiFBMSq (ORCPT + 99 others); Thu, 2 Jun 2022 08:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232328AbiFBMSn (ORCPT ); Thu, 2 Jun 2022 08:18:43 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2066.outbound.protection.outlook.com [40.107.243.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0108E0C9; Thu, 2 Jun 2022 05:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BMGf73d53LLA71tO4hkvmTQMkfAJP7SF5NIJPGDLEzL5dmjQdcuwVrOhaO1wZT2Y8C1U9RjWy1ayBjGt59bXSE/GBg3fk2XYOVrZvC26FJbjRFwUdgDMTvnMcnRvqkpzvNmygCfOgCV+5OEMyylkUdVcceQCkmNo04nhpoHcfCbslaVzAPr+PhYjJgSQ9+uY+d5GbkfGWR+F6x/YUv2hbuM413V/zAVsIVWvHMEauDNVPDbVBVkCgJvyBJ8bHT6yJdc0lL2ew5QiJq0dIA2cq/vB4OdYATyHOqi8hs84+d2k0Jnj03WSFnVoflYbhsMtwG2bSIlQDgNfHT55+qTuuw== 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=b9kZhFWd/1xWGauzcAV7xzrvbmjGqdFbwJMrVUn0+o4=; b=E7TqnqB8RwKaAMRfDo1OoXGIfW/dZXxNT+JKIJBH0yBWTig2M+s0xEz6vqt6SF6EOTUnnlkMGP1s1utuTgm1s2+YGLk504ICZGyWuVN/TG1BN0EjMy2qB/46SmbTFCaMJGoNi3tJXMiijeOHQkpNhp+xBdmuBvEZf1SDijkY8JIZf5wioVRkmsHliVFCo0SYX3n4A3sBS62VH3fEnbe2BPy75mo/6K6nHC/TeskMKBD4CRNhew+9+OKCqVmRBmUWkrSfi4o5uY0Kx/gLzz8i0F8O35eKfz7j4nIXec+Cz1vSHAygXZ3cCOUOmx1B4yljujX+fPTI8xSWCBEgckZdnA== 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=b9kZhFWd/1xWGauzcAV7xzrvbmjGqdFbwJMrVUn0+o4=; b=NUQ5HuNKfdRJPyEVUcj8nOgGOLYMZEkpk8/wljJs2PbwmphkuEWC9jsHXt3nz4N4XzDeazOzetkn62IpYkblwDmHv3IKXReEbb+BRalCXml7xtfnfQ76GBatmfsKGByer0mIZHHPFyLx3hhhUheVSVLFnEOyfFQVPupFuUcdRMrQThlNyQdoSSUGp7RtgwDNHz4mzpqcc9M+Sz3EPRYeg52A27uICAn7KmIpfuUZHotxmZb3hUzQppY7ckNtvAPFD7NVGeYo04kk4GvNtJ6KOfQTtJS2DSnl1XPmzHfh1aokwXu46UbWQShY4rbOee1Uyyw9PAIlsKXKTqCPlpFLFA== 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 BN6PR1201MB0004.namprd12.prod.outlook.com (2603:10b6:404:ac::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Thu, 2 Jun 2022 12:18:38 +0000 Received: from CY5PR12MB6179.namprd12.prod.outlook.com ([fe80::99d2:88e0:a9ae:8099]) by CY5PR12MB6179.namprd12.prod.outlook.com ([fe80::99d2:88e0:a9ae:8099%2]) with mapi id 15.20.5314.012; Thu, 2 Jun 2022 12:18:38 +0000 Date: Thu, 2 Jun 2022 15:18:31 +0300 From: Ido Schimmel To: Hans Schultz Cc: Nikolay Aleksandrov , Ido Schimmel , davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Shuah Khan , Daniel Borkmann , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH V3 net-next 1/4] net: bridge: add fdb flag to extent locked port feature Message-ID: References: <86sfov2w8k.fsf@gmail.com> <86sfoqgi5e.fsf@gmail.com> <86y1yfzap3.fsf@gmail.com> <86sfonjroi.fsf@gmail.com> <3d93d46d-c484-da0a-c12c-80e83eba31c9@blackwall.org> <86mtevjmie.fsf@gmail.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86mtevjmie.fsf@gmail.com> X-ClientProxiedBy: VI1PR0602CA0024.eurprd06.prod.outlook.com (2603:10a6:800:bc::34) To CY5PR12MB6179.namprd12.prod.outlook.com (2603:10b6:930:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05d96115-8d4e-4b2e-1046-08da449205af X-MS-TrafficTypeDiagnostic: BN6PR1201MB0004:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y4PpsbCVsTJ9nvMNTooKDbywNdC0AQgrWJZbTrAPfhIKr2DDl/7u3wZ1vWrJsL0XOnhzIgsQdJEiFrgUIaosTXB++Q0pq81FVO2ozJ2eOiRSnfutqxWUwNyk0igVHi/wA+PdtnwJUMVXMrbX1o/Z48mr82wKpZeREd8FUcKF0xfTGEIU3mXbqhwWuvWyRAVwstfLp60CRZyoyP5BZ1O5pXJKqljmGwfH95Kdj/SvvSXdiCIz36404DpoUtatYfMRnS5JUXTL1hOG0bd7L6LHFbgPyxqmEhrqGvPyea/AINV6TF73QmK649w16OniRRU4/2Ne21I8eqcuR0xl+tcxst003hhJ97R/5X2ZC6+BKX2lY06xM2sbr9YD+e2b7PP/0uUMrxChXYEvNArv3cH/UHUm+iob2cljRLs6O0/EZpnnngkWHVeQ9U9KphIZ6T0ja4oMg4l428G7ZyfL8sgtyjenS1dP/x1Ew4IfH3n5lNksPwcHeZXvzLdXK9SlF34gwU5s+QuOCyRj4iBGwayJ55xq4ulH9FC9Rww9dlfzFK/a23T9rPQw2lBDVXGPe0PPf2h49fpTOkszYkhfpjs47dJgBU4gafNX1DMGOZCMcHXjx74QyS9UbeIEmtOZetZG1dGrVPV4SuwJMx81K06mSg== 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:(13230001)(4636009)(7916004)(366004)(6486002)(6916009)(66556008)(54906003)(66476007)(66946007)(316002)(5660300002)(8676002)(186003)(4326008)(8936002)(508600001)(86362001)(33716001)(38100700002)(2906002)(26005)(7416002)(9686003)(6506007)(6666004)(6512007)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?VmrPmcTgldS+Za+rSo5I8QMKc1EPHnFAaKorflwwXylmKWP7Wn6WQgiTac76?= =?us-ascii?Q?fxrPwwfVBgiYdG9DjXTYZH1fD6VOhqH44M1peJhknRHbk2D/8eCDITo97w1b?= =?us-ascii?Q?WudqsUBl2Dt+uX3FtVPjL4ijnnqtL29heoFQr66i6txNpSSQY2sMKCMf+grx?= =?us-ascii?Q?ryStrBTI6KR+s8pdora3Ot/bkCYwc3hmRJs9gswE1AeTK9L2uc8f7L2ecMx7?= =?us-ascii?Q?6Z1JORZwE2TUFpqdU0B0yEleiZGRrVdS0UclL7BVptFX8cU6CP3CXRrB7Hbb?= =?us-ascii?Q?UCF5MuDH4xZYivQyhnfbhwBn0R1ilWTnCaGMl5EFwTtrqYdOGMg6oqVI4TWR?=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90SjzU09t36fASIU/l73MOZkL?= =?us-ascii?Q?hHGbLBs1/rI4e7F8FYQIVDJyneaQpfLyAJx2GEwPSZoQjmJL9RrQRoq3OM5h?= =?us-ascii?Q?D8xj+6i9gKcrJxeYLVHaqak088vp8XnXwA8kmbAl9WOfaib/RBexqV3LKWrg?= =?us-ascii?Q?kQTqvKA4qmlvRfk4eQmhuxOL2Esl/3H2BB8rGa2I3370bp+sf5wKwb/4E/Q3?= =?us-ascii?Q?x0zYVGRnCD7gEkG8i04XcjhzmhdxGUdpCg51iVKPMj4tgcmxl6b8syTLPCjQ?= =?us-ascii?Q?msmx4sziV4K1M/2xuHUuTb/LLVuTJfhzdljcdXF9Gjg202LvX5I+1YDRPmnm?= =?us-ascii?Q?qh0Nwz8GiMqSQNCHAFSIk8FNYbr/ReI4bBZTU+0qFXzTzkrGI8mTIPx1ERC0?= =?us-ascii?Q?KNpr/kl3DOsEJIWDqglwO7zvgx65G4VZlDuEy/9QU2H/0gFr8/CnJrhmV2xT?= =?us-ascii?Q?JrtuPJy6fplCrE0QIToQ+KzztjJIhmvTlLXNUhEBqfCpGR2plyfbSvbqBUoE?= =?us-ascii?Q?FuxG2wS9kQ=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05d96115-8d4e-4b2e-1046-08da449205af X-MS-Exchange-CrossTenant-AuthSource: CY5PR12MB6179.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2022 12:18:38.0119 (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: YfjCJUNxbIggygLS14c7ZJCwqlvdxmPUnaNmgan6pUi8wG5LVd+XnuhMYw/meN9TsFRqkSg7MZe98jdJ6Cd7WA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0004 X-Spam-Status: No, score=-1.7 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, T_SCC_BODY_TEXT_LINE 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 Thu, Jun 02, 2022 at 02:08:41PM +0200, Hans Schultz wrote: > > > > I think Hans is testing with mv88e6xxx which dumps entries directly from > > HW via ndo_fdb_dump(). See dsa_slave_port_fdb_do_dump() which sets > > NTF_SELF. > > > > Hans, are you seeing the entry twice? Once with 'master' and once with > > 'self'? > > > > When replacing a locked entry it looks like this: > > # bridge fdb show dev eth6 | grep 4c > 00:4c:4c:4c:4c:4c vlan 1 master br0 extern_learn offload locked > > # bridge fdb replace 00:4c:4c:4c:4c:4c dev eth6 vlan 1 master static ; bridge fdb show dev eth6 | grep 4c > 00:4c:4c:4c:4c:4c vlan 1 self static This output means that the FDB entry was deleted from the bridge driver FDB. > > The problem is then that the function > br_fdb_find_rcu(br,eth_hdr(skb)->h_source, vid); > , where the h_source and vid is the entry above, does not find the entry. > My hypothesis was then that this is because of the 'self' flag that I > see. br_fdb_find_rcu() does a lookup in the bridge driver FDB, but per the output above, the entry isn't there for some reason. It's only in HW. Can it be that you driver is deleting these entries from the bridge driver FDB via SWITCHDEV_FDB_DEL_TO_BRIDGE for some reason? > > I am thinking that the function dsa_slave_port_fdb_do_dump() is only for > debug, and thus does not really set any flags in the bridge modules FDB, > but then I don't understand why the above find function does not find > the entry?