From 4d4a76a6c915647515b9633540fdf3fbaf1f13a7 Mon Sep 17 00:00:00 2001 From: Julien Meunier Date: Fri, 30 Oct 2015 17:13:23 +0100 Subject: [PATCH] enic: fix vlan filtering Report an error when something went wrong. Signed-off-by: Julien Meunier Signed-off-by: David Marchand Acked-by: Sujith Sankar --- drivers/net/enic/enic_ethdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 3888dbb12e..2a8804312f 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -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) -- 2.20.1