* [dpdk-dev] [PATCH 00/31] net/i40e: base code update
@ 2016-12-03 1:18 Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
` (31 more replies)
0 siblings, 32 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
i40e base code upate. The main changes are:
- add clause22 and clause45 implementation for PHY registers accessing
- replace existing legacy memcpy() calls with i40e_memcpy() calls.
- use BIT() macro instead of bit fields
- add clear all WoL filters implementation
- add ERROR state for NVM update state machine
- add broadcast promiscuous control per VLAN
- remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
Jingjing Wu (31):
net/i40e/base: add encap csum VF offload flag
net/i40e/base: preserve extended PHY type field
net/i40e/base: remove unnecessary code
net/i40e/base: fix bit test mask
net/i40e/base: group base mode VF offload flags
net/i40e/base: fix long link down notification time
net/i40e/base: add media type detection for 25G link
net/i40e/base: add clause22 and clause45 implementation
net/i40e/base: add bus number info
net/i40e/base: add protocols when discover capabilities
net/i40e/base: pass unknown PHY type for unknown PHYs
net/i40e/base: replace memcpy
net/i40e/base: deprecating unused macro
net/i40e/base: remove FPK HyperV VF device ID
net/i40e/base: add FEC bits to PHY capabilities
net/i40e/base: use BIT() macro instead of bit fields
net/i40e/base: adjust 25G PHY type values
net/i40e/base: implement clear all WoL filters
net/i40e/base: implement set VSI full promisc mode
net/i40e/base: add defines for new aq command
net/i40e/base: save link FEC info from link up event
net/i40e/base: acquire NVM lock before reads on all devices
net/i40e/base: change shift values to hex
net/i40e/base: comment that udp port must be in Host order
net/i40e/base: remove duplicate definitions
net/i40e/base: add ERROR state for NVM update state machine
net/i40e/base: add broadcast promiscuous control per VLAN
net/i40e/base: avoid division by zero
net/i40e/base: fix byte order
net/i40e/base: remove unused marco
net/i40e: remove unused marco from PMD
drivers/net/i40e/Makefile | 2 +-
drivers/net/i40e/base/i40e_adminq.c | 4 +-
drivers/net/i40e/base/i40e_adminq_cmd.h | 51 ++--
drivers/net/i40e/base/i40e_common.c | 425 ++++++++++++++++++++++++++------
drivers/net/i40e/base/i40e_devids.h | 3 -
drivers/net/i40e/base/i40e_lan_hmc.c | 5 -
drivers/net/i40e/base/i40e_nvm.c | 52 ++--
drivers/net/i40e/base/i40e_prototype.h | 30 ++-
drivers/net/i40e/base/i40e_register.h | 2 -
drivers/net/i40e/base/i40e_type.h | 94 +++----
drivers/net/i40e/base/i40e_virtchnl.h | 5 +
drivers/net/i40e/i40e_ethdev.c | 40 ---
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
13 files changed, 467 insertions(+), 247 deletions(-)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 01/31] net/i40e/base: add encap csum VF offload flag
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
` (30 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add ENCAP_CSUM offload negotiation flag. Currently VF assumes checksum
offload for encapsulated packets is supported by default. Going forward,
this feature needs to be negotiated with PF before advertising to the
stack. Hence, we need a flag to control it.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_virtchnl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index fd51ec3..07e7472 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -170,6 +170,7 @@ struct i40e_virtchnl_vsi_resource {
#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
+#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00100000
struct i40e_virtchnl_vf_resource {
u16 num_vsis;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 02/31] net/i40e/base: preserve extended PHY type field
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-05 14:34 ` Ferruh Yigit
2016-12-03 1:18 ` [dpdk-dev] [PATCH 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
` (29 subsequent siblings)
31 siblings, 1 reply; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Prevents 25G PHY types from being disabled when setting
the flow control modes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9a6b3ed..d67ad90 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1789,6 +1789,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
/* Copy over all the old settings */
config.phy_type = abilities.phy_type;
+ config.phy_type_ext = abilities.phy_type_ext;
config.link_speed = abilities.link_speed;
config.eee_capability = abilities.eee_capability;
config.eeer = abilities.eeer_val;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 03/31] net/i40e/base: remove unnecessary code
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 04/31] net/i40e/base: fix bit test mask Jingjing Wu
` (28 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch changes some assignments and removing the unnecessary
code to avoid error reported by static analysis tools.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ----
drivers/net/i40e/base/i40e_lan_hmc.c | 5 -----
2 files changed, 9 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index d67ad90..aa346d1 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3833,7 +3833,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
else
p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL;
p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0;
- p->proxy_support = p->proxy_support;
i40e_debug(hw, I40E_DEBUG_INIT,
"HW Capability: WOL proxy filters = %d\n",
hw->num_wol_proxy_filters);
@@ -6008,9 +6007,6 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
- if (bwd_size > I40E_AQ_LARGE_BUF)
- desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB);
-
desc.datalen = CPU_TO_LE16(bwd_size);
status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details);
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index 2260648..f03f381 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -1239,11 +1239,6 @@ enum i40e_status_code i40e_hmc_get_object_va(struct i40e_hw *hw,
u64 obj_offset_in_fpm;
u32 sd_idx, sd_lmt;
- if (NULL == hmc_info) {
- ret_code = I40E_ERR_BAD_PTR;
- DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n");
- goto exit;
- }
if (NULL == hmc_info->hmc_obj) {
ret_code = I40E_ERR_BAD_PTR;
DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n");
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 04/31] net/i40e/base: fix bit test mask
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (2 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-05 14:37 ` Ferruh Yigit
2016-12-03 1:18 ` [dpdk-dev] [PATCH 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
` (27 subsequent siblings)
31 siblings, 1 reply; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Incorrect bit mask was used for testing "get link status" response.
Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it most probably
should be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01).
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa346d1..a2661cf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1975,7 +1975,7 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->crc_enable = false;
- if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE))
+ if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED))
hw_link_info->lse_enable = true;
else
hw_link_info->lse_enable = false;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 05/31] net/i40e/base: group base mode VF offload flags
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (3 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 04/31] net/i40e/base: fix bit test mask Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
` (26 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Group together the minimum set of offload capabilities that are always
supported by VF in base mode. This define would be used by PF to make
sure VF in base mode gets minimum of base capabilities.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_virtchnl.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index 07e7472..8fba608 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -172,6 +172,10 @@ struct i40e_virtchnl_vsi_resource {
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00100000
+#define I40E_VF_BASE_MODE_OFFLOADS (I40E_VIRTCHNL_VF_OFFLOAD_L2 | \
+ I40E_VIRTCHNL_VF_OFFLOAD_VLAN | \
+ I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF)
+
struct i40e_virtchnl_vf_resource {
u16 num_vsis;
u16 num_queue_pairs;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 06/31] net/i40e/base: fix long link down notification time
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (4 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
` (25 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch fixes a problem where it could take a very
long time (>100 msec) to print the link down notification.
This problem is fixed by changing how often we update link
info from fw, when link is down. Without this patch, it can
take over 100msec to notify user link is down.
Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index a2661cf..2ad9448 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2746,7 +2746,10 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) {
+ /* extra checking needed to ensure link info to user is timely */
+ if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+ ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+ !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
status = i40e_aq_get_phy_capabilities(hw, false, false,
&abilities, NULL);
if (status)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 07/31] net/i40e/base: add media type detection for 25G link
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (5 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
` (24 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ad9448..7eea189 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1288,6 +1288,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_1000BASE_LX:
case I40E_PHY_TYPE_40GBASE_SR4:
case I40E_PHY_TYPE_40GBASE_LR4:
+ case I40E_PHY_TYPE_25GBASE_LR:
+ case I40E_PHY_TYPE_25GBASE_SR:
media = I40E_MEDIA_TYPE_FIBER;
break;
case I40E_PHY_TYPE_100BASE_TX:
@@ -1302,6 +1304,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_SFPP_CU:
case I40E_PHY_TYPE_40GBASE_AOC:
case I40E_PHY_TYPE_10GBASE_AOC:
+ case I40E_PHY_TYPE_25GBASE_CR:
media = I40E_MEDIA_TYPE_DA;
break;
case I40E_PHY_TYPE_1000BASE_KX:
@@ -1309,6 +1312,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_KR:
case I40E_PHY_TYPE_40GBASE_KR4:
case I40E_PHY_TYPE_20GBASE_KR2:
+ case I40E_PHY_TYPE_25GBASE_KR:
media = I40E_MEDIA_TYPE_BACKPLANE;
break;
case I40E_PHY_TYPE_SGMII:
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 08/31] net/i40e/base: add clause22 and clause45 implementation
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (6 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 09/31] net/i40e/base: add bus number info Jingjing Wu
` (23 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Some external PHYs require Clause22 and Clause45 method for
accessing registers. Mostly used for X722 support.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 245 +++++++++++++++++++++++++++------
drivers/net/i40e/base/i40e_prototype.h | 16 ++-
drivers/net/i40e/base/i40e_type.h | 17 ++-
3 files changed, 226 insertions(+), 52 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 7eea189..85c1c11 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6022,7 +6022,92 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
}
/**
- * i40e_read_phy_register
+ * i40e_read_phy_register_clause22
+ * @hw: pointer to the HW structure
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Reads specified PHY register value
+ **/
+enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 *value)
+{
+ enum i40e_status_code status = I40E_ERR_TIMEOUT;
+ u8 port_num = (u8)hw->func_caps.mdio_port_num;
+ u32 command = 0;
+ u16 retry = 1000;
+
+ command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
+ (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
+ (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) |
+ (I40E_MDIO_CLAUSE22_STCODE_MASK) |
+ (I40E_GLGEN_MSCA_MDICMD_MASK);
+ wr32(hw, I40E_GLGEN_MSCA(port_num), command);
+ do {
+ command = rd32(hw, I40E_GLGEN_MSCA(port_num));
+ if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) {
+ status = I40E_SUCCESS;
+ break;
+ }
+ i40e_usec_delay(10);
+ retry--;
+ } while (retry);
+
+ if (status) {
+ i40e_debug(hw, I40E_DEBUG_PHY,
+ "PHY: Can't write command to external PHY.\n");
+ } else {
+ command = rd32(hw, I40E_GLGEN_MSRWD(port_num));
+ *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >>
+ I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT;
+ }
+
+ return status;
+}
+
+/**
+ * i40e_write_phy_register_clause22
+ * @hw: pointer to the HW structure
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Writes specified PHY register value
+ **/
+enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 value)
+{
+ enum i40e_status_code status = I40E_ERR_TIMEOUT;
+ u8 port_num = (u8)hw->func_caps.mdio_port_num;
+ u32 command = 0;
+ u16 retry = 1000;
+
+ command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT;
+ wr32(hw, I40E_GLGEN_MSRWD(port_num), command);
+
+ command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
+ (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
+ (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) |
+ (I40E_MDIO_CLAUSE22_STCODE_MASK) |
+ (I40E_GLGEN_MSCA_MDICMD_MASK);
+
+ wr32(hw, I40E_GLGEN_MSCA(port_num), command);
+ do {
+ command = rd32(hw, I40E_GLGEN_MSCA(port_num));
+ if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) {
+ status = I40E_SUCCESS;
+ break;
+ }
+ i40e_usec_delay(10);
+ retry--;
+ } while (retry);
+
+ return status;
+}
+
+/**
+ * i40e_read_phy_register_clause45
* @hw: pointer to the HW structure
* @page: registers page number
* @reg: register address in the page
@@ -6031,9 +6116,8 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
*
* Reads specified PHY register value
**/
-enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
- u8 page, u16 reg, u8 phy_addr,
- u16 *value)
+enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value)
{
enum i40e_status_code status = I40E_ERR_TIMEOUT;
u32 command = 0;
@@ -6043,8 +6127,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) |
(page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_ADDRESS) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
wr32(hw, I40E_GLGEN_MSCA(port_num), command);
@@ -6066,8 +6150,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_READ) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
status = I40E_ERR_TIMEOUT;
@@ -6097,7 +6181,7 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
}
/**
- * i40e_write_phy_register
+ * i40e_write_phy_register_clause45
* @hw: pointer to the HW structure
* @page: registers page number
* @reg: register address in the page
@@ -6106,9 +6190,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
*
* Writes value to specified PHY register
**/
-enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
- u8 page, u16 reg, u8 phy_addr,
- u16 value)
+enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value)
{
enum i40e_status_code status = I40E_ERR_TIMEOUT;
u32 command = 0;
@@ -6118,8 +6201,8 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) |
(page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_ADDRESS) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
wr32(hw, I40E_GLGEN_MSCA(port_num), command);
@@ -6143,8 +6226,8 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_WRITE) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
status = I40E_ERR_TIMEOUT;
@@ -6165,6 +6248,78 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
}
/**
+ * i40e_write_phy_register
+ * @hw: pointer to the HW structure
+ * @page: registers page number
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Writes value to specified PHY register
+ **/
+enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value)
+{
+ enum i40e_status_code status;
+
+ switch (hw->device_id) {
+ case I40E_DEV_ID_1G_BASE_T_X722:
+ status = i40e_write_phy_register_clause22(hw,
+ reg, phy_addr, value);
+ break;
+ case I40E_DEV_ID_10G_BASE_T:
+ case I40E_DEV_ID_10G_BASE_T4:
+ case I40E_DEV_ID_10G_BASE_T_X722:
+ case I40E_DEV_ID_25G_B:
+ case I40E_DEV_ID_25G_SFP28:
+ status = i40e_write_phy_register_clause45(hw,
+ page, reg, phy_addr, value);
+ break;
+ default:
+ status = I40E_ERR_UNKNOWN_PHY;
+ break;
+ }
+
+ return status;
+}
+
+/**
+ * i40e_read_phy_register
+ * @hw: pointer to the HW structure
+ * @page: registers page number
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Reads specified PHY register value
+ **/
+enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value)
+{
+ enum i40e_status_code status;
+
+ switch (hw->device_id) {
+ case I40E_DEV_ID_1G_BASE_T_X722:
+ status = i40e_read_phy_register_clause22(hw, reg, phy_addr,
+ value);
+ break;
+ case I40E_DEV_ID_10G_BASE_T:
+ case I40E_DEV_ID_10G_BASE_T4:
+ case I40E_DEV_ID_10G_BASE_T_X722:
+ case I40E_DEV_ID_25G_B:
+ case I40E_DEV_ID_25G_SFP28:
+ status = i40e_read_phy_register_clause45(hw, page, reg,
+ phy_addr, value);
+ break;
+ default:
+ status = I40E_ERR_UNKNOWN_PHY;
+ break;
+ }
+
+ return status;
+}
+
+/**
* i40e_get_phy_address
* @hw: pointer to the HW structure
* @dev_num: PHY port num that address we want
@@ -6206,14 +6361,16 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++,
led_addr++) {
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr,
+ &led_reg);
if (status)
goto phy_blinking_end;
led_ctl = led_reg;
if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) {
led_reg = 0;
- status = i40e_write_phy_register(hw,
+ status = i40e_write_phy_register_clause45(hw,
I40E_PHY_COM_REG_PAGE,
led_addr, phy_addr,
led_reg);
@@ -6225,20 +6382,18 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
if (time > 0 && interval > 0) {
for (i = 0; i < time * 1000; i += interval) {
- status = i40e_read_phy_register(hw,
- I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr,
- &led_reg);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
goto restore_config;
if (led_reg & I40E_PHY_LED_MANUAL_ON)
led_reg = 0;
else
led_reg = I40E_PHY_LED_MANUAL_ON;
- status = i40e_write_phy_register(hw,
- I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr,
- led_reg);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_reg);
if (status)
goto restore_config;
i40e_msec_delay(interval);
@@ -6246,8 +6401,9 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
}
restore_config:
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, led_ctl);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_ctl);
phy_blinking_end:
return status;
@@ -6278,8 +6434,10 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,
for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++,
temp_addr++) {
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- temp_addr, phy_addr, ®_val);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ temp_addr, phy_addr,
+ ®_val);
if (status)
return status;
*val = reg_val;
@@ -6312,41 +6470,42 @@ enum i40e_status_code i40e_led_set_phy(struct i40e_hw *hw, bool on,
i = rd32(hw, I40E_PFGEN_PORTNUM);
port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK);
phy_addr = i40e_get_phy_address(hw, port_num);
-
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
return status;
led_ctl = led_reg;
if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) {
led_reg = 0;
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, led_reg);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr,
+ led_reg);
if (status)
return status;
}
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
goto restore_config;
if (on)
led_reg = I40E_PHY_LED_MANUAL_ON;
else
led_reg = 0;
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, led_reg);
+ status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_reg);
if (status)
goto restore_config;
if (mode & I40E_PHY_LED_MODE_ORIG) {
led_ctl = (mode & I40E_PHY_LED_MODE_MASK);
- status = i40e_write_phy_register(hw,
+ status = i40e_write_phy_register_clause45(hw,
I40E_PHY_COM_REG_PAGE,
led_addr, phy_addr, led_ctl);
}
return status;
restore_config:
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, led_ctl);
+ status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_ctl);
return status;
}
#endif /* PF_DRIVER */
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 3aab5ca..9109cfc 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -538,10 +538,18 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
u16 *wake_reason,
struct i40e_asq_cmd_details *cmd_details);
#endif
-enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, u8 page,
- u16 reg, u8 phy_addr, u16 *value);
-enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, u8 page,
- u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value);
u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num);
enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
u32 time, u32 interval);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index b5f72c3..5a59ce2 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -157,15 +157,22 @@ enum i40e_debug_mask {
#define I40E_PCI_LINK_SPEED_5000 0x2
#define I40E_PCI_LINK_SPEED_8000 0x3
-#define I40E_MDIO_STCODE I40E_MASK(0, \
+#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_MASK(1, \
I40E_GLGEN_MSCA_STCODE_SHIFT)
-#define I40E_MDIO_OPCODE_ADDRESS I40E_MASK(0, \
+#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_MASK(1, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_WRITE I40E_MASK(1, \
+#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_MASK(2, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_READ_INC_ADDR I40E_MASK(2, \
+
+#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_MASK(0, \
+ I40E_GLGEN_MSCA_STCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK I40E_MASK(0, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK I40E_MASK(1, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_READ_INC_ADDR_MASK I40E_MASK(2, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_READ I40E_MASK(3, \
+#define I40E_MDIO_CLAUSE45_OPCODE_READ_MASK I40E_MASK(3, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
#define I40E_PHY_COM_REG_PAGE 0x1E
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 09/31] net/i40e/base: add bus number info
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (7 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
` (22 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Currently i40e_bus_info has PCI device and function info only. However
in log messages slot number (i.e hw->bus.device) is being printed
as bus number. Another field should be added to provide bus number
info and preserve existing information.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 5a59ce2..530ee5e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -561,6 +561,7 @@ struct i40e_bus_info {
u16 func;
u16 device;
u16 lan_id;
+ u16 bus_id;
};
/* Flow control (FC) parameters */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 10/31] net/i40e/base: add protocols when discover capabilities
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (8 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 09/31] net/i40e/base: add bus number info Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs Jingjing Wu
` (21 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add logical_id to I40E_AQ_CAP_ID_MNG_MODE capability starting from major
version 2.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 8 ++++++++
drivers/net/i40e/base/i40e_type.h | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 85c1c11..9591428 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3611,6 +3611,14 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
break;
case I40E_AQ_CAP_ID_MNG_MODE:
p->management_mode = number;
+ if (major_rev > 1) {
+ p->mng_protocols_over_mctp = logical_id;
+ i40e_debug(hw, I40E_DEBUG_INIT,
+ "HW Capability: Protocols over MCTP = %d\n",
+ p->mng_protocols_over_mctp);
+ } else {
+ p->mng_protocols_over_mctp = 0;
+ }
i40e_debug(hw, I40E_DEBUG_INIT,
"HW Capability: Management Mode = %d\n",
p->management_mode);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 530ee5e..223f5fe 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -366,6 +366,10 @@ struct i40e_hw_capabilities {
#define I40E_NVM_IMAGE_TYPE_UDP_CLOUD 0x3
u32 management_mode;
+ u32 mng_protocols_over_mctp;
+#define I40E_MNG_PROTOCOL_PLDM 0x2
+#define I40E_MNG_PROTOCOL_OEM_COMMANDS 0x4
+#define I40E_MNG_PROTOCOL_NCSI 0x8
u32 npar_enable;
u32 os2bmc;
u32 valid_functions;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (9 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 12/31] net/i40e/base: replace memcpy Jingjing Wu
` (20 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
The PHY type value for unrecognized PHYs and cables was changed
based on firmware version number. Newer hardware use lower firmware
version numbers and this was causing some PHYs to be identified
as type 0x16 instead of 0xe (unknown).
Without this patch, newer card will incorrectly identify unknown
PHYs and cables.
This change adds hardware type to the check for firmware version
so the PHY type is reported correctly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9591428..fbaa0be 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1984,7 +1984,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->lse_enable = false;
- if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
+ if ((hw->mac.type == I40E_MAC_XL710) &&
+ (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 12/31] net/i40e/base: replace memcpy
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (10 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
` (19 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
To align with current memcpy use, replace existing legacy memcpy() calls
with i40e_memcpy() calls.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 13 ++++++++-----
drivers/net/i40e/base/i40e_nvm.c | 7 ++++---
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fbaa0be..fda6c4a 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1126,7 +1126,8 @@ enum i40e_status_code i40e_get_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL);
if (flags & I40E_AQC_LAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac));
+ i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac),
+ I40E_NONDMA_TO_NONDMA);
return status;
}
@@ -1149,7 +1150,8 @@ enum i40e_status_code i40e_get_port_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
return status;
if (flags & I40E_AQC_PORT_ADDR_VALID)
- memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac));
+ i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac),
+ I40E_NONDMA_TO_NONDMA);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -1207,7 +1209,8 @@ enum i40e_status_code i40e_get_san_mac_addr(struct i40e_hw *hw,
return status;
if (flags & I40E_AQC_SAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac));
+ i40e_memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac),
+ I40E_NONDMA_TO_NONDMA);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -2760,8 +2763,8 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- memcpy(hw->phy.link_info.module_type, &abilities.module_type,
- sizeof(hw->phy.link_info.module_type));
+ i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type,
+ sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA);
}
return status;
}
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4fa1220..eb69e49 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -1423,7 +1423,8 @@ STATIC enum i40e_status_code i40e_nvmupd_exec_aq(struct i40e_hw *hw,
if (hw->nvm_buff.va) {
buff = hw->nvm_buff.va;
- memcpy(buff, &bytes[aq_desc_len], aq_data_len);
+ i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len,
+ I40E_NONDMA_TO_NONDMA);
}
}
@@ -1496,7 +1497,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
__func__, cmd->offset, cmd->offset + len);
buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset;
- memcpy(bytes, buff, len);
+ i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA);
bytes += len;
remainder -= len;
@@ -1510,7 +1511,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n",
__func__, start_byte, start_byte + remainder);
- memcpy(bytes, buff, remainder);
+ i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA);
}
return I40E_SUCCESS;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 13/31] net/i40e/base: deprecating unused macro
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (11 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 12/31] net/i40e/base: replace memcpy Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
` (18 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710
was supposed to be for 40G. But i40e_set_mac_type() sets
I40E_MAC_XL710 for all device IDS. I40E_MAC_X710 is not
used at all. Thus deprecating this extra macro.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 223f5fe..8889fc7 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -212,7 +212,6 @@ enum i40e_memcpy_type {
*/
enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0,
- I40E_MAC_X710,
I40E_MAC_XL710,
I40E_MAC_VF,
#ifdef X722_SUPPORT
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 14/31] net/i40e/base: remove FPK HyperV VF device ID
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (12 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
` (17 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Microsoft recently removed the requirement for VFs to use the VMBus.
The Fort Park Windows VF has been changed to use only the hardware
mailbox, so the Hyper-V VF device ID can be removed.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 1 -
drivers/net/i40e/base/i40e_devids.h | 1 -
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fda6c4a..b9b0ee6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -87,7 +87,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
#ifdef X722_SUPPORT
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_X722_VF:
- case I40E_DEV_ID_X722_VF_HV:
#ifdef X722_A0_SUPPORT
case I40E_DEV_ID_X722_A0_VF:
#endif
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 8bd5793..19bb376 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -70,7 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_SFP_I_X722 0x37D3
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
-#define I40E_DEV_ID_X722_VF_HV 0x37D9
#endif /* VF_DRIVER */
#endif /* X722_SUPPORT */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index aa306d6..219b15e 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1087,7 +1087,6 @@ static const struct rte_pci_id pci_id_i40evf_map[] = {
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) },
- { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) },
{ .vendor_id = 0, /* sentinel */ },
};
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 15/31] net/i40e/base: add FEC bits to PHY capabilities
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (13 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-05 14:30 ` Ferruh Yigit
2016-12-03 1:18 ` [dpdk-dev] [PATCH 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
` (16 subsequent siblings)
31 siblings, 1 reply; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add FEC bits to the PHY capabilities AQ command struct. This is required
for 25GbE support. Change the name of the generic mod_type_ext field to
indicate that it is now used for handling FEC.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 13 ++++++++++++-
drivers/net/i40e/base/i40e_common.c | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4f06772..1884758 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1785,7 +1785,16 @@ struct i40e_aq_get_phy_abilities_resp {
#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
- u8 mod_type_ext;
+ u8 fec_cfg_curr_mod_ext_info;
+#define I40E_AQ_ENABLE_FEC_KR 0x01
+#define I40E_AQ_ENABLE_FEC_RS 0x02
+#define I40E_AQ_REQUEST_FEC_KR 0x04
+#define I40E_AQ_REQUEST_FEC_RS 0x08
+#define I40E_AQ_ENABLE_FEC_AUTO 0x10
+#define I40E_AQ_FEC
+#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0
+#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5
+
u8 ext_comp_code;
u8 phy_id[4];
u8 module_type[3];
@@ -1819,6 +1828,8 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#define I40E_AQ_SET_FEC_REQUEST_KR (1 << 2)
#define I40E_AQ_SET_FEC_REQUEST_RS (1 << 3)
#define I40E_AQ_SET_FEC_AUTO (1 << 4)
+#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0
+#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT)
u8 reserved;
};
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index b9b0ee6..9f4b872 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1800,6 +1800,8 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
config.eee_capability = abilities.eee_capability;
config.eeer = abilities.eeer_val;
config.low_power_ctrl = abilities.d3_lpan;
+ config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+ I40E_AQ_PHY_FEC_CONFIG_MASK;
status = i40e_aq_set_phy_config(hw, &config, NULL);
if (status)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 16/31] net/i40e/base: use BIT() macro instead of bit fields
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (14 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
` (15 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 1884758..cef02b1 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1823,11 +1823,11 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_config;
-#define I40E_AQ_SET_FEC_ABILITY_KR (1 << 0)
-#define I40E_AQ_SET_FEC_ABILITY_RS (1 << 1)
-#define I40E_AQ_SET_FEC_REQUEST_KR (1 << 2)
-#define I40E_AQ_SET_FEC_REQUEST_RS (1 << 3)
-#define I40E_AQ_SET_FEC_AUTO (1 << 4)
+#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0)
+#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1)
+#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2)
+#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3)
+#define I40E_AQ_SET_FEC_AUTO BIT(4)
#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0
#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT)
u8 reserved;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 17/31] net/i40e/base: adjust 25G PHY type values
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (15 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
@ 2016-12-03 1:18 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
` (14 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:18 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Define the values for the 25G PHY type bit-fields that match
reported values from firmware. There was a gap in the bit
fields but no corresponding gap i40e_aq_phy_type enum.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 8889fc7..206e95a 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -338,10 +338,22 @@ struct i40e_phy_info {
#define I40E_CAP_PHY_TYPE_1000BASE_T_OPTICAL \
BIT_ULL(I40E_PHY_TYPE_1000BASE_T_OPTICAL)
#define I40E_CAP_PHY_TYPE_20GBASE_KR2 BIT_ULL(I40E_PHY_TYPE_20GBASE_KR2)
-#define I40E_CAP_PHY_TYPE_25GBASE_KR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_KR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_CR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_CR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_SR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_SR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_LR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_LR + 32)
+/*
+ * Defining the macro I40E_TYPE_OFFSET to implement a bit shift for some
+ * PHY types. There is an unused bit (31) in the I40E_CAP_PHY_TYPE_* bit
+ * fields but no corresponding gap in the i40e_aq_phy_type enumeration. So,
+ * a shift is needed to adjust for this with values larger than 31. The
+ * only affected values are I40E_PHY_TYPE_25GBASE_*.
+ */
+#define I40E_PHY_TYPE_OFFSET 1
+#define I40E_CAP_PHY_TYPE_25GBASE_KR BIT_ULL(I40E_PHY_TYPE_25GBASE_KR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_CR BIT_ULL(I40E_PHY_TYPE_25GBASE_CR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_SR BIT_ULL(I40E_PHY_TYPE_25GBASE_SR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_LR BIT_ULL(I40E_PHY_TYPE_25GBASE_LR + \
+ I40E_PHY_TYPE_OFFSET)
#define I40E_HW_CAP_MAX_GPIO 30
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 18/31] net/i40e/base: implement clear all WoL filters
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (16 preceding siblings ...)
2016-12-03 1:18 ` [dpdk-dev] [PATCH 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
` (13 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch implements the clear Wake on LAN (WoL) filters admin queue
function which clears out ALL WoL patterns programmed into
the flex filters.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 1 +
drivers/net/i40e/base/i40e_common.c | 20 ++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 2 ++
3 files changed, 23 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index cef02b1..19af8b5 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -156,6 +156,7 @@ enum i40e_admin_queue_opc {
/* WoL commands */
i40e_aqc_opc_set_wol_filter = 0x0120,
i40e_aqc_opc_get_wake_reason = 0x0121,
+ i40e_aqc_opc_clear_all_wol_filters = 0x025E,
#endif
/* internal switch commands */
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9f4b872..bae9079 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6900,4 +6900,24 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
return status;
}
+/**
+* i40e_aq_clear_all_wol_filters
+* @hw: pointer to the hw struct
+* @cmd_details: pointer to command details structure or NULL
+*
+* Get information for the reason of a Wake Up event
+**/
+enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ enum i40e_status_code status;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_clear_all_wol_filters);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
#endif /* X722_SUPPORT */
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 9109cfc..4de96b5 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -537,6 +537,8 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
u16 *wake_reason,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
+ struct i40e_asq_cmd_details *cmd_details);
#endif
enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 19/31] net/i40e/base: implement set VSI full promisc mode
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (17 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 20/31] net/i40e/base: add defines for new aq command Jingjing Wu
` (12 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch implements a function to set a VSI to broadcast, multicast, and
unicast promiscuous mode all at once. This is specifically needed to set
the WoL/Proxy VSI created by FW to full promiscuous mode during power down
for WoL patterns and protocol offloads to function properly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 37 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 3 +++
2 files changed, 40 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index bae9079..1095e68 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2354,6 +2354,43 @@ enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous(struct i40e_hw *hw,
}
/**
+* i40e_aq_set_vsi_full_promiscuous
+* @hw: pointer to the hw struct
+* @seid: VSI number
+* @set: set promiscuous enable/disable
+* @cmd_details: pointer to command details structure or NULL
+**/
+enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw,
+ u16 seid, bool set,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
+ (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ if (set)
+ flags = I40E_AQC_SET_VSI_PROMISC_UNICAST |
+ I40E_AQC_SET_VSI_PROMISC_MULTICAST |
+ I40E_AQC_SET_VSI_PROMISC_BROADCAST;
+
+ cmd->promiscuous_flags = CPU_TO_LE16(flags);
+
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST |
+ I40E_AQC_SET_VSI_PROMISC_MULTICAST |
+ I40E_AQC_SET_VSI_PROMISC_BROADCAST);
+
+ cmd->seid = CPU_TO_LE16(seid);
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_mc_promisc_on_vlan
* @hw: pointer to the hw struct
* @seid: vsi number
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 4de96b5..98f5689 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -172,6 +172,9 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
bool rx_only_promisc);
enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous(struct i40e_hw *hw,
u16 vsi_id, bool set, struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw,
+ u16 seid, bool set,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
u16 seid, bool enable, u16 vid,
struct i40e_asq_cmd_details *cmd_details);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 20/31] net/i40e/base: add defines for new aq command
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (18 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
` (11 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
By default the device clears all MAC filter information on PF Reset.
However, this will cause Wake-On-LAN to fail because the wake filters
are deleted on transition to D3 power state. To get around this,
firmware is adding functionality to preserve certain MAC filters during
PFR. These bits allow the driver tell the FW which filters to preserve.
Set the datalen field and add I40E_AQ_FLAG_BUF/I40E_AQ_FLAG_RD flags in the
desc struct for the WoL/Proxy AQ descriptors. The WoL/Proxy AQ commands
were failing because these were missing.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 5 ++++-
drivers/net/i40e/base/i40e_common.c | 16 +++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 19af8b5..d4d2a7a 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -541,7 +541,8 @@ struct i40e_aqc_mac_address_read {
#define I40E_AQC_PORT_ADDR_VALID 0x40
#define I40E_AQC_WOL_ADDR_VALID 0x80
#define I40E_AQC_MC_MAG_EN_VALID 0x100
-#define I40E_AQC_ADDR_VALID_MASK 0x1F0
+#define I40E_AQC_WOL_PRESERVE_STATUS 0x200
+#define I40E_AQC_ADDR_VALID_MASK 0x3F0
u8 reserved[6];
__le32 addr_high;
__le32 addr_low;
@@ -562,6 +563,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_address_read_data);
struct i40e_aqc_mac_address_write {
__le16 command_flags;
#define I40E_AQC_MC_MAG_EN 0x0100
+#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200
#define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000
#define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000
#define I40E_AQC_WRITE_TYPE_PORT 0x8000
@@ -601,6 +603,7 @@ struct i40e_aqc_set_wol_filter {
__le16 cmd_flags;
#define I40E_AQC_SET_WOL_FILTER 0x8000
#define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000
+#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000
#define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0
#define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1
__le16 valid_flags;
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 1095e68..e9376dd 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6804,10 +6804,13 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
desc.params.external.addr_high =
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
+ desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
status = i40e_asq_send_command(hw, &desc, proxy_config,
sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6838,10 +6841,13 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_ns_proxy_table_entry);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
desc.params.external.addr_high =
CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
+ desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6888,9 +6894,11 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
if (set_filter) {
if (!filter)
return I40E_ERR_PARAM;
+
cmd_flags |= I40E_AQC_SET_WOL_FILTER;
- buff_len = sizeof(*filter);
+ cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR;
}
+
if (no_wol_tco)
cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL;
cmd->cmd_flags = CPU_TO_LE16(cmd_flags);
@@ -6901,6 +6909,12 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID;
cmd->valid_flags = CPU_TO_LE16(valid_flags);
+ buff_len = sizeof(*filter);
+ desc.datalen = buff_len;
+
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
+
cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter));
cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter));
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 21/31] net/i40e/base: save link FEC info from link up event
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (19 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 20/31] net/i40e/base: add defines for new aq command Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 22/31] net/i40e/base: acquire NVM lock before reads on all devices Jingjing Wu
` (10 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Store the FEC status bits from the link up event into the
hw_link_info structure.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 2 ++
drivers/net/i40e/base/i40e_type.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e9376dd..17b53ae 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1961,6 +1961,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed;
hw_link_info->link_info = resp->link_info;
hw_link_info->an_info = resp->an_info;
+ hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA |
+ I40E_AQ_CONFIG_FEC_RS_ENA);
hw_link_info->ext_info = resp->ext_info;
hw_link_info->loopback = resp->loopback;
hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 206e95a..99e080e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -272,6 +272,7 @@ struct i40e_link_status {
enum i40e_aq_link_speed link_speed;
u8 link_info;
u8 an_info;
+ u8 fec_info;
u8 ext_info;
u8 loopback;
/* is Link Status Event notification to SW enabled */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 22/31] net/i40e/base: acquire NVM lock before reads on all devices
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (20 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 23/31] net/i40e/base: change shift values to hex Jingjing Wu
` (9 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Acquire NVM lock before reads on all devices. Previously, locks were
only used for X722 and later. Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index eb69e49..1f345a5 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -219,19 +219,19 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
+ ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+ if (!ret_code) {
#ifdef X722_SUPPORT
- if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
- ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
- if (!ret_code) {
+ if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
- i40e_release_nvm(hw);
+ } else {
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
- } else {
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
- }
#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
#endif
+ i40e_release_nvm(hw);
+ }
return ret_code;
}
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 23/31] net/i40e/base: change shift values to hex
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (21 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 22/31] net/i40e/base: acquire NVM lock before reads on all devices Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
` (8 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 99e080e..3784c8f 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -365,9 +365,9 @@ enum i40e_acpi_programming_method {
I40E_ACPI_PROGRAMMING_METHOD_AQC_FPK = 1
};
-#define I40E_WOL_SUPPORT_MASK 1
-#define I40E_ACPI_PROGRAMMING_METHOD_MASK (1 << 1)
-#define I40E_PROXY_SUPPORT_MASK (1 << 2)
+#define I40E_WOL_SUPPORT_MASK 0x1
+#define I40E_ACPI_PROGRAMMING_METHOD_MASK 0x2
+#define I40E_PROXY_SUPPORT_MASK 0x4
#endif
/* Capabilities of a PF or a VF or the whole device */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 24/31] net/i40e/base: comment that udp port must be in Host order
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (22 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 23/31] net/i40e/base: change shift values to hex Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
` (7 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
The firmware expects the Port number to be in Little Endian format, and
the i40e_aq_add_udp_tunnel command clearly expects the udp_port variable
to be in Host order, as it uses CPU_TO_LE16(). It was recently
discovered in the Linux driver that we were passing a Big Endian port
number, which was therefor not enabling the UDP tunnel correctly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 17b53ae..852cbf7 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4419,11 +4419,15 @@ enum i40e_status_code i40e_aq_start_stop_dcbx(struct i40e_hw *hw,
/**
* i40e_aq_add_udp_tunnel
* @hw: pointer to the hw struct
- * @udp_port: the UDP port to add
+ * @udp_port: the UDP port to add in Host byte order
* @header_len: length of the tunneling header length in DWords
* @protocol_index: protocol index type
* @filter_index: pointer to filter index
* @cmd_details: pointer to command details structure or NULL
+ *
+ * Note: Firmware expects the udp_port value to be in Little Endian format,
+ * and this function will call CPU_TO_LE16 to convert from Host byte order to
+ * Little Endian order.
**/
enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw,
u16 udp_port, u8 protocol_index,
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 25/31] net/i40e/base: remove duplicate definitions
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (23 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-05 14:52 ` Ferruh Yigit
2016-12-03 1:19 ` [dpdk-dev] [PATCH 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
` (6 subsequent siblings)
31 siblings, 1 reply; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
We already define I40E_AQ_PHY_TYPE_EXT_25G* flags in the response adminq
structure above, and do not need to re-define these. See eee_capability
for an example where we didn't re-define these. This prevents Linux
driver from complaining about using these flags in an #ifdef when
running cppkeep tool, and generally makes more sense to avoid
duplicating the definitions.
While we are here, replace 0X with 0x as normal style.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index d4d2a7a..4e00516 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1785,8 +1785,8 @@ struct i40e_aq_get_phy_abilities_resp {
u8 d3_lpan;
#define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
u8 phy_type_ext;
-#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01
-#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
+#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01
+#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_cfg_curr_mod_ext_info;
@@ -1822,10 +1822,6 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
__le32 eeer;
u8 low_power_ctrl;
u8 phy_type_ext;
-#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01
-#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
-#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
-#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_config;
#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0)
#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 26/31] net/i40e/base: add ERROR state for NVM update state machine
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (24 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
` (5 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch adds I40E_NVMUPD_STATE_ERROR state for NVM update.
Without this patch driver has no possibility to return NVM image write
failure.This state is being set when ARQ rises error.
arq_last_status is also updated every time when ARQ event comes,
not only on error cases.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 4 ++--
drivers/net/i40e/base/i40e_nvm.c | 17 +++++++++++++++++
drivers/net/i40e/base/i40e_type.h | 2 ++
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 0d3a83f..5bdf3f7 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -1077,11 +1077,11 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,
desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc);
desc_idx = ntc;
+ hw->aq.arq_last_status =
+ (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval);
flags = LE16_TO_CPU(desc->flags);
if (flags & I40E_AQ_FLAG_ERR) {
ret_code = I40E_ERR_ADMIN_QUEUE_ERROR;
- hw->aq.arq_last_status =
- (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval);
i40e_debug(hw,
I40E_DEBUG_AQ_MESSAGE,
"AQRX: Event received with error 0x%X.\n",
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 1f345a5..4f4a645 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -901,9 +901,20 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,
*((u16 *)&bytes[2]) = hw->nvm_wait_opcode;
}
+ /* Clear error status on read */
+ if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR)
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+
return I40E_SUCCESS;
}
+ /* Clear status even it is not read and log */
+ if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) {
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n");
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT:
status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno);
@@ -1253,6 +1264,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_writing(struct i40e_hw *hw,
void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)
{
if (opcode == hw->nvm_wait_opcode) {
+
i40e_debug(hw, I40E_DEBUG_NVM,
"NVMUPD: clearing wait on opcode 0x%04x\n", opcode);
if (hw->nvm_release_on_done) {
@@ -1261,6 +1273,11 @@ void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)
}
hw->nvm_wait_opcode = 0;
+ if (hw->aq.arq_last_status) {
+ hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR;
+ return;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT_WAIT:
hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 3784c8f..56e47ea 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -499,6 +499,7 @@ enum i40e_nvmupd_state {
I40E_NVMUPD_STATE_WRITING,
I40E_NVMUPD_STATE_INIT_WAIT,
I40E_NVMUPD_STATE_WRITE_WAIT,
+ I40E_NVMUPD_STATE_ERROR
};
/* nvm_access definition and its masks/shifts need to be accessible to
@@ -1526,6 +1527,7 @@ struct i40e_hw_port_stats {
#define I40E_SR_EMPR_REGS_AUTO_LOAD_PTR 0x3A
#define I40E_SR_GLOBR_REGS_AUTO_LOAD_PTR 0x3B
#define I40E_SR_CORER_REGS_AUTO_LOAD_PTR 0x3C
+#define I40E_SR_PHY_ACTIVITY_LIST_PTR 0x3D
#define I40E_SR_PCIE_ALT_AUTO_LOAD_PTR 0x3E
#define I40E_SR_SW_CHECKSUM_WORD 0x3F
#define I40E_SR_1ST_FREE_PROVISION_AREA_PTR 0x40
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 27/31] net/i40e/base: add broadcast promiscuous control per VLAN
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (25 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 28/31] net/i40e/base: avoid division by zero Jingjing Wu
` (4 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add a new adminq function that allows driver to configure per-VLAN
broadcast promiscuous mode, similar to how we handle unicast and
multicast promiscuous modes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 34 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 3 +++
2 files changed, 37 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 852cbf7..14aaac6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2461,6 +2461,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
}
/**
+ * i40e_aq_set_vsi_bc_promisc_on_vlan
+ * @hw: pointer to the hw struct
+ * @seid: vsi number
+ * @enable: set broadcast promiscuous enable/disable for a given VLAN
+ * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag
+ * @cmd_details: pointer to command details structure or NULL
+ **/
+enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw,
+ u16 seid, bool enable, u16 vid,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
+ (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ if (enable)
+ flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST;
+
+ cmd->promiscuous_flags = CPU_TO_LE16(flags);
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST);
+ cmd->seid = CPU_TO_LE16(seid);
+ cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_broadcast
* @hw: pointer to the hw struct
* @seid: vsi number
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 98f5689..ed6cdd6 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -181,6 +181,9 @@ enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
u16 seid, bool enable, u16 vid,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw,
+ u16 seid, bool enable, u16 vid,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
u16 seid, bool enable,
struct i40e_asq_cmd_details *cmd_details);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 28/31] net/i40e/base: avoid division by zero
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (26 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 29/31] net/i40e/base: fix byte order Jingjing Wu
` (3 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
For some cases when reading from device are incorrect or image is
incorrect, this part of code causes crash due to division by zero.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 14aaac6..fdf9d9b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3967,8 +3967,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
/* partition id is 1-based, and functions are evenly spread
* across the ports as partitions
*/
- hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
- hw->num_partitions = num_functions / hw->num_ports;
+ if (hw->num_ports != 0) {
+ hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
+ hw->num_partitions = num_functions / hw->num_ports;
+ }
/* additional HW specific goodies that might
* someday be HW version specific
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 29/31] net/i40e/base: fix byte order
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (27 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 28/31] net/i40e/base: avoid division by zero Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco Jingjing Wu
` (2 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Big Endian platform will accidentally send the wrong
data to the firmware command. This patch fixes the issue.
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fdf9d9b..6a0362d 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6852,7 +6852,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
- desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data));
status = i40e_asq_send_command(hw, &desc, proxy_config,
sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6889,7 +6889,7 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
- desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data));
status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6952,7 +6952,7 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
cmd->valid_flags = CPU_TO_LE16(valid_flags);
buff_len = sizeof(*filter);
- desc.datalen = buff_len;
+ desc.datalen = CPU_TO_LE16(buff_len);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (28 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 29/31] net/i40e/base: fix byte order Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-05 14:55 ` Ferruh Yigit
2016-12-03 1:19 ` [dpdk-dev] [PATCH 31/31] net/i40e: remove unused marco from PMD Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
31 siblings, 1 reply; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
remove X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 14 -----------
drivers/net/i40e/base/i40e_common.c | 18 +-------------
drivers/net/i40e/base/i40e_devids.h | 2 --
drivers/net/i40e/base/i40e_nvm.c | 16 -------------
drivers/net/i40e/base/i40e_prototype.h | 6 -----
drivers/net/i40e/base/i40e_register.h | 2 --
drivers/net/i40e/base/i40e_type.h | 42 ---------------------------------
7 files changed, 1 insertion(+), 99 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4e00516..67cef7c 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -139,12 +139,10 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_list_func_capabilities = 0x000A,
i40e_aqc_opc_list_dev_capabilities = 0x000B,
-#ifdef X722_SUPPORT
/* Proxy commands */
i40e_aqc_opc_set_proxy_config = 0x0104,
i40e_aqc_opc_set_ns_proxy_table_entry = 0x0105,
-#endif
/* LAA */
i40e_aqc_opc_mac_address_read = 0x0107,
i40e_aqc_opc_mac_address_write = 0x0108,
@@ -152,13 +150,11 @@ enum i40e_admin_queue_opc {
/* PXE */
i40e_aqc_opc_clear_pxe_mode = 0x0110,
-#ifdef X722_SUPPORT
/* WoL commands */
i40e_aqc_opc_set_wol_filter = 0x0120,
i40e_aqc_opc_get_wake_reason = 0x0121,
i40e_aqc_opc_clear_all_wol_filters = 0x025E,
-#endif
/* internal switch commands */
i40e_aqc_opc_get_switch_config = 0x0200,
i40e_aqc_opc_add_statistics = 0x0201,
@@ -283,12 +279,10 @@ enum i40e_admin_queue_opc {
/* Tunnel commands */
i40e_aqc_opc_add_udp_tunnel = 0x0B00,
i40e_aqc_opc_del_udp_tunnel = 0x0B01,
-#ifdef X722_SUPPORT
i40e_aqc_opc_set_rss_key = 0x0B02,
i40e_aqc_opc_set_rss_lut = 0x0B03,
i40e_aqc_opc_get_rss_key = 0x0B04,
i40e_aqc_opc_get_rss_lut = 0x0B05,
-#endif
/* Async Events */
i40e_aqc_opc_event_lan_overflow = 0x1001,
@@ -587,7 +581,6 @@ struct i40e_aqc_clear_pxe {
I40E_CHECK_CMD_LENGTH(i40e_aqc_clear_pxe);
-#ifdef X722_SUPPORT
/* Set WoL Filter (0x0120) */
struct i40e_aqc_set_wol_filter {
@@ -639,7 +632,6 @@ struct i40e_aqc_get_wake_reason_completion {
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_wake_reason_completion);
-#endif /* X722_SUPPORT */
/* Switch configuration commands (0x02xx) */
/* Used by many indirect commands that only pass an seid and a buffer in the
@@ -944,16 +936,12 @@ struct i40e_aqc_vsi_properties_data {
I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT)
/* queueing option section */
u8 queueing_opt_flags;
-#ifdef X722_SUPPORT
#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04
#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08
-#endif
#define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10
#define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20
-#ifdef X722_SUPPORT
#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00
#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40
-#endif
u8 queueing_opt_reserved[3];
/* scheduler section */
u8 up_enable_bits;
@@ -2427,7 +2415,6 @@ struct i40e_aqc_del_udp_tunnel_completion {
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion);
-#ifdef X722_SUPPORT
struct i40e_aqc_get_set_rss_key {
#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15)
@@ -2468,7 +2455,6 @@ struct i40e_aqc_get_set_rss_lut {
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut);
-#endif
/* tunnel key structure 0x0B10 */
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 6a0362d..b8d8165 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -71,7 +71,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_25G_SFP28:
hw->mac.type = I40E_MAC_XL710;
break;
-#ifdef X722_SUPPORT
#ifdef X722_A0_SUPPORT
case I40E_DEV_ID_X722_A0:
#endif
@@ -83,8 +82,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_SFP_I_X722:
hw->mac.type = I40E_MAC_X722;
break;
-#endif
-#ifdef X722_SUPPORT
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_X722_VF:
#ifdef X722_A0_SUPPORT
@@ -93,7 +90,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
hw->mac.type = I40E_MAC_X722_VF;
break;
#endif /* INTEGRATED_VF || VF_DRIVER */
-#endif /* X722_SUPPORT */
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_VF:
case I40E_DEV_ID_VF_HV:
@@ -113,7 +109,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
return status;
}
-#ifndef I40E_NDIS_SUPPORT
/**
* i40e_aq_str - convert AQ err code to a string
* @hw: pointer to the HW structure
@@ -320,7 +315,6 @@ const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err)
return hw->err_str;
}
-#endif /* I40E_NDIS_SUPPORT */
/**
* i40e_debug_aq
* @hw: debug mask related to admin queue
@@ -446,7 +440,6 @@ enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw,
return status;
}
-#ifdef X722_SUPPORT
/**
* i40e_aq_get_set_rss_lut
@@ -605,7 +598,6 @@ enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw,
{
return i40e_aq_get_set_rss_key(hw, vsi_id, key, true);
}
-#endif /* X722_SUPPORT */
/* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the
* hardware to a bit-field that can be used by SW to more easily determine the
@@ -1021,9 +1013,7 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
switch (hw->mac.type) {
case I40E_MAC_XL710:
-#ifdef X722_SUPPORT
case I40E_MAC_X722:
-#endif
break;
default:
return I40E_ERR_DEVICE_NOT_SUPPORTED;
@@ -1043,11 +1033,9 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
else
hw->pf_id = (u8)(func_rid & 0x7);
-#ifdef X722_SUPPORT
if (hw->mac.type == I40E_MAC_X722)
hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE;
-#endif
status = i40e_init_nvm(hw);
return status;
}
@@ -3916,7 +3904,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
if (number & I40E_NVM_MGMT_UPDATE_DISABLED)
p->update_disabled = true;
break;
-#ifdef X722_SUPPORT
case I40E_AQ_CAP_ID_WOL_AND_PROXY:
hw->num_wol_proxy_filters = (u16)number;
hw->wol_proxy_vsi_seid = (u16)logical_id;
@@ -3930,7 +3917,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
"HW Capability: WOL proxy filters = %d\n",
hw->num_wol_proxy_filters);
break;
-#endif
default:
break;
}
@@ -6823,7 +6809,6 @@ enum i40e_status_code i40e_vf_reset(struct i40e_hw *hw)
I40E_SUCCESS, NULL, 0, NULL);
}
#endif /* VF_DRIVER */
-#ifdef X722_SUPPORT
/**
* i40e_aq_set_arp_proxy_config
@@ -7012,5 +6997,4 @@ enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
-}
-#endif /* X722_SUPPORT */
+}
\ No newline at end of file
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 19bb376..4546689 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -55,7 +55,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_VF 0x154C
#define I40E_DEV_ID_VF_HV 0x1571
#endif /* VF_DRIVER */
-#ifdef X722_SUPPORT
#ifdef X722_A0_SUPPORT
#define I40E_DEV_ID_X722_A0 0x374C
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
@@ -71,7 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
#endif /* VF_DRIVER */
-#endif /* X722_SUPPORT */
#define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \
(d) == I40E_DEV_ID_QSFP_B || \
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4f4a645..e896502 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -221,15 +221,11 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
if (!ret_code) {
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
} else {
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
-#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#endif
i40e_release_nvm(hw);
}
return ret_code;
@@ -249,14 +245,10 @@ enum i40e_status_code __i40e_read_nvm_word(struct i40e_hw *hw,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
else
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#endif
return ret_code;
}
@@ -348,14 +340,10 @@ enum i40e_status_code __i40e_read_nvm_buffer(struct i40e_hw *hw,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, data);
else
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#else
- ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#endif
return ret_code;
}
@@ -375,7 +363,6 @@ enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
if (!ret_code) {
@@ -386,9 +373,6 @@ enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
} else {
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
}
-#else
- ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#endif
return ret_code;
}
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index ed6cdd6..109d3c5 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -78,7 +78,6 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
void i40e_idle_aq(struct i40e_hw *hw);
bool i40e_check_asq_alive(struct i40e_hw *hw);
enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
-#ifdef X722_SUPPORT
enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 seid,
bool pf_lut, u8 *lut, u16 lut_size);
@@ -90,11 +89,8 @@ enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw,
u16 seid,
struct i40e_aqc_get_set_rss_key_data *key);
-#endif
-#ifndef I40E_NDIS_SUPPORT
const char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err);
const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err);
-#endif /* I40E_NDIS_SUPPORT */
#ifdef PF_DRIVER
@@ -527,7 +523,6 @@ enum i40e_status_code i40e_aq_rx_ctl_write_register(struct i40e_hw *hw,
u32 reg_addr, u32 reg_val,
struct i40e_asq_cmd_details *cmd_details);
void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val);
-#ifdef X722_SUPPORT
enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
struct i40e_aqc_arp_proxy_data *proxy_config,
struct i40e_asq_cmd_details *cmd_details);
@@ -545,7 +540,6 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details);
-#endif
enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index fd0a723..3a305b6 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -3401,7 +3401,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_VFQF_HREGION_OVERRIDE_ENA_7_MASK I40E_MASK(0x1, I40E_VFQF_HREGION_OVERRIDE_ENA_7_SHIFT)
#define I40E_VFQF_HREGION_REGION_7_SHIFT 29
#define I40E_VFQF_HREGION_REGION_7_MASK I40E_MASK(0x7, I40E_VFQF_HREGION_REGION_7_SHIFT)
-#ifdef X722_SUPPORT
#ifdef PF_DRIVER
#define I40E_MNGSB_FDCRC 0x000B7050 /* Reset: POR */
@@ -5366,5 +5365,4 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_SHIFT 20
#define I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_MASK I40E_MASK(0xFFF, I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_SHIFT)
-#endif /* X722_SUPPORT */
#endif /* _I40E_REGISTER_H_ */
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 56e47ea..590d97c 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -196,9 +196,7 @@ enum i40e_memcpy_type {
I40E_DMA_TO_NONDMA
};
-#ifdef X722_SUPPORT
#define I40E_FW_API_VERSION_MINOR_X722 0x0005
-#endif
#define I40E_FW_API_VERSION_MINOR_X710 0x0005
@@ -214,10 +212,8 @@ enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0,
I40E_MAC_XL710,
I40E_MAC_VF,
-#ifdef X722_SUPPORT
I40E_MAC_X722,
I40E_MAC_X722_VF,
-#endif
I40E_MAC_GENERIC,
};
@@ -359,7 +355,6 @@ struct i40e_phy_info {
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
-#ifdef X722_SUPPORT
enum i40e_acpi_programming_method {
I40E_ACPI_PROGRAMMING_METHOD_HW_FVL = 0,
I40E_ACPI_PROGRAMMING_METHOD_AQC_FPK = 1
@@ -369,7 +364,6 @@ enum i40e_acpi_programming_method {
#define I40E_ACPI_PROGRAMMING_METHOD_MASK 0x2
#define I40E_PROXY_SUPPORT_MASK 0x4
-#endif
/* Capabilities of a PF or a VF or the whole device */
struct i40e_hw_capabilities {
u32 switch_mode;
@@ -437,11 +431,9 @@ struct i40e_hw_capabilities {
u32 enabled_tcmap;
u32 maxtc;
u64 wr_csr_prot;
-#ifdef X722_SUPPORT
bool apm_wol_support;
enum i40e_acpi_programming_method acpi_prog_method;
bool proxy_support;
-#endif
};
struct i40e_mac_info {
@@ -703,30 +695,22 @@ struct i40e_hw {
struct i40e_dcbx_config remote_dcbx_config; /* Peer Cfg */
struct i40e_dcbx_config desired_dcbx_config; /* CEE Desired Cfg */
-#ifdef X722_SUPPORT
/* WoL and proxy support */
u16 num_wol_proxy_filters;
u16 wol_proxy_vsi_seid;
-#endif
#define I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE BIT_ULL(0)
u64 flags;
/* debug mask */
u32 debug_mask;
-#ifndef I40E_NDIS_SUPPORT
char err_str[16];
-#endif /* I40E_NDIS_SUPPORT */
};
STATIC INLINE bool i40e_is_vf(struct i40e_hw *hw)
{
-#ifdef X722_SUPPORT
return (hw->mac.type == I40E_MAC_VF ||
hw->mac.type == I40E_MAC_X722_VF);
-#else
- return hw->mac.type == I40E_MAC_VF;
-#endif
}
struct i40e_driver_version {
@@ -830,11 +814,7 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_CRCP_SHIFT = 4,
I40E_RX_DESC_STATUS_TSYNINDX_SHIFT = 5, /* 2 BITS */
I40E_RX_DESC_STATUS_TSYNVALID_SHIFT = 7,
-#ifdef X722_SUPPORT
I40E_RX_DESC_STATUS_EXT_UDP_0_SHIFT = 8,
-#else
- I40E_RX_DESC_STATUS_RESERVED1_SHIFT = 8,
-#endif
I40E_RX_DESC_STATUS_UMBCAST_SHIFT = 9, /* 2 BITS */
I40E_RX_DESC_STATUS_FLM_SHIFT = 11,
@@ -842,11 +822,7 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_LPBK_SHIFT = 14,
I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15,
I40E_RX_DESC_STATUS_RESERVED2_SHIFT = 16, /* 2 BITS */
-#ifdef X722_SUPPORT
I40E_RX_DESC_STATUS_INT_UDP_0_SHIFT = 18,
-#else
- I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18,
-#endif
I40E_RX_DESC_STATUS_LAST /* this entry must be last!!! */
};
@@ -1224,10 +1200,8 @@ enum i40e_tx_ctx_desc_eipt_offload {
#define I40E_TXD_CTX_QW0_DECTTL_MASK (0xFULL << \
I40E_TXD_CTX_QW0_DECTTL_SHIFT)
-#ifdef X722_SUPPORT
#define I40E_TXD_CTX_QW0_L4T_CS_SHIFT 23
#define I40E_TXD_CTX_QW0_L4T_CS_MASK BIT_ULL(I40E_TXD_CTX_QW0_L4T_CS_SHIFT)
-#endif
struct i40e_nop_desc {
__le64 rsvd;
__le64 dtype_cmd;
@@ -1264,38 +1238,24 @@ struct i40e_filter_program_desc {
/* Packet Classifier Types for filters */
enum i40e_filter_pctype {
-#ifdef X722_SUPPORT
/* Note: Values 0-28 are reserved for future use.
* Value 29, 30, 32 are not supported on XL710 and X710.
*/
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
-#else
- /* Note: Values 0-30 are reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
-#ifdef X722_SUPPORT
I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
-#else
- /* Note: Value 32 is reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
I40E_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
I40E_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
I40E_FILTER_PCTYPE_FRAG_IPV4 = 36,
-#ifdef X722_SUPPORT
/* Note: Values 37-38 are reserved for future use.
* Value 39, 40, 42 are not supported on XL710 and X710.
*/
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
-#else
- /* Note: Values 37-40 are reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
-#ifdef X722_SUPPORT
I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
-#endif
I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
@@ -1350,12 +1310,10 @@ enum i40e_filter_program_desc_pcmd {
I40E_TXD_FLTR_QW1_CMD_SHIFT)
#define I40E_TXD_FLTR_QW1_FD_STATUS_MASK (0x3ULL << \
I40E_TXD_FLTR_QW1_FD_STATUS_SHIFT)
-#ifdef X722_SUPPORT
#define I40E_TXD_FLTR_QW1_ATR_SHIFT (0xEULL + \
I40E_TXD_FLTR_QW1_CMD_SHIFT)
#define I40E_TXD_FLTR_QW1_ATR_MASK BIT_ULL(I40E_TXD_FLTR_QW1_ATR_SHIFT)
-#endif
#define I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT 20
#define I40E_TXD_FLTR_QW1_CNTINDEX_MASK (0x1FFUL << \
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH 31/31] net/i40e: remove unused marco from PMD
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (29 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco Jingjing Wu
@ 2016-12-03 1:19 ` Jingjing Wu
2016-12-05 14:57 ` Ferruh Yigit
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
31 siblings, 1 reply; 108+ messages in thread
From: Jingjing Wu @ 2016-12-03 1:19 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/Makefile | 2 +-
drivers/net/i40e/i40e_ethdev.c | 40 ----------------------------------------
2 files changed, 1 insertion(+), 41 deletions(-)
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 13085fb..66997b6 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -38,7 +38,7 @@ LIB = librte_pmd_i40e.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF
-CFLAGS += -DX722_SUPPORT -DX722_A0_SUPPORT
+CFLAGS += -DX722_A0_SUPPORT
EXPORT_MAP := rte_pmd_i40e_version.map
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 67778ba..34388e0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6198,18 +6198,14 @@ i40e_parse_hena(uint64_t flags)
rss_hf |= ETH_RSS_FRAG_IPV4;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK))
rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_SCTP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER))
@@ -6218,18 +6214,14 @@ i40e_parse_hena(uint64_t flags)
rss_hf |= ETH_RSS_FRAG_IPV6;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK))
rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_SCTP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER))
@@ -7101,7 +7093,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7120,7 +7111,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7130,7 +7120,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_TCP_FLAGS | I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7140,7 +7129,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_TCP_FLAGS | I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7174,7 +7162,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_HOP_LIMIT | I40E_INSET_IPV6_SRC |
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7193,7 +7180,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7203,7 +7189,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7213,7 +7198,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7253,7 +7237,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
@@ -7264,19 +7247,16 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
@@ -7298,7 +7278,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
@@ -7309,19 +7288,16 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
@@ -7374,22 +7350,18 @@ i40e_get_default_input_set(uint16_t pctype)
[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
@@ -7401,22 +7373,18 @@ i40e_get_default_input_set(uint16_t pctype)
[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
@@ -8215,18 +8183,14 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
[I40E_FILTER_PCTYPE_FRAG_IPV4] = RTE_ETH_FLOW_FRAG_IPV4,
[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
RTE_ETH_FLOW_NONFRAG_IPV4_SCTP,
[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =
@@ -8234,18 +8198,14 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
[I40E_FILTER_PCTYPE_FRAG_IPV6] = RTE_ETH_FLOW_FRAG_IPV6,
[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
RTE_ETH_FLOW_NONFRAG_IPV6_SCTP,
[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 15/31] net/i40e/base: add FEC bits to PHY capabilities
2016-12-03 1:18 ` [dpdk-dev] [PATCH 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
@ 2016-12-05 14:30 ` Ferruh Yigit
0 siblings, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-05 14:30 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
Hi Jingjing,
On 12/3/2016 1:18 AM, Jingjing Wu wrote:
> Add FEC bits to the PHY capabilities AQ command struct. This is required
> for 25GbE support. Change the name of the generic mod_type_ext field to
> indicate that it is now used for handling FEC.
>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/i40e/base/i40e_adminq_cmd.h | 13 ++++++++++++-
> drivers/net/i40e/base/i40e_common.c | 2 ++
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
> index 4f06772..1884758 100644
> --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
> +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
> @@ -1785,7 +1785,16 @@ struct i40e_aq_get_phy_abilities_resp {
> #define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
> #define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
> #define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
> - u8 mod_type_ext;
> + u8 fec_cfg_curr_mod_ext_info;
This is causing a compilation error in next-net [1] after Qi's patch for
25G auto link enable patch: http://dpdk.org/dev/patchwork/patch/17338/
Can you please rebase the patchset on top op next-net ?
Thanks,
ferruh
[1]
.../drivers/net/i40e/i40e_ethdev.c: In function ‘i40e_phy_conf_link’:
.../drivers/net/i40e/i40e_ethdev.c:1632:30: error: ‘struct
i40e_aq_get_phy_abilities_resp’ has no member named ‘mod_type_ext’; did
you mean ‘phy_type_ext’?
phy_conf.fec_config = phy_ab.mod_type_ext;
^
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 02/31] net/i40e/base: preserve extended PHY type field
2016-12-03 1:18 ` [dpdk-dev] [PATCH 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
@ 2016-12-05 14:34 ` Ferruh Yigit
0 siblings, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-05 14:34 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/3/2016 1:18 AM, Jingjing Wu wrote:
> Prevents 25G PHY types from being disabled when setting
> the flow control modes.
>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/i40e/base/i40e_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
> index 9a6b3ed..d67ad90 100644
> --- a/drivers/net/i40e/base/i40e_common.c
> +++ b/drivers/net/i40e/base/i40e_common.c
> @@ -1789,6 +1789,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
> config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> /* Copy over all the old settings */
> config.phy_type = abilities.phy_type;
> + config.phy_type_ext = abilities.phy_type_ext;
http://dpdk.org/dev/patchwork/patch/17338/ does something similar in
i40e_phy_conf_link(), can you please double check if these two works
fine together?
Thanks,
ferruh
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 04/31] net/i40e/base: fix bit test mask
2016-12-03 1:18 ` [dpdk-dev] [PATCH 04/31] net/i40e/base: fix bit test mask Jingjing Wu
@ 2016-12-05 14:37 ` Ferruh Yigit
0 siblings, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-05 14:37 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/3/2016 1:18 AM, Jingjing Wu wrote:
> Incorrect bit mask was used for testing "get link status" response.
> Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it most probably
most probably J
> should be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01).
>
> Fixes: 8db9e2a1b232 ("i40e: base driver")
This is detail, but defined syntax requires an empty line between
"Fixes" tag and "Signed-off-by" tag. You will see
/scripts/check-git-log.sh complain about it.
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/i40e/base/i40e_common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
> index aa346d1..a2661cf 100644
> --- a/drivers/net/i40e/base/i40e_common.c
> +++ b/drivers/net/i40e/base/i40e_common.c
> @@ -1975,7 +1975,7 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
> else
> hw_link_info->crc_enable = false;
>
> - if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE))
> + if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED))
> hw_link_info->lse_enable = true;
> else
> hw_link_info->lse_enable = false;
>
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 25/31] net/i40e/base: remove duplicate definitions
2016-12-03 1:19 ` [dpdk-dev] [PATCH 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
@ 2016-12-05 14:52 ` Ferruh Yigit
0 siblings, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-05 14:52 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/3/2016 1:19 AM, Jingjing Wu wrote:
> We already define I40E_AQ_PHY_TYPE_EXT_25G* flags in the response adminq
> structure above, and do not need to re-define these. See eee_capability
> for an example where we didn't re-define these. This prevents Linux
> driver from complaining about using these flags in an #ifdef when
> running cppkeep tool, and generally makes more sense to avoid
> duplicating the definitions.
Although this is base driver and used in various platforms, mentioning
from the Linux driver and cppkeep here can be confusing, what do you
think removing that part?
>
> While we are here, replace 0X with 0x as normal style.
>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
<...>
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco
2016-12-03 1:19 ` [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco Jingjing Wu
@ 2016-12-05 14:55 ` Ferruh Yigit
2016-12-06 6:43 ` Wu, Jingjing
0 siblings, 1 reply; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-05 14:55 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/3/2016 1:19 AM, Jingjing Wu wrote:
> remove X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
s/marco/macro, same for patch subject
>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
<...>
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 31/31] net/i40e: remove unused marco from PMD
2016-12-03 1:19 ` [dpdk-dev] [PATCH 31/31] net/i40e: remove unused marco from PMD Jingjing Wu
@ 2016-12-05 14:57 ` Ferruh Yigit
0 siblings, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-05 14:57 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/3/2016 1:19 AM, Jingjing Wu wrote:
s/marco/macro in commit title
It is good to see that this unused macro removed, thanks.
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
<...>
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco
2016-12-05 14:55 ` Ferruh Yigit
@ 2016-12-06 6:43 ` Wu, Jingjing
0 siblings, 0 replies; 108+ messages in thread
From: Wu, Jingjing @ 2016-12-06 6:43 UTC (permalink / raw)
To: Yigit, Ferruh, dev; +Cc: Zhang, Helin
OK. Ferruh, I will update this patch set according to your comments.
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, December 5, 2016 10:56 PM
To: Wu, Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
Cc: Zhang, Helin <helin.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco
On 12/3/2016 1:19 AM, Jingjing Wu wrote:
> remove X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
s/marco/macro, same for patch subject
>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
<...>
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
` (30 preceding siblings ...)
2016-12-03 1:19 ` [dpdk-dev] [PATCH 31/31] net/i40e: remove unused marco from PMD Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
` (32 more replies)
31 siblings, 33 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
i40e base code upate. The main changes are:
- add clause22 and clause45 implementation for PHY registers accessing
- replace existing legacy memcpy() calls with i40e_memcpy() calls.
- use BIT() macro instead of bit fields
- add clear all WoL filters implementation
- add ERROR state for NVM update state machine
- add broadcast promiscuous control per VLAN
- remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
v2 changes:
- comments rework
- complie issue fix
- rebase to dpdk-next-net
Jingjing Wu (31):
net/i40e/base: add encap csum VF offload flag
net/i40e/base: preserve extended PHY type field
net/i40e/base: remove unnecessary code
net/i40e/base: fix bit test mask
net/i40e/base: group base mode VF offload flags
net/i40e/base: fix long link down notification time
net/i40e/base: add media type detection for 25G link
net/i40e/base: add clause22 and clause45 implementation
net/i40e/base: add bus number info
net/i40e/base: add protocols when discover capabilities
net/i40e/base: pass unknown PHY type for unknown PHYs
net/i40e/base: replace memcpy
net/i40e/base: deprecating unused macro
net/i40e/base: remove FPK HyperV VF device ID
net/i40e/base: add FEC bits to PHY capabilities
net/i40e/base: use BIT() macro instead of bit fields
net/i40e/base: adjust 25G PHY type values
net/i40e/base: implement clear all WoL filters
net/i40e/base: implement set VSI full promisc mode
net/i40e/base: add defines for new aq command
net/i40e/base: save link FEC info from link up event
net/i40e/base: acquire NVM lock before reads on all devices
net/i40e/base: change shift values to hex
net/i40e/base: comment that udp port must be in Host order
net/i40e/base: remove duplicate definitions
net/i40e/base: add ERROR state for NVM update state machine
net/i40e/base: add broadcast promiscuous control per VLAN
net/i40e/base: avoid division by zero
net/i40e/base: fix byte order
net/i40e/base: remove unused macro
net/i40e: remove unused macro from PMD
drivers/net/i40e/Makefile | 2 +-
drivers/net/i40e/base/i40e_adminq.c | 4 +-
drivers/net/i40e/base/i40e_adminq_cmd.h | 51 ++--
drivers/net/i40e/base/i40e_common.c | 425 ++++++++++++++++++++++++++------
drivers/net/i40e/base/i40e_devids.h | 3 -
drivers/net/i40e/base/i40e_lan_hmc.c | 5 -
drivers/net/i40e/base/i40e_nvm.c | 52 ++--
drivers/net/i40e/base/i40e_prototype.h | 30 ++-
drivers/net/i40e/base/i40e_register.h | 2 -
drivers/net/i40e/base/i40e_type.h | 94 +++----
drivers/net/i40e/base/i40e_virtchnl.h | 5 +
drivers/net/i40e/i40e_ethdev.c | 42 +---
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
13 files changed, 468 insertions(+), 248 deletions(-)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 01/31] net/i40e/base: add encap csum VF offload flag
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
` (31 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add ENCAP_CSUM offload negotiation flag. Currently VF assumes checksum
offload for encapsulated packets is supported by default. Going forward,
this feature needs to be negotiated with PF before advertising to the
stack. Hence, we need a flag to control it.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_virtchnl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index fd51ec3..07e7472 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -170,6 +170,7 @@ struct i40e_virtchnl_vsi_resource {
#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
+#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00100000
struct i40e_virtchnl_vf_resource {
u16 num_vsis;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 02/31] net/i40e/base: preserve extended PHY type field
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
` (30 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Prevents 25G PHY types from being disabled when setting
the flow control modes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9a6b3ed..d67ad90 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1789,6 +1789,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
/* Copy over all the old settings */
config.phy_type = abilities.phy_type;
+ config.phy_type_ext = abilities.phy_type_ext;
config.link_speed = abilities.link_speed;
config.eee_capability = abilities.eee_capability;
config.eeer = abilities.eeer_val;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 03/31] net/i40e/base: remove unnecessary code
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 04/31] net/i40e/base: fix bit test mask Jingjing Wu
` (29 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch changes some assignments and removing the unnecessary
code to avoid error reported by static analysis tools.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ----
drivers/net/i40e/base/i40e_lan_hmc.c | 5 -----
2 files changed, 9 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index d67ad90..aa346d1 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3833,7 +3833,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
else
p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL;
p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0;
- p->proxy_support = p->proxy_support;
i40e_debug(hw, I40E_DEBUG_INIT,
"HW Capability: WOL proxy filters = %d\n",
hw->num_wol_proxy_filters);
@@ -6008,9 +6007,6 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
- if (bwd_size > I40E_AQ_LARGE_BUF)
- desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB);
-
desc.datalen = CPU_TO_LE16(bwd_size);
status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details);
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index 2260648..f03f381 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -1239,11 +1239,6 @@ enum i40e_status_code i40e_hmc_get_object_va(struct i40e_hw *hw,
u64 obj_offset_in_fpm;
u32 sd_idx, sd_lmt;
- if (NULL == hmc_info) {
- ret_code = I40E_ERR_BAD_PTR;
- DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n");
- goto exit;
- }
if (NULL == hmc_info->hmc_obj) {
ret_code = I40E_ERR_BAD_PTR;
DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n");
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 04/31] net/i40e/base: fix bit test mask
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (2 preceding siblings ...)
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
` (28 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Incorrect bit mask was used for testing "get link status" response.
Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it should
be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01).
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa346d1..a2661cf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1975,7 +1975,7 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->crc_enable = false;
- if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE))
+ if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED))
hw_link_info->lse_enable = true;
else
hw_link_info->lse_enable = false;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 05/31] net/i40e/base: group base mode VF offload flags
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (3 preceding siblings ...)
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 04/31] net/i40e/base: fix bit test mask Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
` (27 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Group together the minimum set of offload capabilities that are always
supported by VF in base mode. This define would be used by PF to make
sure VF in base mode gets minimum of base capabilities.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_virtchnl.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index 07e7472..8fba608 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -172,6 +172,10 @@ struct i40e_virtchnl_vsi_resource {
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00100000
+#define I40E_VF_BASE_MODE_OFFLOADS (I40E_VIRTCHNL_VF_OFFLOAD_L2 | \
+ I40E_VIRTCHNL_VF_OFFLOAD_VLAN | \
+ I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF)
+
struct i40e_virtchnl_vf_resource {
u16 num_vsis;
u16 num_queue_pairs;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 06/31] net/i40e/base: fix long link down notification time
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (4 preceding siblings ...)
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
@ 2016-12-09 14:38 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
` (26 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:38 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch fixes a problem where it could take a very
long time (>100 msec) to print the link down notification.
This problem is fixed by changing how often we update link
info from fw, when link is down. Without this patch, it can
take over 100msec to notify user link is down.
Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index a2661cf..2ad9448 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2746,7 +2746,10 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) {
+ /* extra checking needed to ensure link info to user is timely */
+ if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+ ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+ !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
status = i40e_aq_get_phy_capabilities(hw, false, false,
&abilities, NULL);
if (status)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 07/31] net/i40e/base: add media type detection for 25G link
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (5 preceding siblings ...)
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
` (25 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ad9448..7eea189 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1288,6 +1288,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_1000BASE_LX:
case I40E_PHY_TYPE_40GBASE_SR4:
case I40E_PHY_TYPE_40GBASE_LR4:
+ case I40E_PHY_TYPE_25GBASE_LR:
+ case I40E_PHY_TYPE_25GBASE_SR:
media = I40E_MEDIA_TYPE_FIBER;
break;
case I40E_PHY_TYPE_100BASE_TX:
@@ -1302,6 +1304,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_SFPP_CU:
case I40E_PHY_TYPE_40GBASE_AOC:
case I40E_PHY_TYPE_10GBASE_AOC:
+ case I40E_PHY_TYPE_25GBASE_CR:
media = I40E_MEDIA_TYPE_DA;
break;
case I40E_PHY_TYPE_1000BASE_KX:
@@ -1309,6 +1312,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_KR:
case I40E_PHY_TYPE_40GBASE_KR4:
case I40E_PHY_TYPE_20GBASE_KR2:
+ case I40E_PHY_TYPE_25GBASE_KR:
media = I40E_MEDIA_TYPE_BACKPLANE;
break;
case I40E_PHY_TYPE_SGMII:
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 08/31] net/i40e/base: add clause22 and clause45 implementation
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (6 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 09/31] net/i40e/base: add bus number info Jingjing Wu
` (24 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Some external PHYs require Clause22 and Clause45 method for
accessing registers. Mostly used for X722 support.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 245 +++++++++++++++++++++++++++------
drivers/net/i40e/base/i40e_prototype.h | 16 ++-
drivers/net/i40e/base/i40e_type.h | 17 ++-
3 files changed, 226 insertions(+), 52 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 7eea189..85c1c11 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6022,7 +6022,92 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
}
/**
- * i40e_read_phy_register
+ * i40e_read_phy_register_clause22
+ * @hw: pointer to the HW structure
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Reads specified PHY register value
+ **/
+enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 *value)
+{
+ enum i40e_status_code status = I40E_ERR_TIMEOUT;
+ u8 port_num = (u8)hw->func_caps.mdio_port_num;
+ u32 command = 0;
+ u16 retry = 1000;
+
+ command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
+ (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
+ (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) |
+ (I40E_MDIO_CLAUSE22_STCODE_MASK) |
+ (I40E_GLGEN_MSCA_MDICMD_MASK);
+ wr32(hw, I40E_GLGEN_MSCA(port_num), command);
+ do {
+ command = rd32(hw, I40E_GLGEN_MSCA(port_num));
+ if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) {
+ status = I40E_SUCCESS;
+ break;
+ }
+ i40e_usec_delay(10);
+ retry--;
+ } while (retry);
+
+ if (status) {
+ i40e_debug(hw, I40E_DEBUG_PHY,
+ "PHY: Can't write command to external PHY.\n");
+ } else {
+ command = rd32(hw, I40E_GLGEN_MSRWD(port_num));
+ *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >>
+ I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT;
+ }
+
+ return status;
+}
+
+/**
+ * i40e_write_phy_register_clause22
+ * @hw: pointer to the HW structure
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Writes specified PHY register value
+ **/
+enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 value)
+{
+ enum i40e_status_code status = I40E_ERR_TIMEOUT;
+ u8 port_num = (u8)hw->func_caps.mdio_port_num;
+ u32 command = 0;
+ u16 retry = 1000;
+
+ command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT;
+ wr32(hw, I40E_GLGEN_MSRWD(port_num), command);
+
+ command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
+ (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
+ (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) |
+ (I40E_MDIO_CLAUSE22_STCODE_MASK) |
+ (I40E_GLGEN_MSCA_MDICMD_MASK);
+
+ wr32(hw, I40E_GLGEN_MSCA(port_num), command);
+ do {
+ command = rd32(hw, I40E_GLGEN_MSCA(port_num));
+ if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) {
+ status = I40E_SUCCESS;
+ break;
+ }
+ i40e_usec_delay(10);
+ retry--;
+ } while (retry);
+
+ return status;
+}
+
+/**
+ * i40e_read_phy_register_clause45
* @hw: pointer to the HW structure
* @page: registers page number
* @reg: register address in the page
@@ -6031,9 +6116,8 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
*
* Reads specified PHY register value
**/
-enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
- u8 page, u16 reg, u8 phy_addr,
- u16 *value)
+enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value)
{
enum i40e_status_code status = I40E_ERR_TIMEOUT;
u32 command = 0;
@@ -6043,8 +6127,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) |
(page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_ADDRESS) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
wr32(hw, I40E_GLGEN_MSCA(port_num), command);
@@ -6066,8 +6150,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_READ) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
status = I40E_ERR_TIMEOUT;
@@ -6097,7 +6181,7 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
}
/**
- * i40e_write_phy_register
+ * i40e_write_phy_register_clause45
* @hw: pointer to the HW structure
* @page: registers page number
* @reg: register address in the page
@@ -6106,9 +6190,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
*
* Writes value to specified PHY register
**/
-enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
- u8 page, u16 reg, u8 phy_addr,
- u16 value)
+enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value)
{
enum i40e_status_code status = I40E_ERR_TIMEOUT;
u32 command = 0;
@@ -6118,8 +6201,8 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) |
(page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_ADDRESS) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
wr32(hw, I40E_GLGEN_MSCA(port_num), command);
@@ -6143,8 +6226,8 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_WRITE) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
status = I40E_ERR_TIMEOUT;
@@ -6165,6 +6248,78 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
}
/**
+ * i40e_write_phy_register
+ * @hw: pointer to the HW structure
+ * @page: registers page number
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Writes value to specified PHY register
+ **/
+enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value)
+{
+ enum i40e_status_code status;
+
+ switch (hw->device_id) {
+ case I40E_DEV_ID_1G_BASE_T_X722:
+ status = i40e_write_phy_register_clause22(hw,
+ reg, phy_addr, value);
+ break;
+ case I40E_DEV_ID_10G_BASE_T:
+ case I40E_DEV_ID_10G_BASE_T4:
+ case I40E_DEV_ID_10G_BASE_T_X722:
+ case I40E_DEV_ID_25G_B:
+ case I40E_DEV_ID_25G_SFP28:
+ status = i40e_write_phy_register_clause45(hw,
+ page, reg, phy_addr, value);
+ break;
+ default:
+ status = I40E_ERR_UNKNOWN_PHY;
+ break;
+ }
+
+ return status;
+}
+
+/**
+ * i40e_read_phy_register
+ * @hw: pointer to the HW structure
+ * @page: registers page number
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Reads specified PHY register value
+ **/
+enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value)
+{
+ enum i40e_status_code status;
+
+ switch (hw->device_id) {
+ case I40E_DEV_ID_1G_BASE_T_X722:
+ status = i40e_read_phy_register_clause22(hw, reg, phy_addr,
+ value);
+ break;
+ case I40E_DEV_ID_10G_BASE_T:
+ case I40E_DEV_ID_10G_BASE_T4:
+ case I40E_DEV_ID_10G_BASE_T_X722:
+ case I40E_DEV_ID_25G_B:
+ case I40E_DEV_ID_25G_SFP28:
+ status = i40e_read_phy_register_clause45(hw, page, reg,
+ phy_addr, value);
+ break;
+ default:
+ status = I40E_ERR_UNKNOWN_PHY;
+ break;
+ }
+
+ return status;
+}
+
+/**
* i40e_get_phy_address
* @hw: pointer to the HW structure
* @dev_num: PHY port num that address we want
@@ -6206,14 +6361,16 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++,
led_addr++) {
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr,
+ &led_reg);
if (status)
goto phy_blinking_end;
led_ctl = led_reg;
if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) {
led_reg = 0;
- status = i40e_write_phy_register(hw,
+ status = i40e_write_phy_register_clause45(hw,
I40E_PHY_COM_REG_PAGE,
led_addr, phy_addr,
led_reg);
@@ -6225,20 +6382,18 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
if (time > 0 && interval > 0) {
for (i = 0; i < time * 1000; i += interval) {
- status = i40e_read_phy_register(hw,
- I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr,
- &led_reg);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
goto restore_config;
if (led_reg & I40E_PHY_LED_MANUAL_ON)
led_reg = 0;
else
led_reg = I40E_PHY_LED_MANUAL_ON;
- status = i40e_write_phy_register(hw,
- I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr,
- led_reg);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_reg);
if (status)
goto restore_config;
i40e_msec_delay(interval);
@@ -6246,8 +6401,9 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
}
restore_config:
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, led_ctl);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_ctl);
phy_blinking_end:
return status;
@@ -6278,8 +6434,10 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,
for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++,
temp_addr++) {
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- temp_addr, phy_addr, ®_val);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ temp_addr, phy_addr,
+ ®_val);
if (status)
return status;
*val = reg_val;
@@ -6312,41 +6470,42 @@ enum i40e_status_code i40e_led_set_phy(struct i40e_hw *hw, bool on,
i = rd32(hw, I40E_PFGEN_PORTNUM);
port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK);
phy_addr = i40e_get_phy_address(hw, port_num);
-
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
return status;
led_ctl = led_reg;
if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) {
led_reg = 0;
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, led_reg);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr,
+ led_reg);
if (status)
return status;
}
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
goto restore_config;
if (on)
led_reg = I40E_PHY_LED_MANUAL_ON;
else
led_reg = 0;
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, led_reg);
+ status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_reg);
if (status)
goto restore_config;
if (mode & I40E_PHY_LED_MODE_ORIG) {
led_ctl = (mode & I40E_PHY_LED_MODE_MASK);
- status = i40e_write_phy_register(hw,
+ status = i40e_write_phy_register_clause45(hw,
I40E_PHY_COM_REG_PAGE,
led_addr, phy_addr, led_ctl);
}
return status;
restore_config:
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, led_ctl);
+ status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_ctl);
return status;
}
#endif /* PF_DRIVER */
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 3aab5ca..9109cfc 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -538,10 +538,18 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
u16 *wake_reason,
struct i40e_asq_cmd_details *cmd_details);
#endif
-enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, u8 page,
- u16 reg, u8 phy_addr, u16 *value);
-enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, u8 page,
- u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value);
u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num);
enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
u32 time, u32 interval);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index b5f72c3..5a59ce2 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -157,15 +157,22 @@ enum i40e_debug_mask {
#define I40E_PCI_LINK_SPEED_5000 0x2
#define I40E_PCI_LINK_SPEED_8000 0x3
-#define I40E_MDIO_STCODE I40E_MASK(0, \
+#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_MASK(1, \
I40E_GLGEN_MSCA_STCODE_SHIFT)
-#define I40E_MDIO_OPCODE_ADDRESS I40E_MASK(0, \
+#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_MASK(1, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_WRITE I40E_MASK(1, \
+#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_MASK(2, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_READ_INC_ADDR I40E_MASK(2, \
+
+#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_MASK(0, \
+ I40E_GLGEN_MSCA_STCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK I40E_MASK(0, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK I40E_MASK(1, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_READ_INC_ADDR_MASK I40E_MASK(2, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_READ I40E_MASK(3, \
+#define I40E_MDIO_CLAUSE45_OPCODE_READ_MASK I40E_MASK(3, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
#define I40E_PHY_COM_REG_PAGE 0x1E
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 09/31] net/i40e/base: add bus number info
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (7 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
` (23 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Currently i40e_bus_info has PCI device and function info only. However
in log messages slot number (i.e hw->bus.device) is being printed
as bus number. Another field should be added to provide bus number
info and preserve existing information.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 5a59ce2..530ee5e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -561,6 +561,7 @@ struct i40e_bus_info {
u16 func;
u16 device;
u16 lan_id;
+ u16 bus_id;
};
/* Flow control (FC) parameters */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 10/31] net/i40e/base: add protocols when discover capabilities
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (8 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 09/31] net/i40e/base: add bus number info Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs Jingjing Wu
` (22 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add logical_id to I40E_AQ_CAP_ID_MNG_MODE capability starting from major
version 2.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 8 ++++++++
drivers/net/i40e/base/i40e_type.h | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 85c1c11..9591428 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3611,6 +3611,14 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
break;
case I40E_AQ_CAP_ID_MNG_MODE:
p->management_mode = number;
+ if (major_rev > 1) {
+ p->mng_protocols_over_mctp = logical_id;
+ i40e_debug(hw, I40E_DEBUG_INIT,
+ "HW Capability: Protocols over MCTP = %d\n",
+ p->mng_protocols_over_mctp);
+ } else {
+ p->mng_protocols_over_mctp = 0;
+ }
i40e_debug(hw, I40E_DEBUG_INIT,
"HW Capability: Management Mode = %d\n",
p->management_mode);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 530ee5e..223f5fe 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -366,6 +366,10 @@ struct i40e_hw_capabilities {
#define I40E_NVM_IMAGE_TYPE_UDP_CLOUD 0x3
u32 management_mode;
+ u32 mng_protocols_over_mctp;
+#define I40E_MNG_PROTOCOL_PLDM 0x2
+#define I40E_MNG_PROTOCOL_OEM_COMMANDS 0x4
+#define I40E_MNG_PROTOCOL_NCSI 0x8
u32 npar_enable;
u32 os2bmc;
u32 valid_functions;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (9 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 12/31] net/i40e/base: replace memcpy Jingjing Wu
` (21 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
The PHY type value for unrecognized PHYs and cables was changed
based on firmware version number. Newer hardware use lower firmware
version numbers and this was causing some PHYs to be identified
as type 0x16 instead of 0xe (unknown).
Without this patch, newer card will incorrectly identify unknown
PHYs and cables.
This change adds hardware type to the check for firmware version
so the PHY type is reported correctly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9591428..fbaa0be 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1984,7 +1984,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->lse_enable = false;
- if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
+ if ((hw->mac.type == I40E_MAC_XL710) &&
+ (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 12/31] net/i40e/base: replace memcpy
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (10 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
` (20 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
To align with current memcpy use, replace existing legacy memcpy() calls
with i40e_memcpy() calls.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 13 ++++++++-----
drivers/net/i40e/base/i40e_nvm.c | 7 ++++---
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fbaa0be..fda6c4a 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1126,7 +1126,8 @@ enum i40e_status_code i40e_get_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL);
if (flags & I40E_AQC_LAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac));
+ i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac),
+ I40E_NONDMA_TO_NONDMA);
return status;
}
@@ -1149,7 +1150,8 @@ enum i40e_status_code i40e_get_port_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
return status;
if (flags & I40E_AQC_PORT_ADDR_VALID)
- memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac));
+ i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac),
+ I40E_NONDMA_TO_NONDMA);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -1207,7 +1209,8 @@ enum i40e_status_code i40e_get_san_mac_addr(struct i40e_hw *hw,
return status;
if (flags & I40E_AQC_SAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac));
+ i40e_memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac),
+ I40E_NONDMA_TO_NONDMA);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -2760,8 +2763,8 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- memcpy(hw->phy.link_info.module_type, &abilities.module_type,
- sizeof(hw->phy.link_info.module_type));
+ i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type,
+ sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA);
}
return status;
}
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4fa1220..eb69e49 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -1423,7 +1423,8 @@ STATIC enum i40e_status_code i40e_nvmupd_exec_aq(struct i40e_hw *hw,
if (hw->nvm_buff.va) {
buff = hw->nvm_buff.va;
- memcpy(buff, &bytes[aq_desc_len], aq_data_len);
+ i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len,
+ I40E_NONDMA_TO_NONDMA);
}
}
@@ -1496,7 +1497,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
__func__, cmd->offset, cmd->offset + len);
buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset;
- memcpy(bytes, buff, len);
+ i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA);
bytes += len;
remainder -= len;
@@ -1510,7 +1511,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n",
__func__, start_byte, start_byte + remainder);
- memcpy(bytes, buff, remainder);
+ i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA);
}
return I40E_SUCCESS;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 13/31] net/i40e/base: deprecating unused macro
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (11 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 12/31] net/i40e/base: replace memcpy Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
` (19 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710
was supposed to be for 40G. But i40e_set_mac_type() sets
I40E_MAC_XL710 for all device IDS. I40E_MAC_X710 is not
used at all. Thus deprecating this extra macro.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 223f5fe..8889fc7 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -212,7 +212,6 @@ enum i40e_memcpy_type {
*/
enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0,
- I40E_MAC_X710,
I40E_MAC_XL710,
I40E_MAC_VF,
#ifdef X722_SUPPORT
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 14/31] net/i40e/base: remove FPK HyperV VF device ID
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (12 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
` (18 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Microsoft recently removed the requirement for VFs to use the VMBus.
The Fort Park Windows VF has been changed to use only the hardware
mailbox, so the Hyper-V VF device ID can be removed.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 1 -
drivers/net/i40e/base/i40e_devids.h | 1 -
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fda6c4a..b9b0ee6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -87,7 +87,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
#ifdef X722_SUPPORT
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_X722_VF:
- case I40E_DEV_ID_X722_VF_HV:
#ifdef X722_A0_SUPPORT
case I40E_DEV_ID_X722_A0_VF:
#endif
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 8bd5793..19bb376 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -70,7 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_SFP_I_X722 0x37D3
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
-#define I40E_DEV_ID_X722_VF_HV 0x37D9
#endif /* VF_DRIVER */
#endif /* X722_SUPPORT */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 4a0caac..12da0ec 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1087,7 +1087,6 @@ static const struct rte_pci_id pci_id_i40evf_map[] = {
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) },
- { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) },
{ .vendor_id = 0, /* sentinel */ },
};
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 15/31] net/i40e/base: add FEC bits to PHY capabilities
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (13 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
` (17 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add FEC bits to the PHY capabilities AQ command struct. This is required
for 25GbE support. Change the name of the generic mod_type_ext field to
indicate that it is now used for handling FEC.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 13 ++++++++++++-
drivers/net/i40e/base/i40e_common.c | 2 ++
drivers/net/i40e/i40e_ethdev.c | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4f06772..1884758 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1785,7 +1785,16 @@ struct i40e_aq_get_phy_abilities_resp {
#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
- u8 mod_type_ext;
+ u8 fec_cfg_curr_mod_ext_info;
+#define I40E_AQ_ENABLE_FEC_KR 0x01
+#define I40E_AQ_ENABLE_FEC_RS 0x02
+#define I40E_AQ_REQUEST_FEC_KR 0x04
+#define I40E_AQ_REQUEST_FEC_RS 0x08
+#define I40E_AQ_ENABLE_FEC_AUTO 0x10
+#define I40E_AQ_FEC
+#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0
+#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5
+
u8 ext_comp_code;
u8 phy_id[4];
u8 module_type[3];
@@ -1819,6 +1828,8 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#define I40E_AQ_SET_FEC_REQUEST_KR (1 << 2)
#define I40E_AQ_SET_FEC_REQUEST_RS (1 << 3)
#define I40E_AQ_SET_FEC_AUTO (1 << 4)
+#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0
+#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT)
u8 reserved;
};
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index b9b0ee6..9f4b872 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1800,6 +1800,8 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
config.eee_capability = abilities.eee_capability;
config.eeer = abilities.eeer_val;
config.low_power_ctrl = abilities.d3_lpan;
+ config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+ I40E_AQ_PHY_FEC_CONFIG_MASK;
status = i40e_aq_set_phy_config(hw, &config, NULL);
if (status)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 319761f..b2f827c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1629,7 +1629,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
/* use get_phy_abilities_resp value for the rest */
phy_conf.phy_type = phy_ab.phy_type;
phy_conf.phy_type_ext = phy_ab.phy_type_ext;
- phy_conf.fec_config = phy_ab.mod_type_ext;
+ phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
phy_conf.eee_capability = phy_ab.eee_capability;
phy_conf.eeer = phy_ab.eeer_val;
phy_conf.low_power_ctrl = phy_ab.d3_lpan;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 16/31] net/i40e/base: use BIT() macro instead of bit fields
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (14 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
` (16 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 1884758..cef02b1 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1823,11 +1823,11 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_config;
-#define I40E_AQ_SET_FEC_ABILITY_KR (1 << 0)
-#define I40E_AQ_SET_FEC_ABILITY_RS (1 << 1)
-#define I40E_AQ_SET_FEC_REQUEST_KR (1 << 2)
-#define I40E_AQ_SET_FEC_REQUEST_RS (1 << 3)
-#define I40E_AQ_SET_FEC_AUTO (1 << 4)
+#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0)
+#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1)
+#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2)
+#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3)
+#define I40E_AQ_SET_FEC_AUTO BIT(4)
#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0
#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT)
u8 reserved;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 17/31] net/i40e/base: adjust 25G PHY type values
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (15 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
` (15 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Define the values for the 25G PHY type bit-fields that match
reported values from firmware. There was a gap in the bit
fields but no corresponding gap i40e_aq_phy_type enum.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 8889fc7..206e95a 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -338,10 +338,22 @@ struct i40e_phy_info {
#define I40E_CAP_PHY_TYPE_1000BASE_T_OPTICAL \
BIT_ULL(I40E_PHY_TYPE_1000BASE_T_OPTICAL)
#define I40E_CAP_PHY_TYPE_20GBASE_KR2 BIT_ULL(I40E_PHY_TYPE_20GBASE_KR2)
-#define I40E_CAP_PHY_TYPE_25GBASE_KR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_KR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_CR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_CR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_SR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_SR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_LR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_LR + 32)
+/*
+ * Defining the macro I40E_TYPE_OFFSET to implement a bit shift for some
+ * PHY types. There is an unused bit (31) in the I40E_CAP_PHY_TYPE_* bit
+ * fields but no corresponding gap in the i40e_aq_phy_type enumeration. So,
+ * a shift is needed to adjust for this with values larger than 31. The
+ * only affected values are I40E_PHY_TYPE_25GBASE_*.
+ */
+#define I40E_PHY_TYPE_OFFSET 1
+#define I40E_CAP_PHY_TYPE_25GBASE_KR BIT_ULL(I40E_PHY_TYPE_25GBASE_KR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_CR BIT_ULL(I40E_PHY_TYPE_25GBASE_CR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_SR BIT_ULL(I40E_PHY_TYPE_25GBASE_SR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_LR BIT_ULL(I40E_PHY_TYPE_25GBASE_LR + \
+ I40E_PHY_TYPE_OFFSET)
#define I40E_HW_CAP_MAX_GPIO 30
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 18/31] net/i40e/base: implement clear all WoL filters
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (16 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
` (14 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch implements the clear Wake on LAN (WoL) filters admin queue
function which clears out ALL WoL patterns programmed into
the flex filters.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 1 +
drivers/net/i40e/base/i40e_common.c | 20 ++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 2 ++
3 files changed, 23 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index cef02b1..19af8b5 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -156,6 +156,7 @@ enum i40e_admin_queue_opc {
/* WoL commands */
i40e_aqc_opc_set_wol_filter = 0x0120,
i40e_aqc_opc_get_wake_reason = 0x0121,
+ i40e_aqc_opc_clear_all_wol_filters = 0x025E,
#endif
/* internal switch commands */
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9f4b872..bae9079 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6900,4 +6900,24 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
return status;
}
+/**
+* i40e_aq_clear_all_wol_filters
+* @hw: pointer to the hw struct
+* @cmd_details: pointer to command details structure or NULL
+*
+* Get information for the reason of a Wake Up event
+**/
+enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ enum i40e_status_code status;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_clear_all_wol_filters);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
#endif /* X722_SUPPORT */
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 9109cfc..4de96b5 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -537,6 +537,8 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
u16 *wake_reason,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
+ struct i40e_asq_cmd_details *cmd_details);
#endif
enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 19/31] net/i40e/base: implement set VSI full promisc mode
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (17 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 20/31] net/i40e/base: add defines for new aq command Jingjing Wu
` (13 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch implements a function to set a VSI to broadcast, multicast, and
unicast promiscuous mode all at once. This is specifically needed to set
the WoL/Proxy VSI created by FW to full promiscuous mode during power down
for WoL patterns and protocol offloads to function properly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 37 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 3 +++
2 files changed, 40 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index bae9079..1095e68 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2354,6 +2354,43 @@ enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous(struct i40e_hw *hw,
}
/**
+* i40e_aq_set_vsi_full_promiscuous
+* @hw: pointer to the hw struct
+* @seid: VSI number
+* @set: set promiscuous enable/disable
+* @cmd_details: pointer to command details structure or NULL
+**/
+enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw,
+ u16 seid, bool set,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
+ (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ if (set)
+ flags = I40E_AQC_SET_VSI_PROMISC_UNICAST |
+ I40E_AQC_SET_VSI_PROMISC_MULTICAST |
+ I40E_AQC_SET_VSI_PROMISC_BROADCAST;
+
+ cmd->promiscuous_flags = CPU_TO_LE16(flags);
+
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST |
+ I40E_AQC_SET_VSI_PROMISC_MULTICAST |
+ I40E_AQC_SET_VSI_PROMISC_BROADCAST);
+
+ cmd->seid = CPU_TO_LE16(seid);
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_mc_promisc_on_vlan
* @hw: pointer to the hw struct
* @seid: vsi number
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 4de96b5..98f5689 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -172,6 +172,9 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
bool rx_only_promisc);
enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous(struct i40e_hw *hw,
u16 vsi_id, bool set, struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw,
+ u16 seid, bool set,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
u16 seid, bool enable, u16 vid,
struct i40e_asq_cmd_details *cmd_details);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 20/31] net/i40e/base: add defines for new aq command
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (18 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
` (12 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
By default the device clears all MAC filter information on PF Reset.
However, this will cause Wake-On-LAN to fail because the wake filters
are deleted on transition to D3 power state. To get around this,
firmware is adding functionality to preserve certain MAC filters during
PFR. These bits allow the driver tell the FW which filters to preserve.
Set the datalen field and add I40E_AQ_FLAG_BUF/I40E_AQ_FLAG_RD flags in the
desc struct for the WoL/Proxy AQ descriptors. The WoL/Proxy AQ commands
were failing because these were missing.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 5 ++++-
drivers/net/i40e/base/i40e_common.c | 16 +++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 19af8b5..d4d2a7a 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -541,7 +541,8 @@ struct i40e_aqc_mac_address_read {
#define I40E_AQC_PORT_ADDR_VALID 0x40
#define I40E_AQC_WOL_ADDR_VALID 0x80
#define I40E_AQC_MC_MAG_EN_VALID 0x100
-#define I40E_AQC_ADDR_VALID_MASK 0x1F0
+#define I40E_AQC_WOL_PRESERVE_STATUS 0x200
+#define I40E_AQC_ADDR_VALID_MASK 0x3F0
u8 reserved[6];
__le32 addr_high;
__le32 addr_low;
@@ -562,6 +563,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_address_read_data);
struct i40e_aqc_mac_address_write {
__le16 command_flags;
#define I40E_AQC_MC_MAG_EN 0x0100
+#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200
#define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000
#define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000
#define I40E_AQC_WRITE_TYPE_PORT 0x8000
@@ -601,6 +603,7 @@ struct i40e_aqc_set_wol_filter {
__le16 cmd_flags;
#define I40E_AQC_SET_WOL_FILTER 0x8000
#define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000
+#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000
#define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0
#define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1
__le16 valid_flags;
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 1095e68..e9376dd 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6804,10 +6804,13 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
desc.params.external.addr_high =
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
+ desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
status = i40e_asq_send_command(hw, &desc, proxy_config,
sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6838,10 +6841,13 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_ns_proxy_table_entry);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
desc.params.external.addr_high =
CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
+ desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6888,9 +6894,11 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
if (set_filter) {
if (!filter)
return I40E_ERR_PARAM;
+
cmd_flags |= I40E_AQC_SET_WOL_FILTER;
- buff_len = sizeof(*filter);
+ cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR;
}
+
if (no_wol_tco)
cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL;
cmd->cmd_flags = CPU_TO_LE16(cmd_flags);
@@ -6901,6 +6909,12 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID;
cmd->valid_flags = CPU_TO_LE16(valid_flags);
+ buff_len = sizeof(*filter);
+ desc.datalen = buff_len;
+
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
+
cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter));
cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter));
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 21/31] net/i40e/base: save link FEC info from link up event
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (19 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 20/31] net/i40e/base: add defines for new aq command Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 22/31] net/i40e/base: acquire NVM lock before reads on all devices Jingjing Wu
` (11 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Store the FEC status bits from the link up event into the
hw_link_info structure.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 2 ++
drivers/net/i40e/base/i40e_type.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e9376dd..17b53ae 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1961,6 +1961,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed;
hw_link_info->link_info = resp->link_info;
hw_link_info->an_info = resp->an_info;
+ hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA |
+ I40E_AQ_CONFIG_FEC_RS_ENA);
hw_link_info->ext_info = resp->ext_info;
hw_link_info->loopback = resp->loopback;
hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 206e95a..99e080e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -272,6 +272,7 @@ struct i40e_link_status {
enum i40e_aq_link_speed link_speed;
u8 link_info;
u8 an_info;
+ u8 fec_info;
u8 ext_info;
u8 loopback;
/* is Link Status Event notification to SW enabled */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 22/31] net/i40e/base: acquire NVM lock before reads on all devices
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (20 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 23/31] net/i40e/base: change shift values to hex Jingjing Wu
` (10 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Acquire NVM lock before reads on all devices. Previously, locks were
only used for X722 and later. Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index eb69e49..1f345a5 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -219,19 +219,19 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
+ ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+ if (!ret_code) {
#ifdef X722_SUPPORT
- if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
- ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
- if (!ret_code) {
+ if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
- i40e_release_nvm(hw);
+ } else {
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
- } else {
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
- }
#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
#endif
+ i40e_release_nvm(hw);
+ }
return ret_code;
}
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 23/31] net/i40e/base: change shift values to hex
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (21 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 22/31] net/i40e/base: acquire NVM lock before reads on all devices Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
` (9 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 99e080e..3784c8f 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -365,9 +365,9 @@ enum i40e_acpi_programming_method {
I40E_ACPI_PROGRAMMING_METHOD_AQC_FPK = 1
};
-#define I40E_WOL_SUPPORT_MASK 1
-#define I40E_ACPI_PROGRAMMING_METHOD_MASK (1 << 1)
-#define I40E_PROXY_SUPPORT_MASK (1 << 2)
+#define I40E_WOL_SUPPORT_MASK 0x1
+#define I40E_ACPI_PROGRAMMING_METHOD_MASK 0x2
+#define I40E_PROXY_SUPPORT_MASK 0x4
#endif
/* Capabilities of a PF or a VF or the whole device */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 24/31] net/i40e/base: comment that udp port must be in Host order
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (22 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 23/31] net/i40e/base: change shift values to hex Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
` (8 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
The firmware expects the Port number to be in Little Endian format, and
the i40e_aq_add_udp_tunnel command clearly expects the udp_port variable
to be in Host order, as it uses CPU_TO_LE16(). It was recently
discovered in the Linux driver that we were passing a Big Endian port
number, which was therefor not enabling the UDP tunnel correctly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 17b53ae..852cbf7 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4419,11 +4419,15 @@ enum i40e_status_code i40e_aq_start_stop_dcbx(struct i40e_hw *hw,
/**
* i40e_aq_add_udp_tunnel
* @hw: pointer to the hw struct
- * @udp_port: the UDP port to add
+ * @udp_port: the UDP port to add in Host byte order
* @header_len: length of the tunneling header length in DWords
* @protocol_index: protocol index type
* @filter_index: pointer to filter index
* @cmd_details: pointer to command details structure or NULL
+ *
+ * Note: Firmware expects the udp_port value to be in Little Endian format,
+ * and this function will call CPU_TO_LE16 to convert from Host byte order to
+ * Little Endian order.
**/
enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw,
u16 udp_port, u8 protocol_index,
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 25/31] net/i40e/base: remove duplicate definitions
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (23 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
` (7 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
We already define I40E_AQ_PHY_TYPE_EXT_25G* flags in the response adminq
structure above, and do not need to re-define these.
While we are here, replace 0X with 0x as normal style.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index d4d2a7a..4e00516 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1785,8 +1785,8 @@ struct i40e_aq_get_phy_abilities_resp {
u8 d3_lpan;
#define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
u8 phy_type_ext;
-#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01
-#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
+#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01
+#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_cfg_curr_mod_ext_info;
@@ -1822,10 +1822,6 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
__le32 eeer;
u8 low_power_ctrl;
u8 phy_type_ext;
-#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01
-#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
-#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
-#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_config;
#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0)
#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 26/31] net/i40e/base: add ERROR state for NVM update state machine
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (24 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
` (6 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch adds I40E_NVMUPD_STATE_ERROR state for NVM update.
Without this patch driver has no possibility to return NVM image write
failure.This state is being set when ARQ rises error.
arq_last_status is also updated every time when ARQ event comes,
not only on error cases.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 4 ++--
drivers/net/i40e/base/i40e_nvm.c | 17 +++++++++++++++++
drivers/net/i40e/base/i40e_type.h | 2 ++
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 0d3a83f..5bdf3f7 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -1077,11 +1077,11 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,
desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc);
desc_idx = ntc;
+ hw->aq.arq_last_status =
+ (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval);
flags = LE16_TO_CPU(desc->flags);
if (flags & I40E_AQ_FLAG_ERR) {
ret_code = I40E_ERR_ADMIN_QUEUE_ERROR;
- hw->aq.arq_last_status =
- (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval);
i40e_debug(hw,
I40E_DEBUG_AQ_MESSAGE,
"AQRX: Event received with error 0x%X.\n",
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 1f345a5..4f4a645 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -901,9 +901,20 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,
*((u16 *)&bytes[2]) = hw->nvm_wait_opcode;
}
+ /* Clear error status on read */
+ if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR)
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+
return I40E_SUCCESS;
}
+ /* Clear status even it is not read and log */
+ if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) {
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n");
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT:
status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno);
@@ -1253,6 +1264,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_writing(struct i40e_hw *hw,
void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)
{
if (opcode == hw->nvm_wait_opcode) {
+
i40e_debug(hw, I40E_DEBUG_NVM,
"NVMUPD: clearing wait on opcode 0x%04x\n", opcode);
if (hw->nvm_release_on_done) {
@@ -1261,6 +1273,11 @@ void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)
}
hw->nvm_wait_opcode = 0;
+ if (hw->aq.arq_last_status) {
+ hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR;
+ return;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT_WAIT:
hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 3784c8f..56e47ea 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -499,6 +499,7 @@ enum i40e_nvmupd_state {
I40E_NVMUPD_STATE_WRITING,
I40E_NVMUPD_STATE_INIT_WAIT,
I40E_NVMUPD_STATE_WRITE_WAIT,
+ I40E_NVMUPD_STATE_ERROR
};
/* nvm_access definition and its masks/shifts need to be accessible to
@@ -1526,6 +1527,7 @@ struct i40e_hw_port_stats {
#define I40E_SR_EMPR_REGS_AUTO_LOAD_PTR 0x3A
#define I40E_SR_GLOBR_REGS_AUTO_LOAD_PTR 0x3B
#define I40E_SR_CORER_REGS_AUTO_LOAD_PTR 0x3C
+#define I40E_SR_PHY_ACTIVITY_LIST_PTR 0x3D
#define I40E_SR_PCIE_ALT_AUTO_LOAD_PTR 0x3E
#define I40E_SR_SW_CHECKSUM_WORD 0x3F
#define I40E_SR_1ST_FREE_PROVISION_AREA_PTR 0x40
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 27/31] net/i40e/base: add broadcast promiscuous control per VLAN
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (25 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 28/31] net/i40e/base: avoid division by zero Jingjing Wu
` (5 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add a new adminq function that allows driver to configure per-VLAN
broadcast promiscuous mode, similar to how we handle unicast and
multicast promiscuous modes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 34 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 3 +++
2 files changed, 37 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 852cbf7..14aaac6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2461,6 +2461,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
}
/**
+ * i40e_aq_set_vsi_bc_promisc_on_vlan
+ * @hw: pointer to the hw struct
+ * @seid: vsi number
+ * @enable: set broadcast promiscuous enable/disable for a given VLAN
+ * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag
+ * @cmd_details: pointer to command details structure or NULL
+ **/
+enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw,
+ u16 seid, bool enable, u16 vid,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
+ (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ if (enable)
+ flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST;
+
+ cmd->promiscuous_flags = CPU_TO_LE16(flags);
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST);
+ cmd->seid = CPU_TO_LE16(seid);
+ cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_broadcast
* @hw: pointer to the hw struct
* @seid: vsi number
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 98f5689..ed6cdd6 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -181,6 +181,9 @@ enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
u16 seid, bool enable, u16 vid,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw,
+ u16 seid, bool enable, u16 vid,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
u16 seid, bool enable,
struct i40e_asq_cmd_details *cmd_details);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 28/31] net/i40e/base: avoid division by zero
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (26 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 29/31] net/i40e/base: fix byte order Jingjing Wu
` (4 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
For some cases when reading from device are incorrect or image is
incorrect, this part of code causes crash due to division by zero.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 14aaac6..fdf9d9b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3967,8 +3967,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
/* partition id is 1-based, and functions are evenly spread
* across the ports as partitions
*/
- hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
- hw->num_partitions = num_functions / hw->num_ports;
+ if (hw->num_ports != 0) {
+ hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
+ hw->num_partitions = num_functions / hw->num_ports;
+ }
/* additional HW specific goodies that might
* someday be HW version specific
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 29/31] net/i40e/base: fix byte order
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (27 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 28/31] net/i40e/base: avoid division by zero Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 30/31] net/i40e/base: remove unused macro Jingjing Wu
` (3 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Big Endian platform will accidentally send the wrong
data to the firmware command. This patch fixes the issue.
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fdf9d9b..6a0362d 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6852,7 +6852,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
- desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data));
status = i40e_asq_send_command(hw, &desc, proxy_config,
sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6889,7 +6889,7 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
- desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data));
status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6952,7 +6952,7 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
cmd->valid_flags = CPU_TO_LE16(valid_flags);
buff_len = sizeof(*filter);
- desc.datalen = buff_len;
+ desc.datalen = CPU_TO_LE16(buff_len);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 30/31] net/i40e/base: remove unused macro
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (28 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 29/31] net/i40e/base: fix byte order Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 31/31] net/i40e: remove unused macro from PMD Jingjing Wu
` (2 subsequent siblings)
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
remove X722_SUPPORT and I40E_NDIS_SUPPORT MACROs
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 14 -----------
drivers/net/i40e/base/i40e_common.c | 18 +-------------
drivers/net/i40e/base/i40e_devids.h | 2 --
drivers/net/i40e/base/i40e_nvm.c | 16 -------------
drivers/net/i40e/base/i40e_prototype.h | 6 -----
drivers/net/i40e/base/i40e_register.h | 2 --
drivers/net/i40e/base/i40e_type.h | 42 ---------------------------------
7 files changed, 1 insertion(+), 99 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4e00516..67cef7c 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -139,12 +139,10 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_list_func_capabilities = 0x000A,
i40e_aqc_opc_list_dev_capabilities = 0x000B,
-#ifdef X722_SUPPORT
/* Proxy commands */
i40e_aqc_opc_set_proxy_config = 0x0104,
i40e_aqc_opc_set_ns_proxy_table_entry = 0x0105,
-#endif
/* LAA */
i40e_aqc_opc_mac_address_read = 0x0107,
i40e_aqc_opc_mac_address_write = 0x0108,
@@ -152,13 +150,11 @@ enum i40e_admin_queue_opc {
/* PXE */
i40e_aqc_opc_clear_pxe_mode = 0x0110,
-#ifdef X722_SUPPORT
/* WoL commands */
i40e_aqc_opc_set_wol_filter = 0x0120,
i40e_aqc_opc_get_wake_reason = 0x0121,
i40e_aqc_opc_clear_all_wol_filters = 0x025E,
-#endif
/* internal switch commands */
i40e_aqc_opc_get_switch_config = 0x0200,
i40e_aqc_opc_add_statistics = 0x0201,
@@ -283,12 +279,10 @@ enum i40e_admin_queue_opc {
/* Tunnel commands */
i40e_aqc_opc_add_udp_tunnel = 0x0B00,
i40e_aqc_opc_del_udp_tunnel = 0x0B01,
-#ifdef X722_SUPPORT
i40e_aqc_opc_set_rss_key = 0x0B02,
i40e_aqc_opc_set_rss_lut = 0x0B03,
i40e_aqc_opc_get_rss_key = 0x0B04,
i40e_aqc_opc_get_rss_lut = 0x0B05,
-#endif
/* Async Events */
i40e_aqc_opc_event_lan_overflow = 0x1001,
@@ -587,7 +581,6 @@ struct i40e_aqc_clear_pxe {
I40E_CHECK_CMD_LENGTH(i40e_aqc_clear_pxe);
-#ifdef X722_SUPPORT
/* Set WoL Filter (0x0120) */
struct i40e_aqc_set_wol_filter {
@@ -639,7 +632,6 @@ struct i40e_aqc_get_wake_reason_completion {
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_wake_reason_completion);
-#endif /* X722_SUPPORT */
/* Switch configuration commands (0x02xx) */
/* Used by many indirect commands that only pass an seid and a buffer in the
@@ -944,16 +936,12 @@ struct i40e_aqc_vsi_properties_data {
I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT)
/* queueing option section */
u8 queueing_opt_flags;
-#ifdef X722_SUPPORT
#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04
#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08
-#endif
#define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10
#define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20
-#ifdef X722_SUPPORT
#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00
#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40
-#endif
u8 queueing_opt_reserved[3];
/* scheduler section */
u8 up_enable_bits;
@@ -2427,7 +2415,6 @@ struct i40e_aqc_del_udp_tunnel_completion {
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion);
-#ifdef X722_SUPPORT
struct i40e_aqc_get_set_rss_key {
#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15)
@@ -2468,7 +2455,6 @@ struct i40e_aqc_get_set_rss_lut {
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut);
-#endif
/* tunnel key structure 0x0B10 */
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 6a0362d..b8d8165 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -71,7 +71,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_25G_SFP28:
hw->mac.type = I40E_MAC_XL710;
break;
-#ifdef X722_SUPPORT
#ifdef X722_A0_SUPPORT
case I40E_DEV_ID_X722_A0:
#endif
@@ -83,8 +82,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_SFP_I_X722:
hw->mac.type = I40E_MAC_X722;
break;
-#endif
-#ifdef X722_SUPPORT
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_X722_VF:
#ifdef X722_A0_SUPPORT
@@ -93,7 +90,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
hw->mac.type = I40E_MAC_X722_VF;
break;
#endif /* INTEGRATED_VF || VF_DRIVER */
-#endif /* X722_SUPPORT */
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_VF:
case I40E_DEV_ID_VF_HV:
@@ -113,7 +109,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
return status;
}
-#ifndef I40E_NDIS_SUPPORT
/**
* i40e_aq_str - convert AQ err code to a string
* @hw: pointer to the HW structure
@@ -320,7 +315,6 @@ const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err)
return hw->err_str;
}
-#endif /* I40E_NDIS_SUPPORT */
/**
* i40e_debug_aq
* @hw: debug mask related to admin queue
@@ -446,7 +440,6 @@ enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw,
return status;
}
-#ifdef X722_SUPPORT
/**
* i40e_aq_get_set_rss_lut
@@ -605,7 +598,6 @@ enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw,
{
return i40e_aq_get_set_rss_key(hw, vsi_id, key, true);
}
-#endif /* X722_SUPPORT */
/* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the
* hardware to a bit-field that can be used by SW to more easily determine the
@@ -1021,9 +1013,7 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
switch (hw->mac.type) {
case I40E_MAC_XL710:
-#ifdef X722_SUPPORT
case I40E_MAC_X722:
-#endif
break;
default:
return I40E_ERR_DEVICE_NOT_SUPPORTED;
@@ -1043,11 +1033,9 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
else
hw->pf_id = (u8)(func_rid & 0x7);
-#ifdef X722_SUPPORT
if (hw->mac.type == I40E_MAC_X722)
hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE;
-#endif
status = i40e_init_nvm(hw);
return status;
}
@@ -3916,7 +3904,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
if (number & I40E_NVM_MGMT_UPDATE_DISABLED)
p->update_disabled = true;
break;
-#ifdef X722_SUPPORT
case I40E_AQ_CAP_ID_WOL_AND_PROXY:
hw->num_wol_proxy_filters = (u16)number;
hw->wol_proxy_vsi_seid = (u16)logical_id;
@@ -3930,7 +3917,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
"HW Capability: WOL proxy filters = %d\n",
hw->num_wol_proxy_filters);
break;
-#endif
default:
break;
}
@@ -6823,7 +6809,6 @@ enum i40e_status_code i40e_vf_reset(struct i40e_hw *hw)
I40E_SUCCESS, NULL, 0, NULL);
}
#endif /* VF_DRIVER */
-#ifdef X722_SUPPORT
/**
* i40e_aq_set_arp_proxy_config
@@ -7012,5 +6997,4 @@ enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
-}
-#endif /* X722_SUPPORT */
+}
\ No newline at end of file
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 19bb376..4546689 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -55,7 +55,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_VF 0x154C
#define I40E_DEV_ID_VF_HV 0x1571
#endif /* VF_DRIVER */
-#ifdef X722_SUPPORT
#ifdef X722_A0_SUPPORT
#define I40E_DEV_ID_X722_A0 0x374C
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
@@ -71,7 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
#endif /* VF_DRIVER */
-#endif /* X722_SUPPORT */
#define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \
(d) == I40E_DEV_ID_QSFP_B || \
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4f4a645..e896502 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -221,15 +221,11 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
if (!ret_code) {
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
} else {
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
-#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#endif
i40e_release_nvm(hw);
}
return ret_code;
@@ -249,14 +245,10 @@ enum i40e_status_code __i40e_read_nvm_word(struct i40e_hw *hw,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
else
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#endif
return ret_code;
}
@@ -348,14 +340,10 @@ enum i40e_status_code __i40e_read_nvm_buffer(struct i40e_hw *hw,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, data);
else
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#else
- ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#endif
return ret_code;
}
@@ -375,7 +363,6 @@ enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
if (!ret_code) {
@@ -386,9 +373,6 @@ enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
} else {
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
}
-#else
- ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#endif
return ret_code;
}
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index ed6cdd6..109d3c5 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -78,7 +78,6 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
void i40e_idle_aq(struct i40e_hw *hw);
bool i40e_check_asq_alive(struct i40e_hw *hw);
enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
-#ifdef X722_SUPPORT
enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 seid,
bool pf_lut, u8 *lut, u16 lut_size);
@@ -90,11 +89,8 @@ enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw,
u16 seid,
struct i40e_aqc_get_set_rss_key_data *key);
-#endif
-#ifndef I40E_NDIS_SUPPORT
const char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err);
const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err);
-#endif /* I40E_NDIS_SUPPORT */
#ifdef PF_DRIVER
@@ -527,7 +523,6 @@ enum i40e_status_code i40e_aq_rx_ctl_write_register(struct i40e_hw *hw,
u32 reg_addr, u32 reg_val,
struct i40e_asq_cmd_details *cmd_details);
void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val);
-#ifdef X722_SUPPORT
enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
struct i40e_aqc_arp_proxy_data *proxy_config,
struct i40e_asq_cmd_details *cmd_details);
@@ -545,7 +540,6 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details);
-#endif
enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index fd0a723..3a305b6 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -3401,7 +3401,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_VFQF_HREGION_OVERRIDE_ENA_7_MASK I40E_MASK(0x1, I40E_VFQF_HREGION_OVERRIDE_ENA_7_SHIFT)
#define I40E_VFQF_HREGION_REGION_7_SHIFT 29
#define I40E_VFQF_HREGION_REGION_7_MASK I40E_MASK(0x7, I40E_VFQF_HREGION_REGION_7_SHIFT)
-#ifdef X722_SUPPORT
#ifdef PF_DRIVER
#define I40E_MNGSB_FDCRC 0x000B7050 /* Reset: POR */
@@ -5366,5 +5365,4 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_SHIFT 20
#define I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_MASK I40E_MASK(0xFFF, I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_SHIFT)
-#endif /* X722_SUPPORT */
#endif /* _I40E_REGISTER_H_ */
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 56e47ea..590d97c 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -196,9 +196,7 @@ enum i40e_memcpy_type {
I40E_DMA_TO_NONDMA
};
-#ifdef X722_SUPPORT
#define I40E_FW_API_VERSION_MINOR_X722 0x0005
-#endif
#define I40E_FW_API_VERSION_MINOR_X710 0x0005
@@ -214,10 +212,8 @@ enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0,
I40E_MAC_XL710,
I40E_MAC_VF,
-#ifdef X722_SUPPORT
I40E_MAC_X722,
I40E_MAC_X722_VF,
-#endif
I40E_MAC_GENERIC,
};
@@ -359,7 +355,6 @@ struct i40e_phy_info {
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
-#ifdef X722_SUPPORT
enum i40e_acpi_programming_method {
I40E_ACPI_PROGRAMMING_METHOD_HW_FVL = 0,
I40E_ACPI_PROGRAMMING_METHOD_AQC_FPK = 1
@@ -369,7 +364,6 @@ enum i40e_acpi_programming_method {
#define I40E_ACPI_PROGRAMMING_METHOD_MASK 0x2
#define I40E_PROXY_SUPPORT_MASK 0x4
-#endif
/* Capabilities of a PF or a VF or the whole device */
struct i40e_hw_capabilities {
u32 switch_mode;
@@ -437,11 +431,9 @@ struct i40e_hw_capabilities {
u32 enabled_tcmap;
u32 maxtc;
u64 wr_csr_prot;
-#ifdef X722_SUPPORT
bool apm_wol_support;
enum i40e_acpi_programming_method acpi_prog_method;
bool proxy_support;
-#endif
};
struct i40e_mac_info {
@@ -703,30 +695,22 @@ struct i40e_hw {
struct i40e_dcbx_config remote_dcbx_config; /* Peer Cfg */
struct i40e_dcbx_config desired_dcbx_config; /* CEE Desired Cfg */
-#ifdef X722_SUPPORT
/* WoL and proxy support */
u16 num_wol_proxy_filters;
u16 wol_proxy_vsi_seid;
-#endif
#define I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE BIT_ULL(0)
u64 flags;
/* debug mask */
u32 debug_mask;
-#ifndef I40E_NDIS_SUPPORT
char err_str[16];
-#endif /* I40E_NDIS_SUPPORT */
};
STATIC INLINE bool i40e_is_vf(struct i40e_hw *hw)
{
-#ifdef X722_SUPPORT
return (hw->mac.type == I40E_MAC_VF ||
hw->mac.type == I40E_MAC_X722_VF);
-#else
- return hw->mac.type == I40E_MAC_VF;
-#endif
}
struct i40e_driver_version {
@@ -830,11 +814,7 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_CRCP_SHIFT = 4,
I40E_RX_DESC_STATUS_TSYNINDX_SHIFT = 5, /* 2 BITS */
I40E_RX_DESC_STATUS_TSYNVALID_SHIFT = 7,
-#ifdef X722_SUPPORT
I40E_RX_DESC_STATUS_EXT_UDP_0_SHIFT = 8,
-#else
- I40E_RX_DESC_STATUS_RESERVED1_SHIFT = 8,
-#endif
I40E_RX_DESC_STATUS_UMBCAST_SHIFT = 9, /* 2 BITS */
I40E_RX_DESC_STATUS_FLM_SHIFT = 11,
@@ -842,11 +822,7 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_LPBK_SHIFT = 14,
I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15,
I40E_RX_DESC_STATUS_RESERVED2_SHIFT = 16, /* 2 BITS */
-#ifdef X722_SUPPORT
I40E_RX_DESC_STATUS_INT_UDP_0_SHIFT = 18,
-#else
- I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18,
-#endif
I40E_RX_DESC_STATUS_LAST /* this entry must be last!!! */
};
@@ -1224,10 +1200,8 @@ enum i40e_tx_ctx_desc_eipt_offload {
#define I40E_TXD_CTX_QW0_DECTTL_MASK (0xFULL << \
I40E_TXD_CTX_QW0_DECTTL_SHIFT)
-#ifdef X722_SUPPORT
#define I40E_TXD_CTX_QW0_L4T_CS_SHIFT 23
#define I40E_TXD_CTX_QW0_L4T_CS_MASK BIT_ULL(I40E_TXD_CTX_QW0_L4T_CS_SHIFT)
-#endif
struct i40e_nop_desc {
__le64 rsvd;
__le64 dtype_cmd;
@@ -1264,38 +1238,24 @@ struct i40e_filter_program_desc {
/* Packet Classifier Types for filters */
enum i40e_filter_pctype {
-#ifdef X722_SUPPORT
/* Note: Values 0-28 are reserved for future use.
* Value 29, 30, 32 are not supported on XL710 and X710.
*/
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
-#else
- /* Note: Values 0-30 are reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
-#ifdef X722_SUPPORT
I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
-#else
- /* Note: Value 32 is reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
I40E_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
I40E_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
I40E_FILTER_PCTYPE_FRAG_IPV4 = 36,
-#ifdef X722_SUPPORT
/* Note: Values 37-38 are reserved for future use.
* Value 39, 40, 42 are not supported on XL710 and X710.
*/
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
-#else
- /* Note: Values 37-40 are reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
-#ifdef X722_SUPPORT
I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
-#endif
I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
@@ -1350,12 +1310,10 @@ enum i40e_filter_program_desc_pcmd {
I40E_TXD_FLTR_QW1_CMD_SHIFT)
#define I40E_TXD_FLTR_QW1_FD_STATUS_MASK (0x3ULL << \
I40E_TXD_FLTR_QW1_FD_STATUS_SHIFT)
-#ifdef X722_SUPPORT
#define I40E_TXD_FLTR_QW1_ATR_SHIFT (0xEULL + \
I40E_TXD_FLTR_QW1_CMD_SHIFT)
#define I40E_TXD_FLTR_QW1_ATR_MASK BIT_ULL(I40E_TXD_FLTR_QW1_ATR_SHIFT)
-#endif
#define I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT 20
#define I40E_TXD_FLTR_QW1_CNTINDEX_MASK (0x1FFUL << \
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v2 31/31] net/i40e: remove unused macro from PMD
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (29 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 30/31] net/i40e/base: remove unused macro Jingjing Wu
@ 2016-12-09 14:39 ` Jingjing Wu
2016-12-09 16:08 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Ferruh Yigit
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
32 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-09 14:39 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/Makefile | 2 +-
drivers/net/i40e/i40e_ethdev.c | 40 ----------------------------------------
2 files changed, 1 insertion(+), 41 deletions(-)
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 13085fb..66997b6 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -38,7 +38,7 @@ LIB = librte_pmd_i40e.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF
-CFLAGS += -DX722_SUPPORT -DX722_A0_SUPPORT
+CFLAGS += -DX722_A0_SUPPORT
EXPORT_MAP := rte_pmd_i40e_version.map
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b2f827c..f42f4ba 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6198,18 +6198,14 @@ i40e_parse_hena(uint64_t flags)
rss_hf |= ETH_RSS_FRAG_IPV4;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK))
rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_SCTP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER))
@@ -6218,18 +6214,14 @@ i40e_parse_hena(uint64_t flags)
rss_hf |= ETH_RSS_FRAG_IPV6;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK))
rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_SCTP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER))
@@ -7101,7 +7093,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7120,7 +7111,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7130,7 +7120,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_TCP_FLAGS | I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7140,7 +7129,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_TCP_FLAGS | I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7174,7 +7162,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_HOP_LIMIT | I40E_INSET_IPV6_SRC |
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7193,7 +7180,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7203,7 +7189,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7213,7 +7198,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7253,7 +7237,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
@@ -7264,19 +7247,16 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
@@ -7298,7 +7278,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
@@ -7309,19 +7288,16 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
@@ -7374,22 +7350,18 @@ i40e_get_default_input_set(uint16_t pctype)
[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
@@ -7401,22 +7373,18 @@ i40e_get_default_input_set(uint16_t pctype)
[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
@@ -8215,18 +8183,14 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
[I40E_FILTER_PCTYPE_FRAG_IPV4] = RTE_ETH_FLOW_FRAG_IPV4,
[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
RTE_ETH_FLOW_NONFRAG_IPV4_SCTP,
[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =
@@ -8234,18 +8198,14 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
[I40E_FILTER_PCTYPE_FRAG_IPV6] = RTE_ETH_FLOW_FRAG_IPV6,
[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
RTE_ETH_FLOW_NONFRAG_IPV6_SCTP,
[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (30 preceding siblings ...)
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 31/31] net/i40e: remove unused macro from PMD Jingjing Wu
@ 2016-12-09 16:08 ` Ferruh Yigit
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
32 siblings, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-09 16:08 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/9/2016 2:38 PM, Jingjing Wu wrote:
> i40e base code upate. The main changes are:
> - add clause22 and clause45 implementation for PHY registers accessing
> - replace existing legacy memcpy() calls with i40e_memcpy() calls.
> - use BIT() macro instead of bit fields
> - add clear all WoL filters implementation
> - add ERROR state for NVM update state machine
> - add broadcast promiscuous control per VLAN
> - remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
>
> v2 changes:
> - comments rework
> - complie issue fix
> - rebase to dpdk-next-net
>
> Jingjing Wu (31):
> net/i40e/base: add encap csum VF offload flag
> net/i40e/base: preserve extended PHY type field
> net/i40e/base: remove unnecessary code
> net/i40e/base: fix bit test mask
> net/i40e/base: group base mode VF offload flags
> net/i40e/base: fix long link down notification time
> net/i40e/base: add media type detection for 25G link
> net/i40e/base: add clause22 and clause45 implementation
> net/i40e/base: add bus number info
> net/i40e/base: add protocols when discover capabilities
> net/i40e/base: pass unknown PHY type for unknown PHYs
> net/i40e/base: replace memcpy
> net/i40e/base: deprecating unused macro
> net/i40e/base: remove FPK HyperV VF device ID
> net/i40e/base: add FEC bits to PHY capabilities
> net/i40e/base: use BIT() macro instead of bit fields
> net/i40e/base: adjust 25G PHY type values
> net/i40e/base: implement clear all WoL filters
> net/i40e/base: implement set VSI full promisc mode
> net/i40e/base: add defines for new aq command
> net/i40e/base: save link FEC info from link up event
> net/i40e/base: acquire NVM lock before reads on all devices
> net/i40e/base: change shift values to hex
> net/i40e/base: comment that udp port must be in Host order
> net/i40e/base: remove duplicate definitions
> net/i40e/base: add ERROR state for NVM update state machine
> net/i40e/base: add broadcast promiscuous control per VLAN
> net/i40e/base: avoid division by zero
> net/i40e/base: fix byte order
> net/i40e/base: remove unused macro
> net/i40e: remove unused macro from PMD
>
Overall patches looks good, thanks.
But according comment logs, following patches can be for fixing
something broken in the existing code, can you please check, if so can
you please update commit logs according [1]?
[PATCH v2 02/31] net/i40e/base: preserve extended PHY type field
[PATCH v2 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs
[PATCH v2 20/31] net/i40e/base: add defines for new aq command
[PATCH v2 22/31] net/i40e/base: acquire NVM lock before reads on all devices
[PATCH v2 28/31] net/i40e/base: avoid division by zero
Thanks,
ferruh
[1]
Updating patch title to point the fix, adding fixes tag and CC: stable tree.
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
` (31 preceding siblings ...)
2016-12-09 16:08 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Ferruh Yigit
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
` (31 more replies)
32 siblings, 32 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
i40e base code upate. The main changes are:
- add clause22 and clause45 implementation for PHY registers accessing
- replace existing legacy memcpy() calls with i40e_memcpy() calls.
- use BIT() macro instead of bit fields
- add clear all WoL filters implementation
- add ERROR state for NVM update state machine
- add broadcast promiscuous control per VLAN
- remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
v3:
* update commit log of few patches as issue fix
v2:
* comments rework
* complie issue fix
* rebase to dpdk-next-net
Jingjing Wu (31):
net/i40e/base: add encap csum VF offload flag
net/i40e/base: fix flow control set for 25G
net/i40e/base: remove unnecessary code
net/i40e/base: fix bit test mask
net/i40e/base: group base mode VF offload flags
net/i40e/base: fix long link down notification time
net/i40e/base: add media type detection for 25G link
net/i40e/base: add clause22 and clause45 implementation
net/i40e/base: add bus number info
net/i40e/base: add protocols when discover capabilities
net/i40e/base: fix unknown PHYs incorrect identification
net/i40e/base: replace memcpy
net/i40e/base: deprecating unused macro
net/i40e/base: remove FPK HyperV VF device ID
net/i40e/base: add FEC bits to PHY capabilities
net/i40e/base: use BIT() macro instead of bit fields
net/i40e/base: adjust 25G PHY type values
net/i40e/base: implement clear all WoL filters
net/i40e/base: implement set VSI full promisc mode
net/i40e/base: fix wol failure on PF reset
net/i40e/base: save link FEC info from link up event
net/i40e/base: fix NVM access intefering
net/i40e/base: change shift values to hex
net/i40e/base: comment that udp port must be in Host order
net/i40e/base: remove duplicate definitions
net/i40e/base: add ERROR state for NVM update state machine
net/i40e/base: add broadcast promiscuous control per VLAN
net/i40e/base: fix division by zero
net/i40e/base: fix byte order
net/i40e/base: remove unused macro
net/i40e: remove unused macro from PMD
drivers/net/i40e/Makefile | 2 +-
drivers/net/i40e/base/i40e_adminq.c | 4 +-
drivers/net/i40e/base/i40e_adminq_cmd.h | 51 ++--
drivers/net/i40e/base/i40e_common.c | 425 ++++++++++++++++++++++++++------
drivers/net/i40e/base/i40e_devids.h | 3 -
drivers/net/i40e/base/i40e_lan_hmc.c | 5 -
drivers/net/i40e/base/i40e_nvm.c | 52 ++--
drivers/net/i40e/base/i40e_prototype.h | 30 ++-
drivers/net/i40e/base/i40e_register.h | 2 -
drivers/net/i40e/base/i40e_type.h | 94 +++----
drivers/net/i40e/base/i40e_virtchnl.h | 5 +
drivers/net/i40e/i40e_ethdev.c | 42 +---
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
13 files changed, 468 insertions(+), 248 deletions(-)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 01/31] net/i40e/base: add encap csum VF offload flag
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 02/31] net/i40e/base: fix flow control set for 25G Jingjing Wu
` (30 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add ENCAP_CSUM offload negotiation flag. Currently VF assumes checksum
offload for encapsulated packets is supported by default. Going forward,
this feature needs to be negotiated with PF before advertising to the
stack. Hence, we need a flag to control it.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_virtchnl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index fd51ec3..07e7472 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -170,6 +170,7 @@ struct i40e_virtchnl_vsi_resource {
#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
+#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00100000
struct i40e_virtchnl_vf_resource {
u16 num_vsis;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 02/31] net/i40e/base: fix flow control set for 25G
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
` (29 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
Add phy_type_ext copied from old setting to rpevents 25G PHY
types from being disabled when setting the flow control modes.
Fixes: 51131ae119 ("net/i40e/base: get PHY abilities for 25G")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9a6b3ed..d67ad90 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1789,6 +1789,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
/* Copy over all the old settings */
config.phy_type = abilities.phy_type;
+ config.phy_type_ext = abilities.phy_type_ext;
config.link_speed = abilities.link_speed;
config.eee_capability = abilities.eee_capability;
config.eeer = abilities.eeer_val;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 03/31] net/i40e/base: remove unnecessary code
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 02/31] net/i40e/base: fix flow control set for 25G Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 04/31] net/i40e/base: fix bit test mask Jingjing Wu
` (28 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch changes some assignments and removing the unnecessary
code to avoid error reported by static analysis tools.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ----
drivers/net/i40e/base/i40e_lan_hmc.c | 5 -----
2 files changed, 9 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index d67ad90..aa346d1 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3833,7 +3833,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
else
p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL;
p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0;
- p->proxy_support = p->proxy_support;
i40e_debug(hw, I40E_DEBUG_INIT,
"HW Capability: WOL proxy filters = %d\n",
hw->num_wol_proxy_filters);
@@ -6008,9 +6007,6 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
- if (bwd_size > I40E_AQ_LARGE_BUF)
- desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB);
-
desc.datalen = CPU_TO_LE16(bwd_size);
status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details);
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index 2260648..f03f381 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -1239,11 +1239,6 @@ enum i40e_status_code i40e_hmc_get_object_va(struct i40e_hw *hw,
u64 obj_offset_in_fpm;
u32 sd_idx, sd_lmt;
- if (NULL == hmc_info) {
- ret_code = I40E_ERR_BAD_PTR;
- DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n");
- goto exit;
- }
if (NULL == hmc_info->hmc_obj) {
ret_code = I40E_ERR_BAD_PTR;
DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n");
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 04/31] net/i40e/base: fix bit test mask
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (2 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
` (27 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
Incorrect bit mask was used for testing "get link status" response.
Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it should
be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01).
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa346d1..a2661cf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1975,7 +1975,7 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->crc_enable = false;
- if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE))
+ if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED))
hw_link_info->lse_enable = true;
else
hw_link_info->lse_enable = false;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 05/31] net/i40e/base: group base mode VF offload flags
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (3 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 04/31] net/i40e/base: fix bit test mask Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
` (26 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Group together the minimum set of offload capabilities that are always
supported by VF in base mode. This define would be used by PF to make
sure VF in base mode gets minimum of base capabilities.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_virtchnl.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index 07e7472..8fba608 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -172,6 +172,10 @@ struct i40e_virtchnl_vsi_resource {
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000
#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM 0X00100000
+#define I40E_VF_BASE_MODE_OFFLOADS (I40E_VIRTCHNL_VF_OFFLOAD_L2 | \
+ I40E_VIRTCHNL_VF_OFFLOAD_VLAN | \
+ I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF)
+
struct i40e_virtchnl_vf_resource {
u16 num_vsis;
u16 num_queue_pairs;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 06/31] net/i40e/base: fix long link down notification time
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (4 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
` (25 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
This patch fixes a problem where it could take a very
long time (>100 msec) to print the link down notification.
This problem is fixed by changing how often we update link
info from fw, when link is down. Without this patch, it can
take over 100msec to notify user link is down.
Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_common.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index a2661cf..2ad9448 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2746,7 +2746,10 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) {
+ /* extra checking needed to ensure link info to user is timely */
+ if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+ ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+ !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
status = i40e_aq_get_phy_capabilities(hw, false, false,
&abilities, NULL);
if (status)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 07/31] net/i40e/base: add media type detection for 25G link
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (5 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
` (24 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ad9448..7eea189 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1288,6 +1288,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_1000BASE_LX:
case I40E_PHY_TYPE_40GBASE_SR4:
case I40E_PHY_TYPE_40GBASE_LR4:
+ case I40E_PHY_TYPE_25GBASE_LR:
+ case I40E_PHY_TYPE_25GBASE_SR:
media = I40E_MEDIA_TYPE_FIBER;
break;
case I40E_PHY_TYPE_100BASE_TX:
@@ -1302,6 +1304,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_SFPP_CU:
case I40E_PHY_TYPE_40GBASE_AOC:
case I40E_PHY_TYPE_10GBASE_AOC:
+ case I40E_PHY_TYPE_25GBASE_CR:
media = I40E_MEDIA_TYPE_DA;
break;
case I40E_PHY_TYPE_1000BASE_KX:
@@ -1309,6 +1312,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
case I40E_PHY_TYPE_10GBASE_KR:
case I40E_PHY_TYPE_40GBASE_KR4:
case I40E_PHY_TYPE_20GBASE_KR2:
+ case I40E_PHY_TYPE_25GBASE_KR:
media = I40E_MEDIA_TYPE_BACKPLANE;
break;
case I40E_PHY_TYPE_SGMII:
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 08/31] net/i40e/base: add clause22 and clause45 implementation
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (6 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 09/31] net/i40e/base: add bus number info Jingjing Wu
` (23 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Some external PHYs require Clause22 and Clause45 method for
accessing registers. Mostly used for X722 support.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 245 +++++++++++++++++++++++++++------
drivers/net/i40e/base/i40e_prototype.h | 16 ++-
drivers/net/i40e/base/i40e_type.h | 17 ++-
3 files changed, 226 insertions(+), 52 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 7eea189..85c1c11 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6022,7 +6022,92 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
}
/**
- * i40e_read_phy_register
+ * i40e_read_phy_register_clause22
+ * @hw: pointer to the HW structure
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Reads specified PHY register value
+ **/
+enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 *value)
+{
+ enum i40e_status_code status = I40E_ERR_TIMEOUT;
+ u8 port_num = (u8)hw->func_caps.mdio_port_num;
+ u32 command = 0;
+ u16 retry = 1000;
+
+ command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
+ (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
+ (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) |
+ (I40E_MDIO_CLAUSE22_STCODE_MASK) |
+ (I40E_GLGEN_MSCA_MDICMD_MASK);
+ wr32(hw, I40E_GLGEN_MSCA(port_num), command);
+ do {
+ command = rd32(hw, I40E_GLGEN_MSCA(port_num));
+ if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) {
+ status = I40E_SUCCESS;
+ break;
+ }
+ i40e_usec_delay(10);
+ retry--;
+ } while (retry);
+
+ if (status) {
+ i40e_debug(hw, I40E_DEBUG_PHY,
+ "PHY: Can't write command to external PHY.\n");
+ } else {
+ command = rd32(hw, I40E_GLGEN_MSRWD(port_num));
+ *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >>
+ I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT;
+ }
+
+ return status;
+}
+
+/**
+ * i40e_write_phy_register_clause22
+ * @hw: pointer to the HW structure
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Writes specified PHY register value
+ **/
+enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 value)
+{
+ enum i40e_status_code status = I40E_ERR_TIMEOUT;
+ u8 port_num = (u8)hw->func_caps.mdio_port_num;
+ u32 command = 0;
+ u16 retry = 1000;
+
+ command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT;
+ wr32(hw, I40E_GLGEN_MSRWD(port_num), command);
+
+ command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
+ (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
+ (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) |
+ (I40E_MDIO_CLAUSE22_STCODE_MASK) |
+ (I40E_GLGEN_MSCA_MDICMD_MASK);
+
+ wr32(hw, I40E_GLGEN_MSCA(port_num), command);
+ do {
+ command = rd32(hw, I40E_GLGEN_MSCA(port_num));
+ if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) {
+ status = I40E_SUCCESS;
+ break;
+ }
+ i40e_usec_delay(10);
+ retry--;
+ } while (retry);
+
+ return status;
+}
+
+/**
+ * i40e_read_phy_register_clause45
* @hw: pointer to the HW structure
* @page: registers page number
* @reg: register address in the page
@@ -6031,9 +6116,8 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
*
* Reads specified PHY register value
**/
-enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
- u8 page, u16 reg, u8 phy_addr,
- u16 *value)
+enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value)
{
enum i40e_status_code status = I40E_ERR_TIMEOUT;
u32 command = 0;
@@ -6043,8 +6127,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) |
(page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_ADDRESS) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
wr32(hw, I40E_GLGEN_MSCA(port_num), command);
@@ -6066,8 +6150,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_READ) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
status = I40E_ERR_TIMEOUT;
@@ -6097,7 +6181,7 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
}
/**
- * i40e_write_phy_register
+ * i40e_write_phy_register_clause45
* @hw: pointer to the HW structure
* @page: registers page number
* @reg: register address in the page
@@ -6106,9 +6190,8 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
*
* Writes value to specified PHY register
**/
-enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
- u8 page, u16 reg, u8 phy_addr,
- u16 value)
+enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value)
{
enum i40e_status_code status = I40E_ERR_TIMEOUT;
u32 command = 0;
@@ -6118,8 +6201,8 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) |
(page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_ADDRESS) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
wr32(hw, I40E_GLGEN_MSCA(port_num), command);
@@ -6143,8 +6226,8 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) |
(phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) |
- (I40E_MDIO_OPCODE_WRITE) |
- (I40E_MDIO_STCODE) |
+ (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) |
+ (I40E_MDIO_CLAUSE45_STCODE_MASK) |
(I40E_GLGEN_MSCA_MDICMD_MASK) |
(I40E_GLGEN_MSCA_MDIINPROGEN_MASK);
status = I40E_ERR_TIMEOUT;
@@ -6165,6 +6248,78 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
}
/**
+ * i40e_write_phy_register
+ * @hw: pointer to the HW structure
+ * @page: registers page number
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Writes value to specified PHY register
+ **/
+enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value)
+{
+ enum i40e_status_code status;
+
+ switch (hw->device_id) {
+ case I40E_DEV_ID_1G_BASE_T_X722:
+ status = i40e_write_phy_register_clause22(hw,
+ reg, phy_addr, value);
+ break;
+ case I40E_DEV_ID_10G_BASE_T:
+ case I40E_DEV_ID_10G_BASE_T4:
+ case I40E_DEV_ID_10G_BASE_T_X722:
+ case I40E_DEV_ID_25G_B:
+ case I40E_DEV_ID_25G_SFP28:
+ status = i40e_write_phy_register_clause45(hw,
+ page, reg, phy_addr, value);
+ break;
+ default:
+ status = I40E_ERR_UNKNOWN_PHY;
+ break;
+ }
+
+ return status;
+}
+
+/**
+ * i40e_read_phy_register
+ * @hw: pointer to the HW structure
+ * @page: registers page number
+ * @reg: register address in the page
+ * @phy_adr: PHY address on MDIO interface
+ * @value: PHY register value
+ *
+ * Reads specified PHY register value
+ **/
+enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value)
+{
+ enum i40e_status_code status;
+
+ switch (hw->device_id) {
+ case I40E_DEV_ID_1G_BASE_T_X722:
+ status = i40e_read_phy_register_clause22(hw, reg, phy_addr,
+ value);
+ break;
+ case I40E_DEV_ID_10G_BASE_T:
+ case I40E_DEV_ID_10G_BASE_T4:
+ case I40E_DEV_ID_10G_BASE_T_X722:
+ case I40E_DEV_ID_25G_B:
+ case I40E_DEV_ID_25G_SFP28:
+ status = i40e_read_phy_register_clause45(hw, page, reg,
+ phy_addr, value);
+ break;
+ default:
+ status = I40E_ERR_UNKNOWN_PHY;
+ break;
+ }
+
+ return status;
+}
+
+/**
* i40e_get_phy_address
* @hw: pointer to the HW structure
* @dev_num: PHY port num that address we want
@@ -6206,14 +6361,16 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++,
led_addr++) {
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr,
+ &led_reg);
if (status)
goto phy_blinking_end;
led_ctl = led_reg;
if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) {
led_reg = 0;
- status = i40e_write_phy_register(hw,
+ status = i40e_write_phy_register_clause45(hw,
I40E_PHY_COM_REG_PAGE,
led_addr, phy_addr,
led_reg);
@@ -6225,20 +6382,18 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
if (time > 0 && interval > 0) {
for (i = 0; i < time * 1000; i += interval) {
- status = i40e_read_phy_register(hw,
- I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr,
- &led_reg);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
goto restore_config;
if (led_reg & I40E_PHY_LED_MANUAL_ON)
led_reg = 0;
else
led_reg = I40E_PHY_LED_MANUAL_ON;
- status = i40e_write_phy_register(hw,
- I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr,
- led_reg);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_reg);
if (status)
goto restore_config;
i40e_msec_delay(interval);
@@ -6246,8 +6401,9 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
}
restore_config:
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, led_ctl);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_ctl);
phy_blinking_end:
return status;
@@ -6278,8 +6434,10 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,
for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++,
temp_addr++) {
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- temp_addr, phy_addr, ®_val);
+ status = i40e_read_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ temp_addr, phy_addr,
+ ®_val);
if (status)
return status;
*val = reg_val;
@@ -6312,41 +6470,42 @@ enum i40e_status_code i40e_led_set_phy(struct i40e_hw *hw, bool on,
i = rd32(hw, I40E_PFGEN_PORTNUM);
port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK);
phy_addr = i40e_get_phy_address(hw, port_num);
-
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
return status;
led_ctl = led_reg;
if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) {
led_reg = 0;
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, led_reg);
+ status = i40e_write_phy_register_clause45(hw,
+ I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr,
+ led_reg);
if (status)
return status;
}
- status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, &led_reg);
+ status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, &led_reg);
if (status)
goto restore_config;
if (on)
led_reg = I40E_PHY_LED_MANUAL_ON;
else
led_reg = 0;
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE,
- led_addr, phy_addr, led_reg);
+ status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_reg);
if (status)
goto restore_config;
if (mode & I40E_PHY_LED_MODE_ORIG) {
led_ctl = (mode & I40E_PHY_LED_MODE_MASK);
- status = i40e_write_phy_register(hw,
+ status = i40e_write_phy_register_clause45(hw,
I40E_PHY_COM_REG_PAGE,
led_addr, phy_addr, led_ctl);
}
return status;
restore_config:
- status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr,
- phy_addr, led_ctl);
+ status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE,
+ led_addr, phy_addr, led_ctl);
return status;
}
#endif /* PF_DRIVER */
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 3aab5ca..9109cfc 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -538,10 +538,18 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
u16 *wake_reason,
struct i40e_asq_cmd_details *cmd_details);
#endif
-enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, u8 page,
- u16 reg, u8 phy_addr, u16 *value);
-enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, u8 page,
- u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
+ u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value);
+enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 *value);
+enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
+ u8 page, u16 reg, u8 phy_addr, u16 value);
u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num);
enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
u32 time, u32 interval);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index b5f72c3..5a59ce2 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -157,15 +157,22 @@ enum i40e_debug_mask {
#define I40E_PCI_LINK_SPEED_5000 0x2
#define I40E_PCI_LINK_SPEED_8000 0x3
-#define I40E_MDIO_STCODE I40E_MASK(0, \
+#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_MASK(1, \
I40E_GLGEN_MSCA_STCODE_SHIFT)
-#define I40E_MDIO_OPCODE_ADDRESS I40E_MASK(0, \
+#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_MASK(1, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_WRITE I40E_MASK(1, \
+#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_MASK(2, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_READ_INC_ADDR I40E_MASK(2, \
+
+#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_MASK(0, \
+ I40E_GLGEN_MSCA_STCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK I40E_MASK(0, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK I40E_MASK(1, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
+#define I40E_MDIO_CLAUSE45_OPCODE_READ_INC_ADDR_MASK I40E_MASK(2, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
-#define I40E_MDIO_OPCODE_READ I40E_MASK(3, \
+#define I40E_MDIO_CLAUSE45_OPCODE_READ_MASK I40E_MASK(3, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
#define I40E_PHY_COM_REG_PAGE 0x1E
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 09/31] net/i40e/base: add bus number info
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (7 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
` (22 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Currently i40e_bus_info has PCI device and function info only. However
in log messages slot number (i.e hw->bus.device) is being printed
as bus number. Another field should be added to provide bus number
info and preserve existing information.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 5a59ce2..530ee5e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -561,6 +561,7 @@ struct i40e_bus_info {
u16 func;
u16 device;
u16 lan_id;
+ u16 bus_id;
};
/* Flow control (FC) parameters */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 10/31] net/i40e/base: add protocols when discover capabilities
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (8 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 09/31] net/i40e/base: add bus number info Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 11/31] net/i40e/base: fix unknown PHYs incorrect identification Jingjing Wu
` (21 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add logical_id to I40E_AQ_CAP_ID_MNG_MODE capability starting from major
version 2.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 8 ++++++++
drivers/net/i40e/base/i40e_type.h | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 85c1c11..9591428 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3611,6 +3611,14 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
break;
case I40E_AQ_CAP_ID_MNG_MODE:
p->management_mode = number;
+ if (major_rev > 1) {
+ p->mng_protocols_over_mctp = logical_id;
+ i40e_debug(hw, I40E_DEBUG_INIT,
+ "HW Capability: Protocols over MCTP = %d\n",
+ p->mng_protocols_over_mctp);
+ } else {
+ p->mng_protocols_over_mctp = 0;
+ }
i40e_debug(hw, I40E_DEBUG_INIT,
"HW Capability: Management Mode = %d\n",
p->management_mode);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 530ee5e..223f5fe 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -366,6 +366,10 @@ struct i40e_hw_capabilities {
#define I40E_NVM_IMAGE_TYPE_UDP_CLOUD 0x3
u32 management_mode;
+ u32 mng_protocols_over_mctp;
+#define I40E_MNG_PROTOCOL_PLDM 0x2
+#define I40E_MNG_PROTOCOL_OEM_COMMANDS 0x4
+#define I40E_MNG_PROTOCOL_NCSI 0x8
u32 npar_enable;
u32 os2bmc;
u32 valid_functions;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 11/31] net/i40e/base: fix unknown PHYs incorrect identification
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (9 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 12/31] net/i40e/base: replace memcpy Jingjing Wu
` (20 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
The PHY type value for unrecognized PHYs and cables was changed
based on firmware version number. Newer hardware use lower firmware
version numbers and this was causing some PHYs to be identified
as type 0x16 instead of 0xe (unknown).
Without this patch, newer card will incorrectly identify unknown
PHYs and cables.
This change adds hardware type to the check for firmware version
so the PHY type is reported correctly.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9591428..fbaa0be 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1984,7 +1984,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
else
hw_link_info->lse_enable = false;
- if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
+ if ((hw->mac.type == I40E_MAC_XL710) &&
+ (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 12/31] net/i40e/base: replace memcpy
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (10 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 11/31] net/i40e/base: fix unknown PHYs incorrect identification Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
` (19 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
To align with current memcpy use, replace existing legacy memcpy() calls
with i40e_memcpy() calls.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 13 ++++++++-----
drivers/net/i40e/base/i40e_nvm.c | 7 ++++---
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fbaa0be..fda6c4a 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1126,7 +1126,8 @@ enum i40e_status_code i40e_get_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL);
if (flags & I40E_AQC_LAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac));
+ i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac),
+ I40E_NONDMA_TO_NONDMA);
return status;
}
@@ -1149,7 +1150,8 @@ enum i40e_status_code i40e_get_port_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
return status;
if (flags & I40E_AQC_PORT_ADDR_VALID)
- memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac));
+ i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac),
+ I40E_NONDMA_TO_NONDMA);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -1207,7 +1209,8 @@ enum i40e_status_code i40e_get_san_mac_addr(struct i40e_hw *hw,
return status;
if (flags & I40E_AQC_SAN_ADDR_VALID)
- memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac));
+ i40e_memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac),
+ I40E_NONDMA_TO_NONDMA);
else
status = I40E_ERR_INVALID_MAC_ADDR;
@@ -2760,8 +2763,8 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- memcpy(hw->phy.link_info.module_type, &abilities.module_type,
- sizeof(hw->phy.link_info.module_type));
+ i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type,
+ sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA);
}
return status;
}
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4fa1220..eb69e49 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -1423,7 +1423,8 @@ STATIC enum i40e_status_code i40e_nvmupd_exec_aq(struct i40e_hw *hw,
if (hw->nvm_buff.va) {
buff = hw->nvm_buff.va;
- memcpy(buff, &bytes[aq_desc_len], aq_data_len);
+ i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len,
+ I40E_NONDMA_TO_NONDMA);
}
}
@@ -1496,7 +1497,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
__func__, cmd->offset, cmd->offset + len);
buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset;
- memcpy(bytes, buff, len);
+ i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA);
bytes += len;
remainder -= len;
@@ -1510,7 +1511,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_result(struct i40e_hw *hw,
i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n",
__func__, start_byte, start_byte + remainder);
- memcpy(bytes, buff, remainder);
+ i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA);
}
return I40E_SUCCESS;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 13/31] net/i40e/base: deprecating unused macro
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (11 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 12/31] net/i40e/base: replace memcpy Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
` (18 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710
was supposed to be for 40G. But i40e_set_mac_type() sets
I40E_MAC_XL710 for all device IDS. I40E_MAC_X710 is not
used at all. Thus deprecating this extra macro.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 223f5fe..8889fc7 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -212,7 +212,6 @@ enum i40e_memcpy_type {
*/
enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0,
- I40E_MAC_X710,
I40E_MAC_XL710,
I40E_MAC_VF,
#ifdef X722_SUPPORT
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 14/31] net/i40e/base: remove FPK HyperV VF device ID
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (12 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
` (17 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Microsoft recently removed the requirement for VFs to use the VMBus.
The Fort Park Windows VF has been changed to use only the hardware
mailbox, so the Hyper-V VF device ID can be removed.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 1 -
drivers/net/i40e/base/i40e_devids.h | 1 -
drivers/net/i40e/i40e_ethdev_vf.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fda6c4a..b9b0ee6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -87,7 +87,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
#ifdef X722_SUPPORT
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_X722_VF:
- case I40E_DEV_ID_X722_VF_HV:
#ifdef X722_A0_SUPPORT
case I40E_DEV_ID_X722_A0_VF:
#endif
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 8bd5793..19bb376 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -70,7 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_SFP_I_X722 0x37D3
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
-#define I40E_DEV_ID_X722_VF_HV 0x37D9
#endif /* VF_DRIVER */
#endif /* X722_SUPPORT */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 4a0caac..12da0ec 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1087,7 +1087,6 @@ static const struct rte_pci_id pci_id_i40evf_map[] = {
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) },
- { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) },
{ .vendor_id = 0, /* sentinel */ },
};
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 15/31] net/i40e/base: add FEC bits to PHY capabilities
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (13 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
` (16 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add FEC bits to the PHY capabilities AQ command struct. This is required
for 25GbE support. Change the name of the generic mod_type_ext field to
indicate that it is now used for handling FEC.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 13 ++++++++++++-
drivers/net/i40e/base/i40e_common.c | 2 ++
drivers/net/i40e/i40e_ethdev.c | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4f06772..1884758 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1785,7 +1785,16 @@ struct i40e_aq_get_phy_abilities_resp {
#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
- u8 mod_type_ext;
+ u8 fec_cfg_curr_mod_ext_info;
+#define I40E_AQ_ENABLE_FEC_KR 0x01
+#define I40E_AQ_ENABLE_FEC_RS 0x02
+#define I40E_AQ_REQUEST_FEC_KR 0x04
+#define I40E_AQ_REQUEST_FEC_RS 0x08
+#define I40E_AQ_ENABLE_FEC_AUTO 0x10
+#define I40E_AQ_FEC
+#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0
+#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5
+
u8 ext_comp_code;
u8 phy_id[4];
u8 module_type[3];
@@ -1819,6 +1828,8 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#define I40E_AQ_SET_FEC_REQUEST_KR (1 << 2)
#define I40E_AQ_SET_FEC_REQUEST_RS (1 << 3)
#define I40E_AQ_SET_FEC_AUTO (1 << 4)
+#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0
+#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT)
u8 reserved;
};
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index b9b0ee6..9f4b872 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1800,6 +1800,8 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
config.eee_capability = abilities.eee_capability;
config.eeer = abilities.eeer_val;
config.low_power_ctrl = abilities.d3_lpan;
+ config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+ I40E_AQ_PHY_FEC_CONFIG_MASK;
status = i40e_aq_set_phy_config(hw, &config, NULL);
if (status)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 319761f..b2f827c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1629,7 +1629,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
/* use get_phy_abilities_resp value for the rest */
phy_conf.phy_type = phy_ab.phy_type;
phy_conf.phy_type_ext = phy_ab.phy_type_ext;
- phy_conf.fec_config = phy_ab.mod_type_ext;
+ phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
phy_conf.eee_capability = phy_ab.eee_capability;
phy_conf.eeer = phy_ab.eeer_val;
phy_conf.low_power_ctrl = phy_ab.d3_lpan;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 16/31] net/i40e/base: use BIT() macro instead of bit fields
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (14 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
` (15 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 1884758..cef02b1 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1823,11 +1823,11 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_config;
-#define I40E_AQ_SET_FEC_ABILITY_KR (1 << 0)
-#define I40E_AQ_SET_FEC_ABILITY_RS (1 << 1)
-#define I40E_AQ_SET_FEC_REQUEST_KR (1 << 2)
-#define I40E_AQ_SET_FEC_REQUEST_RS (1 << 3)
-#define I40E_AQ_SET_FEC_AUTO (1 << 4)
+#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0)
+#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1)
+#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2)
+#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3)
+#define I40E_AQ_SET_FEC_AUTO BIT(4)
#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0
#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT)
u8 reserved;
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 17/31] net/i40e/base: adjust 25G PHY type values
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (15 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
` (14 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Define the values for the 25G PHY type bit-fields that match
reported values from firmware. There was a gap in the bit
fields but no corresponding gap i40e_aq_phy_type enum.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 8889fc7..206e95a 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -338,10 +338,22 @@ struct i40e_phy_info {
#define I40E_CAP_PHY_TYPE_1000BASE_T_OPTICAL \
BIT_ULL(I40E_PHY_TYPE_1000BASE_T_OPTICAL)
#define I40E_CAP_PHY_TYPE_20GBASE_KR2 BIT_ULL(I40E_PHY_TYPE_20GBASE_KR2)
-#define I40E_CAP_PHY_TYPE_25GBASE_KR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_KR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_CR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_CR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_SR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_SR + 32)
-#define I40E_CAP_PHY_TYPE_25GBASE_LR BIT_ULL(I40E_AQ_PHY_TYPE_EXT_25G_LR + 32)
+/*
+ * Defining the macro I40E_TYPE_OFFSET to implement a bit shift for some
+ * PHY types. There is an unused bit (31) in the I40E_CAP_PHY_TYPE_* bit
+ * fields but no corresponding gap in the i40e_aq_phy_type enumeration. So,
+ * a shift is needed to adjust for this with values larger than 31. The
+ * only affected values are I40E_PHY_TYPE_25GBASE_*.
+ */
+#define I40E_PHY_TYPE_OFFSET 1
+#define I40E_CAP_PHY_TYPE_25GBASE_KR BIT_ULL(I40E_PHY_TYPE_25GBASE_KR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_CR BIT_ULL(I40E_PHY_TYPE_25GBASE_CR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_SR BIT_ULL(I40E_PHY_TYPE_25GBASE_SR + \
+ I40E_PHY_TYPE_OFFSET)
+#define I40E_CAP_PHY_TYPE_25GBASE_LR BIT_ULL(I40E_PHY_TYPE_25GBASE_LR + \
+ I40E_PHY_TYPE_OFFSET)
#define I40E_HW_CAP_MAX_GPIO 30
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 18/31] net/i40e/base: implement clear all WoL filters
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (16 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
` (13 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch implements the clear Wake on LAN (WoL) filters admin queue
function which clears out ALL WoL patterns programmed into
the flex filters.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 1 +
drivers/net/i40e/base/i40e_common.c | 20 ++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 2 ++
3 files changed, 23 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index cef02b1..19af8b5 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -156,6 +156,7 @@ enum i40e_admin_queue_opc {
/* WoL commands */
i40e_aqc_opc_set_wol_filter = 0x0120,
i40e_aqc_opc_get_wake_reason = 0x0121,
+ i40e_aqc_opc_clear_all_wol_filters = 0x025E,
#endif
/* internal switch commands */
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9f4b872..bae9079 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6900,4 +6900,24 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
return status;
}
+/**
+* i40e_aq_clear_all_wol_filters
+* @hw: pointer to the hw struct
+* @cmd_details: pointer to command details structure or NULL
+*
+* Get information for the reason of a Wake Up event
+**/
+enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ enum i40e_status_code status;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_clear_all_wol_filters);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
#endif /* X722_SUPPORT */
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 9109cfc..4de96b5 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -537,6 +537,8 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
u16 *wake_reason,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
+ struct i40e_asq_cmd_details *cmd_details);
#endif
enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 19/31] net/i40e/base: implement set VSI full promisc mode
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (17 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 20/31] net/i40e/base: fix wol failure on PF reset Jingjing Wu
` (12 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch implements a function to set a VSI to broadcast, multicast, and
unicast promiscuous mode all at once. This is specifically needed to set
the WoL/Proxy VSI created by FW to full promiscuous mode during power down
for WoL patterns and protocol offloads to function properly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 37 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 3 +++
2 files changed, 40 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index bae9079..1095e68 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2354,6 +2354,43 @@ enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous(struct i40e_hw *hw,
}
/**
+* i40e_aq_set_vsi_full_promiscuous
+* @hw: pointer to the hw struct
+* @seid: VSI number
+* @set: set promiscuous enable/disable
+* @cmd_details: pointer to command details structure or NULL
+**/
+enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw,
+ u16 seid, bool set,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
+ (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ if (set)
+ flags = I40E_AQC_SET_VSI_PROMISC_UNICAST |
+ I40E_AQC_SET_VSI_PROMISC_MULTICAST |
+ I40E_AQC_SET_VSI_PROMISC_BROADCAST;
+
+ cmd->promiscuous_flags = CPU_TO_LE16(flags);
+
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST |
+ I40E_AQC_SET_VSI_PROMISC_MULTICAST |
+ I40E_AQC_SET_VSI_PROMISC_BROADCAST);
+
+ cmd->seid = CPU_TO_LE16(seid);
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_mc_promisc_on_vlan
* @hw: pointer to the hw struct
* @seid: vsi number
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 4de96b5..98f5689 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -172,6 +172,9 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
bool rx_only_promisc);
enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous(struct i40e_hw *hw,
u16 vsi_id, bool set, struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw,
+ u16 seid, bool set,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
u16 seid, bool enable, u16 vid,
struct i40e_asq_cmd_details *cmd_details);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 20/31] net/i40e/base: fix wol failure on PF reset
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (18 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
` (11 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
By default the device clears all MAC filter information on PF Reset.
However, this will cause Wake-On-LAN to fail because the wake filters
are deleted on transition to D3 power state. To get around this,
firmware is adding functionality to preserve certain MAC filters during
PFR. These bits allow the driver tell the FW which filters to preserve.
Set the datalen field and add I40E_AQ_FLAG_BUF/I40E_AQ_FLAG_RD flags in the
desc struct for the WoL/Proxy AQ descriptors. The WoL/Proxy AQ commands
were failing because these were missing.
Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 5 ++++-
drivers/net/i40e/base/i40e_common.c | 16 +++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 19af8b5..d4d2a7a 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -541,7 +541,8 @@ struct i40e_aqc_mac_address_read {
#define I40E_AQC_PORT_ADDR_VALID 0x40
#define I40E_AQC_WOL_ADDR_VALID 0x80
#define I40E_AQC_MC_MAG_EN_VALID 0x100
-#define I40E_AQC_ADDR_VALID_MASK 0x1F0
+#define I40E_AQC_WOL_PRESERVE_STATUS 0x200
+#define I40E_AQC_ADDR_VALID_MASK 0x3F0
u8 reserved[6];
__le32 addr_high;
__le32 addr_low;
@@ -562,6 +563,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_address_read_data);
struct i40e_aqc_mac_address_write {
__le16 command_flags;
#define I40E_AQC_MC_MAG_EN 0x0100
+#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200
#define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000
#define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000
#define I40E_AQC_WRITE_TYPE_PORT 0x8000
@@ -601,6 +603,7 @@ struct i40e_aqc_set_wol_filter {
__le16 cmd_flags;
#define I40E_AQC_SET_WOL_FILTER 0x8000
#define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000
+#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000
#define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0
#define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1
__le16 valid_flags;
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 1095e68..e9376dd 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6804,10 +6804,13 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
desc.params.external.addr_high =
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
+ desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
status = i40e_asq_send_command(hw, &desc, proxy_config,
sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6838,10 +6841,13 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_ns_proxy_table_entry);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
desc.params.external.addr_high =
CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
+ desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6888,9 +6894,11 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
if (set_filter) {
if (!filter)
return I40E_ERR_PARAM;
+
cmd_flags |= I40E_AQC_SET_WOL_FILTER;
- buff_len = sizeof(*filter);
+ cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR;
}
+
if (no_wol_tco)
cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL;
cmd->cmd_flags = CPU_TO_LE16(cmd_flags);
@@ -6901,6 +6909,12 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID;
cmd->valid_flags = CPU_TO_LE16(valid_flags);
+ buff_len = sizeof(*filter);
+ desc.datalen = buff_len;
+
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
+
cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter));
cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter));
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 21/31] net/i40e/base: save link FEC info from link up event
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (19 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 20/31] net/i40e/base: fix wol failure on PF reset Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 22/31] net/i40e/base: fix NVM access intefering Jingjing Wu
` (10 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Store the FEC status bits from the link up event into the
hw_link_info structure.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 2 ++
drivers/net/i40e/base/i40e_type.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e9376dd..17b53ae 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1961,6 +1961,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed;
hw_link_info->link_info = resp->link_info;
hw_link_info->an_info = resp->an_info;
+ hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA |
+ I40E_AQ_CONFIG_FEC_RS_ENA);
hw_link_info->ext_info = resp->ext_info;
hw_link_info->loopback = resp->loopback;
hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 206e95a..99e080e 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -272,6 +272,7 @@ struct i40e_link_status {
enum i40e_aq_link_speed link_speed;
u8 link_info;
u8 an_info;
+ u8 fec_info;
u8 ext_info;
u8 loopback;
/* is Link Status Event notification to SW enabled */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 22/31] net/i40e/base: fix NVM access intefering
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (20 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 23/31] net/i40e/base: change shift values to hex Jingjing Wu
` (9 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
Acquire NVM lock before reads on all devices. Previously, locks were
only used for X722 and later. Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index eb69e49..1f345a5 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -219,19 +219,19 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
+ ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+ if (!ret_code) {
#ifdef X722_SUPPORT
- if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
- ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
- if (!ret_code) {
+ if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
- i40e_release_nvm(hw);
+ } else {
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
- } else {
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
- }
#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
+ ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
#endif
+ i40e_release_nvm(hw);
+ }
return ret_code;
}
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 23/31] net/i40e/base: change shift values to hex
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (21 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 22/31] net/i40e/base: fix NVM access intefering Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
` (8 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 99e080e..3784c8f 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -365,9 +365,9 @@ enum i40e_acpi_programming_method {
I40E_ACPI_PROGRAMMING_METHOD_AQC_FPK = 1
};
-#define I40E_WOL_SUPPORT_MASK 1
-#define I40E_ACPI_PROGRAMMING_METHOD_MASK (1 << 1)
-#define I40E_PROXY_SUPPORT_MASK (1 << 2)
+#define I40E_WOL_SUPPORT_MASK 0x1
+#define I40E_ACPI_PROGRAMMING_METHOD_MASK 0x2
+#define I40E_PROXY_SUPPORT_MASK 0x4
#endif
/* Capabilities of a PF or a VF or the whole device */
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 24/31] net/i40e/base: comment that udp port must be in Host order
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (22 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 23/31] net/i40e/base: change shift values to hex Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
` (7 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
The firmware expects the Port number to be in Little Endian format, and
the i40e_aq_add_udp_tunnel command clearly expects the udp_port variable
to be in Host order, as it uses CPU_TO_LE16(). It was recently
discovered in the Linux driver that we were passing a Big Endian port
number, which was therefor not enabling the UDP tunnel correctly.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 17b53ae..852cbf7 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4419,11 +4419,15 @@ enum i40e_status_code i40e_aq_start_stop_dcbx(struct i40e_hw *hw,
/**
* i40e_aq_add_udp_tunnel
* @hw: pointer to the hw struct
- * @udp_port: the UDP port to add
+ * @udp_port: the UDP port to add in Host byte order
* @header_len: length of the tunneling header length in DWords
* @protocol_index: protocol index type
* @filter_index: pointer to filter index
* @cmd_details: pointer to command details structure or NULL
+ *
+ * Note: Firmware expects the udp_port value to be in Little Endian format,
+ * and this function will call CPU_TO_LE16 to convert from Host byte order to
+ * Little Endian order.
**/
enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw,
u16 udp_port, u8 protocol_index,
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 25/31] net/i40e/base: remove duplicate definitions
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (23 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
` (6 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
We already define I40E_AQ_PHY_TYPE_EXT_25G* flags in the response adminq
structure above, and do not need to re-define these.
While we are here, replace 0X with 0x as normal style.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index d4d2a7a..4e00516 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1785,8 +1785,8 @@ struct i40e_aq_get_phy_abilities_resp {
u8 d3_lpan;
#define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
u8 phy_type_ext;
-#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01
-#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
+#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01
+#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02
#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_cfg_curr_mod_ext_info;
@@ -1822,10 +1822,6 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
__le32 eeer;
u8 low_power_ctrl;
u8 phy_type_ext;
-#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01
-#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02
-#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04
-#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08
u8 fec_config;
#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0)
#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1)
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 26/31] net/i40e/base: add ERROR state for NVM update state machine
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (24 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
` (5 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
This patch adds I40E_NVMUPD_STATE_ERROR state for NVM update.
Without this patch driver has no possibility to return NVM image write
failure.This state is being set when ARQ rises error.
arq_last_status is also updated every time when ARQ event comes,
not only on error cases.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 4 ++--
drivers/net/i40e/base/i40e_nvm.c | 17 +++++++++++++++++
drivers/net/i40e/base/i40e_type.h | 2 ++
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 0d3a83f..5bdf3f7 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -1077,11 +1077,11 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,
desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc);
desc_idx = ntc;
+ hw->aq.arq_last_status =
+ (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval);
flags = LE16_TO_CPU(desc->flags);
if (flags & I40E_AQ_FLAG_ERR) {
ret_code = I40E_ERR_ADMIN_QUEUE_ERROR;
- hw->aq.arq_last_status =
- (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval);
i40e_debug(hw,
I40E_DEBUG_AQ_MESSAGE,
"AQRX: Event received with error 0x%X.\n",
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 1f345a5..4f4a645 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -901,9 +901,20 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,
*((u16 *)&bytes[2]) = hw->nvm_wait_opcode;
}
+ /* Clear error status on read */
+ if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR)
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+
return I40E_SUCCESS;
}
+ /* Clear status even it is not read and log */
+ if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) {
+ i40e_debug(hw, I40E_DEBUG_NVM,
+ "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n");
+ hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT:
status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno);
@@ -1253,6 +1264,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_writing(struct i40e_hw *hw,
void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)
{
if (opcode == hw->nvm_wait_opcode) {
+
i40e_debug(hw, I40E_DEBUG_NVM,
"NVMUPD: clearing wait on opcode 0x%04x\n", opcode);
if (hw->nvm_release_on_done) {
@@ -1261,6 +1273,11 @@ void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)
}
hw->nvm_wait_opcode = 0;
+ if (hw->aq.arq_last_status) {
+ hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR;
+ return;
+ }
+
switch (hw->nvmupd_state) {
case I40E_NVMUPD_STATE_INIT_WAIT:
hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 3784c8f..56e47ea 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -499,6 +499,7 @@ enum i40e_nvmupd_state {
I40E_NVMUPD_STATE_WRITING,
I40E_NVMUPD_STATE_INIT_WAIT,
I40E_NVMUPD_STATE_WRITE_WAIT,
+ I40E_NVMUPD_STATE_ERROR
};
/* nvm_access definition and its masks/shifts need to be accessible to
@@ -1526,6 +1527,7 @@ struct i40e_hw_port_stats {
#define I40E_SR_EMPR_REGS_AUTO_LOAD_PTR 0x3A
#define I40E_SR_GLOBR_REGS_AUTO_LOAD_PTR 0x3B
#define I40E_SR_CORER_REGS_AUTO_LOAD_PTR 0x3C
+#define I40E_SR_PHY_ACTIVITY_LIST_PTR 0x3D
#define I40E_SR_PCIE_ALT_AUTO_LOAD_PTR 0x3E
#define I40E_SR_SW_CHECKSUM_WORD 0x3F
#define I40E_SR_1ST_FREE_PROVISION_AREA_PTR 0x40
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 27/31] net/i40e/base: add broadcast promiscuous control per VLAN
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (25 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 28/31] net/i40e/base: fix division by zero Jingjing Wu
` (4 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Add a new adminq function that allows driver to configure per-VLAN
broadcast promiscuous mode, similar to how we handle unicast and
multicast promiscuous modes.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 34 ++++++++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 3 +++
2 files changed, 37 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 852cbf7..14aaac6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2461,6 +2461,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
}
/**
+ * i40e_aq_set_vsi_bc_promisc_on_vlan
+ * @hw: pointer to the hw struct
+ * @seid: vsi number
+ * @enable: set broadcast promiscuous enable/disable for a given VLAN
+ * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag
+ * @cmd_details: pointer to command details structure or NULL
+ **/
+enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw,
+ u16 seid, bool enable, u16 vid,
+ struct i40e_asq_cmd_details *cmd_details)
+{
+ struct i40e_aq_desc desc;
+ struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
+ (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ if (enable)
+ flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST;
+
+ cmd->promiscuous_flags = CPU_TO_LE16(flags);
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST);
+ cmd->seid = CPU_TO_LE16(seid);
+ cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_broadcast
* @hw: pointer to the hw struct
* @seid: vsi number
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 98f5689..ed6cdd6 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -181,6 +181,9 @@ enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
u16 seid, bool enable, u16 vid,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw,
+ u16 seid, bool enable, u16 vid,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
u16 seid, bool enable,
struct i40e_asq_cmd_details *cmd_details);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 28/31] net/i40e/base: fix division by zero
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (26 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 29/31] net/i40e/base: fix byte order Jingjing Wu
` (3 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
For some cases when reading from device are incorrect or image is
incorrect, this part of code causes crash due to division by zero.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 14aaac6..fdf9d9b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3967,8 +3967,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
/* partition id is 1-based, and functions are evenly spread
* across the ports as partitions
*/
- hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
- hw->num_partitions = num_functions / hw->num_ports;
+ if (hw->num_ports != 0) {
+ hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
+ hw->num_partitions = num_functions / hw->num_ports;
+ }
/* additional HW specific goodies that might
* someday be HW version specific
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 29/31] net/i40e/base: fix byte order
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (27 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 28/31] net/i40e/base: fix division by zero Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 30/31] net/i40e/base: remove unused macro Jingjing Wu
` (2 subsequent siblings)
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang, stable
Big Endian platform will accidentally send the wrong
data to the firmware command. This patch fixes the issue.
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
CC: stable@dpdk.org
---
drivers/net/i40e/base/i40e_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index fdf9d9b..6a0362d 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6852,7 +6852,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
- desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data));
status = i40e_asq_send_command(hw, &desc, proxy_config,
sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6889,7 +6889,7 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
desc.params.external.addr_low =
CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
- desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
+ desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data));
status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6952,7 +6952,7 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
cmd->valid_flags = CPU_TO_LE16(valid_flags);
buff_len = sizeof(*filter);
- desc.datalen = buff_len;
+ desc.datalen = CPU_TO_LE16(buff_len);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 30/31] net/i40e/base: remove unused macro
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (28 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 29/31] net/i40e/base: fix byte order Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 31/31] net/i40e: remove unused macro from PMD Jingjing Wu
2016-12-12 10:32 ` [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update Ferruh Yigit
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
remove X722_SUPPORT and I40E_NDIS_SUPPORT MACROs
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 14 -----------
drivers/net/i40e/base/i40e_common.c | 18 +-------------
drivers/net/i40e/base/i40e_devids.h | 2 --
drivers/net/i40e/base/i40e_nvm.c | 16 -------------
drivers/net/i40e/base/i40e_prototype.h | 6 -----
drivers/net/i40e/base/i40e_register.h | 2 --
drivers/net/i40e/base/i40e_type.h | 42 ---------------------------------
7 files changed, 1 insertion(+), 99 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4e00516..67cef7c 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -139,12 +139,10 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_list_func_capabilities = 0x000A,
i40e_aqc_opc_list_dev_capabilities = 0x000B,
-#ifdef X722_SUPPORT
/* Proxy commands */
i40e_aqc_opc_set_proxy_config = 0x0104,
i40e_aqc_opc_set_ns_proxy_table_entry = 0x0105,
-#endif
/* LAA */
i40e_aqc_opc_mac_address_read = 0x0107,
i40e_aqc_opc_mac_address_write = 0x0108,
@@ -152,13 +150,11 @@ enum i40e_admin_queue_opc {
/* PXE */
i40e_aqc_opc_clear_pxe_mode = 0x0110,
-#ifdef X722_SUPPORT
/* WoL commands */
i40e_aqc_opc_set_wol_filter = 0x0120,
i40e_aqc_opc_get_wake_reason = 0x0121,
i40e_aqc_opc_clear_all_wol_filters = 0x025E,
-#endif
/* internal switch commands */
i40e_aqc_opc_get_switch_config = 0x0200,
i40e_aqc_opc_add_statistics = 0x0201,
@@ -283,12 +279,10 @@ enum i40e_admin_queue_opc {
/* Tunnel commands */
i40e_aqc_opc_add_udp_tunnel = 0x0B00,
i40e_aqc_opc_del_udp_tunnel = 0x0B01,
-#ifdef X722_SUPPORT
i40e_aqc_opc_set_rss_key = 0x0B02,
i40e_aqc_opc_set_rss_lut = 0x0B03,
i40e_aqc_opc_get_rss_key = 0x0B04,
i40e_aqc_opc_get_rss_lut = 0x0B05,
-#endif
/* Async Events */
i40e_aqc_opc_event_lan_overflow = 0x1001,
@@ -587,7 +581,6 @@ struct i40e_aqc_clear_pxe {
I40E_CHECK_CMD_LENGTH(i40e_aqc_clear_pxe);
-#ifdef X722_SUPPORT
/* Set WoL Filter (0x0120) */
struct i40e_aqc_set_wol_filter {
@@ -639,7 +632,6 @@ struct i40e_aqc_get_wake_reason_completion {
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_wake_reason_completion);
-#endif /* X722_SUPPORT */
/* Switch configuration commands (0x02xx) */
/* Used by many indirect commands that only pass an seid and a buffer in the
@@ -944,16 +936,12 @@ struct i40e_aqc_vsi_properties_data {
I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT)
/* queueing option section */
u8 queueing_opt_flags;
-#ifdef X722_SUPPORT
#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04
#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08
-#endif
#define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10
#define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20
-#ifdef X722_SUPPORT
#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00
#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40
-#endif
u8 queueing_opt_reserved[3];
/* scheduler section */
u8 up_enable_bits;
@@ -2427,7 +2415,6 @@ struct i40e_aqc_del_udp_tunnel_completion {
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion);
-#ifdef X722_SUPPORT
struct i40e_aqc_get_set_rss_key {
#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15)
@@ -2468,7 +2455,6 @@ struct i40e_aqc_get_set_rss_lut {
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut);
-#endif
/* tunnel key structure 0x0B10 */
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 6a0362d..b8d8165 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -71,7 +71,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_25G_SFP28:
hw->mac.type = I40E_MAC_XL710;
break;
-#ifdef X722_SUPPORT
#ifdef X722_A0_SUPPORT
case I40E_DEV_ID_X722_A0:
#endif
@@ -83,8 +82,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_SFP_I_X722:
hw->mac.type = I40E_MAC_X722;
break;
-#endif
-#ifdef X722_SUPPORT
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_X722_VF:
#ifdef X722_A0_SUPPORT
@@ -93,7 +90,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
hw->mac.type = I40E_MAC_X722_VF;
break;
#endif /* INTEGRATED_VF || VF_DRIVER */
-#endif /* X722_SUPPORT */
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
case I40E_DEV_ID_VF:
case I40E_DEV_ID_VF_HV:
@@ -113,7 +109,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
return status;
}
-#ifndef I40E_NDIS_SUPPORT
/**
* i40e_aq_str - convert AQ err code to a string
* @hw: pointer to the HW structure
@@ -320,7 +315,6 @@ const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err)
return hw->err_str;
}
-#endif /* I40E_NDIS_SUPPORT */
/**
* i40e_debug_aq
* @hw: debug mask related to admin queue
@@ -446,7 +440,6 @@ enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw,
return status;
}
-#ifdef X722_SUPPORT
/**
* i40e_aq_get_set_rss_lut
@@ -605,7 +598,6 @@ enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw,
{
return i40e_aq_get_set_rss_key(hw, vsi_id, key, true);
}
-#endif /* X722_SUPPORT */
/* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the
* hardware to a bit-field that can be used by SW to more easily determine the
@@ -1021,9 +1013,7 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
switch (hw->mac.type) {
case I40E_MAC_XL710:
-#ifdef X722_SUPPORT
case I40E_MAC_X722:
-#endif
break;
default:
return I40E_ERR_DEVICE_NOT_SUPPORTED;
@@ -1043,11 +1033,9 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
else
hw->pf_id = (u8)(func_rid & 0x7);
-#ifdef X722_SUPPORT
if (hw->mac.type == I40E_MAC_X722)
hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE;
-#endif
status = i40e_init_nvm(hw);
return status;
}
@@ -3916,7 +3904,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
if (number & I40E_NVM_MGMT_UPDATE_DISABLED)
p->update_disabled = true;
break;
-#ifdef X722_SUPPORT
case I40E_AQ_CAP_ID_WOL_AND_PROXY:
hw->num_wol_proxy_filters = (u16)number;
hw->wol_proxy_vsi_seid = (u16)logical_id;
@@ -3930,7 +3917,6 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
"HW Capability: WOL proxy filters = %d\n",
hw->num_wol_proxy_filters);
break;
-#endif
default:
break;
}
@@ -6823,7 +6809,6 @@ enum i40e_status_code i40e_vf_reset(struct i40e_hw *hw)
I40E_SUCCESS, NULL, 0, NULL);
}
#endif /* VF_DRIVER */
-#ifdef X722_SUPPORT
/**
* i40e_aq_set_arp_proxy_config
@@ -7012,5 +6997,4 @@ enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
-}
-#endif /* X722_SUPPORT */
+}
\ No newline at end of file
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 19bb376..4546689 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -55,7 +55,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_VF 0x154C
#define I40E_DEV_ID_VF_HV 0x1571
#endif /* VF_DRIVER */
-#ifdef X722_SUPPORT
#ifdef X722_A0_SUPPORT
#define I40E_DEV_ID_X722_A0 0x374C
#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
@@ -71,7 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
#endif /* VF_DRIVER */
-#endif /* X722_SUPPORT */
#define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \
(d) == I40E_DEV_ID_QSFP_B || \
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4f4a645..e896502 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -221,15 +221,11 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
if (!ret_code) {
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
} else {
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
}
-#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#endif
i40e_release_nvm(hw);
}
return ret_code;
@@ -249,14 +245,10 @@ enum i40e_status_code __i40e_read_nvm_word(struct i40e_hw *hw,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
else
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#else
- ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-#endif
return ret_code;
}
@@ -348,14 +340,10 @@ enum i40e_status_code __i40e_read_nvm_buffer(struct i40e_hw *hw,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, data);
else
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#else
- ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#endif
return ret_code;
}
@@ -375,7 +363,6 @@ enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
{
enum i40e_status_code ret_code = I40E_SUCCESS;
-#ifdef X722_SUPPORT
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
if (!ret_code) {
@@ -386,9 +373,6 @@ enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
} else {
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
}
-#else
- ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
-#endif
return ret_code;
}
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index ed6cdd6..109d3c5 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -78,7 +78,6 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,
void i40e_idle_aq(struct i40e_hw *hw);
bool i40e_check_asq_alive(struct i40e_hw *hw);
enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
-#ifdef X722_SUPPORT
enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 seid,
bool pf_lut, u8 *lut, u16 lut_size);
@@ -90,11 +89,8 @@ enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw,
enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw,
u16 seid,
struct i40e_aqc_get_set_rss_key_data *key);
-#endif
-#ifndef I40E_NDIS_SUPPORT
const char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err);
const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err);
-#endif /* I40E_NDIS_SUPPORT */
#ifdef PF_DRIVER
@@ -527,7 +523,6 @@ enum i40e_status_code i40e_aq_rx_ctl_write_register(struct i40e_hw *hw,
u32 reg_addr, u32 reg_val,
struct i40e_asq_cmd_details *cmd_details);
void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val);
-#ifdef X722_SUPPORT
enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
struct i40e_aqc_arp_proxy_data *proxy_config,
struct i40e_asq_cmd_details *cmd_details);
@@ -545,7 +540,6 @@ enum i40e_status_code i40e_aq_get_wake_event_reason(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details);
-#endif
enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw,
u16 reg, u8 phy_addr, u16 *value);
enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw,
diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index fd0a723..3a305b6 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -3401,7 +3401,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_VFQF_HREGION_OVERRIDE_ENA_7_MASK I40E_MASK(0x1, I40E_VFQF_HREGION_OVERRIDE_ENA_7_SHIFT)
#define I40E_VFQF_HREGION_REGION_7_SHIFT 29
#define I40E_VFQF_HREGION_REGION_7_MASK I40E_MASK(0x7, I40E_VFQF_HREGION_REGION_7_SHIFT)
-#ifdef X722_SUPPORT
#ifdef PF_DRIVER
#define I40E_MNGSB_FDCRC 0x000B7050 /* Reset: POR */
@@ -5366,5 +5365,4 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_SHIFT 20
#define I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_MASK I40E_MASK(0xFFF, I40E_VFPE_WQEALLOC1_WQE_DESC_INDEX_SHIFT)
-#endif /* X722_SUPPORT */
#endif /* _I40E_REGISTER_H_ */
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 56e47ea..590d97c 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -196,9 +196,7 @@ enum i40e_memcpy_type {
I40E_DMA_TO_NONDMA
};
-#ifdef X722_SUPPORT
#define I40E_FW_API_VERSION_MINOR_X722 0x0005
-#endif
#define I40E_FW_API_VERSION_MINOR_X710 0x0005
@@ -214,10 +212,8 @@ enum i40e_mac_type {
I40E_MAC_UNKNOWN = 0,
I40E_MAC_XL710,
I40E_MAC_VF,
-#ifdef X722_SUPPORT
I40E_MAC_X722,
I40E_MAC_X722_VF,
-#endif
I40E_MAC_GENERIC,
};
@@ -359,7 +355,6 @@ struct i40e_phy_info {
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
-#ifdef X722_SUPPORT
enum i40e_acpi_programming_method {
I40E_ACPI_PROGRAMMING_METHOD_HW_FVL = 0,
I40E_ACPI_PROGRAMMING_METHOD_AQC_FPK = 1
@@ -369,7 +364,6 @@ enum i40e_acpi_programming_method {
#define I40E_ACPI_PROGRAMMING_METHOD_MASK 0x2
#define I40E_PROXY_SUPPORT_MASK 0x4
-#endif
/* Capabilities of a PF or a VF or the whole device */
struct i40e_hw_capabilities {
u32 switch_mode;
@@ -437,11 +431,9 @@ struct i40e_hw_capabilities {
u32 enabled_tcmap;
u32 maxtc;
u64 wr_csr_prot;
-#ifdef X722_SUPPORT
bool apm_wol_support;
enum i40e_acpi_programming_method acpi_prog_method;
bool proxy_support;
-#endif
};
struct i40e_mac_info {
@@ -703,30 +695,22 @@ struct i40e_hw {
struct i40e_dcbx_config remote_dcbx_config; /* Peer Cfg */
struct i40e_dcbx_config desired_dcbx_config; /* CEE Desired Cfg */
-#ifdef X722_SUPPORT
/* WoL and proxy support */
u16 num_wol_proxy_filters;
u16 wol_proxy_vsi_seid;
-#endif
#define I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE BIT_ULL(0)
u64 flags;
/* debug mask */
u32 debug_mask;
-#ifndef I40E_NDIS_SUPPORT
char err_str[16];
-#endif /* I40E_NDIS_SUPPORT */
};
STATIC INLINE bool i40e_is_vf(struct i40e_hw *hw)
{
-#ifdef X722_SUPPORT
return (hw->mac.type == I40E_MAC_VF ||
hw->mac.type == I40E_MAC_X722_VF);
-#else
- return hw->mac.type == I40E_MAC_VF;
-#endif
}
struct i40e_driver_version {
@@ -830,11 +814,7 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_CRCP_SHIFT = 4,
I40E_RX_DESC_STATUS_TSYNINDX_SHIFT = 5, /* 2 BITS */
I40E_RX_DESC_STATUS_TSYNVALID_SHIFT = 7,
-#ifdef X722_SUPPORT
I40E_RX_DESC_STATUS_EXT_UDP_0_SHIFT = 8,
-#else
- I40E_RX_DESC_STATUS_RESERVED1_SHIFT = 8,
-#endif
I40E_RX_DESC_STATUS_UMBCAST_SHIFT = 9, /* 2 BITS */
I40E_RX_DESC_STATUS_FLM_SHIFT = 11,
@@ -842,11 +822,7 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_LPBK_SHIFT = 14,
I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15,
I40E_RX_DESC_STATUS_RESERVED2_SHIFT = 16, /* 2 BITS */
-#ifdef X722_SUPPORT
I40E_RX_DESC_STATUS_INT_UDP_0_SHIFT = 18,
-#else
- I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18,
-#endif
I40E_RX_DESC_STATUS_LAST /* this entry must be last!!! */
};
@@ -1224,10 +1200,8 @@ enum i40e_tx_ctx_desc_eipt_offload {
#define I40E_TXD_CTX_QW0_DECTTL_MASK (0xFULL << \
I40E_TXD_CTX_QW0_DECTTL_SHIFT)
-#ifdef X722_SUPPORT
#define I40E_TXD_CTX_QW0_L4T_CS_SHIFT 23
#define I40E_TXD_CTX_QW0_L4T_CS_MASK BIT_ULL(I40E_TXD_CTX_QW0_L4T_CS_SHIFT)
-#endif
struct i40e_nop_desc {
__le64 rsvd;
__le64 dtype_cmd;
@@ -1264,38 +1238,24 @@ struct i40e_filter_program_desc {
/* Packet Classifier Types for filters */
enum i40e_filter_pctype {
-#ifdef X722_SUPPORT
/* Note: Values 0-28 are reserved for future use.
* Value 29, 30, 32 are not supported on XL710 and X710.
*/
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
-#else
- /* Note: Values 0-30 are reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
-#ifdef X722_SUPPORT
I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
-#else
- /* Note: Value 32 is reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
I40E_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
I40E_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
I40E_FILTER_PCTYPE_FRAG_IPV4 = 36,
-#ifdef X722_SUPPORT
/* Note: Values 37-38 are reserved for future use.
* Value 39, 40, 42 are not supported on XL710 and X710.
*/
I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
-#else
- /* Note: Values 37-40 are reserved for future use */
-#endif
I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
-#ifdef X722_SUPPORT
I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
-#endif
I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
@@ -1350,12 +1310,10 @@ enum i40e_filter_program_desc_pcmd {
I40E_TXD_FLTR_QW1_CMD_SHIFT)
#define I40E_TXD_FLTR_QW1_FD_STATUS_MASK (0x3ULL << \
I40E_TXD_FLTR_QW1_FD_STATUS_SHIFT)
-#ifdef X722_SUPPORT
#define I40E_TXD_FLTR_QW1_ATR_SHIFT (0xEULL + \
I40E_TXD_FLTR_QW1_CMD_SHIFT)
#define I40E_TXD_FLTR_QW1_ATR_MASK BIT_ULL(I40E_TXD_FLTR_QW1_ATR_SHIFT)
-#endif
#define I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT 20
#define I40E_TXD_FLTR_QW1_CNTINDEX_MASK (0x1FFUL << \
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* [dpdk-dev] [PATCH v3 31/31] net/i40e: remove unused macro from PMD
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (29 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 30/31] net/i40e/base: remove unused macro Jingjing Wu
@ 2016-12-10 11:24 ` Jingjing Wu
2016-12-12 10:32 ` [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update Ferruh Yigit
31 siblings, 0 replies; 108+ messages in thread
From: Jingjing Wu @ 2016-12-10 11:24 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, helin.zhang
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/Makefile | 2 +-
drivers/net/i40e/i40e_ethdev.c | 40 ----------------------------------------
2 files changed, 1 insertion(+), 41 deletions(-)
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 13085fb..66997b6 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -38,7 +38,7 @@ LIB = librte_pmd_i40e.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF
-CFLAGS += -DX722_SUPPORT -DX722_A0_SUPPORT
+CFLAGS += -DX722_A0_SUPPORT
EXPORT_MAP := rte_pmd_i40e_version.map
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b2f827c..f42f4ba 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6198,18 +6198,14 @@ i40e_parse_hena(uint64_t flags)
rss_hf |= ETH_RSS_FRAG_IPV4;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK))
rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP))
rss_hf |= ETH_RSS_NONFRAG_IPV4_SCTP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER))
@@ -6218,18 +6214,14 @@ i40e_parse_hena(uint64_t flags)
rss_hf |= ETH_RSS_FRAG_IPV6;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK))
rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-#ifdef X722_SUPPORT
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-#endif
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP))
rss_hf |= ETH_RSS_NONFRAG_IPV6_SCTP;
if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER))
@@ -7101,7 +7093,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7120,7 +7111,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7130,7 +7120,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_TCP_FLAGS | I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7140,7 +7129,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
I40E_INSET_TCP_FLAGS | I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7174,7 +7162,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_HOP_LIMIT | I40E_INSET_IPV6_SRC |
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7193,7 +7180,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7203,7 +7189,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7213,7 +7198,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_DST | I40E_INSET_SRC_PORT |
I40E_INSET_DST_PORT | I40E_INSET_TCP_FLAGS |
I40E_INSET_FLEX_PAYLOAD,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_DMAC | I40E_INSET_SMAC |
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
@@ -7253,7 +7237,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
@@ -7264,19 +7247,16 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_TTL |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
@@ -7298,7 +7278,6 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
@@ -7309,19 +7288,16 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_IPV6_TC | I40E_INSET_IPV6_HOP_LIMIT |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
@@ -7374,22 +7350,18 @@ i40e_get_default_input_set(uint16_t pctype)
[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
I40E_INSET_IPV4_SRC | I40E_INSET_IPV4_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
@@ -7401,22 +7373,18 @@ i40e_get_default_input_set(uint16_t pctype)
[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
I40E_INSET_IPV6_SRC | I40E_INSET_IPV6_DST |
I40E_INSET_SRC_PORT | I40E_INSET_DST_PORT |
@@ -8215,18 +8183,14 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
[I40E_FILTER_PCTYPE_FRAG_IPV4] = RTE_ETH_FLOW_FRAG_IPV4,
[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
RTE_ETH_FLOW_NONFRAG_IPV4_SCTP,
[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =
@@ -8234,18 +8198,14 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
[I40E_FILTER_PCTYPE_FRAG_IPV6] = RTE_ETH_FLOW_FRAG_IPV6,
[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-#ifdef X722_SUPPORT
[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-#endif
[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
RTE_ETH_FLOW_NONFRAG_IPV6_SCTP,
[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =
--
2.4.11
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
` (30 preceding siblings ...)
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 31/31] net/i40e: remove unused macro from PMD Jingjing Wu
@ 2016-12-12 10:32 ` Ferruh Yigit
2016-12-20 15:40 ` Gregory Etelson
31 siblings, 1 reply; 108+ messages in thread
From: Ferruh Yigit @ 2016-12-12 10:32 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: helin.zhang
On 12/10/2016 11:24 AM, Jingjing Wu wrote:
> i40e base code upate. The main changes are:
> - add clause22 and clause45 implementation for PHY registers accessing
> - replace existing legacy memcpy() calls with i40e_memcpy() calls.
> - use BIT() macro instead of bit fields
> - add clear all WoL filters implementation
> - add ERROR state for NVM update state machine
> - add broadcast promiscuous control per VLAN
> - remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
>
> v3:
> * update commit log of few patches as issue fix
>
> v2:
> * comments rework
> * complie issue fix
> * rebase to dpdk-next-net
>
> Jingjing Wu (31):
> net/i40e/base: add encap csum VF offload flag
> net/i40e/base: fix flow control set for 25G
> net/i40e/base: remove unnecessary code
> net/i40e/base: fix bit test mask
> net/i40e/base: group base mode VF offload flags
> net/i40e/base: fix long link down notification time
> net/i40e/base: add media type detection for 25G link
> net/i40e/base: add clause22 and clause45 implementation
> net/i40e/base: add bus number info
> net/i40e/base: add protocols when discover capabilities
> net/i40e/base: fix unknown PHYs incorrect identification
> net/i40e/base: replace memcpy
> net/i40e/base: deprecating unused macro
> net/i40e/base: remove FPK HyperV VF device ID
> net/i40e/base: add FEC bits to PHY capabilities
> net/i40e/base: use BIT() macro instead of bit fields
> net/i40e/base: adjust 25G PHY type values
> net/i40e/base: implement clear all WoL filters
> net/i40e/base: implement set VSI full promisc mode
> net/i40e/base: fix wol failure on PF reset
> net/i40e/base: save link FEC info from link up event
> net/i40e/base: fix NVM access intefering
> net/i40e/base: change shift values to hex
> net/i40e/base: comment that udp port must be in Host order
> net/i40e/base: remove duplicate definitions
> net/i40e/base: add ERROR state for NVM update state machine
> net/i40e/base: add broadcast promiscuous control per VLAN
> net/i40e/base: fix division by zero
> net/i40e/base: fix byte order
> net/i40e/base: remove unused macro
> net/i40e: remove unused macro from PMD
>
<...>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update
2016-12-12 10:32 ` [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update Ferruh Yigit
@ 2016-12-20 15:40 ` Gregory Etelson
2016-12-20 16:21 ` Gregory Etelson
2017-01-12 11:48 ` Ferruh Yigit
0 siblings, 2 replies; 108+ messages in thread
From: Gregory Etelson @ 2016-12-20 15:40 UTC (permalink / raw)
To: dev; +Cc: Ferruh Yigit, Jingjing Wu, helin.zhang
Hello,
I have several XL710-Q2 interfaces that fail with
`PMD: eth_i40e_dev_init(): Failed to init adminq: -54'
Rebase to the latest dpdk-next-net/master did not fix the fault
Firmware version is 5.04 0x80002505 0.0.0
lspci output looks the same for working and failed interfaces
Full traces with all I40*DEBUG options enabled follow.
Is there a way to extract more info to investigate this fault ?
Regards,
Gregory
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 1
EAL: Detected lcore 2 as core 1 on socket 0
EAL: Detected lcore 3 as core 1 on socket 1
EAL: Detected lcore 4 as core 2 on socket 0
EAL: Detected lcore 5 as core 2 on socket 1
EAL: Detected lcore 6 as core 3 on socket 0
EAL: Detected lcore 7 as core 3 on socket 1
EAL: Detected lcore 8 as core 6 on socket 0
EAL: Detected lcore 9 as core 6 on socket 1
EAL: Detected lcore 10 as core 7 on socket 0
EAL: Detected lcore 11 as core 7 on socket 1
EAL: Detected lcore 12 as core 0 on socket 0
EAL: Detected lcore 13 as core 0 on socket 1
EAL: Detected lcore 14 as core 1 on socket 0
EAL: Detected lcore 15 as core 1 on socket 1
EAL: Detected lcore 16 as core 2 on socket 0
EAL: Detected lcore 17 as core 2 on socket 1
EAL: Detected lcore 18 as core 3 on socket 0
EAL: Detected lcore 19 as core 3 on socket 1
EAL: Detected lcore 20 as core 6 on socket 0
EAL: Detected lcore 21 as core 6 on socket 1
EAL: Detected lcore 22 as core 7 on socket 0
EAL: Detected lcore 23 as core 7 on socket 1
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 24 lcore(s)
EAL: Debug logs available - lower performance
EAL: Setting up physically contiguous memory...
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4203a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x1f7000000 bytes
EAL: Virtual area found at 0x7f400c800000 (size = 0x1f7000000)
EAL: Ask a virtual area of 0x800000 bytes
EAL: Virtual area found at 0x7f400be00000 (size = 0x800000)
EAL: Ask a virtual area of 0x2400000 bytes
EAL: Virtual area found at 0x7f4009800000 (size = 0x2400000)
EAL: Ask a virtual area of 0x4800000 bytes
EAL: Virtual area found at 0x7f4004e00000 (size = 0x4800000)
EAL: Ask a virtual area of 0x1800000 bytes
EAL: Virtual area found at 0x7f4003400000 (size = 0x1800000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4003000000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4002c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x1ffc00000 bytes
EAL: Virtual area found at 0x7f3e02e00000 (size = 0x1ffc00000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f3e02a00000 (size = 0x200000)
EAL: Requesting 4096 pages of size 2MB from socket 0
EAL: Requesting 4096 pages of size 2MB from socket 1
EAL: TSC frequency is ~3400010 KHz
EAL: Master lcore 0 is ready (tid=5e938c0;cpuset=[0])
EAL: lcore 4 is ready (tid=1ffe700;cpuset=[4])
EAL: lcore 8 is ready (tid=ff7fa700;cpuset=[8])
EAL: lcore 2 is ready (tid=4a5d700;cpuset=[2])
EAL: lcore 3 is ready (tid=29ff700;cpuset=[3])
EAL: lcore 9 is ready (tid=fedf9700;cpuset=[9])
EAL: lcore 10 is ready (tid=fe3f8700;cpuset=[10])
EAL: lcore 15 is ready (tid=fb1f3700;cpuset=[15])
EAL: lcore 16 is ready (tid=fa7f2700;cpuset=[16])
EAL: lcore 14 is ready (tid=fbbf4700;cpuset=[14])
EAL: lcore 18 is ready (tid=f93f0700;cpuset=[18])
EAL: lcore 12 is ready (tid=fcff6700;cpuset=[12])
EAL: lcore 1 is ready (tid=545e700;cpuset=[1])
EAL: lcore 20 is ready (tid=f7fee700;cpuset=[20])
EAL: lcore 19 is ready (tid=f89ef700;cpuset=[19])
EAL: lcore 5 is ready (tid=15fd700;cpuset=[5])
EAL: lcore 11 is ready (tid=fd9f7700;cpuset=[11])
EAL: lcore 17 is ready (tid=f9df1700;cpuset=[17])
EAL: lcore 6 is ready (tid=bfc700;cpuset=[6])
EAL: lcore 21 is ready (tid=f75ed700;cpuset=[21])
EAL: lcore 13 is ready (tid=fc5f5700;cpuset=[13])
EAL: lcore 23 is ready (tid=f61eb700;cpuset=[23])
EAL: lcore 22 is ready (tid=f6bec700;cpuset=[22])
EAL: lcore 7 is ready (tid=1fb700;cpuset=[7])
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL: probe driver: 8086:1583 net_i40e
EAL: PCI memory mapped at 0x7f3df4feb000
EAL: PCI memory mapped at 0x7f4204055000
PMD: eth_i40e_dev_init(): >>
PMD: i40e_enable_extended_tag(): Extended Tag has already been enabled
PMD: i40e_set_symmetric_hash_enable_per_port(): Symmetric hash has already been disabled
PMD: i40e_pf_reset(): Core and Global modules ready 0
PMD: i40e_init_shared_code(): i40e_init_shared_code
PMD: i40e_set_mac_type(): i40e_set_mac_type
PMD: i40e_set_mac_type(): i40e_set_mac_type found mac: 1, returns: 0
PMD: i40e_init_nvm(): i40e_init_nvm
PMD: i40e_check_write_reg(): [0x002507c0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002507c0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002507e0] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x002507e0] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x002676f8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002676f8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002676fc] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x002676fc] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x002672f8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002672f8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267af8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267af8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002672fc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002672fc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267afc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267afc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250840] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250840] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250860] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x00250860] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x00267708] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267708] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026770c] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x0026770c] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x00267308] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267308] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b08] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b08] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026730c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026730c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b0c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b0c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250880] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00250880] after: 0x80000000
PMD: i40e_check_write_reg(): [0x002508a0] original: 0x0001801f
PMD: i40e_check_write_reg(): [0x002508a0] after: 0x0001801f
PMD: i40e_check_write_reg(): [0x00267710] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00267710] after: 0x80000000
PMD: i40e_check_write_reg(): [0x00267714] original: 0x0001801f
PMD: i40e_check_write_reg(): [0x00267714] after: 0x0001801f
PMD: i40e_check_write_reg(): [0x00267310] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267310] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b10] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b10] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267314] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267314] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b14] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b14] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002508c0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002508c0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002508e0] original: 0x00018018
PMD: i40e_check_write_reg(): [0x002508e0] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267718] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267718] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026771c] original: 0x00018018
PMD: i40e_check_write_reg(): [0x0026771c] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267318] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267318] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b18] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b18] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026731c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026731c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b1c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b1c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250900] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250900] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250920] original: 0x00018018
PMD: i40e_check_write_reg(): [0x00250920] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267720] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267720] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267724] original: 0x00018018
PMD: i40e_check_write_reg(): [0x00267724] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267320] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267320] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b20] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b20] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267324] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267324] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b24] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b24] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250a40] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250a40] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250a60] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00250a60] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267748] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267748] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026774c] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x0026774c] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267348] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267348] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b48] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b48] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026734c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026734c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b4c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b4c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ac0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ac0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ae0] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00250ae0] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267758] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267758] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026775c] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x0026775c] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267358] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267358] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b58] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b58] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026735c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026735c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b5c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b5c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b00] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00250b00] after: 0x80000000
PMD: i40e_check_write_reg(): [0x00250b20] original: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00250b20] after: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00267760] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00267760] after: 0x80000000
PMD: i40e_check_write_reg(): [0x00267764] original: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00267764] after: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00267360] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267360] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b60] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b60] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267364] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267364] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b64] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b64] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b40] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b40] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b60] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00250b60] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267768] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267768] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026776c] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x0026776c] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267368] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267368] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b68] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b68] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026736c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026736c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b6c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b6c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b80] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b80] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ba0] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00250ba0] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267770] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267770] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267774] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267774] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267370] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267370] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b70] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b70] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267374] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267374] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b74] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b74] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250fc0] original: 0x00004000
PMD: i40e_check_write_reg(): [0x00250fc0] after: 0x00004000
PMD: i40e_check_write_reg(): [0x00250fe0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250fe0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002677f8] original: 0x00004000
PMD: i40e_check_write_reg(): [0x002677f8] after: 0x00004000
PMD: i40e_check_write_reg(): [0x002677fc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002677fc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002673f8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002673f8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bf8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bf8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002673fc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002673fc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bfc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bfc] after: 0x00000000
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_9006244102256549392 allocated with physical address: 36066607104
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_9094591617955485484 allocated with physical address: 36066598912
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4921817593146928058 allocated with physical address: 36066590720
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1649522919998970242 allocated with physical address: 36066582528
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_5592431459765142899 allocated with physical address: 36066574336
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3616263856304680647 allocated with physical address: 36066566144
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6135573337873051539 allocated with physical address: 36066557952
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2979425320734363433 allocated with physical address: 36066549760
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_7004567199046153392 allocated with physical address: 36066541568
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2400349342071320464 allocated with physical address: 36066533376
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1198569822703064929 allocated with physical address: 36066525184
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2381874768605265457 allocated with physical address: 36066516992
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_946809976207957533 allocated with physical address: 36066508800
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8890428114805413440 allocated with physical address: 36066500608
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3659808187846474561 allocated with physical address: 36066492416
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6643860085814082754 allocated with physical address: 36066484224
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1077965980644684592 allocated with physical address: 36066476032
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_757788774034593920 allocated with physical address: 36066467840
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8871964809840853652 allocated with physical address: 36066459648
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1319458200989398807 allocated with physical address: 36066451456
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1260444229190182595 allocated with physical address: 36066443264
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4944475028266209581 allocated with physical address: 36066435072
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1981506286114228798 allocated with physical address: 36066426880
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6995706941756923838 allocated with physical address: 36066418688
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6845860763940517715 allocated with physical address: 36066410496
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6316736255568508052 allocated with physical address: 36066402304
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6596345420547494626 allocated with physical address: 36066394112
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_563052720231491541 allocated with physical address: 36066385920
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_5438500282421395772 allocated with physical address: 36066377728
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1489311620446309558 allocated with physical address: 36066369536
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1034342050721494823 allocated with physical address: 36066361344
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_895587109620334414 allocated with physical address: 36066353152
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_7244783987789076734 allocated with physical address: 36066344960
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8121331692218482053 allocated with physical address: 36066340864
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_357653678358899189 allocated with physical address: 36066332672
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8279673960611224875 allocated with physical address: 36066324480
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3128505479544499579 allocated with physical address: 36066316288
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8860600185294246181 allocated with physical address: 36066308096
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2923794349289372856 allocated with physical address: 36066299904
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3555496033731071937 allocated with physical address: 36066291712
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_546014499550556726 allocated with physical address: 36066283520
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2488579372291755051 allocated with physical address: 36066275328
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6650067233218882971 allocated with physical address: 36066267136
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2356739082095908089 allocated with physical address: 36066258944
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4594387210783084948 allocated with physical address: 36066250752
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8514595240639990241 allocated with physical address: 36066242560
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3355784826824932814 allocated with physical address: 36066234368
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6035703664050813578 allocated with physical address: 36066226176
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1826820887759906590 allocated with physical address: 36066217984
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3162038796587606143 allocated with physical address: 36066209792
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4571605943746334657 allocated with physical address: 36066201600
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8896333848084252224 allocated with physical address: 36066193408
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4966872707505717693 allocated with physical address: 36066185216
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3893530533784472947 allocated with physical address: 36066177024
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1217637539560590694 allocated with physical address: 36066168832
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_5878423844769130040 allocated with physical address: 36066160640
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8739981701704134140 allocated with physical address: 36066152448
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8562536557899098522 allocated with physical address: 36066144256
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4304574794556610162 allocated with physical address: 36066136064
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_7499349118597146913 allocated with physical address: 36066127872
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_936617606270126154 allocated with physical address: 36066119680
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4843208302417061252 allocated with physical address: 36066111488
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4297764810681972379 allocated with physical address: 36066103296
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3836696837872975483 allocated with physical address: 36066095104
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_72325700428175156 allocated with physical address: 36066086912
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6444087963138592179 allocated with physical address: 36066078720
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_357653678358899189 to be freed with physical address: 36066332672
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8279673960611224875 to be freed with physical address: 36066324480
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3128505479544499579 to be freed with physical address: 36066316288
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8860600185294246181 to be freed with physical address: 36066308096
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2923794349289372856 to be freed with physical address: 36066299904
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3555496033731071937 to be freed with physical address: 36066291712
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_546014499550556726 to be freed with physical address: 36066283520
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2488579372291755051 to be freed with physical address: 36066275328
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6650067233218882971 to be freed with physical address: 36066267136
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2356739082095908089 to be freed with physical address: 36066258944
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4594387210783084948 to be freed with physical address: 36066250752
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8514595240639990241 to be freed with physical address: 36066242560
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3355784826824932814 to be freed with physical address: 36066234368
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6035703664050813578 to be freed with physical address: 36066226176
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1826820887759906590 to be freed with physical address: 36066217984
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3162038796587606143 to be freed with physical address: 36066209792
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4571605943746334657 to be freed with physical address: 36066201600
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8896333848084252224 to be freed with physical address: 36066193408
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4966872707505717693 to be freed with physical address: 36066185216
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3893530533784472947 to be freed with physical address: 36066177024
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1217637539560590694 to be freed with physical address: 36066168832
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_5878423844769130040 to be freed with physical address: 36066160640
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8739981701704134140 to be freed with physical address: 36066152448
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8562536557899098522 to be freed with physical address: 36066144256
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4304574794556610162 to be freed with physical address: 36066136064
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_7499349118597146913 to be freed with physical address: 36066127872
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_936617606270126154 to be freed with physical address: 36066119680
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4843208302417061252 to be freed with physical address: 36066111488
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4297764810681972379 to be freed with physical address: 36066103296
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3836696837872975483 to be freed with physical address: 36066095104
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_72325700428175156 to be freed with physical address: 36066086912
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6444087963138592179 to be freed with physical address: 36066078720
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8121331692218482053 to be freed with physical address: 36066340864
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_9094591617955485484 to be freed with physical address: 36066598912
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4921817593146928058 to be freed with physical address: 36066590720
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1649522919998970242 to be freed with physical address: 36066582528
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_5592431459765142899 to be freed with physical address: 36066574336
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3616263856304680647 to be freed with physical address: 36066566144
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6135573337873051539 to be freed with physical address: 36066557952
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2979425320734363433 to be freed with physical address: 36066549760
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_7004567199046153392 to be freed with physical address: 36066541568
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2400349342071320464 to be freed with physical address: 36066533376
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1198569822703064929 to be freed with physical address: 36066525184
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2381874768605265457 to be freed with physical address: 36066516992
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_946809976207957533 to be freed with physical address: 36066508800
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8890428114805413440 to be freed with physical address: 36066500608
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3659808187846474561 to be freed with physical address: 36066492416
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6643860085814082754 to be freed with physical address: 36066484224
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1077965980644684592 to be freed with physical address: 36066476032
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_757788774034593920 to be freed with physical address: 36066467840
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8871964809840853652 to be freed with physical address: 36066459648
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1319458200989398807 to be freed with physical address: 36066451456
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1260444229190182595 to be freed with physical address: 36066443264
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4944475028266209581 to be freed with physical address: 36066435072
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1981506286114228798 to be freed with physical address: 36066426880
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6995706941756923838 to be freed with physical address: 36066418688
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6845860763940517715 to be freed with physical address: 36066410496
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6316736255568508052 to be freed with physical address: 36066402304
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6596345420547494626 to be freed with physical address: 36066394112
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_563052720231491541 to be freed with physical address: 36066385920
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_5438500282421395772 to be freed with physical address: 36066377728
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1489311620446309558 to be freed with physical address: 36066369536
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1034342050721494823 to be freed with physical address: 36066361344
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_895587109620334414 to be freed with physical address: 36066353152
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_7244783987789076734 to be freed with physical address: 36066344960
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_9006244102256549392 to be freed with physical address: 36066607104
PMD: eth_i40e_dev_init(): Failed to init adminq: -54
EAL: Error - exiting with code: 1
Cause: Requested device 0000:04:00.0 cannot be used
On Monday, 12 December 2016 10:32:24 IST Ferruh Yigit wrote:
> On 12/10/2016 11:24 AM, Jingjing Wu wrote:
> > i40e base code upate. The main changes are:
> > - add clause22 and clause45 implementation for PHY registers accessing
> > - replace existing legacy memcpy() calls with i40e_memcpy() calls.
> > - use BIT() macro instead of bit fields
> > - add clear all WoL filters implementation
> > - add ERROR state for NVM update state machine
> > - add broadcast promiscuous control per VLAN
> > - remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
> >
> > v3:
> > * update commit log of few patches as issue fix
> >
> > v2:
> > * comments rework
> > * complie issue fix
> > * rebase to dpdk-next-net
> >
> > Jingjing Wu (31):
> > net/i40e/base: add encap csum VF offload flag
> > net/i40e/base: fix flow control set for 25G
> > net/i40e/base: remove unnecessary code
> > net/i40e/base: fix bit test mask
> > net/i40e/base: group base mode VF offload flags
> > net/i40e/base: fix long link down notification time
> > net/i40e/base: add media type detection for 25G link
> > net/i40e/base: add clause22 and clause45 implementation
> > net/i40e/base: add bus number info
> > net/i40e/base: add protocols when discover capabilities
> > net/i40e/base: fix unknown PHYs incorrect identification
> > net/i40e/base: replace memcpy
> > net/i40e/base: deprecating unused macro
> > net/i40e/base: remove FPK HyperV VF device ID
> > net/i40e/base: add FEC bits to PHY capabilities
> > net/i40e/base: use BIT() macro instead of bit fields
> > net/i40e/base: adjust 25G PHY type values
> > net/i40e/base: implement clear all WoL filters
> > net/i40e/base: implement set VSI full promisc mode
> > net/i40e/base: fix wol failure on PF reset
> > net/i40e/base: save link FEC info from link up event
> > net/i40e/base: fix NVM access intefering
> > net/i40e/base: change shift values to hex
> > net/i40e/base: comment that udp port must be in Host order
> > net/i40e/base: remove duplicate definitions
> > net/i40e/base: add ERROR state for NVM update state machine
> > net/i40e/base: add broadcast promiscuous control per VLAN
> > net/i40e/base: fix division by zero
> > net/i40e/base: fix byte order
> > net/i40e/base: remove unused macro
> > net/i40e: remove unused macro from PMD
> >
> <...>
>
> Series applied to dpdk-next-net/master, thanks.
>
>
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update
2016-12-20 15:40 ` Gregory Etelson
@ 2016-12-20 16:21 ` Gregory Etelson
2017-01-12 11:48 ` Ferruh Yigit
1 sibling, 0 replies; 108+ messages in thread
From: Gregory Etelson @ 2016-12-20 16:21 UTC (permalink / raw)
To: dev; +Cc: Ferruh Yigit, Jingjing Wu, helin.zhang
add dmesg output:
dmar: DRHD: handling fault status reg 502
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 602
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 702
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 2
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 102
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 202
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 302
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 402
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 502
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
dmar: DRHD: handling fault status reg 602
dmar: DMAR:[DMA Read] Request device [04:00.0] fault addr 865bcc000
DMAR:[fault reason 02] Present bit in context entry is clear
Hello,
I have several XL710-Q2 interfaces that fail with
`PMD: eth_i40e_dev_init(): Failed to init adminq: -54'
Rebase to the latest dpdk-next-net/master did not fix the fault
Firmware version is 5.04 0x80002505 0.0.0
lspci output looks the same for working and failed interfaces
Full traces with all I40*DEBUG options enabled follow.
Is there a way to extract more info to investigate this fault ?
Regards,
Gregory
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 1
EAL: Detected lcore 2 as core 1 on socket 0
EAL: Detected lcore 3 as core 1 on socket 1
EAL: Detected lcore 4 as core 2 on socket 0
EAL: Detected lcore 5 as core 2 on socket 1
EAL: Detected lcore 6 as core 3 on socket 0
EAL: Detected lcore 7 as core 3 on socket 1
EAL: Detected lcore 8 as core 6 on socket 0
EAL: Detected lcore 9 as core 6 on socket 1
EAL: Detected lcore 10 as core 7 on socket 0
EAL: Detected lcore 11 as core 7 on socket 1
EAL: Detected lcore 12 as core 0 on socket 0
EAL: Detected lcore 13 as core 0 on socket 1
EAL: Detected lcore 14 as core 1 on socket 0
EAL: Detected lcore 15 as core 1 on socket 1
EAL: Detected lcore 16 as core 2 on socket 0
EAL: Detected lcore 17 as core 2 on socket 1
EAL: Detected lcore 18 as core 3 on socket 0
EAL: Detected lcore 19 as core 3 on socket 1
EAL: Detected lcore 20 as core 6 on socket 0
EAL: Detected lcore 21 as core 6 on socket 1
EAL: Detected lcore 22 as core 7 on socket 0
EAL: Detected lcore 23 as core 7 on socket 1
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 24 lcore(s)
EAL: Debug logs available - lower performance
EAL: Setting up physically contiguous memory...
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4203a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x1f7000000 bytes
EAL: Virtual area found at 0x7f400c800000 (size = 0x1f7000000)
EAL: Ask a virtual area of 0x800000 bytes
EAL: Virtual area found at 0x7f400be00000 (size = 0x800000)
EAL: Ask a virtual area of 0x2400000 bytes
EAL: Virtual area found at 0x7f4009800000 (size = 0x2400000)
EAL: Ask a virtual area of 0x4800000 bytes
EAL: Virtual area found at 0x7f4004e00000 (size = 0x4800000)
EAL: Ask a virtual area of 0x1800000 bytes
EAL: Virtual area found at 0x7f4003400000 (size = 0x1800000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4003000000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4002c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x1ffc00000 bytes
EAL: Virtual area found at 0x7f3e02e00000 (size = 0x1ffc00000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f3e02a00000 (size = 0x200000)
EAL: Requesting 4096 pages of size 2MB from socket 0
EAL: Requesting 4096 pages of size 2MB from socket 1
EAL: TSC frequency is ~3400010 KHz
EAL: Master lcore 0 is ready (tid=5e938c0;cpuset=[0])
EAL: lcore 4 is ready (tid=1ffe700;cpuset=[4])
EAL: lcore 8 is ready (tid=ff7fa700;cpuset=[8])
EAL: lcore 2 is ready (tid=4a5d700;cpuset=[2])
EAL: lcore 3 is ready (tid=29ff700;cpuset=[3])
EAL: lcore 9 is ready (tid=fedf9700;cpuset=[9])
EAL: lcore 10 is ready (tid=fe3f8700;cpuset=[10])
EAL: lcore 15 is ready (tid=fb1f3700;cpuset=[15])
EAL: lcore 16 is ready (tid=fa7f2700;cpuset=[16])
EAL: lcore 14 is ready (tid=fbbf4700;cpuset=[14])
EAL: lcore 18 is ready (tid=f93f0700;cpuset=[18])
EAL: lcore 12 is ready (tid=fcff6700;cpuset=[12])
EAL: lcore 1 is ready (tid=545e700;cpuset=[1])
EAL: lcore 20 is ready (tid=f7fee700;cpuset=[20])
EAL: lcore 19 is ready (tid=f89ef700;cpuset=[19])
EAL: lcore 5 is ready (tid=15fd700;cpuset=[5])
EAL: lcore 11 is ready (tid=fd9f7700;cpuset=[11])
EAL: lcore 17 is ready (tid=f9df1700;cpuset=[17])
EAL: lcore 6 is ready (tid=bfc700;cpuset=[6])
EAL: lcore 21 is ready (tid=f75ed700;cpuset=[21])
EAL: lcore 13 is ready (tid=fc5f5700;cpuset=[13])
EAL: lcore 23 is ready (tid=f61eb700;cpuset=[23])
EAL: lcore 22 is ready (tid=f6bec700;cpuset=[22])
EAL: lcore 7 is ready (tid=1fb700;cpuset=[7])
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL: probe driver: 8086:1583 net_i40e
EAL: PCI memory mapped at 0x7f3df4feb000
EAL: PCI memory mapped at 0x7f4204055000
PMD: eth_i40e_dev_init(): >>
PMD: i40e_enable_extended_tag(): Extended Tag has already been enabled
PMD: i40e_set_symmetric_hash_enable_per_port(): Symmetric hash has already been disabled
PMD: i40e_pf_reset(): Core and Global modules ready 0
PMD: i40e_init_shared_code(): i40e_init_shared_code
PMD: i40e_set_mac_type(): i40e_set_mac_type
PMD: i40e_set_mac_type(): i40e_set_mac_type found mac: 1, returns: 0
PMD: i40e_init_nvm(): i40e_init_nvm
PMD: i40e_check_write_reg(): [0x002507c0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002507c0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002507e0] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x002507e0] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x002676f8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002676f8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002676fc] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x002676fc] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x002672f8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002672f8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267af8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267af8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002672fc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002672fc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267afc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267afc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250840] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250840] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250860] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x00250860] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x00267708] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267708] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026770c] original: 0x0001801e
PMD: i40e_check_write_reg(): [0x0026770c] after: 0x0001801e
PMD: i40e_check_write_reg(): [0x00267308] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267308] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b08] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b08] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026730c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026730c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b0c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b0c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250880] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00250880] after: 0x80000000
PMD: i40e_check_write_reg(): [0x002508a0] original: 0x0001801f
PMD: i40e_check_write_reg(): [0x002508a0] after: 0x0001801f
PMD: i40e_check_write_reg(): [0x00267710] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00267710] after: 0x80000000
PMD: i40e_check_write_reg(): [0x00267714] original: 0x0001801f
PMD: i40e_check_write_reg(): [0x00267714] after: 0x0001801f
PMD: i40e_check_write_reg(): [0x00267310] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267310] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b10] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b10] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267314] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267314] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b14] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b14] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002508c0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002508c0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002508e0] original: 0x00018018
PMD: i40e_check_write_reg(): [0x002508e0] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267718] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267718] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026771c] original: 0x00018018
PMD: i40e_check_write_reg(): [0x0026771c] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267318] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267318] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b18] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b18] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026731c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026731c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b1c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b1c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250900] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250900] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250920] original: 0x00018018
PMD: i40e_check_write_reg(): [0x00250920] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267720] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267720] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267724] original: 0x00018018
PMD: i40e_check_write_reg(): [0x00267724] after: 0x00018018
PMD: i40e_check_write_reg(): [0x00267320] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267320] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b20] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b20] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267324] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267324] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b24] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b24] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250a40] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250a40] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250a60] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00250a60] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267748] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267748] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026774c] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x0026774c] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267348] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267348] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b48] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b48] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026734c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026734c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b4c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b4c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ac0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ac0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ae0] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00250ae0] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267758] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267758] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026775c] original: 0x0007fffe
PMD: i40e_check_write_reg(): [0x0026775c] after: 0x0007fffe
PMD: i40e_check_write_reg(): [0x00267358] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267358] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b58] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b58] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026735c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026735c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b5c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b5c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b00] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00250b00] after: 0x80000000
PMD: i40e_check_write_reg(): [0x00250b20] original: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00250b20] after: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00267760] original: 0x80000000
PMD: i40e_check_write_reg(): [0x00267760] after: 0x80000000
PMD: i40e_check_write_reg(): [0x00267764] original: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00267764] after: 0x0007ffff
PMD: i40e_check_write_reg(): [0x00267360] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267360] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b60] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b60] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267364] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267364] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b64] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b64] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b40] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b40] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b60] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00250b60] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267768] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267768] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026776c] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x0026776c] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267368] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267368] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b68] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b68] after: 0x00000000
PMD: i40e_check_write_reg(): [0x0026736c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x0026736c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b6c] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b6c] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b80] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250b80] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250ba0] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00250ba0] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267770] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267770] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267774] original: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267774] after: 0x0007fff8
PMD: i40e_check_write_reg(): [0x00267370] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267370] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b70] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b70] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267374] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267374] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b74] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267b74] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00250fc0] original: 0x00004000
PMD: i40e_check_write_reg(): [0x00250fc0] after: 0x00004000
PMD: i40e_check_write_reg(): [0x00250fe0] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00250fe0] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002677f8] original: 0x00004000
PMD: i40e_check_write_reg(): [0x002677f8] after: 0x00004000
PMD: i40e_check_write_reg(): [0x002677fc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002677fc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002673f8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002673f8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bf8] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bf8] after: 0x00000000
PMD: i40e_check_write_reg(): [0x002673fc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x002673fc] after: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bfc] original: 0x00000000
PMD: i40e_check_write_reg(): [0x00267bfc] after: 0x00000000
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_9006244102256549392 allocated with physical address: 36066607104
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_9094591617955485484 allocated with physical address: 36066598912
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4921817593146928058 allocated with physical address: 36066590720
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1649522919998970242 allocated with physical address: 36066582528
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_5592431459765142899 allocated with physical address: 36066574336
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3616263856304680647 allocated with physical address: 36066566144
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6135573337873051539 allocated with physical address: 36066557952
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2979425320734363433 allocated with physical address: 36066549760
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_7004567199046153392 allocated with physical address: 36066541568
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2400349342071320464 allocated with physical address: 36066533376
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1198569822703064929 allocated with physical address: 36066525184
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2381874768605265457 allocated with physical address: 36066516992
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_946809976207957533 allocated with physical address: 36066508800
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8890428114805413440 allocated with physical address: 36066500608
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3659808187846474561 allocated with physical address: 36066492416
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6643860085814082754 allocated with physical address: 36066484224
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1077965980644684592 allocated with physical address: 36066476032
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_757788774034593920 allocated with physical address: 36066467840
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8871964809840853652 allocated with physical address: 36066459648
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1319458200989398807 allocated with physical address: 36066451456
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1260444229190182595 allocated with physical address: 36066443264
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4944475028266209581 allocated with physical address: 36066435072
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1981506286114228798 allocated with physical address: 36066426880
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6995706941756923838 allocated with physical address: 36066418688
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6845860763940517715 allocated with physical address: 36066410496
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6316736255568508052 allocated with physical address: 36066402304
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6596345420547494626 allocated with physical address: 36066394112
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_563052720231491541 allocated with physical address: 36066385920
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_5438500282421395772 allocated with physical address: 36066377728
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1489311620446309558 allocated with physical address: 36066369536
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1034342050721494823 allocated with physical address: 36066361344
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_895587109620334414 allocated with physical address: 36066353152
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_7244783987789076734 allocated with physical address: 36066344960
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8121331692218482053 allocated with physical address: 36066340864
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_357653678358899189 allocated with physical address: 36066332672
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8279673960611224875 allocated with physical address: 36066324480
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3128505479544499579 allocated with physical address: 36066316288
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8860600185294246181 allocated with physical address: 36066308096
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2923794349289372856 allocated with physical address: 36066299904
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3555496033731071937 allocated with physical address: 36066291712
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_546014499550556726 allocated with physical address: 36066283520
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2488579372291755051 allocated with physical address: 36066275328
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6650067233218882971 allocated with physical address: 36066267136
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_2356739082095908089 allocated with physical address: 36066258944
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4594387210783084948 allocated with physical address: 36066250752
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8514595240639990241 allocated with physical address: 36066242560
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3355784826824932814 allocated with physical address: 36066234368
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6035703664050813578 allocated with physical address: 36066226176
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1826820887759906590 allocated with physical address: 36066217984
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3162038796587606143 allocated with physical address: 36066209792
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4571605943746334657 allocated with physical address: 36066201600
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8896333848084252224 allocated with physical address: 36066193408
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4966872707505717693 allocated with physical address: 36066185216
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3893530533784472947 allocated with physical address: 36066177024
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_1217637539560590694 allocated with physical address: 36066168832
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_5878423844769130040 allocated with physical address: 36066160640
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8739981701704134140 allocated with physical address: 36066152448
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_8562536557899098522 allocated with physical address: 36066144256
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4304574794556610162 allocated with physical address: 36066136064
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_7499349118597146913 allocated with physical address: 36066127872
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_936617606270126154 allocated with physical address: 36066119680
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4843208302417061252 allocated with physical address: 36066111488
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_4297764810681972379 allocated with physical address: 36066103296
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_3836696837872975483 allocated with physical address: 36066095104
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_72325700428175156 allocated with physical address: 36066086912
PMD: i40e_allocate_dma_mem_d(): memzone i40e_dma_6444087963138592179 allocated with physical address: 36066078720
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_357653678358899189 to be freed with physical address: 36066332672
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8279673960611224875 to be freed with physical address: 36066324480
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3128505479544499579 to be freed with physical address: 36066316288
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8860600185294246181 to be freed with physical address: 36066308096
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2923794349289372856 to be freed with physical address: 36066299904
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3555496033731071937 to be freed with physical address: 36066291712
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_546014499550556726 to be freed with physical address: 36066283520
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2488579372291755051 to be freed with physical address: 36066275328
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6650067233218882971 to be freed with physical address: 36066267136
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2356739082095908089 to be freed with physical address: 36066258944
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4594387210783084948 to be freed with physical address: 36066250752
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8514595240639990241 to be freed with physical address: 36066242560
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3355784826824932814 to be freed with physical address: 36066234368
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6035703664050813578 to be freed with physical address: 36066226176
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1826820887759906590 to be freed with physical address: 36066217984
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3162038796587606143 to be freed with physical address: 36066209792
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4571605943746334657 to be freed with physical address: 36066201600
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8896333848084252224 to be freed with physical address: 36066193408
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4966872707505717693 to be freed with physical address: 36066185216
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3893530533784472947 to be freed with physical address: 36066177024
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1217637539560590694 to be freed with physical address: 36066168832
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_5878423844769130040 to be freed with physical address: 36066160640
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8739981701704134140 to be freed with physical address: 36066152448
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8562536557899098522 to be freed with physical address: 36066144256
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4304574794556610162 to be freed with physical address: 36066136064
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_7499349118597146913 to be freed with physical address: 36066127872
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_936617606270126154 to be freed with physical address: 36066119680
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4843208302417061252 to be freed with physical address: 36066111488
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4297764810681972379 to be freed with physical address: 36066103296
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3836696837872975483 to be freed with physical address: 36066095104
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_72325700428175156 to be freed with physical address: 36066086912
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6444087963138592179 to be freed with physical address: 36066078720
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8121331692218482053 to be freed with physical address: 36066340864
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_9094591617955485484 to be freed with physical address: 36066598912
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4921817593146928058 to be freed with physical address: 36066590720
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1649522919998970242 to be freed with physical address: 36066582528
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_5592431459765142899 to be freed with physical address: 36066574336
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3616263856304680647 to be freed with physical address: 36066566144
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6135573337873051539 to be freed with physical address: 36066557952
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2979425320734363433 to be freed with physical address: 36066549760
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_7004567199046153392 to be freed with physical address: 36066541568
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2400349342071320464 to be freed with physical address: 36066533376
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1198569822703064929 to be freed with physical address: 36066525184
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_2381874768605265457 to be freed with physical address: 36066516992
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_946809976207957533 to be freed with physical address: 36066508800
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8890428114805413440 to be freed with physical address: 36066500608
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_3659808187846474561 to be freed with physical address: 36066492416
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6643860085814082754 to be freed with physical address: 36066484224
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1077965980644684592 to be freed with physical address: 36066476032
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_757788774034593920 to be freed with physical address: 36066467840
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_8871964809840853652 to be freed with physical address: 36066459648
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1319458200989398807 to be freed with physical address: 36066451456
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1260444229190182595 to be freed with physical address: 36066443264
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_4944475028266209581 to be freed with physical address: 36066435072
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1981506286114228798 to be freed with physical address: 36066426880
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6995706941756923838 to be freed with physical address: 36066418688
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6845860763940517715 to be freed with physical address: 36066410496
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6316736255568508052 to be freed with physical address: 36066402304
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_6596345420547494626 to be freed with physical address: 36066394112
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_563052720231491541 to be freed with physical address: 36066385920
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_5438500282421395772 to be freed with physical address: 36066377728
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1489311620446309558 to be freed with physical address: 36066369536
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_1034342050721494823 to be freed with physical address: 36066361344
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_895587109620334414 to be freed with physical address: 36066353152
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_7244783987789076734 to be freed with physical address: 36066344960
PMD: i40e_free_dma_mem_d(): memzone i40e_dma_9006244102256549392 to be freed with physical address: 36066607104
PMD: eth_i40e_dev_init(): Failed to init adminq: -54
EAL: Error - exiting with code: 1
Cause: Requested device 0000:04:00.0 cannot be used
On Monday, 12 December 2016 10:32:24 IST Ferruh Yigit wrote:
> On 12/10/2016 11:24 AM, Jingjing Wu wrote:
> > i40e base code upate. The main changes are:
> > - add clause22 and clause45 implementation for PHY registers accessing
> > - replace existing legacy memcpy() calls with i40e_memcpy() calls.
> > - use BIT() macro instead of bit fields
> > - add clear all WoL filters implementation
> > - add ERROR state for NVM update state machine
> > - add broadcast promiscuous control per VLAN
> > - remove unused X722_SUPPORT and I40E_NDIS_SUPPORT MARCOs
> >
> > v3:
> > * update commit log of few patches as issue fix
> >
> > v2:
> > * comments rework
> > * complie issue fix
> > * rebase to dpdk-next-net
> >
> > Jingjing Wu (31):
> > net/i40e/base: add encap csum VF offload flag
> > net/i40e/base: fix flow control set for 25G
> > net/i40e/base: remove unnecessary code
> > net/i40e/base: fix bit test mask
> > net/i40e/base: group base mode VF offload flags
> > net/i40e/base: fix long link down notification time
> > net/i40e/base: add media type detection for 25G link
> > net/i40e/base: add clause22 and clause45 implementation
> > net/i40e/base: add bus number info
> > net/i40e/base: add protocols when discover capabilities
> > net/i40e/base: fix unknown PHYs incorrect identification
> > net/i40e/base: replace memcpy
> > net/i40e/base: deprecating unused macro
> > net/i40e/base: remove FPK HyperV VF device ID
> > net/i40e/base: add FEC bits to PHY capabilities
> > net/i40e/base: use BIT() macro instead of bit fields
> > net/i40e/base: adjust 25G PHY type values
> > net/i40e/base: implement clear all WoL filters
> > net/i40e/base: implement set VSI full promisc mode
> > net/i40e/base: fix wol failure on PF reset
> > net/i40e/base: save link FEC info from link up event
> > net/i40e/base: fix NVM access intefering
> > net/i40e/base: change shift values to hex
> > net/i40e/base: comment that udp port must be in Host order
> > net/i40e/base: remove duplicate definitions
> > net/i40e/base: add ERROR state for NVM update state machine
> > net/i40e/base: add broadcast promiscuous control per VLAN
> > net/i40e/base: fix division by zero
> > net/i40e/base: fix byte order
> > net/i40e/base: remove unused macro
> > net/i40e: remove unused macro from PMD
> >
> <...>
>
> Series applied to dpdk-next-net/master, thanks.
>
>
^ permalink raw reply [flat|nested] 108+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update
2016-12-20 15:40 ` Gregory Etelson
2016-12-20 16:21 ` Gregory Etelson
@ 2017-01-12 11:48 ` Ferruh Yigit
1 sibling, 0 replies; 108+ messages in thread
From: Ferruh Yigit @ 2017-01-12 11:48 UTC (permalink / raw)
To: Gregory Etelson, dev; +Cc: Jingjing Wu, helin.zhang
Hi Gregory,
On 12/20/2016 3:40 PM, Gregory Etelson wrote:
> Hello,
>
> I have several XL710-Q2 interfaces that fail with
> `PMD: eth_i40e_dev_init(): Failed to init adminq: -54'
> Rebase to the latest dpdk-next-net/master did not fix the fault
If I understand correctly, this was existing issue right? Not introduced
with base driver update?
> Firmware version is 5.04 0x80002505 0.0.0
> lspci output looks the same for working and failed interfaces
>
> Full traces with all I40*DEBUG options enabled follow.
>
> Is there a way to extract more info to investigate this fault ?
>
> Regards,
> Gregory
>
<...>
^ permalink raw reply [flat|nested] 108+ messages in thread
end of thread, other threads:[~2017-01-12 11:48 UTC | newest]
Thread overview: 108+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03 1:18 [dpdk-dev] [PATCH 00/31] net/i40e: base code update Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
2016-12-05 14:34 ` Ferruh Yigit
2016-12-03 1:18 ` [dpdk-dev] [PATCH 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 04/31] net/i40e/base: fix bit test mask Jingjing Wu
2016-12-05 14:37 ` Ferruh Yigit
2016-12-03 1:18 ` [dpdk-dev] [PATCH 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 09/31] net/i40e/base: add bus number info Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 12/31] net/i40e/base: replace memcpy Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
2016-12-05 14:30 ` Ferruh Yigit
2016-12-03 1:18 ` [dpdk-dev] [PATCH 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
2016-12-03 1:18 ` [dpdk-dev] [PATCH 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 20/31] net/i40e/base: add defines for new aq command Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 22/31] net/i40e/base: acquire NVM lock before reads on all devices Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 23/31] net/i40e/base: change shift values to hex Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
2016-12-05 14:52 ` Ferruh Yigit
2016-12-03 1:19 ` [dpdk-dev] [PATCH 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 28/31] net/i40e/base: avoid division by zero Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 29/31] net/i40e/base: fix byte order Jingjing Wu
2016-12-03 1:19 ` [dpdk-dev] [PATCH 30/31] net/i40e/base: remove unused marco Jingjing Wu
2016-12-05 14:55 ` Ferruh Yigit
2016-12-06 6:43 ` Wu, Jingjing
2016-12-03 1:19 ` [dpdk-dev] [PATCH 31/31] net/i40e: remove unused marco from PMD Jingjing Wu
2016-12-05 14:57 ` Ferruh Yigit
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 02/31] net/i40e/base: preserve extended PHY type field Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 04/31] net/i40e/base: fix bit test mask Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
2016-12-09 14:38 ` [dpdk-dev] [PATCH v2 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 09/31] net/i40e/base: add bus number info Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 11/31] net/i40e/base: pass unknown PHY type for unknown PHYs Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 12/31] net/i40e/base: replace memcpy Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 20/31] net/i40e/base: add defines for new aq command Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 22/31] net/i40e/base: acquire NVM lock before reads on all devices Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 23/31] net/i40e/base: change shift values to hex Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 28/31] net/i40e/base: avoid division by zero Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 29/31] net/i40e/base: fix byte order Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 30/31] net/i40e/base: remove unused macro Jingjing Wu
2016-12-09 14:39 ` [dpdk-dev] [PATCH v2 31/31] net/i40e: remove unused macro from PMD Jingjing Wu
2016-12-09 16:08 ` [dpdk-dev] [PATCH v2 00/31] net/i40e: base code update Ferruh Yigit
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 " Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 01/31] net/i40e/base: add encap csum VF offload flag Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 02/31] net/i40e/base: fix flow control set for 25G Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 03/31] net/i40e/base: remove unnecessary code Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 04/31] net/i40e/base: fix bit test mask Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 05/31] net/i40e/base: group base mode VF offload flags Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 06/31] net/i40e/base: fix long link down notification time Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 07/31] net/i40e/base: add media type detection for 25G link Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 08/31] net/i40e/base: add clause22 and clause45 implementation Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 09/31] net/i40e/base: add bus number info Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 10/31] net/i40e/base: add protocols when discover capabilities Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 11/31] net/i40e/base: fix unknown PHYs incorrect identification Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 12/31] net/i40e/base: replace memcpy Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 13/31] net/i40e/base: deprecating unused macro Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 14/31] net/i40e/base: remove FPK HyperV VF device ID Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 15/31] net/i40e/base: add FEC bits to PHY capabilities Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 16/31] net/i40e/base: use BIT() macro instead of bit fields Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 17/31] net/i40e/base: adjust 25G PHY type values Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 18/31] net/i40e/base: implement clear all WoL filters Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 19/31] net/i40e/base: implement set VSI full promisc mode Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 20/31] net/i40e/base: fix wol failure on PF reset Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 21/31] net/i40e/base: save link FEC info from link up event Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 22/31] net/i40e/base: fix NVM access intefering Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 23/31] net/i40e/base: change shift values to hex Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 24/31] net/i40e/base: comment that udp port must be in Host order Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 25/31] net/i40e/base: remove duplicate definitions Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 26/31] net/i40e/base: add ERROR state for NVM update state machine Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 27/31] net/i40e/base: add broadcast promiscuous control per VLAN Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 28/31] net/i40e/base: fix division by zero Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 29/31] net/i40e/base: fix byte order Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 30/31] net/i40e/base: remove unused macro Jingjing Wu
2016-12-10 11:24 ` [dpdk-dev] [PATCH v3 31/31] net/i40e: remove unused macro from PMD Jingjing Wu
2016-12-12 10:32 ` [dpdk-dev] [PATCH v3 00/31] net/i40e: base code update Ferruh Yigit
2016-12-20 15:40 ` Gregory Etelson
2016-12-20 16:21 ` Gregory Etelson
2017-01-12 11:48 ` Ferruh Yigit
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).