dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-18 17:13 [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16 Xiao Zhang
@ 2019-07-18  8:23 ` Wang, Haiyue
  2019-07-18  8:25 ` Wang, Haiyue
  2019-07-18 22:51 ` [dpdk-dev] [v2] " Xiao Zhang
  2 siblings, 0 replies; 15+ messages in thread
From: Wang, Haiyue @ 2019-07-18  8:23 UTC (permalink / raw)
  To: Zhang, Xiao, dev; +Cc: Xing, Beilei, Zhang, Qi Z

> -----Original Message-----
> From: Zhang, Xiao
> Sent: Friday, July 19, 2019 01:14
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhang, Xiao <xiao.zhang@intel.com>
> Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16
> 
> FW4.16 of SFP X722 does not support setting TPID by set_switch_config
> adminq operation, for firmware version less than 4.16 TPID is set by
> register instead. Follow the same path with new firmware version for
> SFP X722 to make it work.
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 2b9fc45..bf6dc2b 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
>  	}
> 
>  	/* 802.1ad frames ability is added in NVM API 1.7*/
> -	if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {
> +	/* FW4.16 for SFP x722 does not support set_switch_config option */
> +	if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) &&
> +		hw->device_id != I40E_DEV_ID_SFP_X722) {
>  		if (qinq) {
>  			if (vlan_type == ETH_VLAN_TYPE_OUTER)
>  				hw->first_tag = rte_cpu_to_le_16(tpid);

Control the ' I40E_HW_FLAG_802_1AD_CAPABLE ' set or not here is better ?

enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)

	/* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */
	if ((hw->aq.api_maj_ver > 1) ||
	    ((hw->aq.api_maj_ver == 1) &&
	     (hw->aq.api_min_ver >= 7)))
		hw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE;

> --
> 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-18 17:13 [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16 Xiao Zhang
  2019-07-18  8:23 ` Wang, Haiyue
@ 2019-07-18  8:25 ` Wang, Haiyue
  2019-07-18  8:32   ` Zhang, Xiao
  2019-07-18 22:51 ` [dpdk-dev] [v2] " Xiao Zhang
  2 siblings, 1 reply; 15+ messages in thread
From: Wang, Haiyue @ 2019-07-18  8:25 UTC (permalink / raw)
  To: Zhang, Xiao, dev; +Cc: Xing, Beilei, Zhang, Qi Z



BR,
Haiyue


> -----Original Message-----
> From: Wang, Haiyue
> Sent: Thursday, July 18, 2019 16:23
> To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16
> 
> > -----Original Message-----
> > From: Zhang, Xiao
> > Sent: Friday, July 19, 2019 01:14
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Zhang, Xiao <xiao.zhang@intel.com>
> > Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16
> >
> > FW4.16 of SFP X722 does not support setting TPID by set_switch_config
> > adminq operation, for firmware version less than 4.16 TPID is set by
> > register instead. Follow the same path with new firmware version for
> > SFP X722 to make it work.
> >
> > Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> > index 2b9fc45..bf6dc2b 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
> >  	}
> >
> >  	/* 802.1ad frames ability is added in NVM API 1.7*/
> > -	if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {
> > +	/* FW4.16 for SFP x722 does not support set_switch_config option */
> > +	if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) &&
> > +		hw->device_id != I40E_DEV_ID_SFP_X722) {
> >  		if (qinq) {
> >  			if (vlan_type == ETH_VLAN_TYPE_OUTER)
> >  				hw->first_tag = rte_cpu_to_le_16(tpid);
> 
> Control the ' I40E_HW_FLAG_802_1AD_CAPABLE ' set or not here is better ?
> 
> enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
> 
> 	/* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */
> 	if ((hw->aq.api_maj_ver > 1) ||
> 	    ((hw->aq.api_maj_ver == 1) &&
> 	     (hw->aq.api_min_ver >= 7)))
> 		hw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE;
> 
Looks like changing the share code. Or like :

	ret = i40e_init_adminq(hw);
	if (ret != I40E_SUCCESS) {
		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
		return -EIO;
	}
	...
	clear I40E_HW_FLAG_802_1AD_CAPABLE here ...
> > --
> > 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-18  8:25 ` Wang, Haiyue
@ 2019-07-18  8:32   ` Zhang, Xiao
  0 siblings, 0 replies; 15+ messages in thread
From: Zhang, Xiao @ 2019-07-18  8:32 UTC (permalink / raw)
  To: Wang, Haiyue, dev; +Cc: Xing, Beilei, Zhang, Qi Z



> -----Original Message-----
> From: Wang, Haiyue
> Sent: Thursday, July 18, 2019 4:26 PM
> To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16
> 
> 
> 
> BR,
> Haiyue
> 
> 
> > -----Original Message-----
> > From: Wang, Haiyue
> > Sent: Thursday, July 18, 2019 16:23
> > To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>
> > Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16
> >
> > > -----Original Message-----
> > > From: Zhang, Xiao
> > > Sent: Friday, July 19, 2019 01:14
> > > To: dev@dpdk.org
> > > Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> > > <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang,
> > > Xiao <xiao.zhang@intel.com>
> > > Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16
> > >
> > > FW4.16 of SFP X722 does not support setting TPID by
> > > set_switch_config adminq operation, for firmware version less than
> > > 4.16 TPID is set by register instead. Follow the same path with new
> > > firmware version for SFP X722 to make it work.
> > >
> > > Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> > > ---
> > >  drivers/net/i40e/i40e_ethdev.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > > b/drivers/net/i40e/i40e_ethdev.c index 2b9fc45..bf6dc2b 100644
> > > --- a/drivers/net/i40e/i40e_ethdev.c
> > > +++ b/drivers/net/i40e/i40e_ethdev.c
> > > @@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
> > >  	}
> > >
> > >  	/* 802.1ad frames ability is added in NVM API 1.7*/
> > > -	if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {
> > > +	/* FW4.16 for SFP x722 does not support set_switch_config option */
> > > +	if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) &&
> > > +		hw->device_id != I40E_DEV_ID_SFP_X722) {
> > >  		if (qinq) {
> > >  			if (vlan_type == ETH_VLAN_TYPE_OUTER)
> > >  				hw->first_tag = rte_cpu_to_le_16(tpid);
> >
> > Control the ' I40E_HW_FLAG_802_1AD_CAPABLE ' set or not here is better ?
> >
> > enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
> >
> > 	/* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */
> > 	if ((hw->aq.api_maj_ver > 1) ||
> > 	    ((hw->aq.api_maj_ver == 1) &&
> > 	     (hw->aq.api_min_ver >= 7)))
> > 		hw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE;
> >
> Looks like changing the share code. Or like :
> 
> 	ret = i40e_init_adminq(hw);
> 	if (ret != I40E_SUCCESS) {
> 		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
> 		return -EIO;
> 	}
> 	...
> 	clear I40E_HW_FLAG_802_1AD_CAPABLE here ...

Yes, it's better to clear this flag in case it will be used in other place.

> > > --
> > > 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16
@ 2019-07-18 17:13 Xiao Zhang
  2019-07-18  8:23 ` Wang, Haiyue
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Xiao Zhang @ 2019-07-18 17:13 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, haiyue.wang, qi.z.zhang, Xiao Zhang

FW4.16 of SFP X722 does not support setting TPID by set_switch_config
adminq operation, for firmware version less than 4.16 TPID is set by
register instead. Follow the same path with new firmware version for
SFP X722 to make it work.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b9fc45..bf6dc2b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
 	}
 
 	/* 802.1ad frames ability is added in NVM API 1.7*/
