[dpdk-dev] [PATCH 0/3] promiscuous mode enable on VF

Zhao1, Wei wei.zhao1 at intel.com
Thu Jan 17 10:27:20 CET 2019



> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Thursday, January 17, 2019 2:59 AM
> To: Zhao1, Wei <wei.zhao1 at intel.com>
> Cc: dev at dpdk.org; stable at dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>
> Subject: Re: [dpdk-dev] [PATCH 0/3] promiscuous mode enable on VF
> 
> On Wed, 16 Jan 2019 12:42:52 +0800
> Wei Zhao <wei.zhao1 at intel.com> wrote:
> 
> > There is need to enable promiscuous mode enable on VF, pf host should
> > also enable to support that.
> >
> > Zhao Wei (3):
> >   net/ixgbe: promiscuous mode enable on VF
> >   net/ixgbe: enable promiscous mode on PF host
> >   net/ixgbe: update API version
> >
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 21 +++++++++++
> > drivers/net/ixgbe/ixgbe_ethdev.h |  1 +
> >  drivers/net/ixgbe/ixgbe_pf.c     | 79
> +++++++++++++++++++++++++++++-----------
> >  3 files changed, 79 insertions(+), 22 deletions(-)
> >
> 
> Is there someway to check if PF on host allows promiscious mode (and fail
> the attempt to set it on VF if not allowed).

Yes, 
Pf host has check vfinfo[vf].api_version, that is key for that check.
If fail, it will return -1.


	switch (vfinfo[vf].api_version) {
 	case ixgbe_mbox_api_12:
+		/* promisc introduced in 1.3 version */
+		if (xcast_mode == IXGBEVF_XCAST_MODE_PROMISC)
+			return -EOPNOTSUPP;
+		break;
+		/* Fall threw */
+	case ixgbe_mbox_api_13:
 		break;
 	default:
 		return -1;
 	}


More information about the dev mailing list