> From: Pablo Cascón <pablo.cas...@netronome.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?