-	if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {
+	/* FW4.16 for SFP x722 does not support set_switch_config option */
+	if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) &&
+		hw->device_id != I40E_DEV_ID_SFP_X722) {
 		if (qinq) {
 			if (vlan_type == ETH_VLAN_TYPE_OUTER)
 				hw->first_tag = rte_cpu_to_le_16(tpid);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [dpdk-dev] [v2] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-18 17:13 [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16 Xiao Zhang
  2019-07-18  8:23 ` Wang, Haiyue
  2019-07-18  8:25 ` Wang, Haiyue
@ 2019-07-18 22:51 ` Xiao Zhang
  2019-07-19  0:56   ` Zhang, Qi Z
  2019-07-19 10:26   ` [dpdk-dev] [v3] " Xiao Zhang
  2 siblings, 2 replies; 15+ messages in thread
From: Xiao Zhang @ 2019-07-18 22:51 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, haiyue.wang, qi.z.zhang, Xiao Zhang

FW4.16 of SFP X722 does not support setting TPID by set_switch_config
adminq operation, for firmware version less than 4.16 TPID is set by
register instead. For device SFP X722, disable adminq flag to follow
the same path with old firmware version to make it work.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
v2
Unset adminq flag instead of only checking device id when set TPID.
v1
Check device id when setting TPID, use adminq if not SFP X722, else
use register.
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b9fc45..2b2c877 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
 		return -EIO;
 	}
+	/* Firmware of SFP x722 does not support adminq option */
+	if (hw->device_id == I40E_DEV_ID_SFP_X722)
+		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
+
 	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
 		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
 		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [v2] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-18 22:51 ` [dpdk-dev] [v2] " Xiao Zhang
@ 2019-07-19  0:56   ` Zhang, Qi Z
  2019-07-19  1:02     ` Wang, Haiyue
  2019-07-19 10:26   ` [dpdk-dev] [v3] " Xiao Zhang
  1 sibling, 1 reply; 15+ messages in thread
From: Zhang, Qi Z @ 2019-07-19  0:56 UTC (permalink / raw)
  To: Zhang, Xiao, dev; +Cc: Xing, Beilei, Wang, Haiyue



> -----Original Message-----
> From: Zhang, Xiao
> Sent: Friday, July 19, 2019 6:52 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Xiao
> <xiao.zhang@intel.com>
> Subject: [v2] net/i40e: fix SFP X722 not work with FW4.16

Please add fix line and Cc stable.
Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")

> 
> FW4.16 of SFP X722 does not support setting TPID by set_switch_config
> adminq operation, for firmware version less than 4.16 TPID is set by register
> instead. For device SFP X722, disable adminq flag to follow the same path with
> old firmware version to make it work.
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> ---
> v2
> Unset adminq flag instead of only checking device id when set TPID.
> v1
> Check device id when setting TPID, use adminq if not SFP X722, else use
> register.
> ---
>  drivers/net/i40e/i40e_ethdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 2b9fc45..2b2c877 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void
> *init_params __rte_unused)
>  		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
>  		return -EIO;
>  	}
> +	/* Firmware of SFP x722 does not support adminq option */
> +	if (hw->device_id == I40E_DEV_ID_SFP_X722)
> +		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
> +
>  	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d
> eetrack %04x",
>  		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
>  		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [v2] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19  0:56   ` Zhang, Qi Z
@ 2019-07-19  1:02     ` Wang, Haiyue
  2019-07-19  1:14       ` Zhang, Xiao
  0 siblings, 1 reply; 15+ messages in thread
From: Wang, Haiyue @ 2019-07-19  1:02 UTC (permalink / raw)
  To: Zhang, Qi Z, Zhang, Xiao, dev; +Cc: Xing, Beilei

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Friday, July 19, 2019 08:57
> To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>
> Subject: RE: [v2] net/i40e: fix SFP X722 not work with FW4.16
> 
> 
> 
> > -----Original Message-----
> > From: Zhang, Xiao
> > Sent: Friday, July 19, 2019 6:52 AM
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> > <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Xiao
> > <xiao.zhang@intel.com>
> > Subject: [v2] net/i40e: fix SFP X722 not work with FW4.16
> 
> Please add fix line and Cc stable.
> Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")
> 
> >
> > FW4.16 of SFP X722 does not support setting TPID by set_switch_config
> > adminq operation, for firmware version less than 4.16 TPID is set by register
> > instead. For device SFP X722, disable adminq flag to follow the same path with
> > old firmware version to make it work.
> >
> > Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> > ---
> > v2
> > Unset adminq flag instead of only checking device id when set TPID.
> > v1
> > Check device id when setting TPID, use adminq if not SFP X722, else use
> > register.
> > ---
> >  drivers/net/i40e/i40e_ethdev.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> > index 2b9fc45..2b2c877 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void
> > *init_params __rte_unused)
> >  		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
> >  		return -EIO;
> >  	}
> > +	/* Firmware of SFP x722 does not support adminq option */
> > +	if (hw->device_id == I40E_DEV_ID_SFP_X722)
> > +		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
> > +
The commit log says some version like FW4.16 doesn't support ADQ, but this line
of code means all FW doesn't support ADQ. Which one is right ? :-)

> >  	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d
> > eetrack %04x",
> >  		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
> >  		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
> > --
> > 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [v2] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19  1:02     ` Wang, Haiyue
@ 2019-07-19  1:14       ` Zhang, Xiao
  0 siblings, 0 replies; 15+ messages in thread
From: Zhang, Xiao @ 2019-07-19  1:14 UTC (permalink / raw)
  To: Wang, Haiyue, Zhang, Qi Z, dev; +Cc: Xing, Beilei



> -----Original Message-----
> From: Wang, Haiyue
> Sent: Friday, July 19, 2019 9:02 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Xiao <xiao.zhang@intel.com>;
> dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>
> Subject: RE: [v2] net/i40e: fix SFP X722 not work with FW4.16
> 
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Friday, July 19, 2019 08:57
> > To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> > <haiyue.wang@intel.com>
> > Subject: RE: [v2] net/i40e: fix SFP X722 not work with FW4.16
> >
> >
> >
> > > -----Original Message-----
> > > From: Zhang, Xiao
> > > Sent: Friday, July 19, 2019 6:52 AM
> > > To: dev@dpdk.org
> > > Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> > > <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang,
> > > Xiao <xiao.zhang@intel.com>
> > > Subject: [v2] net/i40e: fix SFP X722 not work with FW4.16
> >
> > Please add fix line and Cc stable.
> > Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
> > setting")
> >
> > >
> > > FW4.16 of SFP X722 does not support setting TPID by
> > > set_switch_config adminq operation, for firmware version less than
> > > 4.16 TPID is set by register instead. For device SFP X722, disable
> > > adminq flag to follow the same path with old firmware version to make it
> work.
> > >
> > > Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> > > ---
> > > v2
> > > Unset adminq flag instead of only checking device id when set TPID.
> > > v1
> > > Check device id when setting TPID, use adminq if not SFP X722, else
> > > use register.
> > > ---
> > >  drivers/net/i40e/i40e_ethdev.c | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > > b/drivers/net/i40e/i40e_ethdev.c index 2b9fc45..2b2c877 100644
> > > --- a/drivers/net/i40e/i40e_ethdev.c
> > > +++ b/drivers/net/i40e/i40e_ethdev.c
> > > @@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev,
> > > void *init_params __rte_unused)
> > >  		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
> > >  		return -EIO;
> > >  	}
> > > +	/* Firmware of SFP x722 does not support adminq option */
> > > +	if (hw->device_id == I40E_DEV_ID_SFP_X722)
> > > +		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
> > > +
> The commit log says some version like FW4.16 doesn't support ADQ, but this line
> of code means all FW doesn't support ADQ. Which one is right ? :-)

