bnxt patchset
cover bnxt patchset
This patchset against dpdk-next-net addresses some issues found during integration testing. The first patch cleans moves some PMD specific code out of bnxt_ethdev.c and bnxt.h, while the second patch updates some HWRM definitions in hsi_struct_def_dpdk.h and the last patch fixes an issue with link status reporting.
Please apply.
--
net/bnxt: move PMD specific functions net/bnxt: update HWRM defines
net/bnxt: fix incorrect reporting of link status
drivers/net/bnxt/bnxt.h | 26 -------------------------- drivers/net/bnxt/bnxt_ethdev.c | 18 ------------------ drivers/net/bnxt/bnxt_hwrm.c | 4 ++-- drivers/net/bnxt/hsi_struct_def_dpdk.h | 7 +++++-- drivers/net/bnxt/rte_pmd_bnxt.c | 18 ++++++++++++++++++ drivers/net/bnxt/rte_pmd_bnxt.h | 26 ++++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 48 deletions(-)
Signature · 1 line
2.10.1 (Apple Git-78)
PATCH 1/3 net/bnxt: move PMD specific functions
Move PMD specific functions in the appropriate rte_pmd_bnxt.c file
--- drivers/net/bnxt/bnxt.h | 26 -------------------------- drivers/net/bnxt/bnxt_ethdev.c | 18 ------------------ drivers/net/bnxt/rte_pmd_bnxt.c | 18 ++++++++++++++++++ drivers/net/bnxt/rte_pmd_bnxt.h | 26 ++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 44 deletions(-)
drivers/net/bnxt/bnxt.h +0 -26
@@ -250,32 +250,6 @@ struct bnxt {uint8_t num_leds; }; -/* -* Response sent back to the caller after callback -*/ -enum rte_pmd_bnxt_mb_event_rsp { -RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ,/**< skip mbox request and ACK */ -RTE_PMD_BNXT_MB_EVENT_NOOP_NACK ,/**< skip mbox request and NACK */ -RTE_PMD_BNXT_MB_EVENT_PROCEED ,/**< proceed with mbox request */ -RTE_PMD_BNXT_MB_EVENT_MAX /**< max value of this enum */ -}; - -/* mailbox message types */ -#define BNXT_VF_RESET 0x01/* VF requests reset */ -#define BNXT_VF_SET_MAC_ADDR 0x02/* VF requests PF to set MAC addr */ -#define BNXT_VF_SET_VLAN 0x03/* VF requests PF to set VLAN */ -#define BNXT_VF_SET_MTU 0x04/* VF requests PF to set MTU */ -#define BNXT_VF_SET_MRU 0x05/* VF requests PF to set MRU */ - -/* -* Data sent to the caller when the callback is executed. -*/ -struct rte_pmd_bnxt_mb_event_param { -uint16_t vf_id;/* Virtual Function number */ -int retval;/* return value */ -void *msg;/* pointer to message */ -}; -int bnxt_link_update_op (struct rte_eth_dev *eth_dev,int wait_to_complete);int bnxt_rcv_msg_from_vf (struct bnxt *bp,uint16_t vf_id,void *msg);
drivers/net/bnxt/bnxt_ethdev.c +0 -18
@@ -1899,24 +1899,6 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev) {return rc; } -int bnxt_rcv_msg_from_vf (struct bnxt *bp,uint16_t vf_id,void *msg) -{ -struct rte_pmd_bnxt_mb_event_param cb_param; - - cb_param.retval =RTE_PMD_BNXT_MB_EVENT_PROCEED ; - cb_param.vf_id = vf_id; - cb_param.msg = msg; - -_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , - &cb_param); - -/* Default to approve */ -if (cb_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED ) - cb_param.retval =RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ; - -return cb_param.retval ==RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ? true : false; -} - static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,struct rte_pci_device *pci_dev) {
drivers/net/bnxt/rte_pmd_bnxt.c +18 -0
@@ -48,6 +48,24 @@#include "rte_pmd_bnxt.h" #include "hsi_struct_def_dpdk.h" +int bnxt_rcv_msg_from_vf (struct bnxt *bp,uint16_t vf_id,void *msg) +{ +struct rte_pmd_bnxt_mb_event_param cb_param; + + cb_param.retval =RTE_PMD_BNXT_MB_EVENT_PROCEED ; + cb_param.vf_id = vf_id; + cb_param.msg = msg; + +_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , + &cb_param); + +/* Default to approve */ +if (cb_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED ) + cb_param.retval =RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ; + +return cb_param.retval ==RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ? true : false; +} +int rte_pmd_bnxt_set_tx_loopback (uint8_t port,uint8_t on) {struct rte_eth_dev *eth_dev;
drivers/net/bnxt/rte_pmd_bnxt.h +26 -0
@@ -36,6 +36,32 @@#include <rte_ethdev.h> +/* +* Response sent back to the caller after callback +*/ +enum rte_pmd_bnxt_mb_event_rsp { +RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ,/**< skip mbox request and ACK */ +RTE_PMD_BNXT_MB_EVENT_NOOP_NACK ,/**< skip mbox request and NACK */ +RTE_PMD_BNXT_MB_EVENT_PROCEED ,/**< proceed with mbox request */ +RTE_PMD_BNXT_MB_EVENT_MAX /**< max value of this enum */ +}; + +/* mailbox message types */ +#define BNXT_VF_RESET 0x01/* VF requests reset */ +#define BNXT_VF_SET_MAC_ADDR 0x02/* VF requests PF to set MAC addr */ +#define BNXT_VF_SET_VLAN 0x03/* VF requests PF to set VLAN */ +#define BNXT_VF_SET_MTU 0x04/* VF requests PF to set MTU */ +#define BNXT_VF_SET_MRU 0x05/* VF requests PF to set MRU */ + +/* +* Data sent to the caller when the callback is executed. +*/ +struct rte_pmd_bnxt_mb_event_param { +uint16_t vf_id;/* Virtual Function number */ +int retval;/* return value */ +void *msg;/* pointer to message */ +}; +/** * Enable/Disable VF MAC anti spoof *
Signature · 1 line
2.10.1 (Apple Git-78)
PATCH 2/3 net/bnxt: update HWRM defines
In reply to Ajit KhapardeSome HWRM defines are missing from hsi_struct_def_dpdk.h This patch adds them.
Also remove duplicate HWRM_RING_GRP_ALLOC entry.
--- drivers/net/bnxt/hsi_struct_def_dpdk.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/bnxt/hsi_struct_def_dpdk.h +5 -2
@@ -108,12 +108,13 @@#define HWRM_VNIC_RSS_QCFG (UINT32_C(0x47))#define HWRM_VNIC_PLCMODES_CFG (UINT32_C(0x48))#define HWRM_VNIC_PLCMODES_QCFG (UINT32_C(0x49)) +#define HWRM_VNIC_QCAPS (UINT32_C(0x4a))#define HWRM_RING_ALLOC (UINT32_C(0x50))#define HWRM_RING_FREE (UINT32_C(0x51)) -#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAM (UINT32_C(0x53)) +#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS (UINT32_C(0x52)) +#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS (UINT32_C(0x53))#define HWRM_RING_RESET (UINT32_C(0x5e))#define HWRM_RING_GRP_ALLOC (UINT32_C(0x60)) -#define HWRM_RING_GRP_ALLOC (UINT32_C(0x60))#define HWRM_RING_GRP_FREE (UINT32_C(0x61))#define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC (UINT32_C(0x70))#define HWRM_VNIC_RSS_COS_LB_CTX_FREE (UINT32_C(0x71))
@@ -135,6 +136,8 @@#define HWRM_STAT_CTX_FREE (UINT32_C(0xb1))#define HWRM_STAT_CTX_QUERY (UINT32_C(0xb2))#define HWRM_STAT_CTX_CLR_STATS (UINT32_C(0xb3)) +#define HWRM_FW_RESET (UINT32_C(0xc0)) +#define HWRM_FW_QSTATUS (UINT32_C(0xc1))#define HWRM_EXEC_FWD_RESP (UINT32_C(0xd0))#define HWRM_REJECT_FWD_RESP (UINT32_C(0xd1))#define HWRM_FWD_RESP (UINT32_C(0xd2))
Signature · 1 line
2.10.1 (Apple Git-78)
PATCH 3/3 net/bnxt: fix incorrect reporting of link status
In reply to Ajit KhapardeThis patch fixes incorrect reporting of link status
1) When link is down, set speed to zero. Otherwise a wrong non-zero speed will be displayed.
2) DAC cables can detect there is a signal, but it necessarily does not mean link is up. Code perviously treated this as link up.
--- drivers/net/bnxt/bnxt_hwrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +2 -2
@@ -630,7 +630,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,HWRM_CHECK_RESULT ; link_info->phy_link_status = resp->link; -if (link_info->phy_link_status !=HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK ) { +if (link_info->phy_link_status ==HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK ) { link_info->link_up =1 ; link_info->link_speed =rte_le_to_cpu_16 (resp->link_speed); }else {
@@ -1831,7 +1831,7 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link) link->link_speed =bnxt_parse_hw_link_speed (link_info->link_speed); else - link->link_speed = ETH_LINK_SPEED_10M; + link->link_speed = ETH_SPEED_NUM_NONE; link->link_duplex =bnxt_parse_hw_link_duplex (link_info->duplex); link->link_status = link_info->link_up; link->link_autoneg = link_info->auto_mode ==
Signature · 1 line
2.10.1 (Apple Git-78)
Quoted 6 lines · Ajit Khaparde
This patchset against dpdk-next-net addresses some issues found during integration testing. The first patch cleans moves some PMD specific code out of
bnxt_ethdev.candbnxt.h, while the second patch updates some HWRM definitions inhsi_struct_def_dpdk.hand the last patch fixes an issue with link status reporting.
Quoted 6 lines
Please apply.
--
net/bnxt: move PMD specific functions net/bnxt: update HWRM defines
net/bnxt: fix incorrect reporting of link status
Series applied to dpdk-next-net/master, thanks.