* [dpdk-dev] [PATCH 00/12] net/i40e: share code update
@ 2016-08-25 20:05 Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 01/12] net/i40e/base: add function to clear default VSI Zhang Qi
` (12 more replies)
0 siblings, 13 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
The patch enable 25G PHY support,
add WoL and proxy configure feature for X722
and other features for all i40e familiy.
Zhang Qi (12):
net/i40e/base: add function to clear default VSI
net/i40e/base: fix UDP packet header
net/i40e/base: define macros for PHY type caps
net/i40e/base: add 25G PHY capability support
net/i40e/base: enable 25G get PHY abilities
net/i40e/base: enable wake on LAN for X722
net/i40e/base: enable set/get HMC resource profile
net/i40e/base: add multicast magic packet enable flag
net/i40e/base: enable proxy cfg cmd for X722
net/i40e: minor changes for clean up
net/i40e/base: add function to get SAN MAC address
net/i40e/base: add FCoE support
drivers/net/i40e/base/i40e_adminq_cmd.h | 132 +++++++++++---
drivers/net/i40e/base/i40e_common.c | 78 +++++++--
drivers/net/i40e/base/i40e_devids.h | 1 -
drivers/net/i40e/base/i40e_prototype.h | 3 +
drivers/net/i40e/base/i40e_type.h | 295 ++++++++++++++++++++++++++++----
drivers/net/i40e/i40e_ethdev.c | 1 -
6 files changed, 428 insertions(+), 82 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 01/12] net/i40e/base: add function to clear default VSI
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 02/12] net/i40e/base: fix UDP packet header Zhang Qi
` (11 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Add function that help to return the VSI to Promiscuous Unicast mode.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 28 ++++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 2 ++
2 files changed, 30 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 98ed4b6..a442067 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2215,6 +2215,34 @@ enum i40e_status_code i40e_aq_set_default_vsi(struct i40e_hw *hw,
}
/**
+ * i40e_aq_clear_default_vsi
+ * @hw: pointer to the hw struct
+ * @seid: vsi number
+ * @cmd_details: pointer to command details structure or NULL
+ **/
+enum i40e_status_code i40e_aq_clear_default_vsi(struct i40e_hw *hw,
+ u16 seid,
+ 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;
+
+ i40e_fill_default_direct_cmd_desc(&desc,
+ i40e_aqc_opc_set_vsi_promiscuous_modes);
+
+ cmd->promiscuous_flags = CPU_TO_LE16(0);
+ cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_DEFAULT);
+ cmd->seid = CPU_TO_LE16(seid);
+
+ status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
+
+ return status;
+}
+
+/**
* i40e_aq_set_vsi_unicast_promiscuous
* @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 03dda93..f17636b 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -124,6 +124,8 @@ enum i40e_status_code i40e_aq_set_phy_debug(struct i40e_hw *hw, u8 cmd_flags,
struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_set_default_vsi(struct i40e_hw *hw, u16 vsi_id,
struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_clear_default_vsi(struct i40e_hw *hw, u16 vsi_id,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
bool qualified_modules, bool report_init,
struct i40e_aq_get_phy_abilities_resp *abilities,
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 02/12] net/i40e/base: fix UDP packet header
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 01/12] net/i40e/base: add function to clear default VSI Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 03/12] net/i40e/base: define macros for PHY type cap Zhang Qi
` (10 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Correct Rx ptype payload layer for non_tunneled ipv6.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Zhang Qi <qi.z.zhang@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 a442067..1de0e39 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -773,7 +773,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {
/* Non Tunneled IPv6 */
I40E_PTT(88, IP, IPV6, FRG, NONE, NONE, NOF, NONE, PAY3),
I40E_PTT(89, IP, IPV6, NOF, NONE, NONE, NOF, NONE, PAY3),
- I40E_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY3),
+ I40E_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY4),
I40E_PTT_UNUSED_ENTRY(91),
I40E_PTT(92, IP, IPV6, NOF, NONE, NONE, NOF, TCP, PAY4),
I40E_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4),
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 03/12] net/i40e/base: define macros for PHY type cap
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 01/12] net/i40e/base: add function to clear default VSI Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 02/12] net/i40e/base: fix UDP packet header Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 04/12] net/i40e/base: add 25G PHY capability support Zhang Qi
` (9 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Define macros for PHY type capabilities to replace exist enum type.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 60 +++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 31 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 5349419..51abc37 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -292,37 +292,6 @@ struct i40e_link_status {
#define I40E_MODULE_TYPE_1000BASE_T 0x08
};
-enum i40e_aq_capabilities_phy_type {
- I40E_CAP_PHY_TYPE_SGMII = BIT(I40E_PHY_TYPE_SGMII),
- I40E_CAP_PHY_TYPE_1000BASE_KX = BIT(I40E_PHY_TYPE_1000BASE_KX),
- I40E_CAP_PHY_TYPE_10GBASE_KX4 = BIT(I40E_PHY_TYPE_10GBASE_KX4),
- I40E_CAP_PHY_TYPE_10GBASE_KR = BIT(I40E_PHY_TYPE_10GBASE_KR),
- I40E_CAP_PHY_TYPE_40GBASE_KR4 = BIT(I40E_PHY_TYPE_40GBASE_KR4),
- I40E_CAP_PHY_TYPE_XAUI = BIT(I40E_PHY_TYPE_XAUI),
- I40E_CAP_PHY_TYPE_XFI = BIT(I40E_PHY_TYPE_XFI),
- I40E_CAP_PHY_TYPE_SFI = BIT(I40E_PHY_TYPE_SFI),
- I40E_CAP_PHY_TYPE_XLAUI = BIT(I40E_PHY_TYPE_XLAUI),
- I40E_CAP_PHY_TYPE_XLPPI = BIT(I40E_PHY_TYPE_XLPPI),
- I40E_CAP_PHY_TYPE_40GBASE_CR4_CU = BIT(I40E_PHY_TYPE_40GBASE_CR4_CU),
- I40E_CAP_PHY_TYPE_10GBASE_CR1_CU = BIT(I40E_PHY_TYPE_10GBASE_CR1_CU),
- I40E_CAP_PHY_TYPE_10GBASE_AOC = BIT(I40E_PHY_TYPE_10GBASE_AOC),
- I40E_CAP_PHY_TYPE_40GBASE_AOC = BIT(I40E_PHY_TYPE_40GBASE_AOC),
- I40E_CAP_PHY_TYPE_100BASE_TX = BIT(I40E_PHY_TYPE_100BASE_TX),
- I40E_CAP_PHY_TYPE_1000BASE_T = BIT(I40E_PHY_TYPE_1000BASE_T),
- I40E_CAP_PHY_TYPE_10GBASE_T = BIT(I40E_PHY_TYPE_10GBASE_T),
- I40E_CAP_PHY_TYPE_10GBASE_SR = BIT(I40E_PHY_TYPE_10GBASE_SR),
- I40E_CAP_PHY_TYPE_10GBASE_LR = BIT(I40E_PHY_TYPE_10GBASE_LR),
- I40E_CAP_PHY_TYPE_10GBASE_SFPP_CU = BIT(I40E_PHY_TYPE_10GBASE_SFPP_CU),
- I40E_CAP_PHY_TYPE_10GBASE_CR1 = BIT(I40E_PHY_TYPE_10GBASE_CR1),
- I40E_CAP_PHY_TYPE_40GBASE_CR4 = BIT(I40E_PHY_TYPE_40GBASE_CR4),
- I40E_CAP_PHY_TYPE_40GBASE_SR4 = BIT(I40E_PHY_TYPE_40GBASE_SR4),
- I40E_CAP_PHY_TYPE_40GBASE_LR4 = BIT(I40E_PHY_TYPE_40GBASE_LR4),
- I40E_CAP_PHY_TYPE_1000BASE_SX = BIT(I40E_PHY_TYPE_1000BASE_SX),
- I40E_CAP_PHY_TYPE_1000BASE_LX = BIT(I40E_PHY_TYPE_1000BASE_LX),
- I40E_CAP_PHY_TYPE_1000BASE_T_OPTICAL = BIT(I40E_PHY_TYPE_1000BASE_T_OPTICAL),
- I40E_CAP_PHY_TYPE_20GBASE_KR2 = BIT(I40E_PHY_TYPE_20GBASE_KR2)
-};
-
struct i40e_phy_info {
struct i40e_link_status link_info;
struct i40e_link_status link_info_old;
@@ -332,6 +301,35 @@ struct i40e_phy_info {
u32 phy_types;
};
+#define I40E_CAP_PHY_TYPE_SGMII BIT_ULL(I40E_PHY_TYPE_SGMII)
+#define I40E_CAP_PHY_TYPE_1000BASE_KX BIT_ULL(I40E_PHY_TYPE_1000BASE_KX)
+#define I40E_CAP_PHY_TYPE_10GBASE_KX4 BIT_ULL(I40E_PHY_TYPE_10GBASE_KX4)
+#define I40E_CAP_PHY_TYPE_10GBASE_KR BIT_ULL(I40E_PHY_TYPE_10GBASE_KR)
+#define I40E_CAP_PHY_TYPE_40GBASE_KR4 BIT_ULL(I40E_PHY_TYPE_40GBASE_KR4)
+#define I40E_CAP_PHY_TYPE_XAUI BIT_ULL(I40E_PHY_TYPE_XAUI)
+#define I40E_CAP_PHY_TYPE_XFI BIT_ULL(I40E_PHY_TYPE_XFI)
+#define I40E_CAP_PHY_TYPE_SFI BIT_ULL(I40E_PHY_TYPE_SFI)
+#define I40E_CAP_PHY_TYPE_XLAUI BIT_ULL(I40E_PHY_TYPE_XLAUI)
+#define I40E_CAP_PHY_TYPE_XLPPI BIT_ULL(I40E_PHY_TYPE_XLPPI)
+#define I40E_CAP_PHY_TYPE_40GBASE_CR4_CU BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4_CU)
+#define I40E_CAP_PHY_TYPE_10GBASE_CR1_CU BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU)
+#define I40E_CAP_PHY_TYPE_10GBASE_AOC BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC)
+#define I40E_CAP_PHY_TYPE_40GBASE_AOC BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC)
+#define I40E_CAP_PHY_TYPE_100BASE_TX BIT_ULL(I40E_PHY_TYPE_100BASE_TX)
+#define I40E_CAP_PHY_TYPE_1000BASE_T BIT_ULL(I40E_PHY_TYPE_1000BASE_T)
+#define I40E_CAP_PHY_TYPE_10GBASE_T BIT_ULL(I40E_PHY_TYPE_10GBASE_T)
+#define I40E_CAP_PHY_TYPE_10GBASE_SR BIT_ULL(I40E_PHY_TYPE_10GBASE_SR)
+#define I40E_CAP_PHY_TYPE_10GBASE_LR BIT_ULL(I40E_PHY_TYPE_10GBASE_LR)
+#define I40E_CAP_PHY_TYPE_10GBASE_SFPP_CU BIT_ULL(I40E_PHY_TYPE_10GBASE_SFPP_CU)
+#define I40E_CAP_PHY_TYPE_10GBASE_CR1 BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1)
+#define I40E_CAP_PHY_TYPE_40GBASE_CR4 BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4)
+#define I40E_CAP_PHY_TYPE_40GBASE_SR4 BIT_ULL(I40E_PHY_TYPE_40GBASE_SR4)
+#define I40E_CAP_PHY_TYPE_40GBASE_LR4 BIT_ULL(I40E_PHY_TYPE_40GBASE_LR4)
+#define I40E_CAP_PHY_TYPE_1000BASE_SX BIT_ULL(I40E_PHY_TYPE_1000BASE_SX)
+#define I40E_CAP_PHY_TYPE_1000BASE_LX BIT_ULL(I40E_PHY_TYPE_1000BASE_LX)
+#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_HW_CAP_MAX_GPIO 30
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 04/12] net/i40e/base: add 25G PHY capability support
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (2 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 03/12] net/i40e/base: define macros for PHY type cap Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities Zhang Qi
` (8 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Add PHY type macros for 25G PHY capabilities.
Change data type and bit setting defines for 25G.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 11 ++++++++++-
drivers/net/i40e/base/i40e_type.h | 6 +++++-
2 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 2b7a760..2831593 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1691,6 +1691,7 @@ enum i40e_aq_phy_type {
#define I40E_LINK_SPEED_10GB_SHIFT 0x3
#define I40E_LINK_SPEED_40GB_SHIFT 0x4
#define I40E_LINK_SPEED_20GB_SHIFT 0x5
+#define I40E_LINK_SPEED_25GB_SHIFT 0x6
enum i40e_aq_link_speed {
I40E_LINK_SPEED_UNKNOWN = 0,
@@ -1698,7 +1699,8 @@ enum i40e_aq_link_speed {
I40E_LINK_SPEED_1GB = (1 << I40E_LINK_SPEED_1000MB_SHIFT),
I40E_LINK_SPEED_10GB = (1 << I40E_LINK_SPEED_10GB_SHIFT),
I40E_LINK_SPEED_40GB = (1 << I40E_LINK_SPEED_40GB_SHIFT),
- I40E_LINK_SPEED_20GB = (1 << I40E_LINK_SPEED_20GB_SHIFT)
+ I40E_LINK_SPEED_20GB = (1 << I40E_LINK_SPEED_20GB_SHIFT),
+ I40E_LINK_SPEED_25GB = (1 << I40E_LINK_SPEED_25GB_SHIFT),
};
struct i40e_aqc_module_desc {
@@ -1833,6 +1835,13 @@ struct i40e_aqc_get_link_status {
#define I40E_AQ_LINK_TX_DRAINED 0x01
#define I40E_AQ_LINK_TX_FLUSHED 0x03
#define I40E_AQ_LINK_FORCED_40G 0x10
+/* 25G Error Codes */
+#define I40E_AQ_25G_NO_ERR 0X00
+#define I40E_AQ_25G_NOT_PRESENT 0X01
+#define I40E_AQ_25G_NVM_CRC_ERR 0X02
+#define I40E_AQ_25G_SBUS_UCODE_ERR 0X03
+#define I40E_AQ_25G_SERDES_UCODE_ERR 0X04
+#define I40E_AQ_25G_NIMB_UCODE_ERR 0X05
u8 loopback; /* use defines from i40e_aqc_set_lb_mode */
__le16 max_frame_size;
u8 config;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 51abc37..86c072d 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -298,7 +298,7 @@ struct i40e_phy_info {
bool get_link_info;
enum i40e_media_type media_type;
/* all the phy types the NVM is capable of */
- u32 phy_types;
+ u64 phy_types;
};
#define I40E_CAP_PHY_TYPE_SGMII BIT_ULL(I40E_PHY_TYPE_SGMII)
@@ -330,6 +330,10 @@ 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)
#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.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (3 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 04/12] net/i40e/base: add 25G PHY capability support Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-09-22 16:54 ` Ferruh Yigit
2016-08-25 20:05 ` [dpdk-dev] [PATCH 06/12] net/i40e/base: enable wake on LAN for X722 Zhang Qi
` (7 subsequent siblings)
12 siblings, 1 reply; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Add extended PHY types to get PHY abilities command response struct
for 25G, then put PHY types for 25g into the proper PHY_Type_Ext field.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 15 +++++++++++++--
drivers/net/i40e/base/i40e_common.c | 4 +++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 2831593..4ae4315 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1733,7 +1733,13 @@ struct i40e_aq_get_phy_abilities_resp {
__le32 eeer_val;
u8 d3_lpan;
#define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
- u8 reserved[3];
+ 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 mod_type_ext;
+ u8 ext_comp_code;
u8 phy_id[4];
u8 module_type[3];
u8 qualified_module_count;
@@ -1755,7 +1761,12 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
__le16 eee_capability;
__le32 eeer;
u8 low_power_ctrl;
- u8 reserved[3];
+ 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 reserved[2];
};
I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config);
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 1de0e39..ff64dca 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1670,8 +1670,10 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
if (hw->aq.asq_last_status == I40E_AQ_RC_EIO)
status = I40E_ERR_UNKNOWN_PHY;
- if (report_init)
+ if (report_init) {
hw->phy.phy_types = LE32_TO_CPU(abilities->phy_type);
+ hw->phy.phy_types |= ((u64)abilities->phy_type_ext << 32);
+ }
return status;
}
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 06/12] net/i40e/base: enable wake on LAN for X722
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (4 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 07/12] net/i40e/base: enable set/get HMC resource profile Zhang Qi
` (6 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Add macro and data structure to support wake on
LAN feature for X722.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 36 +++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4ae4315..271f9b5 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -196,6 +196,7 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_remove_control_packet_filter = 0x025B,
i40e_aqc_opc_add_cloud_filters = 0x025C,
i40e_aqc_opc_remove_cloud_filters = 0x025D,
+ i40e_aqc_opc_clear_wol_switch_filters = 0x025E,
i40e_aqc_opc_add_mirror_rule = 0x0260,
i40e_aqc_opc_delete_mirror_rule = 0x0261,
@@ -581,9 +582,18 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_clear_pxe);
struct i40e_aqc_set_wol_filter {
__le16 filter_index;
#define I40E_AQC_MAX_NUM_WOL_FILTERS 8
+#define I40E_AQC_SET_WOL_FILTER_TYPE_MAGIC_SHIFT 15
+#define I40E_AQC_SET_WOL_FILTER_TYPE_MAGIC_MASK (0x1 << \
+ I40E_AQC_SET_WOL_FILTER_TYPE_MAGIC_SHIFT)
+
+#define I40E_AQC_SET_WOL_FILTER_INDEX_SHIFT 0
+#define I40E_AQC_SET_WOL_FILTER_INDEX_MASK (0x7 << \
+ I40E_AQC_SET_WOL_FILTER_INDEX_SHIFT)
__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_ACTION_CLEAR 0
+#define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1
__le16 valid_flags;
#define I40E_AQC_SET_WOL_FILTER_ACTION_VALID 0x8000
#define I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID 0x4000
@@ -594,23 +604,29 @@ struct i40e_aqc_set_wol_filter {
I40E_CHECK_CMD_LENGTH(i40e_aqc_set_wol_filter);
+struct i40e_aqc_set_wol_filter_data {
+ u8 filter[128];
+ u8 mask[16];
+};
+
+I40E_CHECK_STRUCT_LEN(0x90, i40e_aqc_set_wol_filter_data);
+
/* Get Wake Reason (0x0121) */
struct i40e_aqc_get_wake_reason_completion {
u8 reserved_1[2];
__le16 wake_reason;
+#define I40E_AQC_GET_WAKE_UP_REASON_WOL_REASON_MATCHED_INDEX_SHIFT 0
+#define I40E_AQC_GET_WAKE_UP_REASON_WOL_REASON_MATCHED_INDEX_MASK (0xFF << \
+ I40E_AQC_GET_WAKE_UP_REASON_WOL_REASON_MATCHED_INDEX_SHIFT)
+#define I40E_AQC_GET_WAKE_UP_REASON_WOL_REASON_RESERVED_SHIFT 8
+#define I40E_AQC_GET_WAKE_UP_REASON_WOL_REASON_RESERVED_MASK (0xFF << \
+ I40E_AQC_GET_WAKE_UP_REASON_WOL_REASON_RESERVED_SHIFT)
u8 reserved_2[12];
};
I40E_CHECK_CMD_LENGTH(i40e_aqc_get_wake_reason_completion);
-struct i40e_aqc_set_wol_filter_data {
- u8 filter[128];
- u8 mask[16];
-};
-
-I40E_CHECK_STRUCT_LEN(0x90, i40e_aqc_set_wol_filter_data);
-
#endif /* X722_SUPPORT */
/* Switch configuration commands (0x02xx) */
@@ -694,6 +710,8 @@ struct i40e_aqc_set_port_parameters {
#define I40E_AQ_SET_P_PARAMS_PAD_SHORT_PACKETS 2 /* must set! */
#define I40E_AQ_SET_P_PARAMS_DOUBLE_VLAN_ENA 4
__le16 bad_frame_vsi;
+#define I40E_AQ_SET_P_PARAMS_BFRAME_SEID_SHIFT 0x0
+#define I40E_AQ_SET_P_PARAMS_BFRAME_SEID_MASK 0x3FF
__le16 default_seid; /* reserved for command */
u8 reserved[10];
};
@@ -745,6 +763,7 @@ I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp);
/* Set Switch Configuration (direct 0x0205) */
struct i40e_aqc_set_switch_config {
__le16 flags;
+/* flags used for both fields below */
#define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001
#define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002
__le16 valid_flags;
@@ -1858,11 +1877,12 @@ struct i40e_aqc_get_link_status {
u8 config;
#define I40E_AQ_CONFIG_CRC_ENA 0x04
#define I40E_AQ_CONFIG_PACING_MASK 0x78
- u8 external_power_ability;
+ u8 power_desc;
#define I40E_AQ_LINK_POWER_CLASS_1 0x00
#define I40E_AQ_LINK_POWER_CLASS_2 0x01
#define I40E_AQ_LINK_POWER_CLASS_3 0x02
#define I40E_AQ_LINK_POWER_CLASS_4 0x03
+#define I40E_AQ_PWR_CLASS_MASK 0x03
u8 reserved[4];
};
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 07/12] net/i40e/base: enable set/get HMC resource profile
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (5 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 06/12] net/i40e/base: enable wake on LAN for X722 Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 08/12] net/i40e/base: add multicast magic packet enable flag Zhang Qi
` (5 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Enable admin queue command that can get or set HMC resource
profile
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 271f9b5..271bebe 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -224,6 +224,9 @@ enum i40e_admin_queue_opc {
i40e_aqc_opc_suspend_port_tx = 0x041B,
i40e_aqc_opc_resume_port_tx = 0x041C,
i40e_aqc_opc_configure_partition_bw = 0x041D,
+ /* hmc */
+ i40e_aqc_opc_query_hmc_resource_profile = 0x0500,
+ i40e_aqc_opc_set_hmc_resource_profile = 0x0501,
/* phy commands*/
i40e_aqc_opc_get_phy_abilities = 0x0600,
@@ -1663,6 +1666,24 @@ struct i40e_aqc_configure_partition_bw_data {
I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
+/* Get and set the active HMC resource profile and status.
+ * (direct 0x0500) and (direct 0x0501)
+ */
+struct i40e_aq_get_set_hmc_resource_profile {
+ u8 pm_profile;
+ u8 pe_vf_enabled;
+ u8 reserved[14];
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aq_get_set_hmc_resource_profile);
+
+enum i40e_aq_hmc_profile {
+ /* I40E_HMC_PROFILE_NO_CHANGE = 0, reserved */
+ I40E_HMC_PROFILE_DEFAULT = 1,
+ I40E_HMC_PROFILE_FAVOR_VF = 2,
+ I40E_HMC_PROFILE_EQUAL = 3,
+};
+
/* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
/* set in param0 for get phy abilities to report qualified modules */
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 08/12] net/i40e/base: add multicast magic packet enable flag
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (6 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 07/12] net/i40e/base: enable set/get HMC resource profile Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 09/12] net/i40e/base: enable proxy cmd for x722 Zhang Qi
` (4 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Add a definiation for multicast magic packet enable flag
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 271bebe..a1594eb 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -556,6 +556,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_address_read_data);
/* Manage MAC Address Write Command (0x0108) */
struct i40e_aqc_mac_address_write {
__le16 command_flags;
+#define I40E_AQC_MC_MAG_EN 0x0100
#define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000
#define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000
#define I40E_AQC_WRITE_TYPE_PORT 0x8000
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 09/12] net/i40e/base: enable proxy cmd for x722
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (7 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 08/12] net/i40e/base: add multicast magic packet enable flag Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 10/12] net/i40e: minor changes for clean up Zhang Qi
` (3 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Fill the data structure for set proxying configuration
command table entry for X722
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 38 ++++++++++++++++++---------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a1594eb..36e1569 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -475,13 +475,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
/* Set ARP Proxy command / response (indirect 0x0104) */
struct i40e_aqc_arp_proxy_data {
__le16 command_flags;
-#define I40E_AQ_ARP_INIT_IPV4 0x0008
-#define I40E_AQ_ARP_UNSUP_CTL 0x0010
-#define I40E_AQ_ARP_ENA 0x0020
-#define I40E_AQ_ARP_ADD_IPV4 0x0040
-#define I40E_AQ_ARP_DEL_IPV4 0x0080
+#define I40E_AQ_ARP_INIT_IPV4 0x0800
+#define I40E_AQ_ARP_UNSUP_CTL 0x1000
+#define I40E_AQ_ARP_ENA 0x2000
+#define I40E_AQ_ARP_ADD_IPV4 0x4000
+#define I40E_AQ_ARP_DEL_IPV4 0x8000
__le16 table_id;
- __le32 pfpm_proxyfc;
+ __le32 enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE 0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE 0x00000800
__le32 ip_addr;
u8 mac_addr[6];
u8 reserved[2];
@@ -496,17 +498,19 @@ struct i40e_aqc_ns_proxy_data {
__le16 table_idx_ipv6_0;
__le16 table_idx_ipv6_1;
__le16 control;
-#define I40E_AQ_NS_PROXY_ADD_0 0x0100
-#define I40E_AQ_NS_PROXY_DEL_0 0x0200
-#define I40E_AQ_NS_PROXY_ADD_1 0x0400
-#define I40E_AQ_NS_PROXY_DEL_1 0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0 0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0 0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1 0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1 0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ 0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL 0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL 0x0004
+#define I40E_AQ_NS_PROXY_ADD_0 0x0001
+#define I40E_AQ_NS_PROXY_DEL_0 0x0002
+#define I40E_AQ_NS_PROXY_ADD_1 0x0004
+#define I40E_AQ_NS_PROXY_DEL_1 0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0 0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0 0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1 0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1 0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ 0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL 0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL 0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE 0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE 0x1000
u8 mac_addr_0[6];
u8 mac_addr_1[6];
u8 local_mac_addr[6];
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 10/12] net/i40e: minor changes for clean up
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (8 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 09/12] net/i40e/base: enable proxy cmd for x722 Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 11/12] net/i40e/base: add function to get SAN MAC address Zhang Qi
` (2 subsequent siblings)
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Remove unused device ID.
Remove unused compile option.
Adjust code alignment.
Standardize macros.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 18 ++++--------------
drivers/net/i40e/base/i40e_devids.h | 1 -
drivers/net/i40e/base/i40e_type.h | 6 ++++--
drivers/net/i40e/i40e_ethdev.c | 1 -
4 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ff64dca..40aac06 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -81,7 +81,6 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
case I40E_DEV_ID_1G_BASE_T_X722:
case I40E_DEV_ID_10G_BASE_T_X722:
case I40E_DEV_ID_SFP_I_X722:
- case I40E_DEV_ID_QSFP_I_X722:
hw->mac.type = I40E_MAC_X722;
break;
#endif
@@ -383,8 +382,7 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
d_buf[j] = buf[i];
i40e_debug(hw, mask,
"\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n",
- i_sav, d_buf[0], d_buf[1],
- d_buf[2], d_buf[3],
+ i_sav, d_buf[0], d_buf[1], d_buf[2], d_buf[3],
d_buf[4], d_buf[5], d_buf[6], d_buf[7],
d_buf[8], d_buf[9], d_buf[10], d_buf[11],
d_buf[12], d_buf[13], d_buf[14], d_buf[15]);
@@ -3822,16 +3820,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
if (p->fcoe)
i40e_debug(hw, I40E_DEBUG_ALL, "device is FCoE capable\n");
-#ifdef I40E_FCOE_ENA
- /* Software override ensuring FCoE is disabled if npar or mfp
- * mode because it is not supported in these modes.
- */
- if (p->npar_enable || p->flex10_enable)
- p->fcoe = false;
-#else
/* Always disable FCoE if compiled without the I40E_FCOE_ENA flag */
p->fcoe = false;
-#endif
/* count the enabled ports (aka the "not disabled" ports) */
hw->num_ports = 0;
@@ -5482,12 +5472,12 @@ STATIC void i40e_fix_up_geneve_vni(
u16 tnl_type;
u32 ti;
- tnl_type = (le16_to_cpu(f[i].flags) &
+ tnl_type = (LE16_TO_CPU(f[i].flags) &
I40E_AQC_ADD_CLOUD_TNL_TYPE_MASK) >>
I40E_AQC_ADD_CLOUD_TNL_TYPE_SHIFT;
if (tnl_type == I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE) {
- ti = le32_to_cpu(f[i].tenant_id);
- f[i].tenant_id = cpu_to_le32(ti << 8);
+ ti = LE32_TO_CPU(f[i].tenant_id);
+ f[i].tenant_id = CPU_TO_LE32(ti << 8);
}
}
}
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index ed73e1d..8bd5793 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -68,7 +68,6 @@ POSSIBILITY OF SUCH DAMAGE.
#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1
#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2
#define I40E_DEV_ID_SFP_I_X722 0x37D3
-#define I40E_DEV_ID_QSFP_I_X722 0x37D4
#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
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 86c072d..de3cb2b 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -157,8 +157,10 @@ enum i40e_debug_mask {
#define I40E_PCI_LINK_SPEED_5000 0x2
#define I40E_PCI_LINK_SPEED_8000 0x3
-#define I40E_MDIO_STCODE 0
-#define I40E_MDIO_OPCODE_ADDRESS 0
+#define I40E_MDIO_STCODE I40E_MASK(0, \
+ I40E_GLGEN_MSCA_STCODE_SHIFT)
+#define I40E_MDIO_OPCODE_ADDRESS I40E_MASK(0, \
+ I40E_GLGEN_MSCA_OPCODE_SHIFT)
#define I40E_MDIO_OPCODE_WRITE I40E_MASK(1, \
I40E_GLGEN_MSCA_OPCODE_SHIFT)
#define I40E_MDIO_OPCODE_READ_INC_ADDR I40E_MASK(2, \
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d0aeb70..acc25a2 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -474,7 +474,6 @@ static const struct rte_pci_id pci_id_i40e_map[] = {
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_1G_BASE_T_X722) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T_X722) },
{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_I_X722) },
- { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_I_X722) },
{ .vendor_id = 0, /* sentinel */ },
};
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 11/12] net/i40e/base: add function to get SAN MAC address
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (9 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 10/12] net/i40e: minor changes for clean up Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 12/12] net/i40e/base: add FCoE support Zhang Qi
2016-09-23 11:31 ` [dpdk-dev] [PATCH 00/12] net/i40e: share code update Bruce Richardson
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Add function that reads the adapter's SAN MAC address from NVM
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 26 ++++++++++++++++++++++++++
drivers/net/i40e/base/i40e_prototype.h | 1 +
2 files changed, 27 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 40aac06..9a6b3ed 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1189,6 +1189,32 @@ void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable)
}
/**
+ * i40e_get_san_mac_addr - get SAN MAC address
+ * @hw: pointer to the HW structure
+ * @mac_addr: pointer to SAN MAC address
+ *
+ * Reads the adapter's SAN MAC address from NVM
+ **/
+enum i40e_status_code i40e_get_san_mac_addr(struct i40e_hw *hw,
+ u8 *mac_addr)
+{
+ struct i40e_aqc_mac_address_read_data addrs;
+ enum i40e_status_code status;
+ u16 flags = 0;
+
+ status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL);
+ if (status)
+ return status;
+
+ if (flags & I40E_AQC_SAN_ADDR_VALID)
+ memcpy(mac_addr, &addrs.pf_san_mac, sizeof(addrs.pf_san_mac));
+ else
+ status = I40E_ERR_INVALID_MAC_ADDR;
+
+ return status;
+}
+
+/**
* i40e_read_pba_string - Reads part number string from EEPROM
* @hw: pointer to hardware structure
* @pba_num: stores the part number string from the EEPROM
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index f17636b..3aab5ca 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -440,6 +440,7 @@ enum i40e_status_code i40e_get_port_mac_addr(struct i40e_hw *hw, u8 *mac_addr);
enum i40e_status_code i40e_read_pba_string(struct i40e_hw *hw, u8 *pba_num,
u32 pba_num_size);
void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable);
+enum i40e_status_code i40e_get_san_mac_addr(struct i40e_hw *hw, u8 *mac_addr);
enum i40e_aq_link_speed i40e_get_link_speed(struct i40e_hw *hw);
/* prototype for functions used for NVM access */
enum i40e_status_code i40e_init_nvm(struct i40e_hw *hw);
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH 12/12] net/i40e/base: add FCoE support
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (10 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 11/12] net/i40e/base: add function to get SAN MAC address Zhang Qi
@ 2016-08-25 20:05 ` Zhang Qi
2016-09-23 11:31 ` [dpdk-dev] [PATCH 00/12] net/i40e: share code update Bruce Richardson
12 siblings, 0 replies; 16+ messages in thread
From: Zhang Qi @ 2016-08-25 20:05 UTC (permalink / raw)
To: jingjing.wu, helin.zhang; +Cc: dev, Zhang Qi
Enable FCoE in get PHY capability.
Add data structure for FCoE statistics collection.
Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 12 +-
drivers/net/i40e/base/i40e_type.h | 219 ++++++++++++++++++++++++++++++++
2 files changed, 230 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 36e1569..4f06772 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1768,6 +1768,8 @@ struct i40e_aq_get_phy_abilities_resp {
#define I40E_AQ_PHY_LINK_ENABLED 0x08
#define I40E_AQ_PHY_AN_ENABLED 0x10
#define I40E_AQ_PHY_FLAG_MODULE_QUAL 0x20
+#define I40E_AQ_PHY_FEC_ABILITY_KR 0x40
+#define I40E_AQ_PHY_FEC_ABILITY_RS 0x80
__le16 eee_capability;
#define I40E_AQ_EEE_100BASE_TX 0x0002
#define I40E_AQ_EEE_1000BASE_T 0x0004
@@ -1811,7 +1813,13 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
#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 reserved[2];
+ 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)
+ u8 reserved;
};
I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config);
@@ -1901,6 +1909,8 @@ struct i40e_aqc_get_link_status {
u8 loopback; /* use defines from i40e_aqc_set_lb_mode */
__le16 max_frame_size;
u8 config;
+#define I40E_AQ_CONFIG_FEC_KR_ENA 0x01
+#define I40E_AQ_CONFIG_FEC_RS_ENA 0x02
#define I40E_AQ_CONFIG_CRC_ENA 0x04
#define I40E_AQ_CONFIG_PACING_MASK 0x78
u8 power_desc;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index de3cb2b..b5f72c3 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -1392,6 +1392,23 @@ struct i40e_veb_tc_stats {
u64 tc_tx_bytes[I40E_MAX_TRAFFIC_CLASS];
};
+/* Statistics collected per function for FCoE */
+struct i40e_fcoe_stats {
+ u64 rx_fcoe_packets; /* fcoeprc */
+ u64 rx_fcoe_dwords; /* focedwrc */
+ u64 rx_fcoe_dropped; /* fcoerpdc */
+ u64 tx_fcoe_packets; /* fcoeptc */
+ u64 tx_fcoe_dwords; /* focedwtc */
+ u64 fcoe_bad_fccrc; /* fcoecrc */
+ u64 fcoe_last_error; /* fcoelast */
+ u64 fcoe_ddp_count; /* fcoeddpc */
+};
+
+/* offset to per function FCoE statistics block */
+#define I40E_FCOE_VF_STAT_OFFSET 0
+#define I40E_FCOE_PF_STAT_OFFSET 128
+#define I40E_FCOE_STAT_MAX (I40E_FCOE_PF_STAT_OFFSET + I40E_MAX_PF)
+
/* Statistics collected by the MAC */
struct i40e_hw_port_stats {
/* eth stats collected by the port */
@@ -1513,6 +1530,208 @@ struct i40e_hw_port_stats {
#define I40E_SRRD_SRCTL_ATTEMPTS 100000
+/* FCoE Tx context descriptor - Use the i40e_tx_context_desc struct */
+
+enum i40E_fcoe_tx_ctx_desc_cmd_bits {
+ I40E_FCOE_TX_CTX_DESC_OPCODE_SINGLE_SEND = 0x00, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_TSO_FC_CLASS2 = 0x01, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_TSO_FC_CLASS3 = 0x05, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_ETSO_FC_CLASS2 = 0x02, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_ETSO_FC_CLASS3 = 0x06, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_DWO_FC_CLASS2 = 0x03, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_DWO_FC_CLASS3 = 0x07, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_DDP_CTX_INVL = 0x08, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_OPCODE_DWO_CTX_INVL = 0x09, /* 4 BITS */
+ I40E_FCOE_TX_CTX_DESC_RELOFF = 0x10,
+ I40E_FCOE_TX_CTX_DESC_CLRSEQ = 0x20,
+ I40E_FCOE_TX_CTX_DESC_DIFENA = 0x40,
+ I40E_FCOE_TX_CTX_DESC_IL2TAG2 = 0x80
+};
+
+/* FCoE DIF/DIX Context descriptor */
+struct i40e_fcoe_difdix_context_desc {
+ __le64 flags_buff0_buff1_ref;
+ __le64 difapp_msk_bias;
+};
+
+#define I40E_FCOE_DIFDIX_CTX_QW0_FLAGS_SHIFT 0
+#define I40E_FCOE_DIFDIX_CTX_QW0_FLAGS_MASK (0xFFFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW0_FLAGS_SHIFT)
+
+enum i40e_fcoe_difdix_ctx_desc_flags_bits {
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_RSVD = 0x0000,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_APPTYPE_TAGCHK = 0x0000,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_APPTYPE_TAGNOTCHK = 0x0004,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_GTYPE_OPAQUE = 0x0000,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_GTYPE_CHKINTEGRITY = 0x0008,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_GTYPE_CHKINTEGRITY_APPTAG = 0x0010,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_GTYPE_CHKINTEGRITY_APPREFTAG = 0x0018,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_REFTYPE_CNST = 0x0000,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_REFTYPE_INC1BLK = 0x0020,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_REFTYPE_APPTAG = 0x0040,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_REFTYPE_RSVD = 0x0060,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIXMODE_XSUM = 0x0000,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIXMODE_CRC = 0x0080,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFHOST_UNTAG = 0x0000,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFHOST_BUF = 0x0100,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFHOST_RSVD = 0x0200,
+ /* 2 BITS */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFHOST_EMBDTAGS = 0x0300,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFLAN_UNTAG = 0x0000,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFLAN_TAG = 0x0400,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFBLK_512B = 0x0000,
+ /* 1 BIT */
+ I40E_FCOE_DIFDIX_CTX_DESC_DIFBLK_4K = 0x0800
+};
+
+#define I40E_FCOE_DIFDIX_CTX_QW0_BUFF0_SHIFT 12
+#define I40E_FCOE_DIFDIX_CTX_QW0_BUFF0_MASK (0x3FFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW0_BUFF0_SHIFT)
+
+#define I40E_FCOE_DIFDIX_CTX_QW0_BUFF1_SHIFT 22
+#define I40E_FCOE_DIFDIX_CTX_QW0_BUFF1_MASK (0x3FFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW0_BUFF1_SHIFT)
+
+#define I40E_FCOE_DIFDIX_CTX_QW0_REF_SHIFT 32
+#define I40E_FCOE_DIFDIX_CTX_QW0_REF_MASK (0xFFFFFFFFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW0_REF_SHIFT)
+
+#define I40E_FCOE_DIFDIX_CTX_QW1_APP_SHIFT 0
+#define I40E_FCOE_DIFDIX_CTX_QW1_APP_MASK (0xFFFFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW1_APP_SHIFT)
+
+#define I40E_FCOE_DIFDIX_CTX_QW1_APP_MSK_SHIFT 16
+#define I40E_FCOE_DIFDIX_CTX_QW1_APP_MSK_MASK (0xFFFFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW1_APP_MSK_SHIFT)
+
+#define I40E_FCOE_DIFDIX_CTX_QW1_REF_BIAS_SHIFT 32
+#define I40E_FCOE_DIFDIX_CTX_QW0_REF_BIAS_MASK (0xFFFFFFFFULL << \
+ I40E_FCOE_DIFDIX_CTX_QW1_REF_BIAS_SHIFT)
+
+/* FCoE DIF/DIX Buffers descriptor */
+struct i40e_fcoe_difdix_buffers_desc {
+ __le64 buff_addr0;
+ __le64 buff_addr1;
+};
+
+/* FCoE DDP Context descriptor */
+struct i40e_fcoe_ddp_context_desc {
+ __le64 rsvd;
+ __le64 type_cmd_foff_lsize;
+};
+
+#define I40E_FCOE_DDP_CTX_QW1_DTYPE_SHIFT 0
+#define I40E_FCOE_DDP_CTX_QW1_DTYPE_MASK (0xFULL << \
+ I40E_FCOE_DDP_CTX_QW1_DTYPE_SHIFT)
+
+#define I40E_FCOE_DDP_CTX_QW1_CMD_SHIFT 4
+#define I40E_FCOE_DDP_CTX_QW1_CMD_MASK (0xFULL << \
+ I40E_FCOE_DDP_CTX_QW1_CMD_SHIFT)
+
+enum i40e_fcoe_ddp_ctx_desc_cmd_bits {
+ I40E_FCOE_DDP_CTX_DESC_BSIZE_512B = 0x00, /* 2 BITS */
+ I40E_FCOE_DDP_CTX_DESC_BSIZE_4K = 0x01, /* 2 BITS */
+ I40E_FCOE_DDP_CTX_DESC_BSIZE_8K = 0x02, /* 2 BITS */
+ I40E_FCOE_DDP_CTX_DESC_BSIZE_16K = 0x03, /* 2 BITS */
+ I40E_FCOE_DDP_CTX_DESC_DIFENA = 0x04, /* 1 BIT */
+ I40E_FCOE_DDP_CTX_DESC_LASTSEQH = 0x08, /* 1 BIT */
+};
+
+#define I40E_FCOE_DDP_CTX_QW1_FOFF_SHIFT 16
+#define I40E_FCOE_DDP_CTX_QW1_FOFF_MASK (0x3FFFULL << \
+ I40E_FCOE_DDP_CTX_QW1_FOFF_SHIFT)
+
+#define I40E_FCOE_DDP_CTX_QW1_LSIZE_SHIFT 32
+#define I40E_FCOE_DDP_CTX_QW1_LSIZE_MASK (0x3FFFULL << \
+ I40E_FCOE_DDP_CTX_QW1_LSIZE_SHIFT)
+
+/* FCoE DDP/DWO Queue Context descriptor */
+struct i40e_fcoe_queue_context_desc {
+ __le64 dmaindx_fbase; /* 0:11 DMAINDX, 12:63 FBASE */
+ __le64 flen_tph; /* 0:12 FLEN, 13:15 TPH */
+};
+
+#define I40E_FCOE_QUEUE_CTX_QW0_DMAINDX_SHIFT 0
+#define I40E_FCOE_QUEUE_CTX_QW0_DMAINDX_MASK (0xFFFULL << \
+ I40E_FCOE_QUEUE_CTX_QW0_DMAINDX_SHIFT)
+
+#define I40E_FCOE_QUEUE_CTX_QW0_FBASE_SHIFT 12
+#define I40E_FCOE_QUEUE_CTX_QW0_FBASE_MASK (0xFFFFFFFFFFFFFULL << \
+ I40E_FCOE_QUEUE_CTX_QW0_FBASE_SHIFT)
+
+#define I40E_FCOE_QUEUE_CTX_QW1_FLEN_SHIFT 0
+#define I40E_FCOE_QUEUE_CTX_QW1_FLEN_MASK (0x1FFFULL << \
+ I40E_FCOE_QUEUE_CTX_QW1_FLEN_SHIFT)
+
+#define I40E_FCOE_QUEUE_CTX_QW1_TPH_SHIFT 13
+#define I40E_FCOE_QUEUE_CTX_QW1_TPH_MASK (0x7ULL << \
+ I40E_FCOE_QUEUE_CTX_QW1_FLEN_SHIFT)
+
+enum i40e_fcoe_queue_ctx_desc_tph_bits {
+ I40E_FCOE_QUEUE_CTX_DESC_TPHRDESC = 0x1,
+ I40E_FCOE_QUEUE_CTX_DESC_TPHDATA = 0x2
+};
+
+#define I40E_FCOE_QUEUE_CTX_QW1_RECIPE_SHIFT 30
+#define I40E_FCOE_QUEUE_CTX_QW1_RECIPE_MASK (0x3ULL << \
+ I40E_FCOE_QUEUE_CTX_QW1_RECIPE_SHIFT)
+
+/* FCoE DDP/DWO Filter Context descriptor */
+struct i40e_fcoe_filter_context_desc {
+ __le32 param;
+ __le16 seqn;
+
+ /* 48:51(0:3) RSVD, 52:63(4:15) DMAINDX */
+ __le16 rsvd_dmaindx;
+
+ /* 0:7 FLAGS, 8:52 RSVD, 53:63 LANQ */
+ __le64 flags_rsvd_lanq;
+};
+
+#define I40E_FCOE_FILTER_CTX_QW0_DMAINDX_SHIFT 4
+#define I40E_FCOE_FILTER_CTX_QW0_DMAINDX_MASK (0xFFF << \
+ I40E_FCOE_FILTER_CTX_QW0_DMAINDX_SHIFT)
+
+enum i40e_fcoe_filter_ctx_desc_flags_bits {
+ I40E_FCOE_FILTER_CTX_DESC_CTYP_DDP = 0x00,
+ I40E_FCOE_FILTER_CTX_DESC_CTYP_DWO = 0x01,
+ I40E_FCOE_FILTER_CTX_DESC_ENODE_INIT = 0x00,
+ I40E_FCOE_FILTER_CTX_DESC_ENODE_RSP = 0x02,
+ I40E_FCOE_FILTER_CTX_DESC_FC_CLASS2 = 0x00,
+ I40E_FCOE_FILTER_CTX_DESC_FC_CLASS3 = 0x04
+};
+
+#define I40E_FCOE_FILTER_CTX_QW1_FLAGS_SHIFT 0
+#define I40E_FCOE_FILTER_CTX_QW1_FLAGS_MASK (0xFFULL << \
+ I40E_FCOE_FILTER_CTX_QW1_FLAGS_SHIFT)
+
+#define I40E_FCOE_FILTER_CTX_QW1_PCTYPE_SHIFT 8
+#define I40E_FCOE_FILTER_CTX_QW1_PCTYPE_MASK (0x3FULL << \
+ I40E_FCOE_FILTER_CTX_QW1_PCTYPE_SHIFT)
+
+#define I40E_FCOE_FILTER_CTX_QW1_LANQINDX_SHIFT 53
+#define I40E_FCOE_FILTER_CTX_QW1_LANQINDX_MASK (0x7FFULL << \
+ I40E_FCOE_FILTER_CTX_QW1_LANQINDX_SHIFT)
+
enum i40e_switch_element_types {
I40E_SWITCH_ELEMENT_TYPE_MAC = 1,
I40E_SWITCH_ELEMENT_TYPE_PF = 2,
--
2.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities
2016-08-25 20:05 ` [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities Zhang Qi
@ 2016-09-22 16:54 ` Ferruh Yigit
2016-09-23 1:34 ` Zhang, Qi Z
0 siblings, 1 reply; 16+ messages in thread
From: Ferruh Yigit @ 2016-09-22 16:54 UTC (permalink / raw)
To: Zhang Qi, jingjing.wu, helin.zhang; +Cc: dev
On 8/25/2016 9:05 PM, Zhang Qi wrote:
> Add extended PHY types to get PHY abilities command response struct
> for 25G, then put PHY types for 25g into the proper PHY_Type_Ext field.
>
> Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
> ---
> drivers/net/i40e/base/i40e_adminq_cmd.h | 15 +++++++++++++--
> drivers/net/i40e/base/i40e_common.c | 4 +++-
> 2 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
> index 2831593..4ae4315 100644
> --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
> +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
> @@ -1733,7 +1733,13 @@ struct i40e_aq_get_phy_abilities_resp {
> __le32 eeer_val;
> u8 d3_lpan;
> #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
> - u8 reserved[3];
> + 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 mod_type_ext;
> + u8 ext_comp_code;
> u8 phy_id[4];
> u8 module_type[3];
> u8 qualified_module_count;
> @@ -1755,7 +1761,12 @@ struct i40e_aq_set_phy_config { /* same bits as above in all */
> __le16 eee_capability;
> __le32 eeer;
> u8 low_power_ctrl;
> - u8 reserved[3];
> + 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
These defines looks like duplicate.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities
2016-09-22 16:54 ` Ferruh Yigit
@ 2016-09-23 1:34 ` Zhang, Qi Z
0 siblings, 0 replies; 16+ messages in thread
From: Zhang, Qi Z @ 2016-09-23 1:34 UTC (permalink / raw)
To: Yigit, Ferruh; +Cc: Wu, Jingjing, Zhang, Helin, dev
Hi:
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, September 23, 2016 12:54 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY
> abilities
>
> On 8/25/2016 9:05 PM, Zhang Qi wrote:
> > Add extended PHY types to get PHY abilities command response struct
> > for 25G, then put PHY types for 25g into the proper PHY_Type_Ext field.
> >
> > Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
> > ---
> > drivers/net/i40e/base/i40e_adminq_cmd.h | 15 +++++++++++++--
> > drivers/net/i40e/base/i40e_common.c | 4 +++-
> > 2 files changed, 16 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h
> > b/drivers/net/i40e/base/i40e_adminq_cmd.h
> > index 2831593..4ae4315 100644
> > --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
> > +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
> > @@ -1733,7 +1733,13 @@ struct i40e_aq_get_phy_abilities_resp {
> > __le32 eeer_val;
> > u8 d3_lpan;
> > #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
> > - u8 reserved[3];
> > + 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 mod_type_ext;
> > + u8 ext_comp_code;
> > u8 phy_id[4];
> > u8 module_type[3];
> > u8 qualified_module_count;
> > @@ -1755,7 +1761,12 @@ struct i40e_aq_set_phy_config { /* same bits as
> above in all */
> > __le16 eee_capability;
> > __le32 eeer;
> > u8 low_power_ctrl;
> > - u8 reserved[3];
> > + 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
>
> These defines looks like duplicate.
>
>
This is copied from base driver, usually we will not modify the code if there is no critical issue.
I will feedback this issue to base driver maintainer. Thanks for capture!
Regards
Qi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH 00/12] net/i40e: share code update
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
` (11 preceding siblings ...)
2016-08-25 20:05 ` [dpdk-dev] [PATCH 12/12] net/i40e/base: add FCoE support Zhang Qi
@ 2016-09-23 11:31 ` Bruce Richardson
12 siblings, 0 replies; 16+ messages in thread
From: Bruce Richardson @ 2016-09-23 11:31 UTC (permalink / raw)
To: Zhang Qi; +Cc: jingjing.wu, helin.zhang, dev
On Thu, Aug 25, 2016 at 04:05:06PM -0400, Zhang Qi wrote:
> The patch enable 25G PHY support,
> add WoL and proxy configure feature for X722
> and other features for all i40e familiy.
>
> Zhang Qi (12):
> net/i40e/base: add function to clear default VSI
> net/i40e/base: fix UDP packet header
> net/i40e/base: define macros for PHY type caps
> net/i40e/base: add 25G PHY capability support
> net/i40e/base: enable 25G get PHY abilities
> net/i40e/base: enable wake on LAN for X722
> net/i40e/base: enable set/get HMC resource profile
> net/i40e/base: add multicast magic packet enable flag
> net/i40e/base: enable proxy cfg cmd for X722
> net/i40e: minor changes for clean up
> net/i40e/base: add function to get SAN MAC address
> net/i40e/base: add FCoE support
>
Applied to dpdk-next-net/rel_16_11
/Bruce
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-09-23 11:31 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25 20:05 [dpdk-dev] [PATCH 00/12] net/i40e: share code update Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 01/12] net/i40e/base: add function to clear default VSI Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 02/12] net/i40e/base: fix UDP packet header Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 03/12] net/i40e/base: define macros for PHY type cap Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 04/12] net/i40e/base: add 25G PHY capability support Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 05/12] net/i40e/base: enable 25G get PHY abilities Zhang Qi
2016-09-22 16:54 ` Ferruh Yigit
2016-09-23 1:34 ` Zhang, Qi Z
2016-08-25 20:05 ` [dpdk-dev] [PATCH 06/12] net/i40e/base: enable wake on LAN for X722 Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 07/12] net/i40e/base: enable set/get HMC resource profile Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 08/12] net/i40e/base: add multicast magic packet enable flag Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 09/12] net/i40e/base: enable proxy cmd for x722 Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 10/12] net/i40e: minor changes for clean up Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 11/12] net/i40e/base: add function to get SAN MAC address Zhang Qi
2016-08-25 20:05 ` [dpdk-dev] [PATCH 12/12] net/i40e/base: add FCoE support Zhang Qi
2016-09-23 11:31 ` [dpdk-dev] [PATCH 00/12] net/i40e: share code update Bruce Richardson
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).