Old versions do not support ADQ and did not use ADQ operation in the code. And new FW with version 4.16 also does not support ADQ neither but used the ADQ operation in the code.
So all FW of SFP X722 do not support ADQ, the commit log may be confuse, I will make it more clear.

> 
> > >  	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d
> eetrack
> > > %04x",
> > >  		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
> > >  		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
> > > --
> > > 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19 10:59     ` [dpdk-dev] [v4] " Xiao Zhang
@ 2019-07-19  2:17       ` Wang, Haiyue
  2019-07-19  5:26         ` Zhang, Qi Z
  2019-07-19 15:30       ` Stillwell Jr, Paul M
  1 sibling, 1 reply; 15+ messages in thread
From: Wang, Haiyue @ 2019-07-19  2:17 UTC (permalink / raw)
  To: Zhang, Xiao, dev; +Cc: Xing, Beilei, Zhang, Qi Z, stable

> -----Original Message-----
> From: Zhang, Xiao
> Sent: Friday, July 19, 2019 19:00
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhang, Xiao <xiao.zhang@intel.com>; stable@dpdk.org
> Subject: [v4] net/i40e: fix SFP X722 not work with FW4.16
> 
> The code checked the NVM API version of FW to check if support adminq
> operation, when version is 1.7 or above adminq operation is support
> and the adminq flag will be set. The code will use adminq to set TPID if
> the flags set or to use register. The NVM API version of SFP X722 old
> versions are lowwer than 1.7 and for FW4.16 is 1.8. But FW4.16 of SFP
> X722 does not support adminq operation, the legacy logic is not compatible
> with device SFP X722 currently. Check the device id to unset adminq
> flag to use resigter setting to make it work.
> 
> Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
> setting")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> ---

    Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19  2:17       ` Wang, Haiyue
@ 2019-07-19  5:26         ` Zhang, Qi Z
  0 siblings, 0 replies; 15+ messages in thread
