enic: fix vlan filtering
authorJulien Meunier <julien.meunier@6wind.com>
Fri, 30 Oct 2015 16:13:23 +0000 (17:13 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 10 Nov 2015 16:06:53 +0000 (17:06 +0100)
Report an error when something went wrong.

Signed-off-by: Julien Meunier <julien.meunier@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Sujith Sankar <ssujith@cisco.com>
drivers/net/enic/enic_ethdev.c

index 3888dbb..2a88043 100644 (file)
@@ -277,13 +277,14 @@ 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)
-               enic_add_vlan(enic, vlan_id);
+               err = enic_add_vlan(enic, vlan_id);
        else
-               enic_del_vlan(enic, vlan_id);
-       return 0;
+               err = enic_del_vlan(enic, vlan_id);
+       return err;
 }
 
 static void enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)