Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2384008pxa; Mon, 3 Aug 2020 15:01:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1nR7uJzz49kJ2E5xyixU0SIvv9cutiliAGlpn4y9rX6hyPlg/STtphC5rR7KI8e2Grt7f X-Received: by 2002:a50:9e6f:: with SMTP id z102mr18139509ede.300.1596492090304; Mon, 03 Aug 2020 15:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596492090; cv=none; d=google.com; s=arc-20160816; b=Bpu5ypx8A6GnMs8u3AxR57lU3TbRcoBw050UMuPKhiIB/d5JiqPoEOJKM+1g1wzPKm SewhwWEA07jYS+MrKamULRHgcOd17VWBXFIhdjznJIMPi6lVQSDeJzwV0X/7hECwLtNI gX70RMvzgq7vW3EP3EGG/NhbIAfuAU6jFGSsw0zQpYJFwAO3HX8e/UMEkFYvu811ti8j HctUan2JB59boVp1A0ayRXaTgoeDfl+7nnInCTuAhftryI3wxG27R2ZMARML6WRtalfV 1JOoqnESUFbovKGWdDgg7TfhPSzaI3mArk0gz1nEsPLWzuKreXa8JekQUiWAQZ7+1y1j cZ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=lZzQask+FFnXcLk6Auc02TehYACYm4/GukFz1Ai3G1k=; b=tRcK45yfr2dZO0vXaIdX9DZ5CpdaV/sEZWRTn0c+TSWBoAA2Tf3o+PNj8DS2JKShz2 iynOi+hNZn1xzAz1UXyHPxAnSqGww6MWlvNY6mxdsWnHQosW2osaqqYK3Hko51rkXB0/ 20EwCkbZV/eC9PkHGY/iV9w/7dICt9GWhfH2Fpqae+4CGL6F0PbpDM/NE2dMNzL66tn9 VXrQdPOMVR2i4l8DWc9IHpX0IRuZ2Dep4LsXrQdjNVJJRq0Tw/c5xkGLKiU8BKbR1E8l 96HkuN92W2OKd8ZrEfJ0xomONMV61HqRsktmhMqpD38ELbF5i2iXxssmBRM2jSrFQzN9 k57w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bw6si11159436ejb.653.2020.08.03.15.01.07; Mon, 03 Aug 2020 15:01:30 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbgHCV6x (ORCPT + 99 others); Mon, 3 Aug 2020 17:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgHCV6w (ORCPT ); Mon, 3 Aug 2020 17:58:52 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D84D6C06174A; Mon, 3 Aug 2020 14:58:52 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id DAFDC1276E706; Mon, 3 Aug 2020 14:42:02 -0700 (PDT) Date: Mon, 03 Aug 2020 14:58:43 -0700 (PDT) Message-Id: <20200803.145843.2285407129021498421.davem@davemloft.net> To: hongbo.wang@nxp.com Cc: xiaoliang.yang_1@nxp.com, allan.nielsen@microchip.com, po.liu@nxp.com, claudiu.manoil@nxp.com, alexandru.marginean@nxp.com, vladimir.oltean@nxp.com, leoyang.li@nxp.com, mingkai.hu@nxp.com, andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com, jiri@resnulli.us, idosch@idosch.org, kuba@kernel.org, vinicius.gomes@intel.com, nikolay@cumulusnetworks.com, roopa@cumulusnetworks.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horatiu.vultur@microchip.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, ivecera@redhat.com Subject: Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation From: David Miller In-Reply-To: <20200730102505.27039-3-hongbo.wang@nxp.com> References: <20200730102505.27039-1-hongbo.wang@nxp.com> <20200730102505.27039-3-hongbo.wang@nxp.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 03 Aug 2020 14:42:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: hongbo.wang@nxp.com Date: Thu, 30 Jul 2020 18:25:05 +0800 > + if (vlan->proto == ETH_P_8021AD) { > + ocelot->enable_qinq = true; > + ocelot_port->qinq_mode = true; > + } ... > + if (vlan->proto == ETH_P_8021AD) { > + ocelot->enable_qinq = false; > + ocelot_port->qinq_mode = false; > + } > + I don't understand how this can work just by using a boolean to track the state. This won't work properly if you are handling multiple QinQ VLAN entries. Also, I need Andrew and Florian to review and ACK the DSA layer changes that add the protocol value to the device notifier block.