[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLUPR0701MB2004A321103E707B6F6A63918DC00@BLUPR0701MB2004.namprd07.prod.outlook.com>
Date: Thu, 15 Jun 2017 12:50:57 +0000
From: "Mintz, Yuval" <Yuval.Mintz@...ium.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "oss-drivers@...ronome.com" <oss-drivers@...ronome.com>,
Pablo Cascón <pablo.cascon@...ronome.com>
Subject: RE: [PATCH net-next] nfp: add VLAN filtering support
> From: Pablo Cascón <pablo.cascon@...ronome.com>
>
> Add general use per-vNIC mailbox area and use it for VLAN filtering support.
> Initially proto is hardcoded to 802.1q.
>
...
> +static int
> +nfp_net_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16
> +vid) {
> + struct nfp_net *nn = netdev_priv(netdev);
> +
> + /* Priority tagged packets with vlan id 0 are processed by the
> + * NFP as untagged packets
> + */
> + if (!vid)
> + return 0;
> +
> + nn_writew(nn, NFP_NET_CFG_VLAN_FILTER_VID, vid);
> + nn_writew(nn, NFP_NET_CFG_VLAN_FILTER_PROTO, ETH_P_8021Q);
If it's hard-coded, don't you want to fail the request in case proto is different?
Powered by blists - more mailing lists