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.
--- drivers/net/i40e/i40e_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev.c +3 -1
@@ -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);
Signature · 1 line
2.7.4
Quoted 23 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 01:14
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>
Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16FW4.16 of SFP X722 does not support setting TPID by
set_switch_configadminq 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 <[email protected]>--- drivers/net/i40e/i40e_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev.c +0
-0
drivers/net/i40e/i40e_ethdev.c i40e_vlan_tpid_set(struct rte_eth_dev *dev, · line 3716
Quoted 10 lines
drivers/net/i40e/i40e_ethdev.c +3
-1@@ -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;
Quoted 2 lines
--
2.7.4
BR,
Haiyue
Quoted 43 lines
-----Original Message-----
From: Wang, Haiyue
Sent: Thursday, July 18, 2019 16:23
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16Quoted 23 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 01:14
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>
Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16FW4.16 of SFP X722 does not support setting TPID by
set_switch_configadminq 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 <[email protected]>--- drivers/net/i40e/i40e_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/i40e/i40e_ethdev.c +0
-0drivers/net/i40e/i40e_ethdev.c i40e_vlan_tpid_set(struct rte_eth_dev *dev, · line 3716
Quoted 10 lines
drivers/net/i40e/i40e_ethdev.c +3
-1@@ -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 ?
Quoted 8 lines
enum
i40e_status_codei40e_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 ...Quoted 2 lines
Quoted 2 lines
--
2.7.4
Quoted 70 lines
-----Original Message-----
From: Wang, Haiyue
Sent: Thursday, July 18, 2019 4:26 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16BR,
HaiyueQuoted 45 lines
-----Original Message-----
From: Wang, Haiyue
Sent: Thursday, July 18, 2019 16:23
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [DPDK] net/i40e: fix SFP X722 not work with FW4.16Quoted 24 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 01:14
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>
Subject: [DPDK] net/i40e: fix SFP X722 not work with FW4.16FW4.16 of SFP X722 does not support setting TPID by
set_switch_configadminq 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 <[email protected]>--- drivers/net/i40e/i40e_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/net/i40e/i40e_ethdev.cindex 2b9fc45..bf6dc2b 100644drivers/net/i40e/i40e_ethdev.c i40e_vlan_tpid_set(struct rte_eth_dev *dev, · line 3716
Quoted 10 lines
drivers/net/i40e/i40e_ethdev.c +3
-1@@ -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 ?Quoted 8 lines
enum
i40e_status_codei40e_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 :
Quoted 7 lines
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.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
--
2.7.4
PATCH v2 1/1 net/i40e: fix SFP X722 not work with FW4.16
In reply to Xiao ZhangFW4.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.
---
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(+)
drivers/net/i40e/i40e_ethdev.c +4 -0
@@ -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,
Signature · 1 line
2.7.4
Quoted 10 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 6:52 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>
Subject: [v2] net/i40e: fix SFP X722 not work with FW4.16
Please add fix line and Cc stable.
Quoted 36 lines
FW4.16 of SFP X722 does not support setting TPID by
set_switch_configadminq 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 <[email protected]>---
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(+)drivers/net/i40e/i40e_ethdev.c +4
-0@@ -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",drivers/net/i40e/i40e_ethdev.c +0
-1hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, --2.7.4
Quoted 38 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, July 19, 2019 08:57
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>
Subject: RE: [v2] net/i40e: fix SFP X722 not work with FW4.16Quoted 8 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 6:52 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>
Subject: [v2] net/i40e: fix SFP X722 not work with FW4.16Please add fix line and Cc stable.
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")Quoted 17 lines
FW4.16 of SFP X722 does not support setting TPID by
set_switch_configadminq 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 <[email protected]>---
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(+)
Quoted 13 lines
drivers/net/i40e/i40e_ethdev.c eth_i40e_dev_init(struct rte_eth_dev *dev, void · line 1365
Quoted 13 lines
drivers/net/i40e/i40e_ethdev.c +4
-0@@ -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 ? :-)
Quoted 6 lines
Quoted 6 lines
drivers/net/i40e/i40e_ethdev.c +0
-0PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",drivers/net/i40e/i40e_ethdev.c +0
-1hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, --2.7.4
Quoted 51 lines
-----Original Message-----
From: Wang, Haiyue
Sent: Friday, July 19, 2019 9:02 AM
To: Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>
Subject: RE: [v2] net/i40e: fix SFP X722 not work with FW4.16Quoted 19 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, July 19, 2019 08:57
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>
Subject: RE: [v2] net/i40e: fix SFP X722 not work with FW4.16Quoted 8 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 6:52 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>
Subject: [v2] net/i40e: fix SFP X722 not work with FW4.16Quoted 9 lines
Please add fix line and Cc stable.
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Quoted 5 lines
FW4.16 of SFP X722 does not support setting TPID by
set_switch_configadminq 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 itwork.
Quoted 12 lines
Quoted 12 lines
Signed-off-by Xiao Zhang <[email protected]>---
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(+)
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
(quoted diff) +0
-0
b/drivers/net/i40e/i40e_ethdev.cindex 2b9fc45..2b2c877 100644drivers/net/i40e/i40e_ethdev.c +0
-0@@ -1358,6 +1358,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev,Quoted 8 lines
drivers/net/i40e/i40e_ethdev.c eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) · line 1364
Quoted 8 lines
drivers/net/i40e/i40e_ethdev.c +4
-0void *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.
Quoted 8 lines
Quoted 2 lines
drivers/net/i40e/i40e_ethdev.c eth_i40e_dev_init(struct rte_eth_dev *dev, · line 1366
Quoted 2 lines
drivers/net/i40e/i40e_ethdev.c +0
-0PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02deetrack
Quoted 5 lines
Quoted 5 lines
drivers/net/i40e/i40e_ethdev.c +0
-0%04x",drivers/net/i40e/i40e_ethdev.c +0
-1hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, --2.7.4
PATCH v3 1/1 net/i40e: fix SFP X722 not work with FW4.16
In reply to Xiao Zhangset_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.
setting")
Cc: [email protected]
---
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(+)
drivers/net/i40e/i40e_ethdev.c +4 -0
@@ -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,
Signature · 1 line
2.7.4
PATCH v4 1/1 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.
setting")
Cc: [email protected]
---
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(+)
drivers/net/i40e/i40e_ethdev.c +4 -0
@@ -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,
Signature · 1 line
2.7.4
Quoted 17 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 19:00
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Subject: [v4] net/i40e: fix SFP X722 not work with FW4.16The 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.
Quoted 6 lines
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>---
Zhang, Qi Z
AppliedQuoted 29 lines
-----Original Message-----
From: Wang, Haiyue
Sent: Friday, July 19, 2019 10:18 AM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [v4] net/i40e: fix SFP X722 not work with FW4.16Quoted 19 lines
-----Original Message-----
From: Zhang, Xiao
Sent: Friday, July 19, 2019 19:00
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Subject: [v4] net/i40e: fix SFP X722 not work with FW4.16The 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.
Quoted 8 lines
Quoted 6 lines
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>---
Reviewed-by Haiyue Wang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 10 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiao Zhang
Sent: Friday, July 19, 2019 4:00 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16
Quoted 9 lines
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?
Quoted 38 lines
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>---
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(+)drivers/net/i40e/i40e_ethdev.c +4
-0@@ -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",drivers/net/i40e/i40e_ethdev.c +0
-1hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, --2.7.4
Ferruh Yigit
Reviewed-by Haiyue WangQuoted 22 lines · Paul M
Quoted 10 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiao Zhang
Sent: Friday, July 19, 2019 4:00 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16Quoted 9 lines
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:
Quoted 7 lines
If the device is X722
Then if FW < 1.7 then use register to set TPID Else use adminq to set TPIDThe 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.
Quoted 40 lines
Quoted 39 lines
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>---
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(+)drivers/net/i40e/i40e_ethdev.c +4
-0@@ -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",drivers/net/i40e/i40e_ethdev.c +0
-1hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, --2.7.4
Quoted 59 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Saturday, July 20, 2019 2:18 AM
To: Stillwell Jr, Paul M <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [dpdk-stable] [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16Quoted 21 lines · Paul M
Quoted 10 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiao Zhang
Sent: Friday, July 19, 2019 4:00 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wang, Haiyue <[email protected]>; Zhang, Qi Z <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16Quoted 10 lines
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.Quoted 1 line
Sorry, I'm still confused about what this patch is doing. From the commit
message it seems like there are a couple of conditions:
Quoted 6 lines
If the device is X722
Then if FW < 1.7 then use register to set TPID Else use adminq to set TPIDThe change in the code is only looking to see if the device is X722 and not
doing any other checking of FW version.
Quoted 2 lines
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.16When 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
Quoted 9 lines
Additional check added for SFP X722 to not enable adminq operation.
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>Reviewed-by Haiyue Wang <[email protected]>
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.
Quoted 43 lines
Quoted 22 lines
Quoted 22 lines
Fixes 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of registersetting")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>---
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(+)Quoted 14 lines
Quoted 5 lines
(quoted diff) +0
-0
b/drivers/net/i40e/i40e_ethdev.cindex 2b9fc45..2b2c877 100644drivers/net/i40e/i40e_ethdev.c eth_i40e_dev_init(struct rte_eth_dev *dev, · line 1366
Quoted 9 lines
drivers/net/i40e/i40e_ethdev.c +4
-0@@ -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.%dNVM %02d.%02d.%02d eetrack
Quoted 6 lines
Quoted 5 lines
drivers/net/i40e/i40e_ethdev.c +0
-0%04x",drivers/net/i40e/i40e_ethdev.c +0
-1hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.api_maj_ver, hw->aq.api_min_ver, --2.7.4