bnxt patchset
cover bnxt patchset
Patchset against dpdk-next-net.
Please apply.
Ajit Khaparde (4):
net/bnxt: update bnxt feature list net/bnxt: fix link speed setting with autoneg off net/bnxt: add 100G speed config capability net/bnxt: fix an incorrect return in mac_addr_add
doc/guides/nics/features/bnxt.ini | 6 ++++++ drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/bnxt/bnxt_hwrm.c | 30 +++++++++++++++++++++++++++--- 4 files changed, 35 insertions(+), 4 deletions(-)
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 1/4 net/bnxt: update bnxt feature list
Updating bnxt.ini file.
--- doc/guides/nics/features/bnxt.ini | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/nics/features/bnxt.ini +6 -0
@@ -4,7 +4,9 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] +Speed capabilities = Y Link status = Y +Link status event = Y Rx interrupt = Y Queue start/stop = Y MTU update = Y
@@ -23,8 +25,10 @@ SR-IOV = Y VLAN filter = Y Ethertype filter = Y N-tuple filter = Y +Flow director = Y Flow control = Y Flow API = Y +CRC offload = Y L3 checksum offload = Y L4 checksum offload = Y Inner L3 checksum = Y
@@ -41,4 +45,6 @@ EEPROM dump = Y LED = Y Linux UIO = Y Linux VFIO = Y +ARMv8 = Y +x86-32 = Y x86-64 = Y
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 2/4 net/bnxt: fix link speed setting with autoneg off
In reply to Ajit KhapardeWhen Autoneg is turned off especially on remote side, link does not come up. This patch fixes that.
--- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_hwrm.c | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt.h +1 -0
@@ -163,6 +163,7 @@ struct bnxt_link_info {uint16_t link_speed;uint16_t support_speeds;uint16_t auto_link_speed; +uint16_t force_link_speed;uint16_t auto_link_speed_mask;uint32_t preemphasis;uint8_t phy_type;
drivers/net/bnxt/bnxt_hwrm.c +20 -2
@@ -894,12 +894,22 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, link_info->support_speeds =rte_le_to_cpu_16 (resp->support_speeds); link_info->auto_link_speed =rte_le_to_cpu_16 (resp->auto_link_speed); link_info->preemphasis =rte_le_to_cpu_32 (resp->preemphasis); + link_info->force_link_speed =rte_le_to_cpu_16 (resp->force_link_speed); link_info->phy_ver[0 ] = resp->phy_maj; link_info->phy_ver[1 ] = resp->phy_min; link_info->phy_ver[2 ] = resp->phy_bld;HWRM_UNLOCK (); +PMD_DRV_LOG (DEBUG ,"Link Speed %d\n" , link_info->link_speed); +PMD_DRV_LOG (DEBUG ,"Auto Mode %d\n" , link_info->auto_mode); +PMD_DRV_LOG (DEBUG ,"Support Speeds %x\n" , link_info->support_speeds); +PMD_DRV_LOG (DEBUG ,"Auto Link Speed %x\n" , link_info->auto_link_speed); +PMD_DRV_LOG (DEBUG ,"Auto Link Speed Mask %x\n" , + link_info->auto_link_speed_mask); +PMD_DRV_LOG (DEBUG ,"Forced Link Speed %x\n" , + link_info->force_link_speed); +return rc; }
@@ -2220,7 +2230,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) autoneg =bnxt_check_eth_link_autoneg (dev_conf->link_speeds); speed =bnxt_parse_eth_link_speed (dev_conf->link_speeds); link_req.phy_flags =HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY ; -if (autoneg ==1 ) { +/* Autoneg can be done only when the FW allows */ +if (autoneg ==1 && !(bp->link_info.auto_link_speed || + bp->link_info.force_link_speed)) { link_req.phy_flags |=HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG ; link_req.auto_link_speed_mask =
@@ -2238,7 +2250,13 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) } link_req.phy_flags |=HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE ; - link_req.link_speed = speed; +/* If user wants a particular speed try that first. */ +if (speed) + link_req.link_speed = speed; +else if (bp->link_info.force_link_speed) + link_req.link_speed = bp->link_info.force_link_speed; +else + link_req.link_speed = bp->link_info.auto_link_speed; } link_req.duplex =bnxt_parse_eth_link_duplex (dev_conf->link_speeds); link_req.auto_pause = bp->link_info.auto_pause;
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 3/4 net/bnxt: add 100G speed config capability
In reply to Ajit KhapardeWe are not parsing for 100G speed correctly. With this patch we should be able to configure 100G link.
Fixes 710d3bd5568d: ("net/bnxt: add 100G speed detection")
--- drivers/net/bnxt/bnxt_hwrm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +7 -1
@@ -2042,6 +2042,10 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed) eth_link_speed =HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB ;break ; +case ETH_LINK_SPEED_100G : + eth_link_speed = +HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB ; +break ;default : PMD_DRV_LOG(ERR, "Unsupported link speed %d; default to AUTO\n",
@@ -2054,7 +2058,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed)#define BNXT_SUPPORTED_SPEEDS (ETH_LINK_SPEED_100M | ETH_LINK_SPEED_100M_HD | \ ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G | \ ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G | ETH_LINK_SPEED_25G | \ - ETH_LINK_SPEED_40G | ETH_LINK_SPEED_50G) + ETH_LINK_SPEED_40G | ETH_LINK_SPEED_50G | ETH_LINK_SPEED_100G)static int bnxt_valid_link_speed (uint32_t link_speed,uint16_t port_id) {
@@ -2118,6 +2122,8 @@ bnxt_parse_eth_link_speed_mask(struct bnxt *bp, uint32_t link_speed) ret |=HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_40GB ;if (link_speed Ð_LINK_SPEED_50G ) ret |=HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_50GB ; +if (link_speed Ð_LINK_SPEED_100G ) + ret |=HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100GB ;return ret; }
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 4/4 net/bnxt: fix an incorrect return in mac_addr_add
In reply to Ajit KhapardeThere is no need to return an error if an existing MAC is added.
--- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +1 -1
@@ -727,7 +727,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,if (filter->mac_index == index) {PMD_DRV_LOG (ERR ,"MAC addr already existed for pool %d\n" , pool); -return -EINVAL ; +return 0 ; } } filter =bnxt_alloc_filter (bp);
Signature · 1 line
2.14.3 (Apple Git-98)
Quoted 8 lines · Ajit Khaparde
Patchset against dpdk-next-net.
Please apply.Ajit Khaparde (4):
net/bnxt: update bnxt feature list net/bnxt: fix link speed setting with autoneg off net/bnxt: add 100G speed config capability net/bnxt: fix an incorrect return inmac_addr_add
Series applied to dpdk-next-net/master, thanks.