[dpdk-dev,16/39] net/ixgbe/base: bump mailbox version

Message ID 1472312902-16963-17-git-send-email-xiao.w.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Xiao Wang Aug. 27, 2016, 3:47 p.m. UTC
  This patch will pave the way for the new VF unicast promiscuous
mode support.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_mbx.h | 5 +++--
 drivers/net/ixgbe/base/ixgbe_vf.c  | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit Sept. 19, 2016, 5:03 p.m. UTC | #1
On 8/27/2016 4:47 PM, Xiao Wang wrote:
> This patch will pave the way for the new VF unicast promiscuous
> mode support.
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
>  drivers/net/ixgbe/base/ixgbe_mbx.h | 5 +++--
>  drivers/net/ixgbe/base/ixgbe_vf.c  | 2 ++
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base/ixgbe_mbx.h
> index c3e301f..7556a81 100644
> --- a/drivers/net/ixgbe/base/ixgbe_mbx.h
> +++ b/drivers/net/ixgbe/base/ixgbe_mbx.h
> @@ -90,6 +90,7 @@ enum ixgbe_pfvf_api_rev {
>  	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
>  	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
>  	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
> +	ixgbe_mbox_api_13,	/* API version 1.3, linux/freebsd VF driver */
>  	/* This value should always be last */
>  	ixgbe_mbox_api_unknown,	/* indicates that API version is not known */
>  };
> @@ -109,8 +110,8 @@ enum ixgbe_pfvf_api_rev {
>  #define IXGBE_VF_GET_QUEUES	0x09 /* get queue configuration */
>  
>  /* mailbox API, version 1.2 VF requests */
> -#define IXGBE_VF_GET_RETA		0x0a /* VF request for RETA */
> -#define IXGBE_VF_GET_RSS_KEY		0x0b /* get RSS key */
> +#define IXGBE_VF_GET_RETA      0x0a    /* VF request for RETA */
> +#define IXGBE_VF_GET_RSS_KEY	0x0b    /* get RSS key */

is this intentional, since breaks tab alignment, and the values are not
changes actually.

>  #define IXGBE_VF_UPDATE_XCAST_MODE	0x0c
  
Xiao Wang Sept. 23, 2016, 3:50 a.m. UTC | #2
Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, September 20, 2016 1:03 AM
> To: Wang, Xiao W <xiao.w.wang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 16/39] net/ixgbe/base: bump mailbox version
> 
> On 8/27/2016 4:47 PM, Xiao Wang wrote:
> > This patch will pave the way for the new VF unicast promiscuous
> > mode support.
> >
> > Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> > ---
> >  drivers/net/ixgbe/base/ixgbe_mbx.h | 5 +++--
> >  drivers/net/ixgbe/base/ixgbe_vf.c  | 2 ++
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h
> b/drivers/net/ixgbe/base/ixgbe_mbx.h
> > index c3e301f..7556a81 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_mbx.h
> > +++ b/drivers/net/ixgbe/base/ixgbe_mbx.h
> > @@ -90,6 +90,7 @@ enum ixgbe_pfvf_api_rev {
> >  	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
> >  	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
> >  	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
> > +	ixgbe_mbox_api_13,	/* API version 1.3, linux/freebsd VF driver */
> >  	/* This value should always be last */
> >  	ixgbe_mbox_api_unknown,	/* indicates that API version is not
> known */
> >  };
> > @@ -109,8 +110,8 @@ enum ixgbe_pfvf_api_rev {
> >  #define IXGBE_VF_GET_QUEUES	0x09 /* get queue configuration */
> >
> >  /* mailbox API, version 1.2 VF requests */
> > -#define IXGBE_VF_GET_RETA		0x0a /* VF request for RETA */
> > -#define IXGBE_VF_GET_RSS_KEY		0x0b /* get RSS key */
> > +#define IXGBE_VF_GET_RETA      0x0a    /* VF request for RETA */
> > +#define IXGBE_VF_GET_RSS_KEY	0x0b    /* get RSS key */
> 
> is this intentional, since breaks tab alignment, and the values are not
> changes actually.
> 

Such minor change is to keep in consistency with kernel base code.
I need to put all such modifications into one cleanup patch.

> >  #define IXGBE_VF_UPDATE_XCAST_MODE	0x0c
  

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base/ixgbe_mbx.h
index c3e301f..7556a81 100644
--- a/drivers/net/ixgbe/base/ixgbe_mbx.h
+++ b/drivers/net/ixgbe/base/ixgbe_mbx.h
@@ -90,6 +90,7 @@  enum ixgbe_pfvf_api_rev {
 	ixgbe_mbox_api_20,	/* API version 2.0, solaris Phase1 VF driver */
 	ixgbe_mbox_api_11,	/* API version 1.1, linux/freebsd VF driver */
 	ixgbe_mbox_api_12,	/* API version 1.2, linux/freebsd VF driver */
+	ixgbe_mbox_api_13,	/* API version 1.3, linux/freebsd VF driver */
 	/* This value should always be last */
 	ixgbe_mbox_api_unknown,	/* indicates that API version is not known */
 };
@@ -109,8 +110,8 @@  enum ixgbe_pfvf_api_rev {
 #define IXGBE_VF_GET_QUEUES	0x09 /* get queue configuration */
 
 /* mailbox API, version 1.2 VF requests */
-#define IXGBE_VF_GET_RETA		0x0a /* VF request for RETA */
-#define IXGBE_VF_GET_RSS_KEY		0x0b /* get RSS key */
+#define IXGBE_VF_GET_RETA      0x0a    /* VF request for RETA */
+#define IXGBE_VF_GET_RSS_KEY	0x0b    /* get RSS key */
 #define IXGBE_VF_UPDATE_XCAST_MODE	0x0c
 
 /* GET_QUEUES return data indices within the mailbox */
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 69805f7..c0fedea 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -435,6 +435,7 @@  s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode)
 
 	switch (hw->api_version) {
 	case ixgbe_mbox_api_12:
+	case ixgbe_mbox_api_13:
 		break;
 	default:
 		return IXGBE_ERR_FEATURE_NOT_SUPPORTED;
@@ -728,6 +729,7 @@  int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
 	switch (hw->api_version) {
 	case ixgbe_mbox_api_11:
 	case ixgbe_mbox_api_12:
+	case ixgbe_mbox_api_13:
 		break;
 	default:
 		return 0;