From: Zhang, Qi Z @ 2019-07-19  5:26 UTC (permalink / raw)
  To: Wang, Haiyue, Zhang, Xiao, dev; +Cc: Xing, Beilei, stable



> -----Original Message-----
> From: Wang, Haiyue
> Sent: Friday, July 19, 2019 10:18 AM
> To: Zhang, Xiao <xiao.zhang@intel.com>; dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: RE: [v4] net/i40e: fix SFP X722 not work with FW4.16
> 
> > -----Original Message-----
> > From: Zhang, Xiao
> > Sent: Friday, July 19, 2019 19:00
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> > <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang,
> > Xiao <xiao.zhang@intel.com>; stable@dpdk.org
> > Subject: [v4] net/i40e: fix SFP X722 not work with FW4.16
> >
> > The code checked the NVM API version of FW to check if support adminq
> > operation, when version is 1.7 or above adminq operation is support
> > and the adminq flag will be set. The code will use adminq to set TPID
> > if the flags set or to use register. The NVM API version of SFP X722
> > old versions are lowwer than 1.7 and for FW4.16 is 1.8. But FW4.16 of
> > SFP
> > X722 does not support adminq operation, the legacy logic is not
> > compatible with device SFP X722 currently. Check the device id to
> > unset adminq flag to use resigter setting to make it work.
> >
> > Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
> > setting")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> > ---
> 
>     Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [v3] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-18 22:51 ` [dpdk-dev] [v2] " Xiao Zhang
  2019-07-19  0:56   ` Zhang, Qi Z
