Wednesday, March 21, 2018 3:40 PM, Nelio Laranjeiro: > VF devices are not able to receive promisc or allmulti traffic unless it fully > requests it though Netlink. This will cause the request to be processed by > the PF which will handle the request and enable it. > > This requires the VF to be trusted by the PF. > > Signed-off-by: Nelio Laranjeiro <nelio.laranje...@6wind.com> > Acked-by: Adrien Mazarguil <adrien.mazarg...@6wind.com> > --- > drivers/net/mlx5/mlx5_nl.c | 94 > ++++++++++++++++++++++++++++++++++++++++++ > drivers/net/mlx5/mlx5_rxmode.c | 8 ++++ > 2 files changed, 102 insertions(+)
[...] > diff --git a/drivers/net/mlx5/mlx5_rxmode.c > b/drivers/net/mlx5/mlx5_rxmode.c index e43a4b030..c1c0f21c7 100644 > --- a/drivers/net/mlx5/mlx5_rxmode.c > +++ b/drivers/net/mlx5/mlx5_rxmode.c > @@ -35,6 +35,8 @@ mlx5_promiscuous_enable(struct rte_eth_dev *dev) > int ret; > > dev->data->promiscuous = 1; > + if (((struct priv *)dev->data->dev_private)->config.vf) > + mlx5_nl_promisc(dev, 1); > ret = mlx5_traffic_restart(dev); > if (ret) > DRV_LOG(ERR, "port %u cannot enable promiscuous mode: > %s", @@ -53,6 +55,8 @@ mlx5_promiscuous_disable(struct rte_eth_dev > *dev) > int ret; > > dev->data->promiscuous = 0; > + if (((struct priv *)dev->data->dev_private)->config.vf) > + mlx5_nl_promisc(dev, 0); Same comment: What if the DPDK process is terminated ungracefully?