示例#1
0
/* rtnl lock is held */
void enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
{
	struct enic *enic = netdev_priv(netdev);

	spin_lock(&enic->devcmd_lock);
	enic_del_vlan(enic, vid);
	spin_unlock(&enic->devcmd_lock);
}
示例#2
0
static int enicpmd_vlan_filter_set(struct rte_eth_dev *eth_dev,
	uint16_t vlan_id, int on)
{
	struct enic *enic = pmd_priv(eth_dev);
	int err;

	ENICPMD_FUNC_TRACE();
	if (on)
		err = enic_add_vlan(enic, vlan_id);
	else
		err = enic_del_vlan(enic, vlan_id);
	return err;
}