Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2830100pxb; Sat, 30 Jan 2021 16:42:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJylN3cUqSV3NfOQvN9z2CSIRSU/xX1T2e6+3/G1ibsFODij2H7LFP2IvjBNhU5AH7j8WKQf X-Received: by 2002:a17:906:cf86:: with SMTP id um6mr597236ejb.426.1612053748208; Sat, 30 Jan 2021 16:42:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612053748; cv=none; d=google.com; s=arc-20160816; b=VdCr7O0AkaBnfeAuLJDJu5IZ93/YB7Ekq4/c86x8Gwq/zstAYqg33WZQDhw4PkhJQ2 lOgoovb+3wcuqgyctmNoC40V1H7daIGaQ2zri3iJ0Gp7FpZN9w8kkppaSWhsl95IEezc pMzWzPqmUjE5WMz6Q+1n9my87S56v3I2AO6k1BRUMWTmSvTHH35bqXtHqBSCiSjvPoDV DebmZxIQD975BTbs2pQ9EkLLLSp6tlLRBCuPwg2X8GjbwJ7bV2sKO/okQbGMJ/WofQjT tlY3WdOEgX5+1SkM0weE7CXqVN9WxbQqs8fhypplZ65wDEUSfFKmOSFDu5qk0+YkIxaj Z/GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8emZ/+wsE6Y2IQlfPHKjyHe/TnMtAbs64va9Ainsf2g=; b=g1qXGadH6a5TOXQZ/+55nPa5mflGF3nC1hYNVmUx55phuN87XQ1qPLIgOCg4utjZRJ qQS6pWUj/RyVFke9XLg9yOLburSOkwVKjDBDnx3j5jNiPR7MXjrYkMEiJKW8VUbrwdzF Q6LuNchUMhc99gDd19FSsfeqPRn52vMgfLamVex22XpzcLHemR/TRBnYPxXP6to3WIB0 xM4mphN9hlv2e/xPEzDN+ccGAOiHFvQ2liPOtdN+sIO2YuBh3inFX6teo0zjaRfsW0ml LLQe5+vLwLzJ/1+OesqIi5ziRZWmZ4XloEXg83TdQBYDIf8nO09kez9JmNBBC5hzlY3P MkvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kaJ8pg6r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si7760480edt.572.2021.01.30.16.42.04; Sat, 30 Jan 2021 16:42:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kaJ8pg6r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232484AbhAaAkP (ORCPT + 99 others); Sat, 30 Jan 2021 19:40:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232139AbhAaAkN (ORCPT ); Sat, 30 Jan 2021 19:40:13 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39962C061573; Sat, 30 Jan 2021 16:39:33 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id g12so18653444ejf.8; Sat, 30 Jan 2021 16:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8emZ/+wsE6Y2IQlfPHKjyHe/TnMtAbs64va9Ainsf2g=; b=kaJ8pg6reY+C6iLzWJjRcGJZ9NqOq0AthZywh3MABCKnMmDLX12Utj1Mho4cRFY/nd NneVVBYmJIRcPpvf3UWvUhpRhFg77xx9vFKP7jXFgJg5RfXU3h9Xp3/LdMqaQjTVcTid hYoM90gxp67PuCzdC9mL/e9A6RlX0LXVe++gfesPyzFabU9xhtodeud8iLBziTcgi9Wm jntSOe61Ap9ESPmKgCkXRzKM9iMUVg3ROeRvtANMAvI4DDwqrwdaDYAryB7R+HKhTvPB nr73pN7JcBpOZPGezRpWbFctIvvvIv87HKd1kTAltkNtoUqL1OOGyNPQD1E+SMquXFWm auNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8emZ/+wsE6Y2IQlfPHKjyHe/TnMtAbs64va9Ainsf2g=; b=VnBKi8WfeCscCcwKINerCQBvrnkwR0FqmNRlj65R/Esor2MI/jV1xb3dxkf/JQNby7 B9PzWkoM/PZvaZDjczazZrUy6MaidRcM8fVUDisAtt/KTSEmSIjB+dEp6oOuihtXnT04 RUeBWCz1/LW3RyXjOaLb4wMSBW9A6Icb0Rf6i68ZHEdMn82mq+Eoo9mTzH51oW6aJzln j5jTBK8pDl3LR4eX9y9tLz2iucETtn6iZSMcX/kfXQ8nHjyA4Broq6jxmtMGOnyGS5hG gCDd394JYuUy+Gv1k4k3bwf1J1HQMl85HhkTfSkRVaMdvLfgXGOr8zUq7kZF94CnSncf UaYA== X-Gm-Message-State: AOAM5337z4jnyKbGjIaRd5cKDVb/CD+Kcv+b9IMsk7zZcw6n2a4whomT OZMYuzp819hr3x6cT3CCfmg= X-Received: by 2002:a17:906:8611:: with SMTP id o17mr11030650ejx.145.1612053571791; Sat, 30 Jan 2021 16:39:31 -0800 (PST) Received: from skbuf (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id b26sm6621984edy.57.2021.01.30.16.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 16:39:30 -0800 (PST) Date: Sun, 31 Jan 2021 02:39:29 +0200 From: Vladimir Oltean To: DENG Qingfang Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tobias Waldekranz Subject: Re: [PATCH net] net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add Message-ID: <20210131003929.2rlr6pv5fu7vfldd@skbuf> References: <20210130134334.10243-1-dqfext@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210130134334.10243-1-dqfext@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 30, 2021 at 09:43:34PM +0800, DENG Qingfang wrote: > Having multiple destination ports for a unicast address does not make > sense. > Make port_db_load_purge override existent unicast portvec instead of > adding a new port bit. > > Fixes: 884729399260 ("net: dsa: mv88e6xxx: handle multiple ports in ATU") > Signed-off-by: DENG Qingfang > --- Reviewed-by: Vladimir Oltean Tobias has a point in a way too, you should get used to adding the 'master static' flags to your bridge fdb commands, otherwise weird things like this could happen. The faulty code can only be triggered when going through dsa_legacy_fdb_add, but it is still faulty nonetheless.