@ 2019-07-19 10:26   ` Xiao Zhang
  2019-07-19 10:59     ` [dpdk-dev] [v4] " Xiao Zhang
  1 sibling, 1 reply; 15+ messages in thread
From: Xiao Zhang @ 2019-07-19 10:26 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, haiyue.wang, qi.z.zhang, Xiao Zhang, stable

set_switch_config adminq operation was used to set TPID for SFP X722
with FW4.16, but adminq is not supported which lead to failure. Since
all FW versions of SFP X722 do not support adminq, disable adminq flag
to use resigter setting to make it work.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
setting")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
v3
Modify the commit log to make it not confused and add fixed line.
v2
Unset adminq flag instead of only checking device id when set TPID.
v1
Check device id when setting TPID, use adminq if not SFP X722, else 
use register.
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b9fc45..2b2c877 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
 		return -EIO;
 	}
+	/* Firmware of SFP x722 does not support adminq option */
+	if (hw->device_id == I40E_DEV_ID_SFP_X722)
+		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
+
 	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
 		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
 		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19 10:26   ` [dpdk-dev] [v3] " Xiao Zhang
@ 2019-07-19 10:59     ` Xiao Zhang
  2019-07-19  2:17       ` Wang, Haiyue
  2019-07-19 15:30       ` Stillwell Jr, Paul M
  0 siblings, 2 replies; 15+ messages in thread
