update for i40e base code
PATCH v3 30/36 net/i40e/base: set PHY Access flag on X722
In reply to Xiaolong YeThe X722 FW API version 1.9 adds support for accessing PHY registers with Admin Queue Command. This enables reading EEPROM data from (Q)SFP+ transceivers, what was previously possible only on X710 devices.
--- drivers/net/i40e/base/i40e_adminq.c | 5 +++++ drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ 2 files changed, 7 insertions(+)
drivers/net/i40e/base/i40e_adminq.c +5 -0
@@ -598,6 +598,11 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw) (aq->api_maj_ver ==1 && aq->api_min_ver >= I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722)) hw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE; + +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=I40E_MINOR_VER_GET_LINK_INFO_X722 )) + hw->flags |=I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ;/* fall through */ default :break ;
drivers/net/i40e/base/i40e_adminq_cmd.h +2 -0
@@ -21,6 +21,8 @@/* API version 1.7 implements additional link and PHY-specific APIs */ #define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007 +/* API version 1.9 for X722 implements additional link and PHY-specific APIs */ +#define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */ #define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006
Signature · 1 line
2.17.1
PATCH v3 31/36 net/i40e/base: implement reading lpi statistics
In reply to Xiaolong YeThere was no time duration statistics for LPI (Low Power Idle) in EEE (Energy-Efficient Ethernet).
Added new procedure to get duration values from FW. Otherwise there is no available procedure to get tx_lpi_duration and rx_lpi_duration values.
--- drivers/net/i40e/base/i40e_common.c | 56 ++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 3 ++ drivers/net/i40e/base/i40e_type.h | 2 + 3 files changed, 61 insertions(+)
drivers/net/i40e/base/i40e_common.c +56 -0
@@ -7083,6 +7083,62 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw,return I40E_SUCCESS ; } +/** +* i40e_get_lpi_duration - read LPI time duration from EEE statistics +* @hw: pointer to the hw struct +* @stat: pointer to structure with status of rx and tx lpi +* @tx_duration: pointer to memory for TX LPI time duration +* @rx_duration: pointer to memory for RX LPI time duration +* +* Read Low Power Idle (LPI) mode time duration from Energy Efficient +* Ethernet (EEE) statistics. +*/ +enum i40e_status_code i40e_get_lpi_duration (struct i40e_hw *hw, +struct i40e_hw_port_stats *stat, +u64 *tx_duration,u64 *rx_duration) +{ +u32 tx_time_dur, rx_time_dur; +enum i40e_status_code retval; +u32 cmd_status; + +if (hw->device_id !=I40E_DEV_ID_10G_BASE_T_BC ) +return I40E_ERR_NOT_IMPLEMENTED ; + + retval =i40e_aq_run_phy_activity + (hw,I40E_AQ_RUN_PHY_ACT_ID_USR_DFND , +I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_DUR , + &cmd_status, &tx_time_dur, &rx_time_dur,NULL ); + +if (retval) +return retval; +if ((cmd_status &I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK ) != +I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC ) +return I40E_ERR_ADMIN_QUEUE_ERROR ; + +if (hw->phy.link_info.link_speed ==I40E_LINK_SPEED_1GB && + !tx_time_dur && !rx_time_dur && + stat->tx_lpi_status && stat->rx_lpi_status) { + retval =i40e_aq_run_phy_activity + (hw,I40E_AQ_RUN_PHY_ACT_ID_USR_DFND , +I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT_DUR , + &cmd_status, + &tx_time_dur, &rx_time_dur,NULL ); + +if (retval) +return retval; +if ((cmd_status &I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK ) != +I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC ) +return I40E_ERR_ADMIN_QUEUE_ERROR ; + tx_time_dur =0 ; + rx_time_dur =0 ; + } + + *tx_duration = tx_time_dur; + *rx_duration = rx_time_dur; + +return retval; +} +/** * i40e_lpi_stat_update - update LPI counters with values relative to offset * @hw: pointer to the hw struct
drivers/net/i40e/base/i40e_prototype.h +3 -0
@@ -82,6 +82,9 @@ enum i40e_status_code i40e_lpi_stat_update(struct i40e_hw *hw, bool offset_loaded, u64 *tx_offset, u64 *tx_stat, u64 *rx_offset, u64 *rx_stat); +enum i40e_status_code i40e_get_lpi_duration (struct i40e_hw *hw, +struct i40e_hw_port_stats *stat, +u64 *tx_duration,u64 *rx_duration);/* admin send queue commands */ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw,
drivers/net/i40e/base/i40e_type.h +2 -0
@@ -1498,6 +1498,8 @@ struct i40e_hw_port_stats {u32 rx_lpi_status;u64 tx_lpi_count;/* etlpic */ u64 rx_lpi_count;/* erlpic */ +u64 tx_lpi_duration; +u64 rx_lpi_duration; };/* Checksum and Shadow RAM pointers */
Signature · 1 line
2.17.1
PATCH v3 32/36 net/i40e/base: exposing missing LED functionality
In reply to Xiaolong YeThe previous code had the LED code wrapped such that, it was static to the file and not usable outside of it. It is now available.
--- drivers/net/i40e/base/i40e_common.c | 8 ++++---- drivers/net/i40e/base/i40e_prototype.h | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-)
drivers/net/i40e/base/i40e_common.c +4 -4
@@ -6851,8 +6851,8 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,* @led_addr: LED register address * @reg_val: read register value **/ -static enum i40e_status_code i40e_led_get_reg (struct i40e_hw *hw,u16 led_addr, -u32 *reg_val) +enum i40e_status_code i40e_led_get_reg (struct i40e_hw *hw,u16 led_addr, +u32 *reg_val) {enum i40e_status_code status;u8 phy_addr =0 ;
@@ -6880,8 +6880,8 @@ static enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,* @led_addr: LED register address * @reg_val: register value to write **/ -static enum i40e_status_code i40e_led_set_reg (struct i40e_hw *hw,u16 led_addr, -u32 reg_val) +enum i40e_status_code i40e_led_set_reg (struct i40e_hw *hw,u16 led_addr, +u32 reg_val) {enum i40e_status_code status;u8 phy_addr =0 ;
drivers/net/i40e/base/i40e_prototype.h +4 -1
@@ -73,7 +73,10 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr, u16 *val);enum i40e_status_code i40e_blink_phy_link_led (struct i40e_hw *hw,u32 time,u32 interval); - +enum i40e_status_code i40e_led_get_reg (struct i40e_hw *hw,u16 led_addr, +u32 *reg_val); +enum i40e_status_code i40e_led_set_reg (struct i40e_hw *hw,u16 led_addr, +u32 reg_val);enum i40e_status_code i40e_get_phy_lpi_status (struct i40e_hw *hw,struct i40e_hw_port_stats *stats); enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, u32 *tx_counter,
Signature · 1 line
2.17.1
PATCH v3 33/36 net/i40e/base: introduce firmware EMP reset register offsets
In reply to Xiaolong YeIntroduce offsets of firmware registers holding a number of EMP resets. Implement offsets as a preprocessor's constants.
Required by drivers to read a number of EMP resets reported by FW.
--- drivers/net/i40e/base/i40e_register.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/i40e/base/i40e_register.h +2 -0
@@ -366,6 +366,8 @@#define I40E_GL_FWSTS_FWRI_MASK I40E_MASK(0x1, I40E_GL_FWSTS_FWRI_SHIFT)#define I40E_GL_FWSTS_FWS1B_SHIFT 16#define I40E_GL_FWSTS_FWS1B_MASK I40E_MASK(0xFF, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_GL_FWSTS_FWS1B_EMPR_0 I40E_MASK(0x20, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_GL_FWSTS_FWS1B_EMPR_10 I40E_MASK(0x2A, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_CORER_MASK \ I40E_MASK(0x30, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_GLOBR_MASK \
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v3 33/36] net/i40e/base: introduce firmware EMP reset register offsets
ACK
-----Original Message-----
From: Ye, Xiaolong <[email protected]>
Sent: Monday, December 16, 2019 3:44 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Stillwell Jr, Paul M <[email protected]>; Ye, Xiaolong <[email protected]>; Kwapulinski, Piotr <[email protected]>
Subject: [PATCH v3 33/36] net/i40e/base: introduce firmware EMP reset register offsets
Introduce offsets of firmware registers holding a number of EMP resets. Implement offsets as a preprocessor's constants.
Required by drivers to read a number of EMP resets reported by FW.
--- drivers/net/i40e/base/i40e_register.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/i40e/base/i40e_register.h +3 -1
@@ -366,6 +366,8 @@#define I40E_GL_FWSTS_FWRI_MASK I40E_MASK(0x1, I40E_GL_FWSTS_FWRI_SHIFT)#define I40E_GL_FWSTS_FWS1B_SHIFT 16#define I40E_GL_FWSTS_FWS1B_MASK I40E_MASK(0xFF, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_GL_FWSTS_FWS1B_EMPR_0 I40E_MASK(0x20, +I40E_GL_FWSTS_FWS1B_SHIFT) #define I40E_GL_FWSTS_FWS1B_EMPR_10 +I40E_MASK(0x2A, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_CORER_MASK \ I40E_MASK(0x30, I40E_GL_FWSTS_FWS1B_SHIFT) #define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_GLOBR_MASK \ --
2.17.1
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
PATCH v3 34/36 net/i40e/base: add CRC stripping capability
In reply to Xiaolong YeSome VFs may want to disable CRC stripping on incoming packets so create an offload for that. The VF already sends information about configuring it's RX queues so use that structure to indicate that the CRC stripping should be enabled or not.
--- drivers/net/i40e/base/i40e_dcb.h | 3 +-- drivers/net/i40e/base/virtchnl.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/net/i40e/base/i40e_dcb.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2018 +* Copyright(c) 2001-2019 */ #ifndef _I40E_DCB_H_
@@ -205,5 +205,4 @@ i40e_get_fw_lldp_status(struct i40e_hw *hw,enum i40e_status_code i40e_set_dcb_config (struct i40e_hw *hw);enum i40e_status_code i40e_dcb_config_to_lldp (u8 *lldpmib,u16 *miblen,struct i40e_dcbx_config *dcbcfg); -#endif /* _I40E_DCB_H_ */
drivers/net/i40e/base/virtchnl.h +10 -2
@@ -228,6 +228,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);#define VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010#define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020#define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES 0x00000040 +#define VIRTCHNL_VF_OFFLOAD_CRC 0x00000080#define VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000#define VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000#define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
@@ -276,7 +277,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_txq_info);/* VIRTCHNL_OP_CONFIG_RX_QUEUE * VF sends this message to set up parameters for one RX queue. * External data buffer contains one instance of virtchnl_rxq_info. -* PF configures requested queue and returns a status code. +* PF configures requested queue and returns a status code. The +* crc_disable flag disables CRC stripping on the VF. Setting +* the crc_disable flag to 1 will disable CRC stripping for each +* queue in the VF where the flag is set. The VIRTCHNL_VF_OFFLOAD_CRC +* offload must have been set prior to sending this info or the PF +* will ignore the request. This flag should be set the same for +* all of the queues for a VF. */ /* Rx queue config info */
@@ -288,7 +295,8 @@ struct virtchnl_rxq_info {u16 splithdr_enabled;/* deprecated with AVF 1.0 */ u32 databuffer_size;u32 max_pkt_size; -u32 pad1; +u8 crc_disable; +u8 pad1[3 ];u64 dma_ring_addr;enum virtchnl_rx_hsplit rx_split_pos;/* deprecated with AVF 1.0 */ u32 pad2;
Signature · 1 line
2.17.1
PATCH v3 35/36 net/i40e/base: enable LED blinking flow
In reply to Xiaolong YeAdd X710T*L device specific operations (in port LED detection and handling of GLGEN_GPIO_CTL.PIN_FUNC field) to enable LED blinking.
--- drivers/net/i40e/base/i40e_common.c | 28 +++++++++++++++++++++++++--- drivers/net/i40e/base/i40e_devids.h | 2 ++ 2 files changed, 27 insertions(+), 3 deletions(-)
drivers/net/i40e/base/i40e_common.c +25 -3
@@ -1544,9 +1544,9 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)u32 gpio_val =0 ;u32 port; -if (!hw->func_caps.led[idx]) +if (!I40E_IS_X710TL_DEVICE (hw->device_id) && + !hw->func_caps.led[idx])return 0 ; - gpio_val =rd32 (hw,I40E_GLGEN_GPIO_CTL (idx)); port = (gpio_val &I40E_GLGEN_GPIO_CTL_PRT_NUM_MASK ) >>I40E_GLGEN_GPIO_CTL_PRT_NUM_SHIFT ;
@@ -1565,8 +1565,15 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)#define I40E_FILTER_ACTIVITY 0xE#define I40E_LINK_ACTIVITY 0xC#define I40E_MAC_ACTIVITY 0xD +#define I40E_FW_LED BIT(4) +#define I40E_LED_MODE_VALID (I40E_GLGEN_GPIO_CTL_LED_MODE_MASK >> \ + I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) +#define I40E_LED0 22 +#define I40E_PIN_FUNC_SDP 0x0 +#define I40E_PIN_FUNC_LED 0x1 +/** * i40e_led_get - return current on/off mode * @hw: pointer to the hw struct
@@ -1628,8 +1635,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)u32 current_mode =0 ;int i; -if (mode &0xfffffff0 ) +if (mode & ~I40E_LED_MODE_VALID ) {DEBUGOUT1 ("invalid mode passed in %X\n" , mode); +return ; + }/* as per the documentation GPIO 22-29 are the LED * GPIO pins named LED0..LED7
@@ -1655,6 +1664,19 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)break ; } +if (I40E_IS_X710TL_DEVICE (hw->device_id)) { +u32 pin_func =0 ; + +if (mode &I40E_FW_LED ) + pin_func =I40E_PIN_FUNC_SDP ; +else + pin_func =I40E_PIN_FUNC_LED ; + + gpio_val &= ~I40E_GLGEN_GPIO_CTL_PIN_FUNC_MASK ; + gpio_val |= ((pin_func << +I40E_GLGEN_GPIO_CTL_PIN_FUNC_SHIFT ) & +I40E_GLGEN_GPIO_CTL_PIN_FUNC_MASK ); + } gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK ;/* this & is a bit of paranoia, but serves as a range check */ gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) &
drivers/net/i40e/base/i40e_devids.h +2 -0
@@ -38,6 +38,8 @@#endif #define I40E_DEV_ID_10G_B 0x104F#define I40E_DEV_ID_10G_SFP 0x104E +#define I40E_IS_X710TL_DEVICE (d) \ + ((d) == I40E_DEV_ID_10G_BASE_T_BC)#define I40E_DEV_ID_KX_X722 0x37CE#define I40E_DEV_ID_QSFP_X722 0x37CF#define I40E_DEV_ID_SFP_X722 0x37D0
Signature · 1 line
2.17.1
PATCH v3 36/36 net/i40e/base: add new link speed constants
In reply to Xiaolong YeThis patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for 2.5Gb/5Gb speeds. This problem is fixed by adding constants for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB.
--- drivers/net/i40e/base/i40e_prototype.h | 4 ++++ drivers/net/i40e/base/virtchnl.h | 4 ++++ 2 files changed, 8 insertions(+)
drivers/net/i40e/base/i40e_prototype.h +4 -0
@@ -505,6 +505,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)return VIRTCHNL_LINK_SPEED_100MB ;case I40E_LINK_SPEED_1GB :return VIRTCHNL_LINK_SPEED_1GB ; +case I40E_LINK_SPEED_2_5GB : +return VIRTCHNL_LINK_SPEED_2_5GB ; +case I40E_LINK_SPEED_5GB : +return VIRTCHNL_LINK_SPEED_5GB ;case I40E_LINK_SPEED_10GB :return VIRTCHNL_LINK_SPEED_10GB ;case I40E_LINK_SPEED_40GB :
drivers/net/i40e/base/virtchnl.h +4 -0
@@ -53,12 +53,14 @@ enum virtchnl_status_code {#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED +#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3#define VIRTCHNL_LINK_SPEED_40GB_SHIFT 0x4#define VIRTCHNL_LINK_SPEED_20GB_SHIFT 0x5#define VIRTCHNL_LINK_SPEED_25GB_SHIFT 0x6 +#define VIRTCHNL_LINK_SPEED_5GB_SHIFT 0x7enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_UNKNOWN =0 ,
@@ -68,6 +70,8 @@ enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_40GB =BIT (VIRTCHNL_LINK_SPEED_40GB_SHIFT ),VIRTCHNL_LINK_SPEED_20GB =BIT (VIRTCHNL_LINK_SPEED_20GB_SHIFT ),VIRTCHNL_LINK_SPEED_25GB =BIT (VIRTCHNL_LINK_SPEED_25GB_SHIFT ), +VIRTCHNL_LINK_SPEED_2_5GB =BIT (VIRTCHNL_LINK_SPEED_2_5GB_SHIFT ), + VIRTCHNL_LINK_SPEED_5GB = BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT), };/* for hsplit_0 field of Rx HMC context */
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v3 36/36] net/i40e/base: add new link speed constants
Quoted 11 lines
-----Original Message-----
From: Ye, Xiaolong
Sent: Monday, December 16, 2019 10:44 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Stillwell Jr, Paul M <[email protected]>; Ye, Xiaolong <[email protected]>; Loktionov, Aleksandr <[email protected]>
Subject: [PATCH v3 36/36]net/i40e/base: add new link speed constants
Quoted 4 lines
This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for 2.5Gb/5Gb speeds. This problem is fixed by adding constants for
VIRTCHNL_LINK_SPEED_2_5GBandVIRTCHNL_LINK_SPEED_5GB.
It's a fix patch, fix line is needed? The same comment is also for patch 27/36, 25/36, 21/36, 14/36.
Quoted 60 lines
Signed-off-by Aleksandr Loktionov <[email protected]>Signed-off-by Xiaolong Ye <[email protected]>--- drivers/net/i40e/base/i40e_prototype.h | 4 ++++ drivers/net/i40e/base/virtchnl.h | 4 ++++ 2 files changed, 8 insertions(+)drivers/net/i40e/base/i40e_prototype.h +4
-0@@ -505,6 +505,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)return VIRTCHNL_LINK_SPEED_100MB ;case I40E_LINK_SPEED_1GB :return VIRTCHNL_LINK_SPEED_1GB ; +case I40E_LINK_SPEED_2_5GB : +return VIRTCHNL_LINK_SPEED_2_5GB ; +case I40E_LINK_SPEED_5GB : +return VIRTCHNL_LINK_SPEED_5GB ;case I40E_LINK_SPEED_10GB :return VIRTCHNL_LINK_SPEED_10GB ;drivers/net/i40e/base/i40e_prototype.h +0
-0case I40E_LINK_SPEED_40GB :drivers/net/i40e/base/virtchnl.h +0
-0@@ -53,12 +53,14 @@ enum virtchnl_status_code { #define
VIRTCHNL_ERR_PARAMVIRTCHNL_STATUS_ERR_PARAM#defineVIRTCHNL_STATUS_NOT_SUPPORTEDVIRTCHNL_STATUS_ERR_NOT_SUPPORTEDdrivers/net/i40e/base/virtchnl.h +3
-0+#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3#define VIRTCHNL_LINK_SPEED_40GB_SHIFT 0x4#define VIRTCHNL_LINK_SPEED_20GB_SHIFT 0x5#define VIRTCHNL_LINK_SPEED_25GB_SHIFT 0x6 +#define VIRTCHNL_LINK_SPEED_5GB_SHIFT 0x7enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_UNKNOWN =0 ,@@ -68,6 +70,8 @@ enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_40GB =BIT (VIRTCHNL_LINK_SPEED_40GB_SHIFT ),VIRTCHNL_LINK_SPEED_20GB =BIT (VIRTCHNL_LINK_SPEED_20GB_SHIFT ),VIRTCHNL_LINK_SPEED_25GB =BIT (VIRTCHNL_LINK_SPEED_25GB_SHIFT ), + VIRTCHNL_LINK_SPEED_2_5GB =
BIT(VIRTCHNL_LINK_SPEED_2_5GB_SHIFT),drivers/net/i40e/base/virtchnl.h +1
-0+ VIRTCHNL_LINK_SPEED_5GB =
BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT),
};/* for
hsplit_0field of Rx HMC context */
--
2.17.1
Re: [dpdk-dev] [PATCH v3 36/36] net/i40e/base: add new link speed constants
Good day dear ALL
It's a new feature /*new speed display*/ but from other point of view it's a fix /*because it was found after new feature release*/
-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Friday, December 27, 2019 6:38 AM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Stillwell Jr, Paul M <[email protected]>; Loktionov, Aleksandr <[email protected]>
Subject: RE: [PATCH v3 36/36] net/i40e/base: add new link speed constants
Quoted 10 lines
-----Original Message-----
From: Ye, Xiaolong
Sent: Monday, December 16, 2019 10:44 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Stillwell Jr, Paul M <[email protected]>; Ye, Xiaolong <[email protected]>; Loktionov, Aleksandr <[email protected]>
Subject: [PATCH v3 36/36]net/i40e/base: add new link speed constants
Quoted 4 lines
This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for 2.5Gb/5Gb speeds. This problem is fixed by adding constants for
VIRTCHNL_LINK_SPEED_2_5GBandVIRTCHNL_LINK_SPEED_5GB.
It's a fix patch, fix line is needed? The same comment is also for patch 27/36, 25/36, 21/36, 14/36.
Quoted 57 lines
Signed-off-by Aleksandr Loktionov <[email protected]>Signed-off-by Xiaolong Ye <[email protected]>--- drivers/net/i40e/base/i40e_prototype.h | 4 ++++ drivers/net/i40e/base/virtchnl.h | 4 ++++ 2 files changed, 8 insertions(+)drivers/net/i40e/base/i40e_prototype.h +4
-0@@ -505,6 +505,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)return VIRTCHNL_LINK_SPEED_100MB ;case I40E_LINK_SPEED_1GB :return VIRTCHNL_LINK_SPEED_1GB ; +case I40E_LINK_SPEED_2_5GB : +return VIRTCHNL_LINK_SPEED_2_5GB ; +case I40E_LINK_SPEED_5GB : +return VIRTCHNL_LINK_SPEED_5GB ;case I40E_LINK_SPEED_10GB :return VIRTCHNL_LINK_SPEED_10GB ;drivers/net/i40e/base/i40e_prototype.h +0
-0case I40E_LINK_SPEED_40GB :drivers/net/i40e/base/virtchnl.h +0
-0@@ -53,12 +53,14 @@ enum virtchnl_status_code { #define
VIRTCHNL_ERR_PARAMVIRTCHNL_STATUS_ERR_PARAM#defineVIRTCHNL_STATUS_NOT_SUPPORTEDVIRTCHNL_STATUS_ERR_NOT_SUPPORTEDdrivers/net/i40e/base/virtchnl.h +3
-0+#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3#define VIRTCHNL_LINK_SPEED_40GB_SHIFT 0x4#define VIRTCHNL_LINK_SPEED_20GB_SHIFT 0x5#define VIRTCHNL_LINK_SPEED_25GB_SHIFT 0x6 +#define VIRTCHNL_LINK_SPEED_5GB_SHIFT 0x7enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_UNKNOWN =0 ,@@ -68,6 +70,8 @@ enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_40GB =BIT (VIRTCHNL_LINK_SPEED_40GB_SHIFT ),VIRTCHNL_LINK_SPEED_20GB =BIT (VIRTCHNL_LINK_SPEED_20GB_SHIFT ),VIRTCHNL_LINK_SPEED_25GB =BIT (VIRTCHNL_LINK_SPEED_25GB_SHIFT ), + VIRTCHNL_LINK_SPEED_2_5GB =
BIT(VIRTCHNL_LINK_SPEED_2_5GB_SHIFT),drivers/net/i40e/base/virtchnl.h +1
-0+ VIRTCHNL_LINK_SPEED_5GB =
BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT),
};
Quoted 3 lines
/* for
hsplit_0field of Rx HMC context */
--
2.17.1
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
v4 cover update for i40e base code
In reply to Xiaolong YeThis series is to support FVL 7.2 release.
The main changes include:
* virtchnl updates
* add lldp support
* Flow director updates
* extend PHY access AQ cmd
* add reading LPI counters
* add support for Energy Efficient Ethernet
* A few fixes.
v4:
* add a few missed Fixes tags
V3:
* add missing SOBs
V2:
* strip some unnecessary code
* squash some fixes
* improve commit logs
Xiaolong Ye (36):
net/i40e/base: add support for feature flags net/i40e/base: increase max VSI count for VFs net/i40e/base: change buffer address net/i40e/base: decouple cfg_lldp_mib_change from init_dcb net/i40e/base: change misleading error message net/i40e/base: further implementation of LLDP net/i40e/base: add new device ids
net/i40e/base: add check for MAC type net/i40e/base: adding flags for PHY types net/i40e/base: improve AQ log granularity net/i40e/base: add getter for FW LLDP agent status net/i40e/base: add support for Energy Efficient Ethernet net/i40e/base: read LPI status from external PHY net/i40e/base: change for missing "link modes" net/i40e/base: add reading LPI counters net/i40e/base: backport style changes from upstream Linux net/i40e/base: update status codes
net/i40e/base: change of the incorrect Tx descriptors number net/i40e/base: extend PHY access AQ command net/i40e/base: add drop mode parameter to set MAC config net/i40e/base: add FWS1B register masks net/i40e/base: update FW API version net/i40e/base: add persistent lldp support net/i40e/base: make i40e_set_mac_type() public net/i40e/base: fix retrying logic
net/i40e/base: mark additional missing bits as reserved net/i40e/base: fix wrong 'Advertised FEC modes' net/i40e/base: add Flow Director defines net/i40e/base: removed unreachable code net/i40e/base: set PHY Access flag on X722 net/i40e/base: implement reading lpi statistics net/i40e/base: exposing missing LED functionality net/i40e/base: introduce firmware EMP reset register offsets net/i40e/base: add CRC stripping capability net/i40e/base: enable LED blinking flow net/i40e/base: add new link speed constants
drivers/net/i40e/base/i40e_adminq.c | 142 +++--- drivers/net/i40e/base/i40e_adminq_cmd.h | 95 +++- drivers/net/i40e/base/i40e_common.c | 651 +++++++++++++++++------- drivers/net/i40e/base/i40e_dcb.c | 87 +++- drivers/net/i40e/base/i40e_dcb.h | 20 +- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 113 +++- drivers/net/i40e/base/i40e_prototype.h | 76 ++- drivers/net/i40e/base/i40e_register.h | 95 ++++ drivers/net/i40e/base/i40e_type.h | 39 +- drivers/net/i40e/base/virtchnl.h | 32 +- drivers/net/i40e/i40e_ethdev.c | 12 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 13 files changed, 1047 insertions(+), 323 deletions(-)
Signature · 1 line
2.17.1
PATCH v4 1/36 net/i40e/base: add support for feature flags
Extend NVM Update API to support reporting of features available for the tools.
This change is needed by NVM Update to determine if driver supports changing NVM layout from structured to flat.
--- drivers/net/i40e/base/i40e_common.c | 11 ++++++++ drivers/net/i40e/base/i40e_nvm.c | 42 ++++++++++++++++++++++++++--- drivers/net/i40e/base/i40e_type.h | 22 +++++++++++++++ 3 files changed, 72 insertions(+), 3 deletions(-)
drivers/net/i40e/base/i40e_common.c +11 -0
@@ -1014,6 +1014,17 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)if (hw->mac.type ==I40E_MAC_X722 ) hw->flags |=I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE |I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK ; +/* NVMUpdate features structure initialization */ + hw->nvmupd_features.major =I40E_NVMUPD_FEATURES_API_VER_MAJOR ; + hw->nvmupd_features.minor =I40E_NVMUPD_FEATURES_API_VER_MINOR ; + hw->nvmupd_features.size =sizeof (hw->nvmupd_features); +i40e_memset (hw->nvmupd_features.features,0x0 , +I40E_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN * +sizeof (*hw->nvmupd_features.features), +I40E_NONDMA_MEM ); + +/* No features supported at the moment */ + hw->nvmupd_features.features[0 ] =0 ; status =i40e_init_nvm (hw);return status;
drivers/net/i40e/base/i40e_nvm.c +39 -3
61 lines not on this page · raw message
drivers/net/i40e/base/i40e_type.h +22 -0
@@ -478,6 +478,7 @@ enum i40e_nvmupd_cmd {I40E_NVMUPD_EXEC_AQ ,I40E_NVMUPD_GET_AQ_RESULT ,I40E_NVMUPD_GET_AQ_EVENT , + I40E_NVMUPD_FEATURES, }; enum i40e_nvmupd_state {
@@ -513,6 +514,10 @@ enum i40e_nvmupd_state {#define I40E_NVM_AQE 0xe#define I40E_NVM_EXEC 0xf +#define I40E_NVM_EXEC_GET_AQ_RESULT 0x0 +#define I40E_NVM_EXEC_FEATURES 0xe +#define I40E_NVM_EXEC_STATUS 0xf +#define I40E_NVM_ADAPT_SHIFT 16#define I40E_NVM_ADAPT_MASK (0xffffULL << I40E_NVM_ADAPT_SHIFT)
@@ -527,6 +532,20 @@ struct i40e_nvm_access {u8 data[1 ]; }; +/* NVMUpdate features API */ +#define I40E_NVMUPD_FEATURES_API_VER_MAJOR 0 +#define I40E_NVMUPD_FEATURES_API_VER_MINOR 14 +#define I40E_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN 12 + +#define I40E_NVMUPD_FEATURE_FLAT_NVM_SUPPORT BIT(0) + +struct i40e_nvmupd_features { +u8 major; +u8 minor; +u16 size; +u8 features[I40E_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN ]; +}; +/* (Q)SFP module access definitions */ #define I40E_I2C_EEPROM_DEV_ADDR 0xA0#define I40E_I2C_EEPROM_DEV_ADDR2 0xA2
@@ -730,6 +749,9 @@ struct i40e_hw {u16 first_tag;u16 second_tag; +/* NVMUpdate features */ +struct i40e_nvmupd_features nvmupd_features; +/* debug mask */ u32 debug_mask;char err_str[16 ];
Signature · 1 line
2.17.1
PATCH v4 2/36 net/i40e/base: increase max VSI count for VFs
In reply to Xiaolong YeFor historical reasons, we allowed 3 VSIs per VF, but never used more than one. Now with ADq, we can use up to 4 VSIs per VF, so change this value to match.
--- drivers/net/i40e/base/i40e_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_type.h +1 -1
@@ -38,7 +38,7 @@#define I40E_MAX_PF_VSI 64#define I40E_MAX_PF_QP 128#define I40E_MAX_VSI_QP 16 -#define I40E_MAX_VF_VSI 3 +#define I40E_MAX_VF_VSI 4#define I40E_MAX_CHAINED_RX_BUFFERS 5#define I40E_MAX_PF_UDP_OFFLOAD_PORTS 16
Signature · 1 line
2.17.1
PATCH v4 3/36 net/i40e/base: change buffer address
In reply to Xiaolong YeThe high 32-bits were being set incorrectly in the 'Set Local LLDP MIB' AQ command (0x0A08). Change it to use the right macro to get the correct bits.
--- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_common.c +1 -1
@@ -4311,7 +4311,7 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw, cmd->type = mib_type; cmd->length =CPU_TO_LE16 (buff_size); - cmd->address_high =CPU_TO_LE32 (I40E_HI_WORD ((u64 )buff)); + cmd->address_high =CPU_TO_LE32 (I40E_HI_DWORD ((u64 )buff)); cmd->address_low =CPU_TO_LE32 (I40E_LO_DWORD ((u64 )buff)); status =i40e_asq_send_command (hw, &desc, buff, buff_size, cmd_details);
Signature · 1 line
2.17.1
PATCH v4 4/36 net/i40e/base: decouple cfg_lldp_mib_change from init_dcb
In reply to Xiaolong YeThere is a need to enable MIB change event, not at the same time as init_dcb. This patch will serve this requirement.
Modify the i40e_init_dcb to return the correct error when LLDP or DCBX is not in operational state.
--- drivers/net/i40e/base/i40e_dcb.c | 28 +++++++++++----------------- drivers/net/i40e/base/i40e_dcb.h | 3 ++- drivers/net/i40e/i40e_ethdev.c | 4 ++-- 3 files changed, 15 insertions(+), 20 deletions(-)
drivers/net/i40e/base/i40e_dcb.c +11 -17
@@ -863,22 +863,23 @@ enum i40e_status_code i40e_get_dcb_config(struct i40e_hw *hw)/** * i40e_init_dcb * @hw: pointer to the hw struct +* @enable_mib_change: enable mib change event * * Update DCB configuration from the Firmware **/ -enum i40e_status_code i40e_init_dcb (struct i40e_hw *hw) +enum i40e_status_code i40e_init_dcb (struct i40e_hw *hw,bool enable_mib_change) {enum i40e_status_code ret =I40E_SUCCESS ;struct i40e_lldp_variables lldp_cfg;u8 adminstatus =0 ;if (!hw->func_caps.dcb) -return ret; +return I40E_NOT_SUPPORTED ;/* Read LLDP NVM area */ ret =i40e_read_lldp_cfg (hw, &lldp_cfg);if (ret) -return ret; +return I40E_ERR_NOT_READY ;/* Get the LLDP AdminStatus for the current port */ adminstatus = lldp_cfg.adminstatus >> (hw->port *4 );
@@ -887,7 +888,7 @@ enum i40e_status_code i40e_init_dcb(struct i40e_hw *hw)/* LLDP agent disabled */ if (!adminstatus) { hw->dcbx_status =I40E_DCBX_STATUS_DISABLED ; -return ret; +return I40E_ERR_NOT_READY ; }/* Get DCBX status */
@@ -896,26 +897,19 @@ enum i40e_status_code i40e_init_dcb(struct i40e_hw *hw)return ret;/* Check the DCBX Status */ -switch (hw->dcbx_status) { -case I40E_DCBX_STATUS_DONE : -case I40E_DCBX_STATUS_IN_PROGRESS : +if (hw->dcbx_status ==I40E_DCBX_STATUS_DONE || + hw->dcbx_status ==I40E_DCBX_STATUS_IN_PROGRESS ) {/* Get current DCBX configuration */ ret =i40e_get_dcb_config (hw);if (ret)return ret; -break ; -case I40E_DCBX_STATUS_DISABLED : -return ret; -case I40E_DCBX_STATUS_NOT_STARTED : -case I40E_DCBX_STATUS_MULTIPLE_PEERS : -default : -break ; + }else if (hw->dcbx_status ==I40E_DCBX_STATUS_DISABLED ) { +return I40E_ERR_NOT_READY ; }/* Configure the LLDP MIB change event */ - ret =i40e_aq_cfg_lldp_mib_change_event (hw, true,NULL ); -if (ret) -return ret; +if (enable_mib_change) + ret =i40e_aq_cfg_lldp_mib_change_event (hw, true,NULL );return ret; }
drivers/net/i40e/base/i40e_dcb.h +2 -1
@@ -186,7 +186,8 @@ enum i40e_status_code i40e_aq_get_dcb_config(struct i40e_hw *hw, u8 mib_type,u8 bridgetype, struct i40e_dcbx_config *dcbcfg);enum i40e_status_code i40e_get_dcb_config (struct i40e_hw *hw); -enum i40e_status_code i40e_init_dcb (struct i40e_hw *hw); +enum i40e_status_code i40e_init_dcb (struct i40e_hw *hw, +bool enable_mib_change);enum i40e_status_code i40e_set_dcb_config (struct i40e_hw *hw);enum i40e_status_code i40e_dcb_config_to_lldp (u8 *lldpmib,u16 *miblen,struct i40e_dcbx_config *dcbcfg);
drivers/net/i40e/i40e_ethdev.c +2 -2
@@ -11579,7 +11579,7 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)PMD_INIT_LOG (DEBUG ,"Failed to stop lldp" ); } - ret =i40e_init_dcb (hw); + ret =i40e_init_dcb (hw, true);/* If lldp agent is stopped, the return value from * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM * adminq status. Otherwise, it should return success.
@@ -11627,7 +11627,7 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)if (ret !=I40E_SUCCESS )PMD_INIT_LOG (DEBUG ,"Failed to start lldp" ); - ret =i40e_init_dcb (hw); + ret =i40e_init_dcb (hw, true);if (!ret) {if (hw->dcbx_status ==I40E_DCBX_STATUS_DISABLED ) { PMD_INIT_LOG(ERR,
Signature · 1 line
2.17.1
PATCH v4 5/36 net/i40e/base: change misleading error message
In reply to Xiaolong YeThis patch changes an error code for an admin queue head overrun to use I40E_ERR_ADMIN_QUEUE_FULL instead of I40E_ERR_QUEUE_EMPTY.
--- drivers/net/i40e/base/i40e_adminq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_adminq.c +1 -1
@@ -835,7 +835,7 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,if (val >= hw->aq.num_asq_entries) {i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: head overrun at %d\n" , val); - status =I40E_ERR_QUEUE_EMPTY ; + status =I40E_ERR_ADMIN_QUEUE_FULL ; goto asq_send_command_error; }
Signature · 1 line
2.17.1
PATCH v4 6/36 net/i40e/base: further implementation of LLDP
In reply to Xiaolong YeThis code implements changes necessary for LLDP Agent support.
1. Modified i40e_aq_start_lldp and i40e_aq_stop_lldp. Now Stop and Start can also be persistent across power cycles.
2. Added new function i40e_aq_restore_lldp which restores factory setting for LLDP Agent or gets its status.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 19 ++- drivers/net/i40e/base/i40e_common.c | 173 ++++++------------------ drivers/net/i40e/base/i40e_prototype.h | 18 +-- drivers/net/i40e/base/i40e_type.h | 1 + drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 6 files changed, 67 insertions(+), 152 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +16 -3
@@ -265,6 +265,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_get_cee_dcb_cfg =0x0A07 , i40e_aqc_opc_lldp_set_local_mib =0x0A08 , i40e_aqc_opc_lldp_stop_start_spec_agent =0x0A09 , + i40e_aqc_opc_lldp_restore =0x0A0A ,/* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00,
@@ -2554,8 +2555,9 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_update_tlv);/* Stop LLDP (direct 0x0A05) */ struct i40e_aqc_lldp_stop {u8 command; -#define I40E_AQ_LLDP_AGENT_STOP 0x0 -#define I40E_AQ_LLDP_AGENT_SHUTDOWN 0x1 +#define I40E_AQ_LLDP_AGENT_STOP 0x0 +#define I40E_AQ_LLDP_AGENT_SHUTDOWN 0x1 +#define I40E_AQ_LLDP_AGENT_STOP_PERSIST 0x2u8 reserved[15 ]; };
@@ -2565,7 +2567,8 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop);struct i40e_aqc_lldp_start {u8 command; -#define I40E_AQ_LLDP_AGENT_START 0x1 +#define I40E_AQ_LLDP_AGENT_START 0x1 +#define I40E_AQ_LLDP_AGENT_START_PERSIST 0x2u8 reserved[15 ]; };
@@ -2685,6 +2688,16 @@ struct i40e_aqc_lldp_stop_start_specific_agent {I40E_CHECK_CMD_LENGTH (i40e_aqc_lldp_stop_start_specific_agent); +/* Restore LLDP Agent factory settings (direct 0x0A0A) */ +struct i40e_aqc_lldp_restore { +u8 command; +#define I40E_AQ_LLDP_AGENT_RESTORE_NOT 0x0 +#define I40E_AQ_LLDP_AGENT_RESTORE 0x1 +u8 reserved[15 ]; +}; + +I40E_CHECK_CMD_LENGTH (i40e_aqc_lldp_restore); +/* Add Udp Tunnel command and completion (direct 0x0B00) */ struct i40e_aqc_add_udp_tunnel {__le16 udp_port;
drivers/net/i40e/base/i40e_common.c +41 -132
226 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +5 -13
@@ -251,26 +251,18 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw,enum i40e_status_code i40e_aq_cfg_lldp_mib_change_event (struct i40e_hw *hw,bool enable_update,struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_add_lldp_tlv (struct i40e_hw *hw,u8 bridge_type, -void *buff,u16 buff_size,u16 tlv_len, -u16 *mib_len, -struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_update_lldp_tlv (struct i40e_hw *hw, -u8 bridge_type,void *buff,u16 buff_size, -u16 old_len,u16 new_len,u16 offset, -u16 *mib_len, -struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_delete_lldp_tlv (struct i40e_hw *hw, -u8 bridge_type,void *buff,u16 buff_size, -u16 tlv_len,u16 *mib_len, -struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_restore_lldp (struct i40e_hw *hw,u8 *setting,bool restore, +struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_stop_lldp (struct i40e_hw *hw,bool shutdown_agent, +bool persist,struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_set_dcb_parameters (struct i40e_hw *hw,bool dcb_enable,struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_start_lldp (struct i40e_hw *hw, +bool persist,struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_get_cee_dcb_config(struct i40e_hw *hw, void *buff, u16 buff_size,
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -742,6 +742,7 @@ struct i40e_hw {#define I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE BIT_ULL(2)#define I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK BIT_ULL(3)#define I40E_HW_FLAG_FW_LLDP_STOPPABLE BIT_ULL(4) +#define I40E_HW_FLAG_FW_LLDP_PERSISTENT BIT_ULL(5)u64 flags;/* Used in set switch config AQ command */
drivers/net/i40e/i40e_ethdev.c +2 -2
@@ -11574,7 +11574,7 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)*/ if (sw_dcb == TRUE) {if (i40e_need_stop_lldp (dev)) { - ret =i40e_aq_stop_lldp (hw, TRUE,NULL ); + ret =i40e_aq_stop_lldp (hw, TRUE, TRUE,NULL );if (ret !=I40E_SUCCESS )PMD_INIT_LOG (DEBUG ,"Failed to stop lldp" ); }
@@ -11623,7 +11623,7 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)return -ENOTSUP ; } }else { - ret =i40e_aq_start_lldp (hw,NULL ); + ret =i40e_aq_start_lldp (hw, true,NULL );if (ret !=I40E_SUCCESS )PMD_INIT_LOG (DEBUG ,"Failed to start lldp" );
drivers/net/i40e/rte_pmd_i40e.c +2 -2
@@ -1409,7 +1409,7 @@ rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map)/* Disable DCBx if it's the first time to set strict priority. */ if (!veb->strict_prio_tc) { - ret =i40e_aq_stop_lldp (hw, true,NULL ); + ret =i40e_aq_stop_lldp (hw, true, true,NULL );if (ret)PMD_DRV_LOG (INFO , "Failed to disable DCBx as it's already"
@@ -1464,7 +1464,7 @@ rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map)/* Enable DCBx again, if all the TCs' strict priority disabled. */ if (!tc_map) { - ret =i40e_aq_start_lldp (hw,NULL ); + ret =i40e_aq_start_lldp (hw, true,NULL );if (ret) {PMD_DRV_LOG (ERR ,"Failed to enable DCBx, err(%d)." , ret);
Signature · 1 line
2.17.1
PATCH v4 7/36 net/i40e/base: add new device ids
In reply to Xiaolong YeNew device ids are created to support SFP+ and backplane connections.
--- drivers/net/i40e/base/i40e_common.c | 2 ++ drivers/net/i40e/base/i40e_devids.h | 2 ++ drivers/net/i40e/i40e_ethdev.c | 2 ++ 3 files changed, 6 insertions(+)
drivers/net/i40e/base/i40e_common.c +2 -0
@@ -36,6 +36,8 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_10G_BASE_T :case I40E_DEV_ID_10G_BASE_T4 :case I40E_DEV_ID_10G_BASE_T_BC : +case I40E_DEV_ID_10G_B : +case I40E_DEV_ID_10G_SFP :case I40E_DEV_ID_20G_KR2 :case I40E_DEV_ID_20G_KR2_A :case I40E_DEV_ID_25G_B :
drivers/net/i40e/base/i40e_devids.h +2 -0
@@ -36,6 +36,8 @@#define I40E_DEV_ID_X722_A0_VF 0x374D#endif #endif +#define I40E_DEV_ID_10G_B 0x104F +#define I40E_DEV_ID_10G_SFP 0x104E#define I40E_DEV_ID_KX_X722 0x37CE#define I40E_DEV_ID_QSFP_X722 0x37CF#define I40E_DEV_ID_SFP_X722 0x37D0
drivers/net/i40e/i40e_ethdev.c +2 -0
@@ -443,6 +443,8 @@ static const struct rte_pci_id pci_id_i40e_map[] = { { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X710_N3000) }, { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_XXV710_N3000) }, { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T_BC) }, + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_B) }, + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_SFP) }, { .vendor_id = 0, /* sentinel */ }, };
Signature · 1 line
2.17.1
PATCH v4 8/36 net/i40e/base: add check for MAC type
In reply to Xiaolong YeSome features were introduced in different FW API version on XL710 and X722 MACs. Others are available only on specific MAC type. Make sure that they are properly assigned. Also fix the style issues reported by current check-patch.
--- drivers/net/i40e/base/i40e_adminq.c | 68 +++++++---------------------- 1 file changed, 16 insertions(+), 52 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +16 -52
@@ -582,25 +582,22 @@ STATIC void i40e_resume_aq(struct i40e_hw *hw)**/ enum i40e_status_code i40e_init_adminq (struct i40e_hw *hw) { -#ifdef PF_DRIVER +struct i40e_adminq_info *aq = &hw->aq; +enum i40e_status_code ret_code;u16 cfg_ptr, oem_hi, oem_lo;u16 eetrack_lo, eetrack_hi; -#endif -enum i40e_status_code ret_code; -#ifdef PF_DRIVER int retry =0 ; -#endif /* verify input for valid configuration */ -if ((hw->aq.num_arq_entries ==0 ) || - (hw->aq.num_asq_entries ==0 ) || - (hw->aq.arq_buf_size ==0 ) || - (hw->aq.asq_buf_size ==0 )) { +if (aq->num_arq_entries ==0 || + aq->num_asq_entries ==0 || + aq->arq_buf_size ==0 || + aq->asq_buf_size ==0 ) { ret_code =I40E_ERR_CONFIG ; goto init_adminq_exit; } -i40e_init_spinlock (&hw->aq.asq_spinlock); -i40e_init_spinlock (&hw->aq.arq_spinlock); +i40e_init_spinlock (&aq->asq_spinlock); +i40e_init_spinlock (&aq->arq_spinlock);/* Set up register offsets */ i40e_adminq_init_regs (hw);
@@ -618,23 +615,17 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)if (ret_code !=I40E_SUCCESS ) goto init_adminq_free_asq; -#ifdef PF_DRIVER -#ifdef INTEGRATED_VF - /* VF has no need of firmware */ - if (i40e_is_vf(hw)) - goto init_adminq_exit; -#endif/* There are some cases where the firmware may not be quite ready * for AdminQ operations, so we retry the AdminQ setup a few times * if we see timeouts in this first AQ call. */ do { ret_code = i40e_aq_get_firmware_version(hw, - &hw->aq.fw_maj_ver, - &hw->aq.fw_min_ver, - &hw->aq.fw_build, - &hw->aq.api_maj_ver, - &hw->aq.api_min_ver, + &aq->fw_maj_ver, + &aq->fw_min_ver, + &aq->fw_build, + &aq->api_maj_ver, + &aq->api_min_ver, NULL); if (ret_code != I40E_ERR_ADMIN_QUEUE_TIMEOUT) break;
@@ -658,31 +649,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) &oem_lo); hw->nvm.oem_ver = ((u32 )oem_hi <<16 ) | oem_lo; -/* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */ -if ((hw->aq.api_maj_ver >1 ) || - ((hw->aq.api_maj_ver ==1 ) && - (hw->aq.api_min_ver >=7 ))) - hw->flags |=I40E_HW_FLAG_802_1AD_CAPABLE ; - -if (hw->mac.type ==I40E_MAC_XL710 && - hw->aq.api_maj_ver ==I40E_FW_API_VERSION_MAJOR && - hw->aq.api_min_ver >=I40E_MINOR_VER_GET_LINK_INFO_XL710 ) { - hw->flags |=I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ; - hw->flags |=I40E_HW_FLAG_FW_LLDP_STOPPABLE ; - } -if (hw->mac.type ==I40E_MAC_X722 && - hw->aq.api_maj_ver ==I40E_FW_API_VERSION_MAJOR && - hw->aq.api_min_ver >=I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 ) { - hw->flags |=I40E_HW_FLAG_FW_LLDP_STOPPABLE ; - } - -/* Newer versions of firmware require lock when reading the NVM */ -if ((hw->aq.api_maj_ver >1 ) || - ((hw->aq.api_maj_ver ==1 ) && - (hw->aq.api_min_ver >=5 ))) - hw->flags |=I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK ; - -if (hw->aq.api_maj_ver >I40E_FW_API_VERSION_MAJOR ) { +if (aq->api_maj_ver >I40E_FW_API_VERSION_MAJOR ) { ret_code =I40E_ERR_FIRMWARE_API_VERSION ; goto init_adminq_free_arq; }
@@ -692,21 +659,18 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) hw->nvm_release_on_done = false; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; -#endif /* PF_DRIVER */ ret_code =I40E_SUCCESS ;/* success! */ goto init_adminq_exit; -#ifdef PF_DRIVER init_adminq_free_arq:i40e_shutdown_arq (hw); -#endif init_adminq_free_asq:i40e_shutdown_asq (hw); init_adminq_destroy_spinlocks: -i40e_destroy_spinlock (&hw->aq.asq_spinlock); -i40e_destroy_spinlock (&hw->aq.arq_spinlock); +i40e_destroy_spinlock (&aq->asq_spinlock); +i40e_destroy_spinlock (&aq->arq_spinlock); init_adminq_exit:return ret_code;
Signature · 1 line
2.17.1
PATCH v4 9/36 net/i40e/base: adding flags for PHY types
In reply to Xiaolong YeAdding bit flags to enable/disable EEE capability for 2.5GBase-T and 5GBase-T PHY types as well as 'Set autonomous EEE for relevant enabled PHY types' flag.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -0
@@ -2027,12 +2027,15 @@ struct i40e_aq_get_phy_abilities_resp {#define I40E_AQ_PHY_FEC_ABILITY_KR 0x40#define I40E_AQ_PHY_FEC_ABILITY_RS 0x80__le16 eee_capability; +#define I40E_AQ_EEE_AUTO 0x0001#define I40E_AQ_EEE_100BASE_TX 0x0002#define I40E_AQ_EEE_1000BASE_T 0x0004#define I40E_AQ_EEE_10GBASE_T 0x0008#define I40E_AQ_EEE_1000BASE_KX 0x0010#define I40E_AQ_EEE_10GBASE_KX4 0x0020#define I40E_AQ_EEE_10GBASE_KR 0x0040 +#define I40E_AQ_EEE_2_5GBASE_T 0x0100 +#define I40E_AQ_EEE_5GBASE_T 0x0200__le32 eeer_val;u8 d3_lpan;#define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01
Signature · 1 line
2.17.1
PATCH v4 10/36 net/i40e/base: improve AQ log granularity
In reply to Xiaolong YeThis patch makes it possible to log only AQ descriptors, without the entire AQ message buffers being dumped too. It should greatly reduce kernel log size in cases where a full AQ dump is not needed. Selection is made by setting flags in hw->debug_mask.
Additionally, some debug messages that preceded an AQ dump have been moved to I40E_DEBUG_AQ_COMMAND class, which seems more appropriate.
--- drivers/net/i40e/base/i40e_adminq.c | 8 ++++---- drivers/net/i40e/base/i40e_common.c | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +4 -4
@@ -715,7 +715,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc =I40E_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc);while (rd32 (hw, hw->aq.asq.head) != ntc) { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +i40e_debug (hw,I40E_DEBUG_AQ_COMMAND ,"ntc %d head %d.\n" , ntc,rd32 (hw, hw->aq.asq.head));if (details->callback) {
@@ -887,7 +887,7 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, }/* bump the tail */ -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" ); +i40e_debug (hw,I40E_DEBUG_AQ_COMMAND ,"AQTX: desc and buffer:\n" );i40e_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc_on_ring, buff, buff_size); (hw->aq.asq.next_to_use)++;
@@ -940,7 +940,7 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, hw->aq.asq_last_status = (enum i40e_admin_queue_err )retval; } -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +i40e_debug (hw,I40E_DEBUG_AQ_COMMAND ,"AQTX: desc and buffer writeback:\n" );i40e_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, buff_size);
@@ -1069,7 +1069,7 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw, hw->aq.arq.r.arq_bi[desc_idx].va, e->msg_len, I40E_DMA_TO_NONDMA); -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" ); +i40e_debug (hw,I40E_DEBUG_AQ_COMMAND ,"AQRX: desc and buffer:\n" );i40e_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, hw->aq.arq_buf_size);
drivers/net/i40e/base/i40e_common.c +12 -7
@@ -307,32 +307,37 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc, void *buffer, u16 buf_len) {struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc; +u32 effective_mask = hw->debug_mask & mask;u8 *buf = (u8 *)buffer;u16 len; -u16 i =0 ; +u16 i; -if ((!(mask & hw->debug_mask)) || (desc ==NULL )) +if (!effective_mask || !desc)return ; len =LE16_TO_CPU (aq_desc->datalen); -i40e_debug (hw, mask, +i40e_debug (hw, mask &I40E_DEBUG_AQ_DESCRIPTOR ,"AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n" ,LE16_TO_CPU (aq_desc->opcode),LE16_TO_CPU (aq_desc->flags),LE16_TO_CPU (aq_desc->datalen),LE16_TO_CPU (aq_desc->retval)); -i40e_debug (hw, mask,"\tcookie (h,l) 0x%08X 0x%08X\n" , +i40e_debug (hw, mask &I40E_DEBUG_AQ_DESCRIPTOR , +"\tcookie (h,l) 0x%08X 0x%08X\n" ,LE32_TO_CPU (aq_desc->cookie_high),LE32_TO_CPU (aq_desc->cookie_low)); -i40e_debug (hw, mask,"\tparam (0,1) 0x%08X 0x%08X\n" , +i40e_debug (hw, mask &I40E_DEBUG_AQ_DESCRIPTOR , +"\tparam (0,1) 0x%08X 0x%08X\n" ,LE32_TO_CPU (aq_desc->params.internal.param0),LE32_TO_CPU (aq_desc->params.internal.param1)); -i40e_debug (hw, mask,"\taddr (h,l) 0x%08X 0x%08X\n" , +i40e_debug (hw, mask &I40E_DEBUG_AQ_DESCRIPTOR , +"\taddr (h,l) 0x%08X 0x%08X\n" ,LE32_TO_CPU (aq_desc->params.external.addr_high),LE32_TO_CPU (aq_desc->params.external.addr_low)); -if ((buffer !=NULL ) && (aq_desc->datalen !=0 )) { +if (buffer && (buf_len !=0 ) && (len !=0 ) && + (effective_mask &I40E_DEBUG_AQ_DESC_BUFFER )) {i40e_debug (hw, mask,"AQ CMD Buffer:\n" );if (buf_len < len) len = buf_len;
Signature · 1 line
2.17.1
PATCH v4 11/36 net/i40e/base: add getter for FW LLDP agent status
In reply to Xiaolong YeThis change introduces i40e_get_fw_lldp_status() function capable of reporting status of FW Link Layer Discovery Protocol (LLDP) agent.
Since reading LLDP configuration from NVM only gives information what is the default state of FW LLDP agent after POR, this change introduces more reliable method for checking if agent is enabled.
Current state of FW LLDP agent may be different if user disabled the agent, so i40e_get_fw_lldp_status() uses LLDP MIB checking to determine status of the agent.
--- drivers/net/i40e/base/i40e_dcb.c | 43 ++++++++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_dcb.h | 9 +++++++ 2 files changed, 52 insertions(+)
drivers/net/i40e/base/i40e_dcb.c +43 -0
@@ -914,6 +914,49 @@ enum i40e_status_code i40e_init_dcb(struct i40e_hw *hw, bool enable_mib_change)return ret; } +/** +* i40e_get_fw_lldp_status +* @hw: pointer to the hw struct +* @lldp_status: pointer to the status enum +* +* Get status of FW Link Layer Discovery Protocol (LLDP) Agent. +* Status of agent is reported via @lldp_status parameter. +**/ +enum i40e_status_code +i40e_get_fw_lldp_status (struct i40e_hw *hw, +enum i40e_get_fw_lldp_status_resp *lldp_status) +{ +enum i40e_status_code ret; +struct i40e_virt_mem mem; +u8 *lldpmib; + +if (!lldp_status) +return I40E_ERR_PARAM ; + +/* Allocate buffer for the LLDPDU */ + ret =i40e_allocate_virt_mem (hw, &mem,I40E_LLDPDU_SIZE ); +if (ret) +return ret; + + lldpmib = (u8 *)mem.va; + ret =i40e_aq_get_lldp_mib (hw,0 ,0 , (void *)lldpmib, +I40E_LLDPDU_SIZE ,NULL ,NULL ,NULL ); + +if (ret ==I40E_SUCCESS ) { + *lldp_status =I40E_GET_FW_LLDP_STATUS_ENABLED ; + }else if (hw->aq.asq_last_status ==I40E_AQ_RC_ENOENT ) { +/* MIB is not available yet but the agent is running */ + *lldp_status =I40E_GET_FW_LLDP_STATUS_ENABLED ; + ret =I40E_SUCCESS ; + }else if (hw->aq.asq_last_status ==I40E_AQ_RC_EPERM ) { + *lldp_status =I40E_GET_FW_LLDP_STATUS_DISABLED ; + ret =I40E_SUCCESS ; + } + +i40e_free_virt_mem (hw, &mem); +return ret; +} +/** * i40e_add_ieee_ets_tlv - Prepare ETS TLV in IEEE format * @tlv: Fill the ETS config data in IEEE format
drivers/net/i40e/base/i40e_dcb.h +9 -0
@@ -178,6 +178,12 @@ struct i40e_dcbx_variables {u32 deftsaassignment; }; + +enum i40e_get_fw_lldp_status_resp { +I40E_GET_FW_LLDP_STATUS_DISABLED =0 , +I40E_GET_FW_LLDP_STATUS_ENABLED =1 +}; +enum i40e_status_code i40e_get_dcbx_status (struct i40e_hw *hw,u16 *status); enum i40e_status_code i40e_lldp_to_dcb_config(u8 *lldpmib,
@@ -188,6 +194,9 @@ enum i40e_status_code i40e_aq_get_dcb_config(struct i40e_hw *hw, u8 mib_type,enum i40e_status_code i40e_get_dcb_config (struct i40e_hw *hw);enum i40e_status_code i40e_init_dcb (struct i40e_hw *hw,bool enable_mib_change); +enum i40e_status_code +i40e_get_fw_lldp_status (struct i40e_hw *hw, +enum i40e_get_fw_lldp_status_resp *lldp_status);enum i40e_status_code i40e_set_dcb_config (struct i40e_hw *hw);enum i40e_status_code i40e_dcb_config_to_lldp (u8 *lldpmib,u16 *miblen,struct i40e_dcbx_config *dcbcfg);
Signature · 1 line
2.17.1
PATCH v4 12/36 net/i40e/base: add support for Energy Efficient Ethernet
In reply to Xiaolong YeThis change adds i40e_enable_eee() function controlling advertisement of Energy Efficient Ethernet mode (EEE).
--- drivers/net/i40e/base/i40e_common.c | 64 ++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 1 + 2 files changed, 65 insertions(+)
drivers/net/i40e/base/i40e_common.c +64 -0
@@ -6306,6 +6306,70 @@ enum i40e_status_code i40e_aq_debug_dump(struct i40e_hw *hw, u8 cluster_id,return status; } + +/** +* i40e_enable_eee +* @hw: pointer to the hardware structure +* @enable: state of Energy Efficient Ethernet mode to be set +* +* Enables or disables Energy Efficient Ethernet (EEE) mode +* accordingly to @enable parameter. +**/ +enum i40e_status_code i40e_enable_eee (struct i40e_hw *hw,bool enable) +{ +struct i40e_aq_get_phy_abilities_resp abilities; +struct i40e_aq_set_phy_config config; +enum i40e_status_code status; +__le16 eee_capability; + +/* Get initial PHY capabilities */ + status =i40e_aq_get_phy_capabilities (hw, false, true, &abilities, +NULL ); +if (status) + goto err; + +/* Check whether NIC configuration is compatible with Energy Efficient +* Ethernet (EEE) mode. +*/ +if (abilities.eee_capability ==0 ) { + status =I40E_ERR_CONFIG ; + goto err; + } + +/* Cache initial EEE capability */ + eee_capability = abilities.eee_capability; + +/* Get current configuration */ + status =i40e_aq_get_phy_capabilities (hw, false, false, &abilities, +NULL ); +if (status) + goto err; + +/* Cache current configuration */ + config.phy_type = abilities.phy_type; + config.link_speed = abilities.link_speed; + config.abilities = abilities.abilities | +I40E_AQ_PHY_ENABLE_ATOMIC_LINK ; + 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 ; + +/* Set desired EEE state */ +if (enable) { + config.eee_capability = eee_capability; + config.eeer |=I40E_PRTPM_EEER_TX_LPI_EN_MASK ; + }else { + config.eee_capability =0 ; + config.eeer &= ~I40E_PRTPM_EEER_TX_LPI_EN_MASK ; + } + +/* Save modified config */ + status =i40e_aq_set_phy_config (hw, &config,NULL ); +err: +return status; +} +/** * i40e_read_bw_from_alt_ram * @hw: pointer to the hardware structure
drivers/net/i40e/base/i40e_prototype.h +1 -0
@@ -458,6 +458,7 @@ void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode,void i40e_nvmupd_clear_wait_state (struct i40e_hw *hw);void i40e_set_pci_config_data (struct i40e_hw *hw,u16 link_status);#endif /* PF_DRIVER */ +enum i40e_status_code i40e_enable_eee (struct i40e_hw *hw,bool enable);#if defined(I40E_QV ) || defined(VF_DRIVER )enum i40e_status_code i40e_set_mac_type (struct i40e_hw *hw);
Signature · 1 line
2.17.1
PATCH v4 13/36 net/i40e/base: read LPI status from external PHY
In reply to Xiaolong YeWhen external PHY is used, MAC register may not reflect actual state of LPI. Add function reading it directly from PHY or MAC, depending on what is supported by the device.
--- drivers/net/i40e/base/i40e_common.c | 45 ++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 2 ++ drivers/net/i40e/base/i40e_type.h | 6 ++++ 3 files changed, 53 insertions(+)
drivers/net/i40e/base/i40e_common.c +45 -0
@@ -6982,6 +6982,51 @@ enum i40e_status_code i40e_led_set_phy(struct i40e_hw *hw, bool on,return status; }#endif /* PF_DRIVER */ +/** +* i40e_get_phy_lpi_status - read LPI status from PHY or MAC register +* @hw: pointer to the hw struct +* @stat: pointer to structure with status of rx and tx lpi +* +* Read LPI state directly from external PHY register or from MAC +* register, depending on device ID and current link speed. +*/ +enum i40e_status_code i40e_get_phy_lpi_status (struct i40e_hw *hw, +struct i40e_hw_port_stats *stat) +{ +enum i40e_status_code ret =I40E_SUCCESS ; +u32 val; + + stat->rx_lpi_status =0 ; + stat->tx_lpi_status =0 ; + +if (hw->device_id ==I40E_DEV_ID_10G_BASE_T_BC && + (hw->phy.link_info.link_speed ==I40E_LINK_SPEED_2_5GB || + hw->phy.link_info.link_speed ==I40E_LINK_SPEED_5GB )) { + ret =i40e_aq_get_phy_register (hw, +I40E_AQ_PHY_REG_ACCESS_EXTERNAL , +I40E_BCM_PHY_PCS_STATUS1_PAGE , + true, +I40E_BCM_PHY_PCS_STATUS1_REG , + &val,NULL ); + +if (ret !=I40E_SUCCESS ) +return ret; + + stat->rx_lpi_status = !!(val &I40E_BCM_PHY_PCS_STATUS1_RX_LPI ); + stat->tx_lpi_status = !!(val &I40E_BCM_PHY_PCS_STATUS1_TX_LPI ); + +return ret; + } + + val =rd32 (hw,I40E_PRTPM_EEE_STAT ); + stat->rx_lpi_status = (val &I40E_PRTPM_EEE_STAT_RX_LPI_STATUS_MASK ) >> +I40E_PRTPM_EEE_STAT_RX_LPI_STATUS_SHIFT ; + stat->tx_lpi_status = (val &I40E_PRTPM_EEE_STAT_TX_LPI_STATUS_MASK ) >> +I40E_PRTPM_EEE_STAT_TX_LPI_STATUS_SHIFT ; + +return ret; +} +/** * i40e_aq_rx_ctl_read_register - use FW to read from an Rx control register
drivers/net/i40e/base/i40e_prototype.h +2 -0
@@ -74,6 +74,8 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,enum i40e_status_code i40e_blink_phy_link_led (struct i40e_hw *hw,u32 time,u32 interval); +enum i40e_status_code i40e_get_phy_lpi_status (struct i40e_hw *hw, +struct i40e_hw_port_stats *stats);/* admin send queue commands */ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw,
drivers/net/i40e/base/i40e_type.h +6 -0
@@ -2038,4 +2038,10 @@ struct i40e_profile_info {u8 reserved[7 ]; u8 name[I40E_DDP_NAME_SIZE]; }; + +#define I40E_BCM_PHY_PCS_STATUS1_PAGE 0x3 +#define I40E_BCM_PHY_PCS_STATUS1_REG 0x0001 +#define I40E_BCM_PHY_PCS_STATUS1_RX_LPI BIT(8) +#define I40E_BCM_PHY_PCS_STATUS1_TX_LPI BIT(9) +#endif /* _I40E_TYPE_H_ */
Signature · 1 line
2.17.1
PATCH v4 14/36 net/i40e/base: change for missing "link modes"
In reply to Xiaolong YeFix for missing "Supported link modes" and "Advertised link modes" info in ethtool after changed speed on X722 devices with BASE-T PHY with FW API version >= 1.7.
The same FW API version on X710 and X722 does not mean the same feature set so the change was needed as mac type of the device should also be checked instead of FW API version only.
--- drivers/net/i40e/base/i40e_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/base/i40e_common.c +2 -2
@@ -2043,8 +2043,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; -if (hw->aq.api_maj_ver ==I40E_FW_API_VERSION_MAJOR && - hw->aq.api_min_ver >=7 ) { +if (hw->flags &I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && + hw->mac.type !=I40E_MAC_X722 ) {__le32 tmp; i40e_memcpy(&tmp, resp->link_type, sizeof(tmp),
Signature · 1 line
2.17.1
PATCH v4 15/36 net/i40e/base: add reading LPI counters
In reply to Xiaolong YeThis change introduces new function i40e_get_lpi_counters() reading Low Power Idle (LPI) mode counters from Energy Efficient Ethernet (EEE) statistics. Since reading EEE statistics requires running DNL script, function i40e_aq_run_phy_activity() able to run it, was implemented.
i40e_lpi_stat_update() was introduced as helper function for retrieving LPI counters' values relative to given offsets.
This change also fixes order of fields in struct i40e_aqc_run_phy_activity and introduces union in the struct providing more descriptive names of fields depending on usage (command or response).
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 29 ++++-- drivers/net/i40e/base/i40e_common.c | 130 ++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 10 ++ 3 files changed, 163 insertions(+), 6 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +23 -6
@@ -2272,15 +2272,32 @@ enum i40e_aq_phy_reg_type { I40E_AQC_PHY_REG_EXERNAL_MODULE = 0x3 }; +#pragma pack(1)/* Run PHY Activity (0x0626) */ struct i40e_aqc_run_phy_activity { -__le16 activity_id; -u8 flags; -u8 reserved1; -__le32 control; -__le32 data; -u8 reserved2[4 ]; +u8 cmd_flags; +__le16 activity_id; +#define I40E_AQ_RUN_PHY_ACT_ID_USR_DFND 0x10 +u8 reserved; +union { +struct { +__le32 dnl_opcode; +#define I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT_DUR 0x801a +#define I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT 0x801b +#define I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_DUR 0x1801b +__le32 data; +u8 reserved2[4 ]; + } cmd; +struct { +__le32 cmd_status; +#define I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC 0x4 +#define I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK 0xFFFF +__le32 data0; +__le32 data1; + } resp; + } params; }; +#pragma pack()I40E_CHECK_CMD_LENGTH (i40e_aqc_run_phy_activity);
drivers/net/i40e/base/i40e_common.c +130 -0
142 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +10 -0
@@ -76,6 +76,12 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,enum i40e_status_code i40e_get_phy_lpi_status (struct i40e_hw *hw,struct i40e_hw_port_stats *stats); +enum i40e_status_code i40e_get_lpi_counters (struct i40e_hw *hw,u32 *tx_counter, +u32 *rx_counter,bool *is_clear); +enum i40e_status_code i40e_lpi_stat_update (struct i40e_hw *hw, +bool offset_loaded,u64 *tx_offset, +u64 *tx_stat,u64 *rx_offset, +u64 *rx_stat);/* admin send queue commands */ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw,
@@ -550,6 +556,10 @@ enum i40e_status_code i40e_aq_get_phy_register(struct i40e_hw *hw, u8 phy_select, u8 dev_addr, bool page_change, u32 reg_addr, u32 *reg_val, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_run_phy_activity (struct i40e_hw *hw,u16 activity_id,u32 opcode, +u32 *cmd_status,u32 *data0,u32 *data1, +struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, struct i40e_aqc_arp_proxy_data *proxy_config,
Signature · 1 line
2.17.1
PATCH v4 16/36 net/i40e/base: backport style changes from upstream Linux
In reply to Xiaolong YeThe upstream virtchnl.h has a few minor style differences to what is out-of-tree, and there is no real reason we should prefer the current style over whats upstream.
--- drivers/net/i40e/base/virtchnl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/base/virtchnl.h +2 -2
@@ -123,13 +123,13 @@ enum virtchnl_ops { }; -/* This macro is used to generate a compilation error if a structure +/* These macros are used to generate compilation errors if a structure/union * is not exactly the correct length. It gives a divide by zero error if the * structure is not of the correct size, otherwise it creates an enum that is * never used. */ #define VIRTCHNL_CHECK_STRUCT_LEN (n,X ) enum virtchnl_static_assert_enum_##X \ - {virtchnl_static_assert_##X = (n) / ((sizeof(struct X) == (n)) ? 1 : 0)} + { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }/* Virtual channel message descriptor. This overlays the admin queue * descriptor. All other data is passed in external buffers.
Signature · 1 line
2.17.1
PATCH v4 17/36 net/i40e/base: update status codes
In reply to Xiaolong YeAdd a few new status codes and rename a few to make them more consistent. Error code are mapped to similar values as in i40e_status.h, so as to be compatible with older VF drivers not using this status enum.
--- drivers/net/i40e/base/virtchnl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/net/i40e/base/virtchnl.h +9 -3
@@ -40,13 +40,19 @@/* Error Codes */ enum virtchnl_status_code {VIRTCHNL_STATUS_SUCCESS =0 , -VIRTCHNL_ERR_PARAM =-5 , +VIRTCHNL_STATUS_ERR_PARAM =-5 , +VIRTCHNL_STATUS_ERR_NO_MEMORY =-18 ,VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH =-38 ,VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR =-39 ,VIRTCHNL_STATUS_ERR_INVALID_VF_ID =-40 , -VIRTCHNL_STATUS_NOT_SUPPORTED =-64 , +VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR =-53 , +VIRTCHNL_STATUS_ERR_NOT_SUPPORTED =-64 , }; +/* Backward compatibility */ +#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM +#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED +#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3
@@ -732,7 +738,7 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,case VIRTCHNL_OP_EVENT :case VIRTCHNL_OP_UNKNOWN :default : -return VIRTCHNL_ERR_PARAM ; +return VIRTCHNL_STATUS_ERR_PARAM ; }/* few more checks */ if (err_msg_format || valid_len != msglen)
Signature · 1 line
2.17.1
PATCH v4 18/36 net/i40e/base: change of the incorrect Tx descriptors number
In reply to Xiaolong YeThe existing driver allows setting the number of TX descriptors to the value that is indivisible by 32. This is not properly supported by x710 hardware. The patch limits the number of TX descriptors to the whole value of 32.
--- drivers/net/i40e/base/i40e_type.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/base/i40e_type.h +2 -2
@@ -79,8 +79,8 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);#define I40E_HI_BYTE (x) ((u8)(((x) >> 8) & 0xFF))#define I40E_LO_BYTE (x) ((u8)((x) & 0xFF)) -/* Number of Transmit Descriptors must be a multiple of 8. */ -#define I40E_REQ_TX_DESCRIPTOR_MULTIPLE 8 +/* Number of Transmit Descriptors must be a multiple of 32. */ +#define I40E_REQ_TX_DESCRIPTOR_MULTIPLE 32/* Number of Receive Descriptors must be a multiple of 32 if * the number of descriptors is greater than 32. */
Signature · 1 line
2.17.1
PATCH v4 19/36 net/i40e/base: extend PHY access AQ command
In reply to Xiaolong YeCurrently FW use MDIO I/F number corresponded with current PF for PHY access. This code allow to specify used MDIO I/F number.
--- drivers/net/i40e/base/i40e_adminq.c | 57 +++++++++++++++++++++++ drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++- drivers/net/i40e/base/i40e_common.c | 62 ++++++++++++++++++++----- drivers/net/i40e/base/i40e_prototype.h | 27 +++++++---- drivers/net/i40e/base/i40e_type.h | 1 + 5 files changed, 132 insertions(+), 21 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +57 -0
@@ -569,6 +569,57 @@ STATIC void i40e_resume_aq(struct i40e_hw *hw) }#endif /* PF_DRIVER */ +/** +* i40e_set_hw_flags - set HW flags +* @hw: pointer to the hardware structure +**/ +STATIC void i40e_set_hw_flags(struct i40e_hw *hw) +{ +struct i40e_adminq_info *aq = &hw->aq; + + hw->flags =0 ; + +switch (hw->mac.type) { +case I40E_MAC_XL710 : +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=I40E_MINOR_VER_GET_LINK_INFO_XL710 )) { + hw->flags |=I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ; + hw->flags |=I40E_HW_FLAG_FW_LLDP_STOPPABLE ; +/* The ability to RX (not drop) 802.1ad frames */ + hw->flags |=I40E_HW_FLAG_802_1AD_CAPABLE ; + } +break ; +case I40E_MAC_X722 : + hw->flags |=I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE | +I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK ; + +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 )) + hw->flags |=I40E_HW_FLAG_FW_LLDP_STOPPABLE ; +/* fall through */ +default : +break ; + } + +/* Newer versions of firmware require lock when reading the NVM */ +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=5 )) + hw->flags |=I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK ; + +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=8 )) + hw->flags |=I40E_HW_FLAG_FW_LLDP_PERSISTENT ; + +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=9 )) + hw->flags |=I40E_HW_FLAG_AQ_PHY_ACCESS_EXTENDED ; +} +/** * i40e_init_adminq - main initialization routine for Admin Queue * @hw: pointer to the hardware structure
@@ -636,6 +687,12 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)if (ret_code !=I40E_SUCCESS ) goto init_adminq_free_arq; +/* +* Some features were introduced in different FW API version +* for different MAC type. +*/ +i40e_set_hw_flags (hw); +/* get the NVM version info */ i40e_read_nvm_word (hw,I40E_SR_NVM_DEV_STARTER_VERSION , &hw->nvm.version);
drivers/net/i40e/base/i40e_adminq_cmd.h +5 -1
@@ -2310,7 +2310,11 @@ struct i40e_aqc_phy_register_access {#define I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE 2u8 dev_addres;u8 cmd_flags; -#define I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE 1 +#define I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE 0x01 +#define I40E_AQ_PHY_REG_ACCESS_SET_MDIO_IF_NUMBER 0x02 +#define I40E_AQ_PHY_REG_ACCESS_MDIO_IF_NUMBER_SHIFT 2 +#define I40E_AQ_PHY_REG_ACCESS_MDIO_IF_NUMBER_MASK (0x3 << \ + I40E_AQ_PHY_REG_ACCESS_MDIO_IF_NUMBER_SHIFT)u8 reserved1;__le32 reg_address;__le32 reg_value;
drivers/net/i40e/base/i40e_common.c +50 -12
113 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +19 -8
@@ -548,14 +548,25 @@ 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); -enum i40e_status_code i40e_aq_set_phy_register (struct i40e_hw *hw, -u8 phy_select,u8 dev_addr,bool page_change, -u32 reg_addr,u32 reg_val, -struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_get_phy_register (struct i40e_hw *hw, -u8 phy_select,u8 dev_addr,bool page_change, -u32 reg_addr,u32 *reg_val, -struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_set_phy_register_ext (struct i40e_hw *hw, +u8 phy_select,u8 dev_addr,bool page_change, +bool set_mdio,u8 mdio_num, +u32 reg_addr,u32 reg_val, +struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_get_phy_register_ext (struct i40e_hw *hw, +u8 phy_select,u8 dev_addr,bool page_change, +bool set_mdio,u8 mdio_num, +u32 reg_addr,u32 *reg_val, +struct i40e_asq_cmd_details *cmd_details); + +/* Convenience wrappers for most common use case */ +#define i40e_aq_set_phy_register (hw, ps, da, pc, ra, rv, cd) \ + i40e_aq_set_phy_register_ext(hw, ps, da, pc, false, 0, ra, rv, cd) +#define i40e_aq_get_phy_register (hw, ps, da, pc, ra, rv, cd) \ + i40e_aq_get_phy_register_ext(hw, ps, da, pc, false, 0, ra, rv, cd) + enum i40e_status_code i40e_aq_run_phy_activity(struct i40e_hw *hw, u16 activity_id, u32 opcode, u32 *cmd_status, u32 *data0, u32 *data1,
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -743,6 +743,7 @@ struct i40e_hw {#define I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK BIT_ULL(3)#define I40E_HW_FLAG_FW_LLDP_STOPPABLE BIT_ULL(4)#define I40E_HW_FLAG_FW_LLDP_PERSISTENT BIT_ULL(5) +#define I40E_HW_FLAG_AQ_PHY_ACCESS_EXTENDED BIT_ULL(6)u64 flags;/* Used in set switch config AQ command */
Signature · 1 line
2.17.1
PATCH v4 20/36 net/i40e/base: add drop mode parameter to set MAC config
In reply to Xiaolong YeThis patch adds "drop mode" parameter to set mac config AQ command. This bit controls the behavior when a no-drop packet is blocking a TC queue.
0 – The PF driver is notified.
1 – The blocking packet is dropped and then the PF driver is notified.
--- drivers/net/i40e/base/i40e_adminq.c | 4 +++- drivers/net/i40e/base/i40e_adminq_cmd.h | 29 +++++++++++++------------ drivers/net/i40e/base/i40e_common.c | 11 ++++++++++ drivers/net/i40e/base/i40e_prototype.h | 1 + drivers/net/i40e/base/i40e_type.h | 1 + drivers/net/i40e/i40e_ethdev.c | 2 +- 6 files changed, 32 insertions(+), 16 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +3 -1
@@ -611,8 +611,10 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw)if (aq->api_maj_ver >1 || (aq->api_maj_ver ==1 && - aq->api_min_ver >=8 )) + aq->api_min_ver >=8 )) { hw->flags |=I40E_HW_FLAG_FW_LLDP_PERSISTENT ; + hw->flags |=I40E_HW_FLAG_DROP_MODE ; + } if (aq->api_maj_ver > 1 || (aq->api_maj_ver == 1 &&
drivers/net/i40e/base/i40e_adminq_cmd.h +15 -14
@@ -2098,20 +2098,21 @@ I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config);struct i40e_aq_set_mac_config {__le16 max_frame_size;u8 params; -#define I40E_AQ_SET_MAC_CONFIG_CRC_EN 0x04 -#define I40E_AQ_SET_MAC_CONFIG_PACING_MASK 0x78 -#define I40E_AQ_SET_MAC_CONFIG_PACING_SHIFT 3 -#define I40E_AQ_SET_MAC_CONFIG_PACING_NONE 0x0 -#define I40E_AQ_SET_MAC_CONFIG_PACING_1B_13TX 0xF -#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_9TX 0x9 -#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_4TX 0x8 -#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_7TX 0x7 -#define I40E_AQ_SET_MAC_CONFIG_PACING_2DW_3TX 0x6 -#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_1TX 0x5 -#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_2TX 0x4 -#define I40E_AQ_SET_MAC_CONFIG_PACING_7DW_3TX 0x3 -#define I40E_AQ_SET_MAC_CONFIG_PACING_4DW_1TX 0x2 -#define I40E_AQ_SET_MAC_CONFIG_PACING_9DW_1TX 0x1 +#define I40E_AQ_SET_MAC_CONFIG_CRC_EN 0x04 +#define I40E_AQ_SET_MAC_CONFIG_PACING_MASK 0x78 +#define I40E_AQ_SET_MAC_CONFIG_PACING_SHIFT 3 +#define I40E_AQ_SET_MAC_CONFIG_PACING_NONE 0x0 +#define I40E_AQ_SET_MAC_CONFIG_PACING_1B_13TX 0xF +#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_9TX 0x9 +#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_4TX 0x8 +#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_7TX 0x7 +#define I40E_AQ_SET_MAC_CONFIG_PACING_2DW_3TX 0x6 +#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_1TX 0x5 +#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_2TX 0x4 +#define I40E_AQ_SET_MAC_CONFIG_PACING_7DW_3TX 0x3 +#define I40E_AQ_SET_MAC_CONFIG_PACING_4DW_1TX 0x2 +#define I40E_AQ_SET_MAC_CONFIG_PACING_9DW_1TX 0x1 +#define I40E_AQ_SET_MAC_CONFIG_DROP_BLOCKING_PACKET_EN 0x80u8 tx_timer_priority;/* bitmap */ __le16 tx_timer_value;__le16 fc_refresh_threshold;
drivers/net/i40e/base/i40e_common.c +11 -0
@@ -1873,6 +1873,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,* @max_frame_size: Maximum Frame Size to be supported by the port * @crc_en: Tell HW to append a CRC to outgoing frames * @pacing: Pacing configurations +* @auto_drop_blocking_packets: Tell HW to drop packets if TC queue is blocked * @cmd_details: pointer to command details structure or NULL * * Configure MAC settings for frame size, jumbo frame support and the
@@ -1881,6 +1882,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,enum i40e_status_code i40e_aq_set_mac_config (struct i40e_hw *hw,u16 max_frame_size,bool crc_en,u16 pacing, +bool auto_drop_blocking_packets,struct i40e_asq_cmd_details *cmd_details) {struct i40e_aq_desc desc;
@@ -1899,6 +1901,15 @@ enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,if (crc_en) cmd->params |=I40E_AQ_SET_MAC_CONFIG_CRC_EN ; +if (auto_drop_blocking_packets) { +if (hw->flags &I40E_HW_FLAG_DROP_MODE ) + cmd->params |= +I40E_AQ_SET_MAC_CONFIG_DROP_BLOCKING_PACKET_EN ; +else +i40e_debug (hw,I40E_DEBUG_ALL , +"This FW api version does not support drop mode.\n" ); + } +#define I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD 0x7FFF cmd->fc_refresh_threshold =CPU_TO_LE16 (I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD );
drivers/net/i40e/base/i40e_prototype.h +1 -0
@@ -114,6 +114,7 @@ enum i40e_status_code i40e_aq_set_phy_int_mask(struct i40e_hw *hw, u16 mask, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_set_mac_config (struct i40e_hw *hw,u16 max_frame_size,bool crc_en,u16 pacing, +bool auto_drop_blocking_packets,struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_get_local_advt_reg(struct i40e_hw *hw, u64 *advt_reg,
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -744,6 +744,7 @@ struct i40e_hw {#define I40E_HW_FLAG_FW_LLDP_STOPPABLE BIT_ULL(4)#define I40E_HW_FLAG_FW_LLDP_PERSISTENT BIT_ULL(5)#define I40E_HW_FLAG_AQ_PHY_ACCESS_EXTENDED BIT_ULL(6) +#define I40E_HW_FLAG_DROP_MODE BIT_ULL(7)u64 flags;/* Used in set switch config AQ command */
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -1649,7 +1649,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)/* Set the max frame size to 0x2600 by default, * in case other drivers changed the default value. */ -i40e_aq_set_mac_config (hw,I40E_FRAME_SIZE_MAX , TRUE,0 ,NULL ); +i40e_aq_set_mac_config (hw,I40E_FRAME_SIZE_MAX , TRUE, false,0 ,NULL );/* initialize mirror rule list */ TAILQ_INIT (&pf->mirror_list);
Signature · 1 line
2.17.1
PATCH v4 21/36 net/i40e/base: add FWS1B register masks
In reply to Xiaolong YeFunction check_recovery_mode had wrong if statement. Now we check proper FWS1B register values, which are responsible for the recovery mode. Recovery mode has 6 values in total. That's why we need 6 different flags. Now in if statement we recognize type of mac and register value. Without those changes driver could show wrong state.
--- drivers/net/i40e/base/i40e_register.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/i40e/base/i40e_register.h +12 -0
@@ -366,6 +366,18 @@#define I40E_GL_FWSTS_FWRI_MASK I40E_MASK(0x1, I40E_GL_FWSTS_FWRI_SHIFT)#define I40E_GL_FWSTS_FWS1B_SHIFT 16#define I40E_GL_FWSTS_FWS1B_MASK I40E_MASK(0xFF, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_CORER_MASK \ + I40E_MASK(0x30, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_GLOBR_MASK \ + I40E_MASK(0x31, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_TRANSITION_MASK \ + I40E_MASK(0x32, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_NVM_MASK \ + I40E_MASK(0x33, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_X722_GL_FWSTS_FWS1B_REC_MOD_CORER_MASK \ + I40E_MASK(0xB, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_X722_GL_FWSTS_FWS1B_REC_MOD_GLOBR_MASK \ + I40E_MASK(0xC, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_GLGEN_CLKSTAT 0x000B8184/* Reset: POR */ #define I40E_GLGEN_CLKSTAT_CLKMODE_SHIFT 0#define I40E_GLGEN_CLKSTAT_CLKMODE_MASK I40E_MASK(0x1, I40E_GLGEN_CLKSTAT_CLKMODE_SHIFT)
Signature · 1 line
2.17.1
PATCH v4 22/36 net/i40e/base: update FW API version
In reply to Xiaolong YeUpdate FW API version to 1.9.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/base/i40e_adminq_cmd.h +2 -2
@@ -12,8 +12,8 @@*/ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x0006 -#define I40E_FW_API_VERSION_MINOR_X710 0x0007 +#define I40E_FW_API_VERSION_MINOR_X722 0x0009 +#define I40E_FW_API_VERSION_MINOR_X710 0x0009#define I40E_FW_MINOR_VERSION (_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \
Signature · 1 line
2.17.1
PATCH v4 23/36 net/i40e/base: add persistent lldp support
In reply to Xiaolong YeThis patch adds a function to read nvm module data and uses it to read current lldp agent configuration from nvm api version 1.8.
--- drivers/net/i40e/base/i40e_dcb.c | 20 +++++++- drivers/net/i40e/base/i40e_dcb.h | 5 ++ drivers/net/i40e/base/i40e_nvm.c | 71 ++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 3 ++ 4 files changed, 98 insertions(+), 1 deletion(-)
drivers/net/i40e/base/i40e_dcb.c +19 -1
@@ -877,7 +877,25 @@ enum i40e_status_code i40e_init_dcb(struct i40e_hw *hw, bool enable_mib_change)return I40E_NOT_SUPPORTED ;/* Read LLDP NVM area */ - ret =i40e_read_lldp_cfg (hw, &lldp_cfg); +if (hw->flags &I40E_HW_FLAG_FW_LLDP_PERSISTENT ) { +u8 offset =0 ; + +if (hw->mac.type ==I40E_MAC_XL710 ) + offset =I40E_LLDP_CURRENT_STATUS_XL710_OFFSET ; +else if (hw->mac.type ==I40E_MAC_X722 ) + offset =I40E_LLDP_CURRENT_STATUS_X722_OFFSET ; +else +return I40E_NOT_SUPPORTED ; + + ret =i40e_read_nvm_module_data (hw, +I40E_SR_EMP_SR_SETTINGS_PTR , + offset, +I40E_LLDP_CURRENT_STATUS_OFFSET , +I40E_LLDP_CURRENT_STATUS_SIZE , + &lldp_cfg.adminstatus); + }else { + ret =i40e_read_lldp_cfg (hw, &lldp_cfg); + }if (ret)return I40E_ERR_NOT_READY ;
drivers/net/i40e/base/i40e_dcb.h +5 -0
@@ -39,6 +39,11 @@#define I40E_LLDP_ADMINSTATUS_ENABLED_TX 2#define I40E_LLDP_ADMINSTATUS_ENABLED_RXTX 3 +#define I40E_LLDP_CURRENT_STATUS_XL710_OFFSET 0x2B +#define I40E_LLDP_CURRENT_STATUS_X722_OFFSET 0x31 +#define I40E_LLDP_CURRENT_STATUS_OFFSET 1 +#define I40E_LLDP_CURRENT_STATUS_SIZE 1 +/* Defines for LLDP TLV header */ #define I40E_LLDP_MIB_HLEN 14#define I40E_LLDP_TLV_LEN_SHIFT 0
drivers/net/i40e/base/i40e_nvm.c +71 -0
77 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +3 -0
@@ -442,6 +442,9 @@ enum i40e_status_code i40e_acquire_nvm(struct i40e_hw *hw,void i40e_release_nvm (struct i40e_hw *hw);enum i40e_status_code i40e_read_nvm_word (struct i40e_hw *hw,u16 offset,u16 *data); +enum i40e_status_code +i40e_read_nvm_module_data (struct i40e_hw *hw,u8 module_ptr,u16 module_offset, +u16 data_offset,u16 words_data_size,u16 *data_ptr);enum i40e_status_code i40e_read_nvm_buffer (struct i40e_hw *hw,u16 offset,u16 *words,u16 *data); enum i40e_status_code i40e_write_nvm_aq(struct i40e_hw *hw, u8 module,
Signature · 1 line
2.17.1
PATCH v4 24/36 net/i40e/base: make i40e_set_mac_type() public
In reply to Xiaolong YeMake i40e_set_mac_type() public. i40e driver requires i40e_set_mac_type() to be public. It is required for recovery mode handling. Without this patch recovery mode could not be detected at probe() function.
--- drivers/net/i40e/base/i40e_common.c | 4 ---- drivers/net/i40e/base/i40e_prototype.h | 2 -- 2 files changed, 6 deletions(-)
drivers/net/i40e/base/i40e_common.c +0 -4
@@ -14,11 +14,7 @@* This function sets the mac type of the adapter based on the * vendor ID and device ID stored in the hw structure. **/ -#if defined(INTEGRATED_VF ) || defined(VF_DRIVER )enum i40e_status_code i40e_set_mac_type (struct i40e_hw *hw) -#else -STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw) -#endif {enum i40e_status_code status =I40E_SUCCESS ;
drivers/net/i40e/base/i40e_prototype.h +0 -2
@@ -472,10 +472,8 @@ void i40e_set_pci_config_data(struct i40e_hw *hw, u16 link_status);#endif /* PF_DRIVER */ enum i40e_status_code i40e_enable_eee (struct i40e_hw *hw,bool enable); -#if defined(I40E_QV ) || defined(VF_DRIVER )enum i40e_status_code i40e_set_mac_type (struct i40e_hw *hw); -#endif extern struct i40e_rx_ptype_decoded i40e_ptype_lookup[]; STATIC INLINE struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v4 24/36] net/i40e/base: make i40e_set_mac_type() public
ACK
-----Original Message-----
From: Ye, Xiaolong <[email protected]>
Sent: Monday, January 13, 2020 3:40 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>; Kwapulinski, Piotr <[email protected]>
Subject: [PATCH v4 24/36] net/i40e/base: make i40e_set_mac_type() public
Make i40e_set_mac_type() public. i40e driver requires i40e_set_mac_type() to be public. It is required for recovery mode handling. Without this patch recovery mode could not be detected at probe() function.
--- drivers/net/i40e/base/i40e_common.c | 4 ---- drivers/net/i40e/base/i40e_prototype.h | 2 -- 2 files changed, 6 deletions(-)
drivers/net/i40e/base/i40e_common.c +0 -1
@@ -14,11 +14,7 @@* This function sets the mac type of the adapter based on the * vendor ID and device ID stored in the hw structure. **/ -#if defined(INTEGRATED_VF) || defined(VF_DRIVER) enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw) -#else -STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw) -#endif {enum i40e_status_code status =I40E_SUCCESS ;
drivers/net/i40e/base/i40e_prototype.h +0 -3
@@ -472,10 +472,8 @@ void i40e_set_pci_config_data(struct i40e_hw *hw, u16 link_status); #endif /* PF_DRIVER */ enum i40e_status_code i40e_enable_eee(struct i40e_hw *hw, bool enable); -#if defined(I40E_QV) || defined(VF_DRIVER) enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw); -#endif extern struct i40e_rx_ptype_decoded i40e_ptype_lookup[]; STATIC INLINE struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype) --
2.17.1
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
PATCH v4 25/36 net/i40e/base: fix retrying logic
In reply to Xiaolong YeFixed a bug where driver was breaking out of the loop and reporting an error without retrying first.
--- drivers/net/i40e/base/i40e_common.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/net/i40e/base/i40e_common.c +10 -7
@@ -1714,19 +1714,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw, status =i40e_asq_send_command (hw, &desc, abilities, abilities_size, cmd_details); -if (status !=I40E_SUCCESS ) -break ; - -if (hw->aq.asq_last_status ==I40E_AQ_RC_EIO ) { +switch (hw->aq.asq_last_status) { +case I40E_AQ_RC_EIO : status =I40E_ERR_UNKNOWN_PHY ;break ; - }else if (hw->aq.asq_last_status ==I40E_AQ_RC_EAGAIN ) { +case I40E_AQ_RC_EAGAIN :i40e_msec_delay (1 ); total_delay++; status =I40E_ERR_TIMEOUT ; +break ; +/* also covers I40E_AQ_RC_OK */ +default : +break ; } - }while ((hw->aq.asq_last_status !=I40E_AQ_RC_OK ) && - (total_delay < max_delay)); + + }while ((hw->aq.asq_last_status ==I40E_AQ_RC_EAGAIN ) && + (total_delay < max_delay));if (status !=I40E_SUCCESS )return status;
Signature · 1 line
2.17.1
PATCH v4 26/36 net/i40e/base: mark additional missing bits as reserved
In reply to Xiaolong YeMark bits 0xD through 0xF for the command flags of a cloud filter as reserved. These bits are not yet defined and are considered as reserved in the data sheet.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -0
@@ -1402,6 +1402,9 @@ struct i40e_aqc_cloud_filters_element_data {#define I40E_AQC_ADD_CLOUD_FILTER_IMAC 0x000A#define I40E_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC 0x000B#define I40E_AQC_ADD_CLOUD_FILTER_IIP 0x000C +/* 0x000D reserved */ +/* 0x000E reserved */ +/* 0x000F reserved */ /* 0x0010 to 0x0017 is for custom filters */ #define I40E_AQC_ADD_CLOUD_FILTER_IP_PORT 0x0010/* Dest IP + L4 Port */ #define I40E_AQC_ADD_CLOUD_FILTER_MAC_PORT 0x0011/* Dest MAC + L4 Port */
Signature · 1 line
2.17.1
PATCH v4 27/36 net/i40e/base: fix wrong 'Advertised FEC modes'
In reply to Xiaolong YeFix display of FEC settings for ethtool.
This patch change variable 'phy.link_info.req_fec_info' sent to ethtool. Without this patch wrong FEC settings can be shown.
--- drivers/net/i40e/base/i40e_common.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/net/i40e/base/i40e_common.c +10 -3
@@ -2911,9 +2911,16 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)if (status)return status; - hw->phy.link_info.req_fec_info = - abilities.fec_cfg_curr_mod_ext_info & - (I40E_AQ_REQUEST_FEC_KR |I40E_AQ_REQUEST_FEC_RS ); +if (abilities.fec_cfg_curr_mod_ext_info & +I40E_AQ_ENABLE_FEC_AUTO ) + hw->phy.link_info.req_fec_info = + (I40E_AQ_REQUEST_FEC_KR | +I40E_AQ_REQUEST_FEC_RS ); +else + hw->phy.link_info.req_fec_info = + abilities.fec_cfg_curr_mod_ext_info & + (I40E_AQ_REQUEST_FEC_KR | +I40E_AQ_REQUEST_FEC_RS );i40e_memcpy (hw->phy.link_info.module_type, &abilities.module_type,sizeof (hw->phy.link_info.module_type),I40E_NONDMA_TO_NONDMA );
Signature · 1 line
2.17.1
PATCH v4 28/36 net/i40e/base: add Flow Director defines
In reply to Xiaolong YeAdd defines for creating Flow Director flows as defined in datasheet section 7.1.5.4 for field vectors.
--- drivers/net/i40e/base/i40e_register.h | 81 +++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
drivers/net/i40e/base/i40e_register.h +81 -0
@@ -5287,6 +5287,87 @@#define I40E_GLGEN_STAT_HALT_HALT_CELLS_SHIFT 0#define I40E_GLGEN_STAT_HALT_HALT_CELLS_MASK I40E_MASK(0x3FFFFFFF, I40E_GLGEN_STAT_HALT_HALT_CELLS_SHIFT)#endif /* PF_DRIVER */ +/* Flow Director */ +#define I40E_REG_INSET_L2_DMAC_SHIFT 60 +#define I40E_REG_INSET_L2_DMAC_MASK I40E_MASK(0xEULL, I40E_REG_INSET_L2_DMAC_SHIFT) +#define I40E_REG_INSET_L2_SMAC_SHIFT 56 +#define I40E_REG_INSET_L2_SMAC_MASK I40E_MASK(0x1CULL, I40E_REG_INSET_L2_SMAC_SHIFT) +#define I40E_REG_INSET_L2_OUTER_VLAN_SHIFT 26 +#define I40E_REG_INSET_L2_OUTER_VLAN_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L2_OUTER_VLAN_SHIFT) +#define I40E_REG_INSET_L2_INNER_VLAN_SHIFT 55 +#define I40E_REG_INSET_L2_INNER_VLAN_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L2_INNER_VLAN_SHIFT) +#define I40E_REG_INSET_TUNNEL_VLAN_SHIFT 56 +#define I40E_REG_INSET_TUNNEL_VLAN_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_TUNNEL_VLAN_SHIFT) +#define I40E_REG_INSET_L3_SRC_IP4_SHIFT 47 +#define I40E_REG_INSET_L3_SRC_IP4_MASK I40E_MASK(0x3ULL, I40E_REG_INSET_L3_SRC_IP4_SHIFT) +#define I40E_REG_INSET_L3_DST_IP4_SHIFT 35 +#define I40E_REG_INSET_L3_DST_IP4_MASK I40E_MASK(0x3ULL, I40E_REG_INSET_L3_DST_IP4_SHIFT) +#define I40E_X722_REG_INSET_L3_SRC_IP4_SHIFT 49 +#define I40E_X722_REG_INSET_L3_SRC_IP4_MASK I40E_MASK(0x3ULL, I40E_X722_REG_INSET_L3_SRC_IP4_SHIFT) +#define I40E_X722_REG_INSET_L3_DST_IP4_SHIFT 41 +#define I40E_X722_REG_INSET_L3_DST_IP4_MASK I40E_MASK(0x3ULL, I40E_X722_REG_INSET_L3_DST_IP4_SHIFT) +#define I40E_X722_REG_INSET_L3_IP4_PROTO_SHIFT 52 +#define I40E_X722_REG_INSET_L3_IP4_PROTO_MASK I40E_MASK(0x1ULL, I40E_X722_REG_INSET_L3_IP4_PROTO_SHIFT) +#define I40E_X722_REG_INSET_L3_IP4_TTL_SHIFT 52 +#define I40E_X722_REG_INSET_L3_IP4_TTL_MASK I40E_MASK(0x1ULL, I40E_X722_REG_INSET_L3_IP4_TTL_SHIFT) +#define I40E_REG_INSET_L3_IP4_TOS_SHIFT 54 +#define I40E_REG_INSET_L3_IP4_TOS_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L3_IP4_TOS_SHIFT) +#define I40E_REG_INSET_L3_IP4_PROTO_SHIFT 50 +#define I40E_REG_INSET_L3_IP4_PROTO_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L3_IP4_PROTO_SHIFT) +#define I40E_REG_INSET_L3_IP4_TTL_SHIFT 50 +#define I40E_REG_INSET_L3_IP4_TTL_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L3_IP4_TTL_SHIFT) +#define I40E_REG_INSET_L3_SRC_IP6_SHIFT 43 +#define I40E_REG_INSET_L3_SRC_IP6_MASK I40E_MASK(0xFFULL, I40E_REG_INSET_L3_SRC_IP6_SHIFT) +#define I40E_REG_INSET_L3_DST_IP6_SHIFT 35 +#define I40E_REG_INSET_L3_DST_IP6_MASK I40E_MASK(0xFFULL, I40E_REG_INSET_L3_DST_IP6_SHIFT) +#define I40E_REG_INSET_L3_IP6_TC_SHIFT 54 +#define I40E_REG_INSET_L3_IP6_TC_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L3_IP6_TC_SHIFT) +#define I40E_REG_INSET_L3_IP6_NEXT_HDR_SHIFT 51 +#define I40E_REG_INSET_L3_IP6_NEXT_HDR_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L3_IP6_NEXT_HDR_SHIFT) +#define I40E_REG_INSET_L3_IP6_HOP_LIMIT_SHIFT 51 +#define I40E_REG_INSET_L3_IP6_HOP_LIMIT_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L3_IP6_HOP_LIMIT_SHIFT) +#define I40E_REG_INSET_L4_SRC_PORT_SHIFT 34 +#define I40E_REG_INSET_L4_SRC_PORT_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L4_SRC_PORT_SHIFT) +#define I40E_REG_INSET_L4_DST_PORT_SHIFT 33 +#define I40E_REG_INSET_L4_DST_PORT_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_L4_DST_PORT_SHIFT) +#define I40E_REG_INSET_L4_SCTP_VERIFICATION_TAG_SHIFT 31 +#define I40E_REG_INSET_L4_SCTP_VERIFICATION_TAG_MASK I40E_MASK(0x3ULL, I40E_REG_INSET_L4_SCTP_VERIFICATION_TAG_SHIFT) +#define I40E_REG_INSET_TUNNEL_L2_INNER_DST_MAC_SHIFT 22 +#define I40E_REG_INSET_TUNNEL_L2_INNER_DST_MAC_MASK I40E_MASK(0x7ULL, I40E_REG_INSET_TUNNEL_L2_INNER_DST_MAC_SHIFT) +#define I40E_REG_INSET_TUNNEL_L2_INNER_SRC_MAC_SHIFT 11 +#define I40E_REG_INSET_TUNNEL_L2_INNER_SRC_MAC_MASK I40E_MASK(0x7ULL, I40E_REG_INSET_TUNNEL_L2_INNER_SRC_MAC_SHIFT) +#define I40E_REG_INSET_TUNNEL_L4_UDP_DST_PORT_SHIFT 21 +#define I40E_REG_INSET_TUNNEL_L4_UDP_DST_PORT_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_TUNNEL_L4_UDP_DST_PORT_SHIFT) +#define I40E_REG_INSET_TUNNEL_ID_SHIFT 18 +#define I40E_REG_INSET_TUNNEL_ID_MASK I40E_MASK(0x3ULL, I40E_REG_INSET_TUNNEL_ID_SHIFT) +#define I40E_REG_INSET_LAST_ETHER_TYPE_SHIFT 14 +#define I40E_REG_INSET_LAST_ETHER_TYPE_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_LAST_ETHER_TYPE_SHIFT) +#define I40E_REG_INSET_TUNNEL_L3_SRC_IP4_SHIFT 8 +#define I40E_REG_INSET_TUNNEL_L3_SRC_IP4_MASK I40E_MASK(0x3ULL, I40E_REG_INSET_TUNNEL_L3_SRC_IP4_SHIFT) +#define I40E_REG_INSET_TUNNEL_L3_DST_IP4_SHIFT 6 +#define I40E_REG_INSET_TUNNEL_L3_DST_IP4_MASK I40E_MASK(0x3ULL, I40E_REG_INSET_TUNNEL_L3_DST_IP4_SHIFT) +#define I40E_REG_INSET_TUNNEL_L3_DST_IP6_SHIFT 6 +#define I40E_REG_INSET_TUNNEL_L3_DST_IP6_MASK I40E_MASK(0xFFULL, I40E_REG_INSET_TUNNEL_L3_DST_IP6_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD1_SHIFT 13 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD1_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD1_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD2_SHIFT 12 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD2_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD2_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD3_SHIFT 11 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD3_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD3_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD4_SHIFT 10 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD4_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD4_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD5_SHIFT 9 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD5_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD5_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD6_SHIFT 8 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD6_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD6_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD7_SHIFT 7 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD7_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD7_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD8_SHIFT 6 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORD8_MASK I40E_MASK(0x1ULL, I40E_REG_INSET_FLEX_PAYLOAD_WORD8_SHIFT) +#define I40E_REG_INSET_FLEX_PAYLOAD_WORDS_SHIFT 6 +#define I40E_REG_INSET_FLEX_PAYLOAD_WORDS_MASK I40E_MASK(0xFFULL, I40E_REG_INSET_FLEX_PAYLOAD_WORDS_SHIFT) +#define I40E_REG_INSET_MASK_DEFAULT 0x0000000000000000ULL +#define I40E_VFINT_DYN_CTL01_WB_ON_ITR_SHIFT 30#define I40E_VFINT_DYN_CTL01_WB_ON_ITR_MASK I40E_MASK(0x1, I40E_VFINT_DYN_CTL01_WB_ON_ITR_SHIFT)#define I40E_VFINT_DYN_CTLN1_WB_ON_ITR_SHIFT 30
Signature · 1 line
2.17.1
PATCH v4 29/36 net/i40e/base: removed unreachable code
In reply to Xiaolong YeThe result of the check is always FALSE and the code within "if" is never executed.
--- drivers/net/i40e/base/i40e_common.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/i40e/base/i40e_common.c +0 -2
@@ -4869,8 +4869,6 @@ enum i40e_status_code i40e_aq_add_mcast_etag(struct i40e_hw *hw, u16 pv_seid, cmd->num_unicast_etags = num_tags_in_buf; desc.flags |=CPU_TO_LE16 ((u16)(I40E_AQ_FLAG_BUF |I40E_AQ_FLAG_RD )); -if (length >I40E_AQ_LARGE_BUF ) - desc.flags |=CPU_TO_LE16 ((u16 )I40E_AQ_FLAG_LB ); status =i40e_asq_send_command (hw, &desc, buf, length, cmd_details);
Signature · 1 line
2.17.1
PATCH v4 30/36 net/i40e/base: set PHY Access flag on X722
In reply to Xiaolong YeThe X722 FW API version 1.9 adds support for accessing PHY registers with Admin Queue Command. This enables reading EEPROM data from (Q)SFP+ transceivers, what was previously possible only on X710 devices.
--- drivers/net/i40e/base/i40e_adminq.c | 5 +++++ drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ 2 files changed, 7 insertions(+)
drivers/net/i40e/base/i40e_adminq.c +5 -0
@@ -598,6 +598,11 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw) (aq->api_maj_ver ==1 && aq->api_min_ver >= I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722)) hw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE; + +if (aq->api_maj_ver >1 || + (aq->api_maj_ver ==1 && + aq->api_min_ver >=I40E_MINOR_VER_GET_LINK_INFO_X722 )) + hw->flags |=I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE ;/* fall through */ default :break ;
drivers/net/i40e/base/i40e_adminq_cmd.h +2 -0
@@ -21,6 +21,8 @@/* API version 1.7 implements additional link and PHY-specific APIs */ #define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007 +/* API version 1.9 for X722 implements additional link and PHY-specific APIs */ +#define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */ #define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006
Signature · 1 line
2.17.1
PATCH v4 31/36 net/i40e/base: implement reading lpi statistics
In reply to Xiaolong YeThere was no time duration statistics for LPI (Low Power Idle) in EEE (Energy-Efficient Ethernet).
Added new procedure to get duration values from FW. Otherwise there is no available procedure to get tx_lpi_duration and rx_lpi_duration values.
--- drivers/net/i40e/base/i40e_common.c | 56 ++++++++++++++++++++++++++ drivers/net/i40e/base/i40e_prototype.h | 3 ++ drivers/net/i40e/base/i40e_type.h | 2 + 3 files changed, 61 insertions(+)
drivers/net/i40e/base/i40e_common.c +56 -0
@@ -7083,6 +7083,62 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw,return I40E_SUCCESS ; } +/** +* i40e_get_lpi_duration - read LPI time duration from EEE statistics +* @hw: pointer to the hw struct +* @stat: pointer to structure with status of rx and tx lpi +* @tx_duration: pointer to memory for TX LPI time duration +* @rx_duration: pointer to memory for RX LPI time duration +* +* Read Low Power Idle (LPI) mode time duration from Energy Efficient +* Ethernet (EEE) statistics. +*/ +enum i40e_status_code i40e_get_lpi_duration (struct i40e_hw *hw, +struct i40e_hw_port_stats *stat, +u64 *tx_duration,u64 *rx_duration) +{ +u32 tx_time_dur, rx_time_dur; +enum i40e_status_code retval; +u32 cmd_status; + +if (hw->device_id !=I40E_DEV_ID_10G_BASE_T_BC ) +return I40E_ERR_NOT_IMPLEMENTED ; + + retval =i40e_aq_run_phy_activity + (hw,I40E_AQ_RUN_PHY_ACT_ID_USR_DFND , +I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_DUR , + &cmd_status, &tx_time_dur, &rx_time_dur,NULL ); + +if (retval) +return retval; +if ((cmd_status &I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK ) != +I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC ) +return I40E_ERR_ADMIN_QUEUE_ERROR ; + +if (hw->phy.link_info.link_speed ==I40E_LINK_SPEED_1GB && + !tx_time_dur && !rx_time_dur && + stat->tx_lpi_status && stat->rx_lpi_status) { + retval =i40e_aq_run_phy_activity + (hw,I40E_AQ_RUN_PHY_ACT_ID_USR_DFND , +I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT_DUR , + &cmd_status, + &tx_time_dur, &rx_time_dur,NULL ); + +if (retval) +return retval; +if ((cmd_status &I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK ) != +I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC ) +return I40E_ERR_ADMIN_QUEUE_ERROR ; + tx_time_dur =0 ; + rx_time_dur =0 ; + } + + *tx_duration = tx_time_dur; + *rx_duration = rx_time_dur; + +return retval; +} +/** * i40e_lpi_stat_update - update LPI counters with values relative to offset * @hw: pointer to the hw struct
drivers/net/i40e/base/i40e_prototype.h +3 -0
@@ -82,6 +82,9 @@ enum i40e_status_code i40e_lpi_stat_update(struct i40e_hw *hw, bool offset_loaded, u64 *tx_offset, u64 *tx_stat, u64 *rx_offset, u64 *rx_stat); +enum i40e_status_code i40e_get_lpi_duration (struct i40e_hw *hw, +struct i40e_hw_port_stats *stat, +u64 *tx_duration,u64 *rx_duration);/* admin send queue commands */ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw,
drivers/net/i40e/base/i40e_type.h +2 -0
@@ -1498,6 +1498,8 @@ struct i40e_hw_port_stats {u32 rx_lpi_status;u64 tx_lpi_count;/* etlpic */ u64 rx_lpi_count;/* erlpic */ +u64 tx_lpi_duration; +u64 rx_lpi_duration; };/* Checksum and Shadow RAM pointers */
Signature · 1 line
2.17.1
PATCH v4 32/36 net/i40e/base: exposing missing LED functionality
In reply to Xiaolong YeThe previous code had the LED code wrapped such that, it was static to the file and not usable outside of it. It is now available.
--- drivers/net/i40e/base/i40e_common.c | 8 ++++---- drivers/net/i40e/base/i40e_prototype.h | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-)
drivers/net/i40e/base/i40e_common.c +4 -4
@@ -6851,8 +6851,8 @@ enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,* @led_addr: LED register address * @reg_val: read register value **/ -static enum i40e_status_code i40e_led_get_reg (struct i40e_hw *hw,u16 led_addr, -u32 *reg_val) +enum i40e_status_code i40e_led_get_reg (struct i40e_hw *hw,u16 led_addr, +u32 *reg_val) {enum i40e_status_code status;u8 phy_addr =0 ;
@@ -6880,8 +6880,8 @@ static enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,* @led_addr: LED register address * @reg_val: register value to write **/ -static enum i40e_status_code i40e_led_set_reg (struct i40e_hw *hw,u16 led_addr, -u32 reg_val) +enum i40e_status_code i40e_led_set_reg (struct i40e_hw *hw,u16 led_addr, +u32 reg_val) {enum i40e_status_code status;u8 phy_addr =0 ;
drivers/net/i40e/base/i40e_prototype.h +4 -1
@@ -73,7 +73,10 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr, u16 *val);enum i40e_status_code i40e_blink_phy_link_led (struct i40e_hw *hw,u32 time,u32 interval); - +enum i40e_status_code i40e_led_get_reg (struct i40e_hw *hw,u16 led_addr, +u32 *reg_val); +enum i40e_status_code i40e_led_set_reg (struct i40e_hw *hw,u16 led_addr, +u32 reg_val);enum i40e_status_code i40e_get_phy_lpi_status (struct i40e_hw *hw,struct i40e_hw_port_stats *stats); enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, u32 *tx_counter,
Signature · 1 line
2.17.1
PATCH v4 33/36 net/i40e/base: introduce firmware EMP reset register offsets
In reply to Xiaolong YeIntroduce offsets of firmware registers holding a number of EMP resets. Implement offsets as a preprocessor's constants.
Required by drivers to read a number of EMP resets reported by FW.
--- drivers/net/i40e/base/i40e_register.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/i40e/base/i40e_register.h +2 -0
@@ -366,6 +366,8 @@#define I40E_GL_FWSTS_FWRI_MASK I40E_MASK(0x1, I40E_GL_FWSTS_FWRI_SHIFT)#define I40E_GL_FWSTS_FWS1B_SHIFT 16#define I40E_GL_FWSTS_FWS1B_MASK I40E_MASK(0xFF, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_GL_FWSTS_FWS1B_EMPR_0 I40E_MASK(0x20, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_GL_FWSTS_FWS1B_EMPR_10 I40E_MASK(0x2A, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_CORER_MASK \ I40E_MASK(0x30, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_GLOBR_MASK \
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v4 33/36] net/i40e/base: introduce firmware EMP reset register offsets
ACK
-----Original Message-----
From: Ye, Xiaolong <[email protected]>
Sent: Monday, January 13, 2020 3:40 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>; Kwapulinski, Piotr <[email protected]>
Subject: [PATCH v4 33/36] net/i40e/base: introduce firmware EMP reset register offsets
Introduce offsets of firmware registers holding a number of EMP resets. Implement offsets as a preprocessor's constants.
Required by drivers to read a number of EMP resets reported by FW.
--- drivers/net/i40e/base/i40e_register.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/i40e/base/i40e_register.h +3 -1
@@ -366,6 +366,8 @@#define I40E_GL_FWSTS_FWRI_MASK I40E_MASK(0x1, I40E_GL_FWSTS_FWRI_SHIFT)#define I40E_GL_FWSTS_FWS1B_SHIFT 16#define I40E_GL_FWSTS_FWS1B_MASK I40E_MASK(0xFF, I40E_GL_FWSTS_FWS1B_SHIFT) +#define I40E_GL_FWSTS_FWS1B_EMPR_0 I40E_MASK(0x20, +I40E_GL_FWSTS_FWS1B_SHIFT) #define I40E_GL_FWSTS_FWS1B_EMPR_10 +I40E_MASK(0x2A, I40E_GL_FWSTS_FWS1B_SHIFT)#define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_CORER_MASK \ I40E_MASK(0x30, I40E_GL_FWSTS_FWS1B_SHIFT) #define I40E_XL710_GL_FWSTS_FWS1B_REC_MOD_GLOBR_MASK \ --
2.17.1
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
PATCH v4 34/36 net/i40e/base: add CRC stripping capability
In reply to Xiaolong YeSome VFs may want to disable CRC stripping on incoming packets so create an offload for that. The VF already sends information about configuring it's RX queues so use that structure to indicate that the CRC stripping should be enabled or not.
--- drivers/net/i40e/base/i40e_dcb.h | 3 +-- drivers/net/i40e/base/virtchnl.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/net/i40e/base/i40e_dcb.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2001-2018 +* Copyright(c) 2001-2019 */ #ifndef _I40E_DCB_H_
@@ -205,5 +205,4 @@ i40e_get_fw_lldp_status(struct i40e_hw *hw,enum i40e_status_code i40e_set_dcb_config (struct i40e_hw *hw);enum i40e_status_code i40e_dcb_config_to_lldp (u8 *lldpmib,u16 *miblen,struct i40e_dcbx_config *dcbcfg); -#endif /* _I40E_DCB_H_ */
drivers/net/i40e/base/virtchnl.h +10 -2
@@ -228,6 +228,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);#define VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010#define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020#define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES 0x00000040 +#define VIRTCHNL_VF_OFFLOAD_CRC 0x00000080#define VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000#define VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000#define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
@@ -276,7 +277,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_txq_info);/* VIRTCHNL_OP_CONFIG_RX_QUEUE * VF sends this message to set up parameters for one RX queue. * External data buffer contains one instance of virtchnl_rxq_info. -* PF configures requested queue and returns a status code. +* PF configures requested queue and returns a status code. The +* crc_disable flag disables CRC stripping on the VF. Setting +* the crc_disable flag to 1 will disable CRC stripping for each +* queue in the VF where the flag is set. The VIRTCHNL_VF_OFFLOAD_CRC +* offload must have been set prior to sending this info or the PF +* will ignore the request. This flag should be set the same for +* all of the queues for a VF. */ /* Rx queue config info */
@@ -288,7 +295,8 @@ struct virtchnl_rxq_info {u16 splithdr_enabled;/* deprecated with AVF 1.0 */ u32 databuffer_size;u32 max_pkt_size; -u32 pad1; +u8 crc_disable; +u8 pad1[3 ];u64 dma_ring_addr;enum virtchnl_rx_hsplit rx_split_pos;/* deprecated with AVF 1.0 */ u32 pad2;
Signature · 1 line
2.17.1
PATCH v4 35/36 net/i40e/base: enable LED blinking flow
In reply to Xiaolong YeAdd X710T*L device specific operations (in port LED detection and handling of GLGEN_GPIO_CTL.PIN_FUNC field) to enable LED blinking.
--- drivers/net/i40e/base/i40e_common.c | 28 +++++++++++++++++++++++++--- drivers/net/i40e/base/i40e_devids.h | 2 ++ 2 files changed, 27 insertions(+), 3 deletions(-)
drivers/net/i40e/base/i40e_common.c +25 -3
@@ -1544,9 +1544,9 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)u32 gpio_val =0 ;u32 port; -if (!hw->func_caps.led[idx]) +if (!I40E_IS_X710TL_DEVICE (hw->device_id) && + !hw->func_caps.led[idx])return 0 ; - gpio_val =rd32 (hw,I40E_GLGEN_GPIO_CTL (idx)); port = (gpio_val &I40E_GLGEN_GPIO_CTL_PRT_NUM_MASK ) >>I40E_GLGEN_GPIO_CTL_PRT_NUM_SHIFT ;
@@ -1565,8 +1565,15 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)#define I40E_FILTER_ACTIVITY 0xE#define I40E_LINK_ACTIVITY 0xC#define I40E_MAC_ACTIVITY 0xD +#define I40E_FW_LED BIT(4) +#define I40E_LED_MODE_VALID (I40E_GLGEN_GPIO_CTL_LED_MODE_MASK >> \ + I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) +#define I40E_LED0 22 +#define I40E_PIN_FUNC_SDP 0x0 +#define I40E_PIN_FUNC_LED 0x1 +/** * i40e_led_get - return current on/off mode * @hw: pointer to the hw struct
@@ -1628,8 +1635,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)u32 current_mode =0 ;int i; -if (mode &0xfffffff0 ) +if (mode & ~I40E_LED_MODE_VALID ) {DEBUGOUT1 ("invalid mode passed in %X\n" , mode); +return ; + }/* as per the documentation GPIO 22-29 are the LED * GPIO pins named LED0..LED7
@@ -1655,6 +1664,19 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)break ; } +if (I40E_IS_X710TL_DEVICE (hw->device_id)) { +u32 pin_func =0 ; + +if (mode &I40E_FW_LED ) + pin_func =I40E_PIN_FUNC_SDP ; +else + pin_func =I40E_PIN_FUNC_LED ; + + gpio_val &= ~I40E_GLGEN_GPIO_CTL_PIN_FUNC_MASK ; + gpio_val |= ((pin_func << +I40E_GLGEN_GPIO_CTL_PIN_FUNC_SHIFT ) & +I40E_GLGEN_GPIO_CTL_PIN_FUNC_MASK ); + } gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK ;/* this & is a bit of paranoia, but serves as a range check */ gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) &
drivers/net/i40e/base/i40e_devids.h +2 -0
@@ -38,6 +38,8 @@#endif #define I40E_DEV_ID_10G_B 0x104F#define I40E_DEV_ID_10G_SFP 0x104E +#define I40E_IS_X710TL_DEVICE (d) \ + ((d) == I40E_DEV_ID_10G_BASE_T_BC)#define I40E_DEV_ID_KX_X722 0x37CE#define I40E_DEV_ID_QSFP_X722 0x37CF#define I40E_DEV_ID_SFP_X722 0x37D0
Signature · 1 line
2.17.1
PATCH v4 36/36 net/i40e/base: add new link speed constants
In reply to Xiaolong YeThis patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for 2.5Gb/5Gb speeds. This problem is fixed by adding constants for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB.
--- drivers/net/i40e/base/i40e_prototype.h | 4 ++++ drivers/net/i40e/base/virtchnl.h | 4 ++++ 2 files changed, 8 insertions(+)
drivers/net/i40e/base/i40e_prototype.h +4 -0
@@ -505,6 +505,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)return VIRTCHNL_LINK_SPEED_100MB ;case I40E_LINK_SPEED_1GB :return VIRTCHNL_LINK_SPEED_1GB ; +case I40E_LINK_SPEED_2_5GB : +return VIRTCHNL_LINK_SPEED_2_5GB ; +case I40E_LINK_SPEED_5GB : +return VIRTCHNL_LINK_SPEED_5GB ;case I40E_LINK_SPEED_10GB :return VIRTCHNL_LINK_SPEED_10GB ;case I40E_LINK_SPEED_40GB :
drivers/net/i40e/base/virtchnl.h +4 -0
@@ -53,12 +53,14 @@ enum virtchnl_status_code {#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED +#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3#define VIRTCHNL_LINK_SPEED_40GB_SHIFT 0x4#define VIRTCHNL_LINK_SPEED_20GB_SHIFT 0x5#define VIRTCHNL_LINK_SPEED_25GB_SHIFT 0x6 +#define VIRTCHNL_LINK_SPEED_5GB_SHIFT 0x7enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_UNKNOWN =0 ,
@@ -68,6 +70,8 @@ enum virtchnl_link_speed {VIRTCHNL_LINK_SPEED_40GB =BIT (VIRTCHNL_LINK_SPEED_40GB_SHIFT ),VIRTCHNL_LINK_SPEED_20GB =BIT (VIRTCHNL_LINK_SPEED_20GB_SHIFT ),VIRTCHNL_LINK_SPEED_25GB =BIT (VIRTCHNL_LINK_SPEED_25GB_SHIFT ), +VIRTCHNL_LINK_SPEED_2_5GB =BIT (VIRTCHNL_LINK_SPEED_2_5GB_SHIFT ), + VIRTCHNL_LINK_SPEED_5GB = BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT), };/* for hsplit_0 field of Rx HMC context */
Signature · 1 line
2.17.1
Quoted 87 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiaolong Ye
Sent: Monday, January 13, 2020 10:39 AM
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeThis series is to support FVL 7.2 release.
The main changes include:
* virtchnl updates
* add lldp support
* Flow director updates
* extend PHY access AQ cmd
* add reading LPI counters
* add support for Energy Efficient Ethernet
* A few fixes.v4:
* add a few missed Fixes tags
V3:
* add missing SOBs
V2:
* strip some unnecessary code
* squash some fixes
* improve commit logsXiaolong Ye (36):
net/i40e/base: add support for feature flagsnet/i40e/base: increase max VSI count for VFsnet/i40e/base: change buffer addressnet/i40e/base: decouplecfg_lldp_mib_changefrominit_dcbnet/i40e/base: change misleading error messagenet/i40e/base: further implementation of LLDPnet/i40e/base: add new device ids
net/i40e/base: add check for MAC typenet/i40e/base: adding flags for PHY typesnet/i40e/base: improve AQ log granularitynet/i40e/base: add getter for FW LLDP agent statusnet/i40e/base: add support for Energy Efficient Ethernetnet/i40e/base: read LPI status from external PHYnet/i40e/base: change for missing "link modes"net/i40e/base: add reading LPI countersnet/i40e/base: backport style changes from upstream Linuxnet/i40e/base: update status codes
net/i40e/base: change of the incorrect Tx descriptors numbernet/i40e/base: extend PHY access AQ commandnet/i40e/base: add drop mode parameter to set MAC confignet/i40e/base: add FWS1B register masksnet/i40e/base: update FW API versionnet/i40e/base: add persistent lldp supportnet/i40e/base: makei40e_set_mac_type()publicnet/i40e/base: fix retrying logic
net/i40e/base: mark additional missing bits as reservednet/i40e/base: fix wrong 'Advertised FEC modes'net/i40e/base: add Flow Director definesnet/i40e/base: removed unreachable codenet/i40e/base: set PHY Access flag on X722net/i40e/base: implement reading lpi statisticsnet/i40e/base: exposing missing LED functionalitynet/i40e/base: introduce firmware EMP reset register offsetsnet/i40e/base: add CRC stripping capabilitynet/i40e/base: enable LED blinking flownet/i40e/base: add new link speed constantsdrivers/net/i40e/base/i40e_adminq.c | 142 +++--- drivers/net/i40e/base/i40e_adminq_cmd.h | 95 +++- drivers/net/i40e/base/i40e_common.c | 651 +++++++++++++++++------- drivers/net/i40e/base/i40e_dcb.c | 87 +++- drivers/net/i40e/base/i40e_dcb.h | 20 +- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 113 +++- drivers/net/i40e/base/i40e_prototype.h | 76 ++- drivers/net/i40e/base/i40e_register.h | 95 ++++ drivers/net/i40e/base/i40e_type.h | 39 +- drivers/net/i40e/base/virtchnl.h | 32 +- drivers/net/i40e/i40e_ethdev.c | 12 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 13 files changed, 1047 insertions(+), 323 deletions(-)
Quoted 2 lines
--
2.17.1
Quoted 87 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Xiaolong Ye
Sent: Monday, January 13, 2020 10:39 AM
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeThis series is to support FVL 7.2 release.
The main changes include:
* virtchnl updates
* add lldp support
* Flow director updates
* extend PHY access AQ cmd
* add reading LPI counters
* add support for Energy Efficient Ethernet
* A few fixes.v4:
* add a few missed Fixes tags
V3:
* add missing SOBs
V2:
* strip some unnecessary code
* squash some fixes
* improve commit logsXiaolong Ye (36):
net/i40e/base: add support for feature flagsnet/i40e/base: increase max VSI count for VFsnet/i40e/base: change buffer addressnet/i40e/base: decouplecfg_lldp_mib_changefrominit_dcbnet/i40e/base: change misleading error messagenet/i40e/base: further implementation of LLDPnet/i40e/base: add new device ids
net/i40e/base: add check for MAC typenet/i40e/base: adding flags for PHY typesnet/i40e/base: improve AQ log granularitynet/i40e/base: add getter for FW LLDP agent statusnet/i40e/base: add support for Energy Efficient Ethernetnet/i40e/base: read LPI status from external PHYnet/i40e/base: change for missing "link modes"net/i40e/base: add reading LPI countersnet/i40e/base: backport style changes from upstream Linuxnet/i40e/base: update status codes
net/i40e/base: change of the incorrect Tx descriptors numbernet/i40e/base: extend PHY access AQ commandnet/i40e/base: add drop mode parameter to set MAC confignet/i40e/base: add FWS1B register masksnet/i40e/base: update FW API versionnet/i40e/base: add persistent lldp supportnet/i40e/base: makei40e_set_mac_type()publicnet/i40e/base: fix retrying logic
net/i40e/base: mark additional missing bits as reservednet/i40e/base: fix wrong 'Advertised FEC modes'net/i40e/base: add Flow Director definesnet/i40e/base: removed unreachable codenet/i40e/base: set PHY Access flag on X722net/i40e/base: implement reading lpi statisticsnet/i40e/base: exposing missing LED functionalitynet/i40e/base: introduce firmware EMP reset register offsetsnet/i40e/base: add CRC stripping capabilitynet/i40e/base: enable LED blinking flownet/i40e/base: add new link speed constantsdrivers/net/i40e/base/i40e_adminq.c | 142 +++--- drivers/net/i40e/base/i40e_adminq_cmd.h | 95 +++- drivers/net/i40e/base/i40e_common.c | 651 +++++++++++++++++------- drivers/net/i40e/base/i40e_dcb.c | 87 +++- drivers/net/i40e/base/i40e_dcb.h | 20 +- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 113 +++- drivers/net/i40e/base/i40e_prototype.h | 76 ++- drivers/net/i40e/base/i40e_register.h | 95 ++++ drivers/net/i40e/base/i40e_type.h | 39 +- drivers/net/i40e/base/virtchnl.h | 32 +- drivers/net/i40e/i40e_ethdev.c | 12 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 13 files changed, 1047 insertions(+), 323 deletions(-)
Quoted 2 lines
--
2.17.1
Quoted 96 lines
-----Original Message-----
From: Xing, Beilei
Sent: Monday, January 13, 2020 11:26 AM
To: Ye, Xiaolong <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeQuoted 85 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Xiaolong Ye
Sent: Monday, January 13, 2020 10:39 AM
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeThis series is to support FVL 7.2 release.
The main changes include:
* virtchnl updates
* add lldp support
* Flow director updates
* extend PHY access AQ cmd
* add reading LPI counters
* add support for Energy Efficient Ethernet
* A few fixes.v4:
* add a few missed Fixes tags
V3:
* add missing SOBs
V2:
* strip some unnecessary code
* squash some fixes
* improve commit logsXiaolong Ye (36):
net/i40e/base: add support for feature flagsnet/i40e/base: increase max VSI count for VFsnet/i40e/base: change buffer addressnet/i40e/base: decouplecfg_lldp_mib_changefrominit_dcbnet/i40e/base: change misleading error messagenet/i40e/base: further implementation of LLDPnet/i40e/base: add new device ids
net/i40e/base: add check for MAC typenet/i40e/base: adding flags for PHY typesnet/i40e/base: improve AQ log granularitynet/i40e/base: add getter for FW LLDP agent statusnet/i40e/base: add support for Energy Efficient Ethernetnet/i40e/base: read LPI status from external PHYnet/i40e/base: change for missing "link modes"net/i40e/base: add reading LPI countersnet/i40e/base: backport style changes from upstream Linuxnet/i40e/base: update status codes
net/i40e/base: change of the incorrect Tx descriptors numbernet/i40e/base: extend PHY access AQ commandnet/i40e/base: add drop mode parameter to set MAC confignet/i40e/base: add FWS1B register masksnet/i40e/base: update FW API versionnet/i40e/base: add persistent lldp supportnet/i40e/base: makei40e_set_mac_type()publicnet/i40e/base: fix retrying logic
net/i40e/base: mark additional missing bits as reservednet/i40e/base: fix wrong 'Advertised FEC modes'net/i40e/base: add Flow Director definesnet/i40e/base: removed unreachable codenet/i40e/base: set PHY Access flag on X722net/i40e/base: implement reading lpi statisticsnet/i40e/base: exposing missing LED functionalitynet/i40e/base: introduce firmware EMP reset register offsetsnet/i40e/base: add CRC stripping capabilitynet/i40e/base: enable LED blinking flownet/i40e/base: add new link speed constantsdrivers/net/i40e/base/i40e_adminq.c | 142 +++--- drivers/net/i40e/base/i40e_adminq_cmd.h | 95 +++- drivers/net/i40e/base/i40e_common.c | 651 +++++++++++++++++------- drivers/net/i40e/base/i40e_dcb.c | 87 +++- drivers/net/i40e/base/i40e_dcb.h | 20 +- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 113 +++- drivers/net/i40e/base/i40e_prototype.h | 76 ++- drivers/net/i40e/base/i40e_register.h | 95 ++++ drivers/net/i40e/base/i40e_type.h | 39 +- drivers/net/i40e/base/virtchnl.h | 32 +- drivers/net/i40e/i40e_ethdev.c | 12 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 13 files changed, 1047 insertions(+), 323 deletions(-)
Quoted 4 lines
Quoted 2 lines
--
2.17.1Acked-by Beilei Xing <[email protected]>
Series applied to dpdk-next-net-intel.
Thanks,
Xiaolong
Quoted 11 lines · Xiaolong
Quoted 11 lines
-----Original Message-----
From: Xing, Beilei
Sent: Monday, January 13, 2020 11:26 AM
To: Ye, Xiaolong <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4 00/36] update for i40e base code
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Xiaolong Ye
Sent: Monday, January 13, 2020 10:39 AM
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeThis series is to support FVL 7.2 release.
7.1 is the latest here [1]. Am I looking in the wrong place or mixing up?
Please remember to update the table [2] in docs after testing, it was missed in previous release.
[1]
https://downloadcenter.intel.com/product/82947/Intel-Ethernet-Controller-X710-Series
[2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/i40e.rst#n61
Quoted 87 lines
Quoted 77 lines
Quoted 77 lines
The main changes include:
* virtchnl updates
* add lldp support
* Flow director updates
* extend PHY access AQ cmd
* add reading LPI counters
* add support for Energy Efficient Ethernet
* A few fixes.v4:
* add a few missed Fixes tags
V3:
* add missing SOBs
V2:
* strip some unnecessary code
* squash some fixes
* improve commit logsXiaolong Ye (36):
net/i40e/base: add support for feature flagsnet/i40e/base: increase max VSI count for VFsnet/i40e/base: change buffer addressnet/i40e/base: decouplecfg_lldp_mib_changefrominit_dcbnet/i40e/base: change misleading error messagenet/i40e/base: further implementation of LLDPnet/i40e/base: add new device ids
net/i40e/base: add check for MAC typenet/i40e/base: adding flags for PHY typesnet/i40e/base: improve AQ log granularitynet/i40e/base: add getter for FW LLDP agent statusnet/i40e/base: add support for Energy Efficient Ethernetnet/i40e/base: read LPI status from external PHYnet/i40e/base: change for missing "link modes"net/i40e/base: add reading LPI countersnet/i40e/base: backport style changes from upstream Linuxnet/i40e/base: update status codes
net/i40e/base: change of the incorrect Tx descriptors numbernet/i40e/base: extend PHY access AQ commandnet/i40e/base: add drop mode parameter to set MAC confignet/i40e/base: add FWS1B register masksnet/i40e/base: update FW API versionnet/i40e/base: add persistent lldp supportnet/i40e/base: makei40e_set_mac_type()publicnet/i40e/base: fix retrying logic
net/i40e/base: mark additional missing bits as reservednet/i40e/base: fix wrong 'Advertised FEC modes'net/i40e/base: add Flow Director definesnet/i40e/base: removed unreachable codenet/i40e/base: set PHY Access flag on X722net/i40e/base: implement reading lpi statisticsnet/i40e/base: exposing missing LED functionalitynet/i40e/base: introduce firmware EMP reset register offsetsnet/i40e/base: add CRC stripping capabilitynet/i40e/base: enable LED blinking flownet/i40e/base: add new link speed constantsdrivers/net/i40e/base/i40e_adminq.c | 142 +++--- drivers/net/i40e/base/i40e_adminq_cmd.h | 95 +++- drivers/net/i40e/base/i40e_common.c | 651 +++++++++++++++++------- drivers/net/i40e/base/i40e_dcb.c | 87 +++- drivers/net/i40e/base/i40e_dcb.h | 20 +- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 113 +++- drivers/net/i40e/base/i40e_prototype.h | 76 ++- drivers/net/i40e/base/i40e_register.h | 95 ++++ drivers/net/i40e/base/i40e_type.h | 39 +- drivers/net/i40e/base/virtchnl.h | 32 +- drivers/net/i40e/i40e_ethdev.c | 12 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 13 files changed, 1047 insertions(+), 323 deletions(-)Quoted 4 lines
Quoted 2 lines
--
2.17.1Acked-by Beilei Xing <[email protected]>Series applied to dpdk-next-net-intel.
Thanks,
Xiaolong
Quoted 99 lines · Xiaolong
Quoted 99 lines
-----Original Message-----
From: Xing, Beilei
Sent: Monday, January 13, 2020 11:26 AM
To: Ye, Xiaolong <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeQuoted 87 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Xiaolong Ye
Sent: Monday, January 13, 2020 10:39 AM
Cc: [email protected]; Ye, Xiaolong <[email protected]>
Subject: [dpdk-dev] [PATCH v4 00/36] update for i40e base codeThis series is to support FVL 7.2 release.
The main changes include:
* virtchnl updates
* add lldp support
* Flow director updates
* extend PHY access AQ cmd
* add reading LPI counters
* add support for Energy Efficient Ethernet
* A few fixes.v4:
* add a few missed Fixes tags
V3:
* add missing SOBs
V2:
* strip some unnecessary code
* squash some fixes
* improve commit logsXiaolong Ye (36):
net/i40e/base: add support for feature flagsnet/i40e/base: increase max VSI count for VFsnet/i40e/base: change buffer addressnet/i40e/base: decouplecfg_lldp_mib_changefrominit_dcbnet/i40e/base: change misleading error messagenet/i40e/base: further implementation of LLDPnet/i40e/base: add new device ids
net/i40e/base: add check for MAC typenet/i40e/base: adding flags for PHY typesnet/i40e/base: improve AQ log granularitynet/i40e/base: add getter for FW LLDP agent statusnet/i40e/base: add support for Energy Efficient Ethernetnet/i40e/base: read LPI status from external PHYnet/i40e/base: change for missing "link modes"net/i40e/base: add reading LPI countersnet/i40e/base: backport style changes from upstream Linuxnet/i40e/base: update status codes
net/i40e/base: change of the incorrect Tx descriptors numbernet/i40e/base: extend PHY access AQ commandnet/i40e/base: add drop mode parameter to set MAC confignet/i40e/base: add FWS1B register masksnet/i40e/base: update FW API versionnet/i40e/base: add persistent lldp supportnet/i40e/base: makei40e_set_mac_type()publicnet/i40e/base: fix retrying logic
net/i40e/base: mark additional missing bits as reservednet/i40e/base: fix wrong 'Advertised FEC modes'net/i40e/base: add Flow Director definesnet/i40e/base: removed unreachable codenet/i40e/base: set PHY Access flag on X722net/i40e/base: implement reading lpi statisticsnet/i40e/base: exposing missing LED functionalitynet/i40e/base: introduce firmware EMP reset register offsetsnet/i40e/base: add CRC stripping capabilitynet/i40e/base: enable LED blinking flownet/i40e/base: add new link speed constantsdrivers/net/i40e/base/i40e_adminq.c | 142 +++--- drivers/net/i40e/base/i40e_adminq_cmd.h | 95 +++- drivers/net/i40e/base/i40e_common.c | 651 +++++++++++++++++------- drivers/net/i40e/base/i40e_dcb.c | 87 +++- drivers/net/i40e/base/i40e_dcb.h | 20 +- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 113 +++- drivers/net/i40e/base/i40e_prototype.h | 76 ++- drivers/net/i40e/base/i40e_register.h | 95 ++++ drivers/net/i40e/base/i40e_type.h | 39 +- drivers/net/i40e/base/virtchnl.h | 32 +- drivers/net/i40e/i40e_ethdev.c | 12 +- drivers/net/i40e/rte_pmd_i40e.c | 4 +- 13 files changed, 1047 insertions(+), 323 deletions(-)--
2.17.1
Quoted 7 lines
Quoted 1 line
Acked-by Beilei Xing <[email protected]>Series applied to dpdk-next-net-intel.
Thanks,
Xiaolong
Hi Xiaolong/Beilei/Qi Z,
Some of these patches are tagged to go to 'S'table and are 'F'ixes, while others are also fixes for older releases but not tagged to go to stable.
No issue with not backporting patches (in fact i would prefer not if some doubts), but want to check if the stable tag was missed by accident?
Also, note that Fw listed is v6.01 for 18.11, (v7.00 for 19.11) so changes would need to be compatible with that.
20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04) 20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0) 20.02 1da546c39 - F net/i40e/base: fix missing link modes (17.08) 20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0) 20.02 50126939c - F net/i40e/base: fix retrying logic (18.02) 20.02 b330a1c5c - F net/i40e/base: fix display of FEC settings (17.08) 20.02 03ef7d47f - F net/i40e/base: add new link speed constants (17.08)
Please confirm on patches above missing stable tag. For time being I will only consider ones with stable tag.
thanks,
Kevin.
Hi, Kevin
Quoted 1 line · Kevin Traynor
On 13/01/2020 05:59, Ye, Xiaolong wrote:
[snip]
Quoted 7 lines
Quoted 1 line
Quoted 1 line
-----Original Message-----
Hi Xiaolong/Beilei/Qi Z,
Some of these patches are tagged to go to 'S'table and are 'F'ixes, while others are also fixes for older releases but not tagged to go to stable.
Quoted 5 lines
No issue with not backporting patches (in fact i would prefer not if some doubts), but want to check if the stable tag was missed by accident?
Also, note that Fw listed is v6.01 for 18.11, (v7.00 for 19.11) so changes would need to be compatible with that.
Yes, some of the stable tags were missed deliberately since the new base code update is for FW 7.1/7.2, it's not guaranteed to be compatible with old FW.
Quoted 9 lines
20.02
8f33cbcfaS Fnet/i40e/base: fix buffer address (16.04) 20.024b3da9415S Fnet/i40e/base: fix error message (1.7.0) 20.021da546c39- Fnet/i40e/base: fix missing link modes (17.08) 20.0279bfe7808S Fnet/i40e/base: fix Tx descriptors number (1.7.0) 20.0250126939c- Fnet/i40e/base: fix retrying logic (18.02) 20.02b330a1c5c- Fnet/i40e/base: fix display of FEC settings (17.08) 20.0203ef7d47f- Fnet/i40e/base: add new link speed constants (17.08)
I would suggest we only backport below obvious fixes to stable releases.
20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04) 20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0) 20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0) 20.02 50126939c - F net/i40e/base: fix retrying logic (18.02)
Thanks,
Xiaolong
Quoted 6 lines
Please confirm on patches above missing stable tag. For time being I will only consider ones with stable tag.
thanks,
Kevin.
Quoted 33 lines · Ye Xiaolong
Hi, Kevin
Quoted 1 line · Kevin Traynor
On 13/01/2020 05:59, Ye, Xiaolong wrote:
[snip]
Quoted 7 lines
Quoted 1 line
Quoted 1 line
-----Original Message-----
Hi Xiaolong/Beilei/Qi Z,
Some of these patches are tagged to go to 'S'table and are 'F'ixes, while others are also fixes for older releases but not tagged to go to stable.
Quoted 5 lines
No issue with not backporting patches (in fact i would prefer not if some doubts), but want to check if the stable tag was missed by accident?
Also, note that Fw listed is v6.01 for 18.11, (v7.00 for 19.11) so changes would need to be compatible with that.
Yes, some of the stable tags were missed deliberately since the new base code update is for FW 7.1/7.2, it's not guaranteed to be compatible with old FW.
Quoted 9 lines
20.02
8f33cbcfaS Fnet/i40e/base: fix buffer address (16.04) 20.024b3da9415S Fnet/i40e/base: fix error message (1.7.0) 20.021da546c39- Fnet/i40e/base: fix missing link modes (17.08) 20.0279bfe7808S Fnet/i40e/base: fix Tx descriptors number (1.7.0) 20.0250126939c- Fnet/i40e/base: fix retrying logic (18.02) 20.02b330a1c5c- Fnet/i40e/base: fix display of FEC settings (17.08) 20.0203ef7d47f- Fnet/i40e/base: add new link speed constants (17.08)
Quoted 7 lines
I would suggest we only backport below obvious fixes to stable releases.
20.02
8f33cbcfaS Fnet/i40e/base: fix buffer address (16.04) 20.024b3da9415S Fnet/i40e/base: fix error message (1.7.0) 20.0279bfe7808S Fnet/i40e/base: fix Tx descriptors number (1.7.0) 20.0250126939c- Fnet/i40e/base: fix retrying logic (18.02)
Thanks for confirming Xialong, I will backport the ones you suggest.
Kevin.
Quoted 10 lines
Thanks,
XiaolongQuoted 6 lines
Please confirm on patches above missing stable tag. For time being I will only consider ones with stable tag.
thanks,
Kevin.