Update ixgbe base code
cover Update ixgbe base code
Update IXGBE base code snapshot to version 2025-06-04.
Aleksandr Loktionov (1):
net/ixgbe: remove PTP by PHY cap
Anatoly Burakov (1):
net/ixgbe: update README
Jedrzej Jagielski (1):
net/ixgbe: add VF mailbox op for link status
Piotr Kwapulinski (1):
net/ixgbe: add ACI debug printouts
Piotr Pietruszewski (1):
net/ixgbe: add support for toggling VF Tx queues
drivers/net/intel/ixgbe/base/README | 2 +- drivers/net/intel/ixgbe/base/ixgbe_api.c | 13 ++ drivers/net/intel/ixgbe/base/ixgbe_api.h | 1 + drivers/net/intel/ixgbe/base/ixgbe_common.c | 56 ++++++++ drivers/net/intel/ixgbe/base/ixgbe_common.h | 1 + drivers/net/intel/ixgbe/base/ixgbe_e610.c | 112 +++++++++++++++- drivers/net/intel/ixgbe/base/ixgbe_e610.h | 2 + drivers/net/intel/ixgbe/base/ixgbe_mbx.h | 4 + drivers/net/intel/ixgbe/base/ixgbe_osdep.h | 1 + drivers/net/intel/ixgbe/base/ixgbe_type.h | 1 + .../net/intel/ixgbe/base/ixgbe_type_e610.h | 1 + drivers/net/intel/ixgbe/base/ixgbe_vf.c | 126 ++++++++++++++---- drivers/net/intel/ixgbe/base/ixgbe_vf.h | 2 + 13 files changed, 293 insertions(+), 29 deletions(-)
Signature · 1 line
2.47.1
PATCH 1/5 net/ixgbe: remove PTP by PHY cap
From: Aleksandr Loktionov <[email protected]>
Disable PTP by PHY capability support.
--- drivers/net/intel/ixgbe/base/ixgbe_e610.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/ixgbe/base/ixgbe_e610.c +1 -1
@@ -752,7 +752,7 @@ ixgbe_parse_common_caps(struct ixgbe_hw *hw, struct ixgbe_hw_common_caps *caps, prefix, caps->next_cluster_id_support);break ;case IXGBE_ACI_CAPS_PTP_BY_PHY : - caps->ptp_by_phy_support = (number ==1 ); + caps->ptp_by_phy_support =0 ;DEBUGOUT2 ("%s: ptp_by_phy_support = %d\n" , prefix, caps->ptp_by_phy_support);break ;
Signature · 1 line
2.47.1
PATCH 2/5 net/ixgbe: add VF mailbox op for link status
In reply to Anatoly BurakovFrom: Jedrzej Jagielski <[email protected]>
E610 adapter no longer uses the VFLINKS register to read PF's link speed and linkup state. Currently this leads to mismatch between actual link status and that what VF driver shows to the OS.
Add new mailbox operation to let the VF driver request the PF driver to provide the actual link data. Update the mailbox api to v1.6.
Incorporate both ways of getting link status within the legacy ixgbe_check_mac_link_vf() function.
--- drivers/net/intel/ixgbe/base/ixgbe_mbx.h | 4 + drivers/net/intel/ixgbe/base/ixgbe_vf.c | 126 ++++++++++++++++++----- drivers/net/intel/ixgbe/base/ixgbe_vf.h | 2 + 3 files changed, 105 insertions(+), 27 deletions(-)
drivers/net/intel/ixgbe/base/ixgbe_mbx.h +4 -0
@@ -101,6 +101,7 @@ enum ixgbe_pfvf_api_rev {/* API 1.4 is being used in the upstream for IPsec */ ixgbe_mbox_api_14,/* API version 1.4, linux/freebsd VF driver */ ixgbe_mbox_api_15,/* API version 1.5, linux/freebsd VF driver */ + ixgbe_mbox_api_16,/* API version 1.6, linux/freebsd VF driver */ /* This value should always be last */ ixgbe_mbox_api_unknown, /* indicates that API version is not known */ };
@@ -125,6 +126,9 @@ enum ixgbe_pfvf_api_rev {#define IXGBE_VF_UPDATE_XCAST_MODE 0x0c#define IXGBE_VF_GET_LINK_STATE 0x10/* get vf link state */ +/* mailbox API, version 1.6 VF requests */ +#define IXGBE_VF_GET_PF_LINK_STATE 0x11/* get status of the link on PF */ +/* mode choices for IXGBE_VF_UPDATE_XCAST_MODE */ enum ixgbevf_xcast_modes {IXGBEVF_XCAST_MODE_NONE =0 ,
drivers/net/intel/ixgbe/base/ixgbe_vf.c +99 -27
177 lines not on this page · raw message
drivers/net/intel/ixgbe/base/ixgbe_vf.h +2 -0
@@ -113,5 +113,7 @@ s32 ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, u16 max_size);int ixgbevf_negotiate_api_version (struct ixgbe_hw *hw,int api);int ixgbevf_get_queues (struct ixgbe_hw *hw,unsigned int *num_tcs,unsigned int *default_tc); +int ixgbevf_get_pf_link_state (struct ixgbe_hw *hw,ixgbe_link_speed *speed, +bool *link_up);#endif /* __IXGBE_VF_H__ */
Signature · 1 line
2.47.1
PATCH 3/5 net/ixgbe: add support for toggling VF Tx queues
In reply to Anatoly BurakovFrom: Piotr Pietruszewski <[email protected]>
Add method to toggle VF's TX queues to work around silicon errata.
--- drivers/net/intel/ixgbe/base/ixgbe_api.c | 13 +++++ drivers/net/intel/ixgbe/base/ixgbe_api.h | 1 + drivers/net/intel/ixgbe/base/ixgbe_common.c | 56 +++++++++++++++++++++ drivers/net/intel/ixgbe/base/ixgbe_common.h | 1 + drivers/net/intel/ixgbe/base/ixgbe_type.h | 1 + 5 files changed, 72 insertions(+)
drivers/net/intel/ixgbe/base/ixgbe_api.c +13 -0
@@ -1116,6 +1116,19 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, IXGBE_NOT_IMPLEMENTED); } +/** +* ixgbe_toggle_txdctl - Toggle VF's queues +* @hw: pointer to hardware structure +* @vind: VMDq pool index +* +* Enable and disable each queue in VF. +*/ +s32 ixgbe_toggle_txdctl (struct ixgbe_hw *hw,u32 vind) +{ +return ixgbe_call_func (hw, hw->mac.ops.toggle_txdctl, (hw, + vind),IXGBE_NOT_IMPLEMENTED ); +} +/** * ixgbe_fc_enable - Enable flow control * @hw: pointer to hardware structure
drivers/net/intel/ixgbe/base/ixgbe_api.h +1 -0
@@ -102,6 +102,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan,s32 ixgbe_set_vlvf (struct ixgbe_hw *hw,u32 vlan,u32 vind,bool vlan_on,u32 *vfta_delta,u32 vfta,bool vlvf_bypass); +s32 ixgbe_toggle_txdctl (struct ixgbe_hw *hw,u32 vind);s32 ixgbe_fc_enable (struct ixgbe_hw *hw);s32 ixgbe_setup_fc (struct ixgbe_hw *hw); s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
drivers/net/intel/ixgbe/base/ixgbe_common.c +56 -0
68 lines not on this page · raw message
drivers/net/intel/ixgbe/base/ixgbe_common.h +1 -0
@@ -111,6 +111,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlvf_bypass);s32 ixgbe_clear_vfta_generic (struct ixgbe_hw *hw);s32 ixgbe_find_vlvf_slot (struct ixgbe_hw *hw,u32 vlan,bool vlvf_bypass); +s32 ixgbe_toggle_txdctl_generic (struct ixgbe_hw *hw,u32 vind); s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
drivers/net/intel/ixgbe/base/ixgbe_type.h +1 -0
@@ -4026,6 +4026,7 @@ struct ixgbe_mac_operations {void (*set_vlan_anti_spoofing)(struct ixgbe_hw *,bool ,int );s32 (*update_xcast_mode)(struct ixgbe_hw *,int );s32 (*set_rlpml)(struct ixgbe_hw *,u16 ); +s32 (*toggle_txdctl)(struct ixgbe_hw *hw,u32 vf_index);/* Flow Control */ s32 (*fc_enable)(struct ixgbe_hw *);
Signature · 1 line
2.47.1
PATCH 4/5 net/ixgbe: add ACI debug printouts
In reply to Anatoly BurakovFrom: Piotr Kwapulinski <[email protected]>
Add more verbose printouts for ACI when debugging is enabled.
--- drivers/net/intel/ixgbe/base/ixgbe_e610.c | 110 ++++++++++++++++++ drivers/net/intel/ixgbe/base/ixgbe_e610.h | 2 + drivers/net/intel/ixgbe/base/ixgbe_osdep.h | 1 + .../net/intel/ixgbe/base/ixgbe_type_e610.h | 1 + 4 files changed, 114 insertions(+)
drivers/net/intel/ixgbe/base/ixgbe_e610.c +110 -0
@@ -31,6 +31,99 @@ void ixgbe_shutdown_aci(struct ixgbe_hw *hw)ixgbe_destroy_lock (&hw->aci.lock); } +/** +* ixgbe_aci_debug_array - dump a buffer of data row by row +* @row_size: size in bytes of data dumped in a single row +* @buf: data to be dumped into the debug log +* @buf_size: size of buffer +* +* Debug function for dumping a binary blob of data row by row. +*/ +STATIC void ixgbe_aci_debug_array(struct ixgbe_hw *hw, u16 row_size, u8 *buf, +u16 buf_size) +{ +char debug_portion[IXGBE_ACI_MAX_DEBUG_STRING_LENGTH ] = {'\0' }; +char debug_string[IXGBE_ACI_MAX_DEBUG_STRING_LENGTH ] = {'\0' }; +u16 i =0 , j =0 ; +s16 remaining_space =IXGBE_ACI_MAX_DEBUG_STRING_LENGTH -1 ; +s16 nbytes =0 ; +if (!hw) +return ; +if (buf && buf_size && row_size) { +if (buf_size >= row_size) { +for (i =0 ; i < (buf_size - row_size); i += row_size) { + nbytes =snprintf (debug_string,sizeof (debug_string),"0x%04X : " , i); + remaining_space =IXGBE_ACI_MAX_DEBUG_STRING_LENGTH - nbytes -1 ; +for (j =0 ; j < row_size; j++) { + nbytes =snprintf (debug_portion,sizeof (debug_portion),"0x%02X " , buf[i + j]); +strncat (debug_string, debug_portion, remaining_space); + remaining_space -= nbytes; +if (remaining_space <=0 )break ; + } +strncat (debug_string,"\n" , remaining_space); +DEBUGOUT1 ("%s" , debug_string); +memset (debug_string,0 ,IXGBE_ACI_MAX_DEBUG_STRING_LENGTH ); + } + } +if (i < buf_size) { + nbytes =snprintf (debug_string,sizeof (debug_string),"0x%04X : " , i); + remaining_space =IXGBE_ACI_MAX_DEBUG_STRING_LENGTH - nbytes -1 ; +for (j =0 ; j < (buf_size - i); j++) { + nbytes =snprintf (debug_portion,sizeof (debug_portion),"0x%02X " , buf[i + j]); +strncat (debug_string, debug_portion, remaining_space); + remaining_space -= nbytes; +if (remaining_space <=0 )break ; + } +strncat (debug_string,"\n" , remaining_space); +DEBUGOUT1 ("%s" , debug_string); + } + } +} + +/** +* ixgbe_aci_debug - dump the ACI data with the descriptor contents. +* @hw: pointer to the hardware structure +* @desc: pointer to control queue descriptor +* @buf: pointer to command buffer +* @buf_len: max length of buf +* +* Debug function for dumping logs about ACI command with descriptor contents. +*/ +void ixgbe_aci_debug (struct ixgbe_hw *hw,void *desc,void *buf,u16 buf_len) +{ +struct ixgbe_aci_desc *aci_desc = (struct ixgbe_aci_desc *)desc; +u16 datalen, flags; + +if (!hw || !desc) +return ; + + datalen =IXGBE_LE16_TO_CPU (aci_desc->datalen); + flags =IXGBE_LE16_TO_CPU (aci_desc->flags); + +DEBUGOUT4 ("CQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n" , +IXGBE_LE16_TO_CPU (aci_desc->opcode), flags, datalen, +IXGBE_LE16_TO_CPU (aci_desc->retval)); +DEBUGOUT2 ("\tcookie (h,l) 0x%08X 0x%08X\n" , +IXGBE_LE32_TO_CPU (aci_desc->cookie_high), +IXGBE_LE32_TO_CPU (aci_desc->cookie_low)); +DEBUGOUT2 ("\tparam (0,1) 0x%08X 0x%08X\n" , +IXGBE_LE32_TO_CPU (aci_desc->params.generic.param0), +IXGBE_LE32_TO_CPU (aci_desc->params.generic.param1)); +DEBUGOUT2 ("\taddr (h,l) 0x%08X 0x%08X\n" , +IXGBE_LE32_TO_CPU (aci_desc->params.generic.addr_high), +IXGBE_LE32_TO_CPU (aci_desc->params.generic.addr_low)); + +/* Dump buffer if 1) one exists and 2) is either a response indicated +* by the DD and/or CMP flag set or a command with the RD flag set. +*/ +if (buf && aci_desc->datalen !=0 && + (flags & (IXGBE_ACI_FLAG_DD |IXGBE_ACI_FLAG_CMP ) || + flags &IXGBE_ACI_FLAG_RD )) { +DEBUGOUT ("Buffer:\n" ); +ixgbe_aci_debug_array (hw,16 , (u8 *)buf,min (buf_len, datalen)); + } +} +/** * ixgbe_should_retry_aci_send_cmd_execute - decide if ACI command should * be resent
@@ -94,10 +187,12 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,/* It's necessary to check if mechanism is enabled */ hicr =IXGBE_READ_REG (hw,PF_HICR );if (!(hicr &PF_HICR_EN )) { +DEBUGOUT ("CSR mechanism is not enabled\n" ); status =IXGBE_ERR_ACI_DISABLED ;break ; }if (hicr &PF_HICR_C ) { +DEBUGOUT ("CSR mechanism is busy\n" ); hw->aci.last_status =IXGBE_ACI_RC_EBUSY ; status =IXGBE_ERR_ACI_BUSY ;break ;
@@ -105,6 +200,7 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, opcode = desc->opcode;if (buf_size >IXGBE_ACI_MAX_BUFFER_SIZE ) { +DEBUGOUT ("buf_size is too big\n" ); status =IXGBE_ERR_PARAM ;break ; }
@@ -117,6 +213,7 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,if ((buf && buf_size ==0 ) || (buf ==NULL && buf_size)) { status =IXGBE_ERR_PARAM ; +DEBUGOUT ("Error: Invalid argument buf or buf_size\n" );break ; }if (buf && buf_size)
@@ -156,6 +253,8 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, } } +ixgbe_aci_debug (hw, (void *)desc, tmp_buf, (u16 )tmp_buf_size); +/* Descriptor is written to specific registers */ for (i =0 ; i <IXGBE_ACI_DESC_SIZE_IN_DWORDS ; i++) IXGBE_WRITE_REG(hw, PF_HIDA(i),
@@ -195,6 +294,7 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, raw_desc[i] =IXGBE_READ_REG (hw,PF_HIDA (i)); raw_desc[i] =IXGBE_CPU_TO_LE32 (raw_desc[i]); } +ixgbe_aci_debug (hw, (void *)raw_desc,NULL ,0 ); }/* Read async Admin Command response */
@@ -203,13 +303,18 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, raw_desc[i] =IXGBE_READ_REG (hw,PF_HIDA_2 (i)); raw_desc[i] =IXGBE_CPU_TO_LE32 (raw_desc[i]); } +ixgbe_aci_debug (hw, (void *)raw_desc,NULL ,0 ); }/* Handle timeout and invalid state of HICR register */ if (hicr &PF_HICR_C ) { +DEBUGOUT1 ("Error: Admin Command 0x%X command timeout\n" , + desc->opcode); status =IXGBE_ERR_ACI_TIMEOUT ;break ; }else if (!(hicr &PF_HICR_SV ) && !(hicr &PF_HICR_EV )) { +DEBUGOUT1 ("Error: Admin Command 0x%X invalid state of HICR register\n" , + desc->opcode); status =IXGBE_ERR_ACI_ERROR ;break ; }
@@ -221,11 +326,14 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,*/ if (desc->opcode != opcode && opcode !=IXGBE_CPU_TO_LE16 (ixgbe_aci_opc_get_fw_event)) { +DEBUGOUT ("Error: Admin Command failed because of bad opcode was returned\n" ); status =IXGBE_ERR_ACI_ERROR ;break ; }if (desc->retval !=IXGBE_ACI_RC_OK ) { +DEBUGOUT1 ("Error: Admin Command failed with error %x\n" , + desc->retval); hw->aci.last_status = (enum ixgbe_aci_err )desc->retval; status =IXGBE_ERR_ACI_ERROR ;break ;
@@ -239,6 +347,8 @@ ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc, tmp_buf[i] =IXGBE_CPU_TO_LE32 (tmp_buf[i]); }memcpy (buf, tmp_buf, buf_size); +ixgbe_aci_debug (hw, (void *)raw_desc, tmp_buf, + (u16 )tmp_buf_size); } }while (0 );
drivers/net/intel/ixgbe/base/ixgbe_e610.h +2 -0
@@ -10,6 +10,8 @@void ixgbe_init_aci (struct ixgbe_hw *hw);void ixgbe_shutdown_aci (struct ixgbe_hw *hw); +void ixgbe_aci_debug (struct ixgbe_hw *hw,void *desc,void *buf,u16 buf_len); +s32 ixgbe_aci_send_cmd (struct ixgbe_hw *hw,struct ixgbe_aci_desc *desc,void *buf,u16 buf_size);bool ixgbe_aci_check_event_pending (struct ixgbe_hw *hw);
drivers/net/intel/ixgbe/base/ixgbe_osdep.h +1 -0
@@ -39,6 +39,7 @@#define DEBUGOUT1 (S , ...) DEBUGOUT(S, ##__VA_ARGS__)#define DEBUGOUT2 (S , ...) DEBUGOUT(S, ##__VA_ARGS__)#define DEBUGOUT3 (S , ...) DEBUGOUT(S, ##__VA_ARGS__) +#define DEBUGOUT4 (S , ...) DEBUGOUT(S, ##__VA_ARGS__)#define DEBUGOUT6 (S , ...) DEBUGOUT(S, ##__VA_ARGS__)#define DEBUGOUT7 (S , ...) DEBUGOUT(S, ##__VA_ARGS__)
drivers/net/intel/ixgbe/base/ixgbe_type_e610.h +1 -0
@@ -361,6 +361,7 @@#define IXGBE_ACI_DESC_COOKIE_L_DWORD_OFFSET 3#define IXGBE_ACI_SEND_DELAY_TIME_MS 10#define IXGBE_ACI_SEND_MAX_EXECUTE 3 +#define IXGBE_ACI_MAX_DEBUG_STRING_LENGTH 128/* [ms] timeout of waiting for sync response */ #define IXGBE_ACI_SYNC_RESPONSE_TIMEOUT 100000/* [ms] timeout of waiting for async response */
Signature · 1 line
2.47.1
PATCH 5/5 net/ixgbe: update README
In reply to Anatoly BurakovUpdate readme with new base code snapshot update date.
--- drivers/net/intel/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/ixgbe/base/README +1 -1
@@ -6,7 +6,7 @@ Intel® IXGBE driver =================== This directory contains source code of ixgbe base driver generated on -2024-12-20 released by the team which develops +2025-06-04 released by the team which develops basic drivers for any ixgbe NIC. The sub-directory of base/ contains the original source package. This driver is valid for the product(s) listed below
Signature · 1 line
2.47.1
Bruce Richardson
AppliedQuoted 8 lines · Anatoly Burakov
Update IXGBE base code snapshot to version 2025-06-04.
Aleksandr Loktionov (1):
net/ixgbe: remove PTP by PHY capAnatoly Burakov (1):
net/ixgbe: update README
Quoted 9 lines
Jedrzej Jagielski (1):
net/ixgbe: add VF mailbox op for link statusPiotr Kwapulinski (1):
net/ixgbe: add ACI debug printoutsPiotr Pietruszewski (1):
net/ixgbe: add support for toggling VF Tx queues
Applied to dpdk-next-net-intel.
Thanks,
/Bruce