From: Xiao Zhang @ 2019-07-19 10:59 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, haiyue.wang, qi.z.zhang, Xiao Zhang, stable

The code checked the NVM API version of FW to check if support adminq 
operation, when version is 1.7 or above adminq operation is support 
and the adminq flag will be set. The code will use adminq to set TPID if
the flags set or to use register. The NVM API version of SFP X722 old
versions are lowwer than 1.7 and for FW4.16 is 1.8. But FW4.16 of SFP
X722 does not support adminq operation, the legacy logic is not compatible
with device SFP X722 currently. Check the device id to unset adminq
flag to use resigter setting to make it work.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
setting")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
v4
Add more detailed information in the commit log.
v3
Modify the commit log to make it not confused and add fixed line.
v2
Unset adminq flag instead of only checking device id when set TPID.
v1
Check device id when setting TPID, use adminq if not SFP X722, else 
use register.
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b9fc45..2b2c877 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
 		return -EIO;
 	}
+	/* Firmware of SFP x722 does not support adminq option */
+	if (hw->device_id == I40E_DEV_ID_SFP_X722)
+		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
+
 	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
 		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
 		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19 10:59     ` [dpdk-dev] [v4] " Xiao Zhang
  2019-07-19  2:17       ` Wang, Haiyue
@ 2019-07-19 15:30       ` Stillwell Jr, Paul M
  2019-07-19 18:17         ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  1 sibling, 1 reply; 15+ messages in thread
From: Stillwell Jr, Paul M @ 2019-07-19 15:30 UTC (permalink / raw)
  To: Zhang, Xiao, dev
  Cc: Xing, Beilei, Wang, Haiyue, Zhang, Qi Z, Zhang, Xiao, stable


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiao Zhang
> Sent: Friday, July 19, 2019 4:00 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Xiao
> <xiao.zhang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
> 
> The code checked the NVM API version of FW to check if support adminq
> operation, when version is 1.7 or above adminq operation is support and the
> adminq flag will be set. The code will use adminq to set TPID if the flags set or
> to use register. The NVM API version of SFP X722 old versions are lowwer
> than 1.7 and for FW4.16 is 1.8. But FW4.16 of SFP
> X722 does not support adminq operation, the legacy logic is not compatible
> with device SFP X722 currently. Check the device id to unset adminq flag to
> use resigter setting to make it work.
> 

Sorry, I'm still confused about what this patch is doing. From the commit message it seems like there are a couple of conditions:

If the device is X722
	Then if FW < 1.7 then use register to set TPID
	Else use adminq to set TPID

The change in the code is only looking to see if the device is X722 and not doing any other checking of FW version.

Am I misunderstanding the commit message, the patch, or both?

> Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
> setting")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> ---
> v4
> Add more detailed information in the commit log.
> v3
> Modify the commit log to make it not confused and add fixed line.
> v2
> Unset adminq flag instead of only checking device id when set TPID.
> v1
> Check device id when setting TPID, use adminq if not SFP X722, else use
> register.
> ---
>  drivers/net/i40e/i40e_ethdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 2b9fc45..2b2c877 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void
> *init_params __rte_unused)
>  		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
>  		return -EIO;
>  	}
> +	/* Firmware of SFP x722 does not support adminq option */
> +	if (hw->device_id == I40E_DEV_ID_SFP_X722)
> +		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
> +
>  	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM
> %02d.%02d.%02d eetrack %04x",
>  		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
>  		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [v4] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19 15:30       ` Stillwell Jr, Paul M
@ 2019-07-19 18:17         ` Ferruh Yigit
  2019-07-20  0:53           ` Zhang, Xiao
  0 siblings, 1 reply; 15+ messages in thread
From: Ferruh Yigit @ 2019-07-19 18:17 UTC (permalink / raw)
  To: Stillwell Jr, Paul M, Zhang, Xiao, dev
  Cc: Xing, Beilei, Wang, Haiyue, Zhang, Qi Z, stable

