From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahaf Shuler Subject: Re: [PATCH v3 2/3] net/mlx5: use Netlink to enable promisc / all multicast mode Date: Thu, 22 Mar 2018 07:36:08 +0000 Message-ID: References: <73d9075c4ac78166d5ae88bec01542d9a5af9463.1521639463.git.nelio.laranjeiro@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , "Adrien Mazarguil" , Yongseok Koh Return-path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00084.outbound.protection.outlook.com [40.107.0.84]) by dpdk.org (Postfix) with ESMTP id 8B37D5592 for ; Thu, 22 Mar 2018 08:36:09 +0100 (CET) In-Reply-To: <73d9075c4ac78166d5ae88bec01542d9a5af9463.1521639463.git.nelio.laranjeiro@6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Wednesday, March 21, 2018 3:40 PM, Nelio Laranjeiro: =20 > 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. >=20 > This requires the VF to be trusted by the PF. >=20 > Signed-off-by: Nelio Laranjeiro > Acked-by: Adrien Mazarguil > --- > 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; >=20 > dev->data->promiscuous =3D 1; > + if (((struct priv *)dev->data->dev_private)->config.vf) > + mlx5_nl_promisc(dev, 1); > ret =3D 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; >=20 > dev->data->promiscuous =3D 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?