From: Jakub Kicinski <kuba@kernel.org>
To: Huazhong Tan <tanhuazhong@huawei.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <salil.mehta@huawei.com>,
<yisen.zhuang@huawei.com>, <linuxarm@huawei.com>,
GuoJia Liao <liaoguojia@huawei.com>
Subject: Re: [PATCH net-next 1/2] net: hns3: adds support for dynamic VLAN mode
Date: Wed, 20 May 2020 14:06:17 -0700 [thread overview]
Message-ID: <20200520140617.6d8338bf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <1589937613-40545-2-git-send-email-tanhuazhong@huawei.com>
On Wed, 20 May 2020 09:20:12 +0800 Huazhong Tan wrote:
> From: GuoJia Liao <liaoguojia@huawei.com>
>
> There is a scenario which needs vNICs enable the VLAN filter
> in access port, while disable the VLAN filter in trunk port.
> Access port and trunk port can switch according to the user's
> configuration.
>
> This patch adds support for the dynamic VLAN mode. then the
> HNS3 driver can support two VLAN modes: default VLAN mode and
> dynamic VLAN mode. User can switch the mode through the
> configuration file.
What configuration file? Sounds like you're reimplementing trusted
VFs (ndo_set_vf_trust).
> In default VLAN mode, port based VLAN filter and VF VLAN
> filter should always be enabled.
>
> In dynamic VLAN mode, port based VLAN filter is disabled, and
> VF VLAN filter is disabled defaultly, and should be enabled
> when there is a non-zero VLAN ID. In addition, VF VLAN filter
> is enabled if PVID is enabled for vNIC.
>
> When enable promisc, VLAN filter should be disabled. When disable
> promisc, VLAN filter's status depends on the value of
> 'vport->vf_vlan_en', which is used to record the VF VLAN filter
> status.
>
> In default VLAN mode, 'vport->vf_vlan_en' always be 'true', so
> VF VLAN filter will set to be enabled after disabling promisc.
>
> In dynamic VLAN mode, 'vport->vf_vlan_en' lies on whether there
> is a non-zero VLAN ID.
>
> Signed-off-by: GuoJia Liao <liaoguojia@huawei.com>
> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
next prev parent reply other threads:[~2020-05-20 21:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 1:20 [PATCH net-next 0/2] net: hns3: adds two VLAN feature Huazhong Tan
2020-05-20 1:20 ` [PATCH net-next 1/2] net: hns3: adds support for dynamic VLAN mode Huazhong Tan
2020-05-20 21:06 ` Jakub Kicinski [this message]
2020-05-21 1:33 ` tanhuazhong
2020-05-21 1:36 ` Jakub Kicinski
2020-05-21 2:26 ` tanhuazhong
2020-05-20 1:20 ` [PATCH net-next 2/2] net: hns3: add support for 'QOS' in port based VLAN configuration Huazhong Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200520140617.6d8338bf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=liaoguojia@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=tanhuazhong@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).