On 7/19/2019 4:30 PM, Stillwell Jr, Paul M wrote:
> 
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiao Zhang
>> Sent: Friday, July 19, 2019 4:00 AM
>> To: dev@dpdk.org
>> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
>> <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Xiao
>> <xiao.zhang@intel.com>; stable@dpdk.org
>> Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
>>
>> The code checked the NVM API version of FW to check if support adminq
>> operation, when version is 1.7 or above adminq operation is support and the
>> adminq flag will be set. The code will use adminq to set TPID if the flags set or
>> to use register. The NVM API version of SFP X722 old versions are lowwer
>> than 1.7 and for FW4.16 is 1.8. But FW4.16 of SFP
>> X722 does not support adminq operation, the legacy logic is not compatible
>> with device SFP X722 currently. Check the device id to unset adminq flag to
>> use resigter setting to make it work.
>>
> 
> Sorry, I'm still confused about what this patch is doing. From the commit message it seems like there are a couple of conditions:
> 
> If the device is X722
> 	Then if FW < 1.7 then use register to set TPID
> 	Else use adminq to set TPID
> 
> The change in the code is only looking to see if the device is X722 and not doing any other checking of FW version.
> 
> Am I misunderstanding the commit message, the patch, or both?

I have updated the commit log while merging [1] (according what I understand) I
hope it is more clear.

[1]
    net/i40e: fix SFP X722 with FW4.16

    When NVM API version is 1.7 or above adminq operation to set TPID is
    set as supported. This cause using adminq instead of registers.

    For SFP X722 FW4.16, reported NVM API version is 1.8, and this cause
    adminq operation to set as supported but it is not supported on FW4.16

    Additional check added for SFP X722 to not enable adminq operation.

    Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")
    Cc: stable@dpdk.org

    Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
    Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>



