Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp116244iol; Fri, 10 Jun 2022 23:25:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqfoBYjy11yClZTfDeU/Jok5VH0noDMbSANyLqqx2SN9kaOSsJ1KH/hUf0vNvPV/7DrSxU X-Received: by 2002:a05:6402:125a:b0:431:34c8:4805 with SMTP id l26-20020a056402125a00b0043134c84805mr2048316edw.314.1654928739293; Fri, 10 Jun 2022 23:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654928739; cv=none; d=google.com; s=arc-20160816; b=tBFzBusxejBz110/MiWLCn4FqFe94/qjsBwZOvf5DwiETHxBYCTWjeglr5eZJrSX8+ 6ZFvQ7/GeCWqiRikAYusTFmBZqNh9rFjAjiX4l1nG/au/byQtSp+Vi++QGsnU5Rcj62N 0k3FM/9b62ZBvO6Z8YR9NpFX7kqi/rVO3KhQxnfx1TrncmLhkrfJ+DqrejpIhNnsOUhG SmV7K7+XoIiMOzX9hlWQ3C1mtPxFVlyQXToJ4jszo+uUUHQ0EI0YDJ7VRWhfaSE7uA/k bhV+qrDX6dzgtnZJWg5j9a3nFDcMUtB5k6rG7F+pUfscSy5yUHNgUE2bYvKW8vhW3/Ap AhIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rpYr6tPbzcLpxRKr1xs39mOC3G4ibWJgqJCFbMl0S98=; b=vifcyKKc7IG8pa2Nb0ai14dd1+LthcG4aV9w76BkCM7EO3mmJjHhRmaw+EjG4Pj5ox FmzlFo9aA/zo35DaASnWJL2fD3mbENFrhpMYGx9Z5nienJ+dnw6etAgrj7l4Yr/9rncF a+rIkmVL1kiHpjXtTzo7WNa5ctv89xWQm/UKjWUqtLtZHcFa59UctcbDrhnXJt/iTtX/ 0paeM/AYZEwcsRLDxzUYrsyXSl50dH+l1YUjQMk7QpNrDKPDX+Bx3ig/A6sO/kx+lI3V wi/0sHXh9GbO+6ncg7PNNqUd/LEtlOkUuASw4lhZnLHUC55xSATL05dbrS4lXAbHL5t/ Eg4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EOyxoKLc; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a1709067a0f00b006fee7a49b31si1056155ejo.450.2022.06.10.23.25.12; Fri, 10 Jun 2022 23:25:39 -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=@kernel.org header.s=k20201202 header.b=EOyxoKLc; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347004AbiFKEpQ (ORCPT + 99 others); Sat, 11 Jun 2022 00:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiFKEpN (ORCPT ); Sat, 11 Jun 2022 00:45:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD6D6D3BE; Fri, 10 Jun 2022 21:45:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3CDD060AB2; Sat, 11 Jun 2022 04:45:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FDABC34116; Sat, 11 Jun 2022 04:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654922708; bh=wGn2rPCuxew5qwldJYSVq19UhC8f95uZDKrBI+AiCAs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EOyxoKLc9zXozWV7DhcLaFfbrZrgbhBfWXvYbc+Lt4wFOIHKclOPGOCzoYGcMtDZh RG+SyRAXenLZQC7KMgi/e5wAXA9dlIAaqo4FYwicuklL6O0V9bglXECa/erWrP4892 sw28v8UNUIYjuFFFMlOHMn/BdLYAZIHQRGrzcV/XzvwhmGAi9GgAUU1+7j9oQpVSZu KEAJfI1eUdBhkdaITLN7U9feUtgkZEAQHZnP6BAj4Ky1qSqXNF/e0sJZ9ONuARh66L ayhkV6fKRt1LWfXp0iWBx92ZBISS7NHAaodySUd+q6PFhPK39pZ2YFQtu5IxElOEY1 U14TuxV1zh5dQ== Date: Fri, 10 Jun 2022 21:45:06 -0700 From: Jakub Kicinski To: Jiaqing Zhao Cc: Samuel Mendoza-Jonas , "David S . Miller" , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: Re: [PATCH v2 0/6] Configurable VLAN mode for NCSI driver Message-ID: <20220610214506.74c3f89c@kernel.org> In-Reply-To: <3c9fa928-f416-3526-be23-12644d18db3b@linux.intel.com> References: <20220610165940.2326777-1-jiaqing.zhao@linux.intel.com> <20220610130903.0386c0d9@kernel.org> <3c9fa928-f416-3526-be23-12644d18db3b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Sat, 11 Jun 2022 11:25:03 +0800 Jiaqing Zhao wrote: > > Why is "ncsi,vlan-mode" set via the device tree? Looks like something > > that can be configured at runtime. > > Actually this cannot be configured at runtime, the NCSI spec defines no > command or register to determine which mode is supported by the device. To be clear I'm not saying that it should be auto-detected and auto-configured. Just that user space can issue a command to change the config. > If kernel want to enable VLAN on the NCSI device, either "Filtered tagged > + Untagged" (current default) or "Any tagged + untagged" mode should be > enabled, but unfortunately both of these two modes are documented to be > optionally supported in the spec. And in real cases, there are devices > that only supports one of them, or neither of them. So I added the device > tree property to configure which mode to use. But for a given device its driver knows what modes are supported. Is it not possible to make the VLAN mode passed thru ncsi-netlink? Better still, can't "Filtered tagged + Untagged" vs "Any tagged + untagged" be decided based on netdev features being enabled like it is for normal netdevs?