[dpdk-dev] enic: fix vlan filtering
Commit Message
From: Julien Meunier <julien.meunier@6wind.com>
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>
---
drivers/net/enic/enic_ethdev.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On 30/10/15 9:43 pm, "David Marchand" <david.marchand@6wind.com> wrote:
>From: Julien Meunier <julien.meunier@6wind.com>
>
>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>
>---
> 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 e385560..5df9a6c 100644
>--- a/drivers/net/enic/enic_ethdev.c
>+++ b/drivers/net/enic/enic_ethdev.c
>@@ -271,13 +271,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;
Acked.
Thanks,
-Sujith
> }
>
> static void enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int
>mask)
>--
>1.9.1
>
2015-10-31 17:04, Sujith Sankar:
> On 30/10/15 9:43 pm, "David Marchand" <david.marchand@6wind.com> wrote:
> >From: Julien Meunier <julien.meunier@6wind.com>
> >
> >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.
Applied, thanks
@@ -271,13 +271,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)