Received: by 2002:a05:7208:31d3:b0:81:e143:7c29 with SMTP id v19csp416117rbd; Fri, 5 Apr 2024 08:14:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuup/kSjPkpuhXCgj3kS/yk/K7Tf5ivFlqJH+VMfxCfDRmLSf/vXEWX3xN0gQEprhmoIvDsnt8t3QmQFE9Z0IPVcqziRBDNJlksAaxJw== X-Google-Smtp-Source: AGHT+IHwYeFE4qzoi07h3htWeJmGMgqbk6omBeenZdwlnmVmFah6D6iigFspyFn2v6xpXU+wSMSh X-Received: by 2002:a17:906:fb1a:b0:a4e:9962:2dfc with SMTP id lz26-20020a170906fb1a00b00a4e99622dfcmr1274165ejb.21.1712330057172; Fri, 05 Apr 2024 08:14:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712330057; cv=pass; d=google.com; s=arc-20160816; b=g+rwuobBu5ft4uQzhl9MPjuuW4fVTL16XKpVJbKfC0CbFJ280CTOC7jzwNxQsNMnDV /xt3jquaV96cyY0bL3TURomQwCkilz3iSLQC0sA5icj42SI59/fkCo9eMbDoOUvZrgn7 tMpxOzIa8KLqSazXjbSTkJ3/OCBYqtKRFzxi0c1dmQr/PEJL5Y7NDChvHa72ILkwZaij lEq7ad1i1o+j9ZMlJdz6sD2r5lQd5Beka8NCum3rhTNwaFX58c8hYqE2e7tul84snWVw hHqzg55c49DkMvTMTsFSm6uY2XvZ3AP/DtzEFnHqQwDB3AM5LMywUBKokKhCk4vCfABJ PC+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cW66Xi9N1jJiiCbW5+5cftF5AQ4e7QDnxMyMEgeBBJg=; fh=+PE2mZTwHnls9WkcrOz07ZDoz5eatm/E6ExW7Jwv3LA=; b=Xnn1VNwLjmmehvghsfDyFI5KHoaMUxbKva3H/6IFlX/hkaueHIfkSKF6QNCwGUEaK6 2Aw5qQmZyISAasda9XI27k8NCY51UdVGNjccV9gDVzQ9PCHhHJVx83Z9VLW5iAQFpnr4 QgcPaIwRMkqnCM95LqpbFIwyjxE8O1nw1V9jRltKyKVuzegvH74pCSrk8aIOvuPmeuYb lNy4Uf5hclUZaVcizdbVy5AkjtFnVrlL7QHIo5BQ58uhSm00B0rxFe0VqsjTaRAsPmSo x37cdsx6UI8FcUxP3uTNRSeSoNwrYYgbvu6PhCK9FpYdan+7yYOM8phu2EiT0c/3dJj6 Y80g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dK9l+6jq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w19-20020a170906481300b00a51a2130c4fsi782032ejq.645.2024.04.05.08.14.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 08:14:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dK9l+6jq; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-133222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E8F2D1F242DC for ; Fri, 5 Apr 2024 15:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7F7716F857; Fri, 5 Apr 2024 15:14:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dK9l+6jq" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A41343170; Fri, 5 Apr 2024 15:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712330046; cv=none; b=XA6tsE1EtO4h+7Fm4jKvR8uEobSuX2GjOgX8A6FEDW+OOMBR3RyBLJLHspEY4vt/W8NpXBvyTEFUIEonsepkzpIaUFE0qGPkTBEh6JBPEVEJ5iMkDXplGtLavXGFI4bQEaB4WVVHD/lN2EMkO1v7mekhZx4IVaIWlh/aWbtbyNc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712330046; c=relaxed/simple; bh=iwj0KP+eanKsQzXfz4LZn/8GeEnuSPo+VMKDJLnxQ2c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pt8ApqLKFPNUGYlLeP1A+DKiOtQ9erG3NuDlCGEtrSj58Z+YMruVnDLMws8+oKyCWn6vAm4gQXELpmtam/nX/hQRNpcYEDho5X6ULhuun9DCGe3FhOpbHzVzWGdRmxd9gPxUsOUVV3fSYdLe437Y4/2B0vYA9yDjqTQCRIuUGEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dK9l+6jq; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-56e0c00e7fcso2629068a12.2; Fri, 05 Apr 2024 08:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712330044; x=1712934844; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=cW66Xi9N1jJiiCbW5+5cftF5AQ4e7QDnxMyMEgeBBJg=; b=dK9l+6jqI6WCpO1EXPkADspupHr2IK5YfXtNThm72Hjh6qrJut80XmaBR/y/0Mv4GD bfcBb8KQ/EXzw/uqhoi8r/RiwTmSVncMVRIzUt2l+vmWxPl4A/XfDEyeu+mM80HOteL1 ZWx8hnVDdWGPb1/N3IuPaY/g62wSEAIVw2FGUDp1zwqzoVFHtuI47CaNtm9cXKLZ3rv+ qo6AgGAvtDlJEFUCTicJi6a1huQJQgfu29juImatsUmpFvD9+lzig7Yt3mf51nab1iYj hd1LWkNrYAl5dDtmLeiz1LeB11qx90ceHrbunadzgMSk89OyPuurr5BjZvM/3qWYEMAh 5enA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712330044; x=1712934844; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cW66Xi9N1jJiiCbW5+5cftF5AQ4e7QDnxMyMEgeBBJg=; b=pBNhF5AQDl+6dXhHrZuR5cfCdiNadZPdB224hM+XC9iKNd1qnYg3qPsrdlFFA5Li9M 0UiIvwXTnBI8PS06w1vSxOrVb0qbK/D4w27f8UAiI7ttf9Uvfj+tjUKz5kB/nOba7KBI X/uIWbkx+A7aI0ACF6yTAceAA4h6cwrg8jctTY/2ZJ40sUHA3TZK1IcfumTGJBiZ25pN K2ABiIHvT73RPrnw1pZ7QBhQjBfk4FwAi4AbEC5n3rJvuAiQEaDTlzMsI5cOWNkAM5LS uPGW2+S2W+tSz6eRQzMIg0RenKYgsxQvHsaLhXcN8dXL9Yt9Em8nsJCo7gwcYcNggzUS rzkw== X-Forwarded-Encrypted: i=1; AJvYcCUYZHNlqgRsF31vlWZZYNCvT/UUzq7ULplxKhtIhE7AhZU65JFbDVhj4lYgy0IIA2ttsgW5PJhQLtVknY0MX5V+3bTdWeOb0JvuJdZh X-Gm-Message-State: AOJu0YylXxYGz51YjhgNbTN8b39YGqB0LdpLl/8dgnz8ZXQcZIqfK9wm s1hDkunWhKZaq7eERjkNv7Jqtlzhpu8casXByronDQn+4qRPWD1N X-Received: by 2002:a50:8acd:0:b0:56b:9029:dd48 with SMTP id k13-20020a508acd000000b0056b9029dd48mr1207020edk.5.1712330043498; Fri, 05 Apr 2024 08:14:03 -0700 (PDT) Received: from skbuf ([2a02:2f04:d700:2000::b2c]) by smtp.gmail.com with ESMTPSA id o9-20020aa7c509000000b0056bf6287f32sm883472edq.26.2024.04.05.08.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 08:14:02 -0700 (PDT) Date: Fri, 5 Apr 2024 18:13:59 +0300 From: Vladimir Oltean To: Pawel Dembicki Cc: netdev@vger.kernel.org, Linus Walleij , Simon Horman , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Russell King , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v8 13/16] net: dsa: vsc73xx: Implement the tag_8021q VLAN operations Message-ID: <20240405151359.3kuawi4ylug6ryfc@skbuf> References: <20240403103734.3033398-1-paweldembicki@gmail.com> <20240403103734.3033398-1-paweldembicki@gmail.com> <20240403103734.3033398-14-paweldembicki@gmail.com> <20240403103734.3033398-14-paweldembicki@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240403103734.3033398-14-paweldembicki@gmail.com> <20240403103734.3033398-14-paweldembicki@gmail.com> On Wed, Apr 03, 2024 at 12:37:29PM +0200, Pawel Dembicki wrote: > @@ -756,6 +756,12 @@ static int vsc73xx_setup(struct dsa_switch *ds) > > mdelay(50); > > + rtnl_lock(); > + ret = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q)); > + rtnl_unlock(); > + if (ret) > + return ret; > + No dsa_tag_8021q_unregister() in vsc73xx_teardown()? Also, a bit odd placement, while the resets haven't all finished (this falls in between the IP multicast flood mask and the PHY resets. It makes future refactoring of the other code harder. Additionally (and much worse), even later in vsc73xx_setup(), you clear the VLAN table with portmaps of 0. Doesn't this wipe out the configuration made by dsa_tag_8021q_register() -> dsa_tag_8021q_setup() -> dsa_tag_8021q_port_setup() -> dsa_port_tag_8021q_vlan_add() -> dsa_switch_tag_8021q_vlan_add() -> dsa_port_do_tag_8021q_vlan_add() -> vsc73xx_tag_8021q_vlan_add() -> vsc73xx_tag_8021q_vlan_add() ?