> 
>> Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
>> setting")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
>> ---
>> v4
>> Add more detailed information in the commit log.
>> v3
>> Modify the commit log to make it not confused and add fixed line.
>> v2
>> Unset adminq flag instead of only checking device id when set TPID.
>> v1
>> Check device id when setting TPID, use adminq if not SFP X722, else use
>> register.
>> ---
>>  drivers/net/i40e/i40e_ethdev.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
>> index 2b9fc45..2b2c877 100644
>> --- a/drivers/net/i40e/i40e_ethdev.c
>> +++ b/drivers/net/i40e/i40e_ethdev.c
>> @@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void
>> *init_params __rte_unused)
>>  		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
>>  		return -EIO;
>>  	}
>> +	/* Firmware of SFP x722 does not support adminq option */
>> +	if (hw->device_id == I40E_DEV_ID_SFP_X722)
>> +		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
>> +
>>  	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM
>> %02d.%02d.%02d eetrack %04x",
>>  		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
>>  		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
>> --
>> 2.7.4
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [v4] net/i40e: fix SFP X722 not work with FW4.16
  2019-07-19 18:17         ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-07-20  0:53           ` Zhang, Xiao
  0 siblings, 0 replies; 15+ messages in thread
From: Zhang, Xiao @ 2019-07-20  0:53 UTC (permalink / raw)
  To: Yigit, Ferruh, Stillwell Jr, Paul M, dev
  Cc: Xing, Beilei, Wang, Haiyue, Zhang, Qi Z, stable



> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Saturday, July 20, 2019 2:18 AM
> To: Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>; Zhang, Xiao
> <xiao.zhang@intel.com>; dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: Re: [dpdk-stable] [dpdk-dev] [v4] net/i40e: fix SFP X722 not work
> with FW4.16
> 
> On 7/19/2019 4:30 PM, Stillwell Jr, Paul M wrote:
> >
> >> -----Original Message-----
> >> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiao Zhang
> >> Sent: Friday, July 19, 2019 4:00 AM
> >> To: dev@dpdk.org
> >> Cc: Xing, Beilei <beilei.xing@intel.com>; Wang, Haiyue
> >> <haiyue.wang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang,
> >> Xiao <xiao.zhang@intel.com>; stable@dpdk.org
> >> Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
> >>
> >> The code checked the NVM API version of FW to check if support adminq
> >> operation, when version is 1.7 or above adminq operation is support
> >> and the adminq flag will be set. The code will use adminq to set TPID
> >> if the flags set or to use register. The NVM API version of SFP X722
> >> old versions are lowwer than 1.7 and for FW4.16 is 1.8. But FW4.16 of
> >> SFP
> >> X722 does not support adminq operation, the legacy logic is not
> >> compatible with device SFP X722 currently. Check the device id to
> >> unset adminq flag to use resigter setting to make it work.
> >>
> >
> > Sorry, I'm still confused about what this patch is doing. From the commit
> message it seems like there are a couple of conditions:
> >
> > If the device is X722
> > 	Then if FW < 1.7 then use register to set TPID
> > 	Else use adminq to set TPID
> >
> > The change in the code is only looking to see if the device is X722 and not
> doing any other checking of FW version.
> >
> > Am I misunderstanding the commit message, the patch, or both?
> 
> I have updated the commit log while merging [1] (according what I
> understand) I hope it is more clear.
> 
> [1]
>     net/i40e: fix SFP X722 with FW4.16
> 
>     When NVM API version is 1.7 or above adminq operation to set TPID is
>     set as supported. This cause using adminq instead of registers.
> 
>     For SFP X722 FW4.16, reported NVM API version is 1.8, and this cause
>     adminq operation to set as supported but it is not supported on FW4.16
> 
>     Additional check added for SFP X722 to not enable adminq operation.
> 
>     Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
> setting")
>     Cc: stable@dpdk.org
> 
>     Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
>     Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
> 

Thanks Ferruh for updating the log. 

There are two versions here, NVM API version and FW version.
For SFP X722, NVM API version of FW4.16 is 1.8, old versions bellow 1.7.(eg. FW4.0 with NVM API 1.6).
The adminq operation is not workable for FW4.16, so all FW versions do not work with adminq operation for SFP X722 currently. So add device check for SFP X722 in this fix.

> 
> 
> >
> >> Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
> >> setting")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> >> ---
> >> v4
> >> Add more detailed information in the commit log.
> >> v3
> >> Modify the commit log to make it not confused and add fixed line.
> >> v2
> >> Unset adminq flag instead of only checking device id when set TPID.
> >> v1
> >> Check device id when setting TPID, use adminq if not SFP X722, else
> >> use register.
> >> ---
> >>  drivers/net/i40e/i40e_ethdev.c | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/net/i40e/i40e_ethdev.c
> >> b/drivers/net/i40e/i40e_ethdev.c index 2b9fc45..2b2c877 100644
> >> --- a/drivers/net/i40e/i40e_ethdev.c
> >> +++ b/drivers/net/i40e/i40e_ethdev.c
> >> @@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev,
> >> void *init_params __rte_unused)
> >>  		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
> >>  		return -EIO;
> >>  	}
> >> +	/* Firmware of SFP x722 does not support adminq option */
> >> +	if (hw->device_id == I40E_DEV_ID_SFP_X722)
> >> +		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
> >> +
> >>  	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d
> NVM %02d.%02d.%02d eetrack
> >> %04x",
> >>  		     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
> >>  		     hw->aq.api_maj_ver, hw->aq.api_min_ver,
> >> --
> >> 2.7.4
> >


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-07-20  0:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 17:13 [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16 Xiao Zhang
2019-07-18  8:23 ` Wang, Haiyue
2019-07-18  8:25 ` Wang, Haiyue
2019-07-18  8:32   ` Zhang, Xiao
2019-07-18 22:51 ` [dpdk-dev] [v2] " Xiao Zhang
2019-07-19  0:56   ` Zhang, Qi Z
2019-07-19  1:02     ` Wang, Haiyue
2019-07-19  1:14       ` Zhang, Xiao
2019-07-19 10:26   ` [dpdk-dev] [v3] " Xiao Zhang
2019-07-19 10:59     ` [dpdk-dev] [v4] " Xiao Zhang
2019-07-19  2:17       ` Wang, Haiyue
2019-07-19  5:26         ` Zhang, Qi Z
2019-07-19 15:30       ` Stillwell Jr, Paul M
2019-07-19 18:17         ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-07-20  0:53           ` Zhang, Xiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).