patchset for bnxt PMD
cover patchset for bnxt PMD
Patches for bnxt PMD to add support for RSS level
selection, update HWRM API.
Ajit Khaparde (3):
net/bnxt: add support for RSS hash selection
net/bnxt: update HWRM structures
doc: fix vector mode info for bnxt
doc/guides/nics/bnxt.rst | 1 - doc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 + drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 16 +- drivers/net/bnxt/bnxt_rxq.c | 6 + drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 66 + drivers/net/bnxt/bnxt_vnic.h | 5 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 11011 +++++++++++++++-------- 11 files changed, 7153 insertions(+), 3994 deletions(-)
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 1/3 net/bnxt: add support for RSS hash selection
Add support to select RSS hash based on innermost or outermost headers. If an application is started without any specific settings the default mode configured by FW or HW shall be used.
--- doc/guides/rel_notes/release_20_11.rst | 1 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 +++ drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 9 +++- drivers/net/bnxt/bnxt_rxq.c | 6 +++ drivers/net/bnxt/bnxt_vnic.c | 66 ++++++++++++++++++++++++++ drivers/net/bnxt/bnxt_vnic.h | 5 ++ 8 files changed, 97 insertions(+), 3 deletions(-)
doc/guides/rel_notes/release_20_11.rst +1 -0
@@ -83,6 +83,7 @@ New Features Updated the Broadcom bnxt driver with new features and improvements, including: * Added support for 200G PAM4 link speed. + * Added support for RSS hash level selection. Removed Items
drivers/net/bnxt/bnxt.h +3 -1
@@ -558,7 +558,8 @@ struct bnxt_rep_info { ETH_RSS_NONFRAG_IPV4_UDP | \ ETH_RSS_IPV6 | \ ETH_RSS_NONFRAG_IPV6_TCP | \ - ETH_RSS_NONFRAG_IPV6_UDP) + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_LEVEL_MASK)#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \ DEV_TX_OFFLOAD_IPV4_CKSUM | \
@@ -671,6 +672,7 @@ struct bnxt {uint32_t vnic_cap_flags;#define BNXT_VNIC_CAP_COS_CLASSIFY BIT(0) +#define BNXT_VNIC_CAP_OUTER_RSS BIT(1)unsigned int rx_nr_rings;unsigned int rx_cp_nr_rings;unsigned int rx_num_qs_per_vnic;
drivers/net/bnxt/bnxt_ethdev.c +7 -0
@@ -1893,6 +1893,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,/* Update the default RSS VNIC(s) */ vnic =BNXT_GET_DEFAULT_VNIC (bp); vnic->hash_type =bnxt_rte_to_hwrm_hash_types (rss_conf->rss_hf); + vnic->hash_mode = +bnxt_rte_to_hwrm_hash_level (bp, rss_conf->rss_hf, +ETH_RSS_LEVEL (rss_conf->rss_hf));/* * If hashkey is not specified, use the previously configured
@@ -1963,6 +1966,10 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev, hash_types &= ~HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6 ; } + + rss_conf->rss_hf |= +bnxt_hwrm_to_rte_rss_level (bp, vnic->hash_mode); +if (hash_types) { PMD_DRV_LOG(ERR, "Unknown RSS config from firmware (%08x), RSS disabled",
drivers/net/bnxt/bnxt_flow.c +2 -0
@@ -1365,6 +1365,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,if (vnic->rx_queue_cnt >1 ) { vnic->hash_type =bnxt_rte_to_hwrm_hash_types (rss->types); + vnic->hash_mode = +bnxt_rte_to_hwrm_hash_level (bp, rss->types, rss->level);if (!rss->key_len) {/* If hash key has not been specified,
drivers/net/bnxt/bnxt_hwrm.c +7 -2
@@ -835,6 +835,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)int bnxt_hwrm_vnic_qcaps (struct bnxt *bp) {int rc =0 ; +uint32_t flags;struct hwrm_vnic_qcaps_input req = {.req_type =0 };struct hwrm_vnic_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
@@ -846,12 +847,16 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)HWRM_CHECK_RESULT (); -if (rte_le_to_cpu_32 (resp->flags) & -HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP ) { + flags =rte_le_to_cpu_32 (resp->flags); + +if (flags &HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP ) { bp->vnic_cap_flags |=BNXT_VNIC_CAP_COS_CLASSIFY ;PMD_DRV_LOG (INFO ,"CoS assignment capability enabled\n" ); } +if (flags &HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP ) + bp->vnic_cap_flags |=BNXT_VNIC_CAP_OUTER_RSS ; + bp->max_tpa_v2 =rte_le_to_cpu_16 (resp->max_aggs_supported);HWRM_UNLOCK ();
drivers/net/bnxt/bnxt_rxq.c +6 -0
@@ -172,9 +172,15 @@ int bnxt_mq_rx_configure(struct bnxt *bp) bp->flags &= ~BNXT_FLAG_UPDATE_HASH ;for (i =0 ; i < bp->nr_vnics; i++) { +uint32_t lvl =ETH_RSS_LEVEL (rss->rss_hf); + vnic = &bp->vnic_info[i]; vnic->hash_type =bnxt_rte_to_hwrm_hash_types (rss->rss_hf); + vnic->hash_mode = +bnxt_rte_to_hwrm_hash_level (bp, + rss->rss_hf, + lvl);/* * Use the supplied key if the key length is
drivers/net/bnxt/bnxt_vnic.c +66 -0
69 lines not on this page · raw message
drivers/net/bnxt/bnxt_vnic.h +5 -0
@@ -11,6 +11,9 @@#define INVALID_VNIC_ID ((uint16_t)-1) +#define BNXT_RSS_LEVEL_INNERMOST 0x2 +#define BNXT_RSS_LEVEL_OUTERMOST 0x1 +struct bnxt_vnic_info {STAILQ_ENTRY (bnxt_vnic_info) next;uint8_t ff_pool_idx;
@@ -69,4 +72,6 @@ int bnxt_alloc_vnic_mem(struct bnxt *bp);int bnxt_vnic_grp_alloc (struct bnxt *bp,struct bnxt_vnic_info *vnic);void prandom_bytes (void *dest_ptr,size_t len);uint16_t bnxt_rte_to_hwrm_hash_types (uint64_t rte_type); +int bnxt_rte_to_hwrm_hash_level (struct bnxt *bp,uint64_t hash_f,uint32_t lvl); +uint64_t bnxt_hwrm_to_rte_rss_level (struct bnxt *bp,uint32_t mode);#endif
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 2/3 net/bnxt: update HWRM structures
In reply to Ajit KhapardeHWRM API to a newer 1.10.1.70 version.
Few fields have been renamed because of this.rx_err_pkt -> rx_discard_pktsrx_drop_pkts -> rx_error_pkts
tx_err_pkts -> tx_discard_pktstx_drop_pkts -> tx_error_pkts
link_signal_mode -> active_fec_signal_mode
tx_bd_long_hi.mss -> tx_bd_long_hi.kid_or_ts_high_mss tx_bd_long_hi.hdr_size -> tx_bd_long_hi.kid_or_ts_low_hdr_size
--- doc/guides/rel_notes/release_20_11.rst | 1 + drivers/net/bnxt/bnxt_hwrm.c | 7 +- drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/hsi_struct_def_dpdk.h | 11011 +++++++++++++++-------- 4 files changed, 7056 insertions(+), 3990 deletions(-)
doc/guides/rel_notes/release_20_11.rst +1 -0
@@ -84,6 +84,7 @@ New Features * Added support for 200G PAM4 link speed. * Added support for RSS hash level selection. + * Updated HWRM structures to 1.10.1.70 version. Removed Items
drivers/net/bnxt/bnxt_hwrm.c +4 -3
@@ -1364,7 +1364,8 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, link_info->phy_ver[0 ] = resp->phy_maj; link_info->phy_ver[1 ] = resp->phy_min; link_info->phy_ver[2 ] = resp->phy_bld; - link_info->link_signal_mode =rte_le_to_cpu_16 (resp->link_signal_mode); + link_info->link_signal_mode = +rte_le_to_cpu_16 (resp->active_fec_signal_mode); link_info->force_pam4_link_speed =rte_le_to_cpu_16 (resp->force_pam4_link_speed); link_info->support_pam4_speeds =
@@ -4011,8 +4012,8 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx, stats->q_ibytes[idx] =rte_le_to_cpu_64 (resp->rx_ucast_bytes); stats->q_ibytes[idx] +=rte_le_to_cpu_64 (resp->rx_mcast_bytes); stats->q_ibytes[idx] +=rte_le_to_cpu_64 (resp->rx_bcast_bytes); - stats->q_errors[idx] =rte_le_to_cpu_64 (resp->rx_err_pkts); - stats->q_errors[idx] +=rte_le_to_cpu_64 (resp->rx_drop_pkts); + stats->q_errors[idx] =rte_le_to_cpu_64 (resp->rx_discard_pkts); + stats->q_errors[idx] +=rte_le_to_cpu_64 (resp->rx_error_pkts); }else { stats->q_opackets[idx] =rte_le_to_cpu_64 (resp->tx_ucast_pkts); stats->q_opackets[idx] +=rte_le_to_cpu_64 (resp->tx_mcast_pkts);
drivers/net/bnxt/bnxt_txr.c +8 -19
@@ -216,6 +216,10 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, &txr->tx_desc_ring[txr->tx_prod]; txbd1->lflags =0 ; txbd1->cfa_meta = vlan_tag_flags; +/* Legacy tx_bd_long_hi->mss = +* tx_bd_long_hi->kid_or_ts_high_mss +*/ + txbd1->kid_or_ts_high_mss =0 ;if (txq->vfr_tx_cfa_action) txbd1->cfa_action = txq->vfr_tx_cfa_action;
@@ -235,91 +239,76 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, tx_pkt->outer_l3_len : 0;/* The hdr_size is multiple of 16bit units not 8bit. * Hence divide by 2. +* Also legacy hdr_size = kid_or_ts_low_hdr_size. */ - txbd1->hdr_size = hdr_size >>1 ; - txbd1->mss = tx_pkt->tso_segsz; -RTE_VERIFY (txbd1->mss); + txbd1->kid_or_ts_low_hdr_size = hdr_size >>1 ; + txbd1->kid_or_ts_high_mss = tx_pkt->tso_segsz; +RTE_VERIFY (txbd1->kid_or_ts_high_mss); }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_TCP_UDP_CKSUM ) ==PKT_TX_OIP_IIP_TCP_UDP_CKSUM ) {/* Outer IP, Inner IP, Inner TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_TCP_CKSUM ) ==PKT_TX_OIP_IIP_TCP_CKSUM ) {/* Outer IP, Inner IP, Inner TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_UDP_CKSUM ) ==PKT_TX_OIP_IIP_UDP_CKSUM ) {/* Outer IP, Inner IP, Inner TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IIP_TCP_UDP_CKSUM ) ==PKT_TX_IIP_TCP_UDP_CKSUM ) {/* (Inner) IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IIP_UDP_CKSUM ) ==PKT_TX_IIP_UDP_CKSUM ) {/* (Inner) IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IIP_TCP_CKSUM ) ==PKT_TX_IIP_TCP_CKSUM ) {/* (Inner) IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_TCP_UDP_CKSUM ) ==PKT_TX_OIP_TCP_UDP_CKSUM ) {/* Outer IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_UDP_CKSUM ) ==PKT_TX_OIP_UDP_CKSUM ) {/* Outer IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_TCP_CKSUM ) ==PKT_TX_OIP_TCP_CKSUM ) {/* Outer IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_CKSUM ) ==PKT_TX_OIP_IIP_CKSUM ) {/* Outer IP, Inner IP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_TCP_UDP_CKSUM ) ==PKT_TX_TCP_UDP_CKSUM ) {/* TCP/UDP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_TCP_CKSUM ) ==PKT_TX_TCP_CKSUM ) {/* TCP/UDP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_UDP_CKSUM ) ==PKT_TX_UDP_CKSUM ) {/* TCP/UDP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IP_CKSUM ) ==PKT_TX_IP_CKSUM ) {/* IP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_IP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OUTER_IP_CKSUM ) ==PKT_TX_OUTER_IP_CKSUM ) {/* IP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_T_IP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IEEE1588_TMST ) ==PKT_TX_IEEE1588_TMST ) {/* PTP */ txbd1->lflags |=TX_BD_LONG_LFLAGS_STAMP ; - txbd1->mss =0 ; } }else { txbd->flags_type |=TX_BD_SHORT_TYPE_TX_BD_SHORT ;
drivers/net/bnxt/hsi_struct_def_dpdk.h +7043 -3968
2,869 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH 2/3] net/bnxt: update HWRM structures
Quoted 9 lines · Ajit Khaparde
HWRM API to a newer 1.10.1.70 version.
Few fields have been renamed because of this.
rx_err_pkt->rx_discard_pktsrx_drop_pkts->rx_error_pkts
tx_err_pkts->tx_discard_pktstx_drop_pkts->tx_error_pkts
Quoted 7 lines
link_signal_mode->active_fec_signal_modetx_bd_long_hi.mss -> tx_bd_long_hi.kid_or_ts_high_mss tx_bd_long_hi.hdr_size -> tx_bd_long_hi.kid_or_ts_low_hdr_size
Signed-off-by Ajit Khaparde <[email protected]>
There are some basic checkpatch errors like spelling mistakes, can you please take care of them:
http://mails.dpdk.org/archives/test-report/2020-September/155556.html
Also some of the comment are too long, can you please check them too, again above checkpatch link has them listed.
cover patchset for bnxt PMD
Patches for bnxt PMD to add support for RSS level
selection, update HWRM API.
v1->v2: fix spelling mistakes and long line comments in patch [2/2].
Ajit Khaparde (2):
net/bnxt: add support for RSS hash selection
net/bnxt: update HWRM structures
doc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 + drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 16 +- drivers/net/bnxt/bnxt_rxq.c | 6 + drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 66 + drivers/net/bnxt/bnxt_vnic.h | 5 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 9665 ++++++++++++++++-------- 10 files changed, 6513 insertions(+), 3287 deletions(-)
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 1/2 net/bnxt: add support for RSS hash selection
Add support to select RSS hash based on innermost or outermost headers. If an application is started without any specific settings the default mode configured by FW or HW shall be used.
--- doc/guides/rel_notes/release_20_11.rst | 1 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 +++ drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 9 +++- drivers/net/bnxt/bnxt_rxq.c | 6 +++ drivers/net/bnxt/bnxt_vnic.c | 66 ++++++++++++++++++++++++++ drivers/net/bnxt/bnxt_vnic.h | 5 ++ 8 files changed, 97 insertions(+), 3 deletions(-)
doc/guides/rel_notes/release_20_11.rst +1 -0
@@ -89,6 +89,7 @@ New Features Updated the Broadcom bnxt driver with new features and improvements, including: * Added support for 200G PAM4 link speed. + * Added support for RSS hash level selection. Removed Items
drivers/net/bnxt/bnxt.h +3 -1
@@ -558,7 +558,8 @@ struct bnxt_rep_info { ETH_RSS_NONFRAG_IPV4_UDP | \ ETH_RSS_IPV6 | \ ETH_RSS_NONFRAG_IPV6_TCP | \ - ETH_RSS_NONFRAG_IPV6_UDP) + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_LEVEL_MASK)#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \ DEV_TX_OFFLOAD_IPV4_CKSUM | \
@@ -671,6 +672,7 @@ struct bnxt {uint32_t vnic_cap_flags;#define BNXT_VNIC_CAP_COS_CLASSIFY BIT(0) +#define BNXT_VNIC_CAP_OUTER_RSS BIT(1)unsigned int rx_nr_rings;unsigned int rx_cp_nr_rings;unsigned int rx_num_qs_per_vnic;
drivers/net/bnxt/bnxt_ethdev.c +7 -0
@@ -1898,6 +1898,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,/* Update the default RSS VNIC(s) */ vnic =BNXT_GET_DEFAULT_VNIC (bp); vnic->hash_type =bnxt_rte_to_hwrm_hash_types (rss_conf->rss_hf); + vnic->hash_mode = +bnxt_rte_to_hwrm_hash_level (bp, rss_conf->rss_hf, +ETH_RSS_LEVEL (rss_conf->rss_hf));/* * If hashkey is not specified, use the previously configured
@@ -1968,6 +1971,10 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev, hash_types &= ~HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6 ; } + + rss_conf->rss_hf |= +bnxt_hwrm_to_rte_rss_level (bp, vnic->hash_mode); +if (hash_types) { PMD_DRV_LOG(ERR, "Unknown RSS config from firmware (%08x), RSS disabled",
drivers/net/bnxt/bnxt_flow.c +2 -0
@@ -1365,6 +1365,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,if (vnic->rx_queue_cnt >1 ) { vnic->hash_type =bnxt_rte_to_hwrm_hash_types (rss->types); + vnic->hash_mode = +bnxt_rte_to_hwrm_hash_level (bp, rss->types, rss->level);if (!rss->key_len) {/* If hash key has not been specified,
drivers/net/bnxt/bnxt_hwrm.c +7 -2
@@ -835,6 +835,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)int bnxt_hwrm_vnic_qcaps (struct bnxt *bp) {int rc =0 ; +uint32_t flags;struct hwrm_vnic_qcaps_input req = {.req_type =0 };struct hwrm_vnic_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
@@ -846,12 +847,16 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)HWRM_CHECK_RESULT (); -if (rte_le_to_cpu_32 (resp->flags) & -HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP ) { + flags =rte_le_to_cpu_32 (resp->flags); + +if (flags &HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP ) { bp->vnic_cap_flags |=BNXT_VNIC_CAP_COS_CLASSIFY ;PMD_DRV_LOG (INFO ,"CoS assignment capability enabled\n" ); } +if (flags &HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP ) + bp->vnic_cap_flags |=BNXT_VNIC_CAP_OUTER_RSS ; + bp->max_tpa_v2 =rte_le_to_cpu_16 (resp->max_aggs_supported);HWRM_UNLOCK ();
drivers/net/bnxt/bnxt_rxq.c +6 -0
@@ -172,9 +172,15 @@ int bnxt_mq_rx_configure(struct bnxt *bp) bp->flags &= ~BNXT_FLAG_UPDATE_HASH ;for (i =0 ; i < bp->nr_vnics; i++) { +uint32_t lvl =ETH_RSS_LEVEL (rss->rss_hf); + vnic = &bp->vnic_info[i]; vnic->hash_type =bnxt_rte_to_hwrm_hash_types (rss->rss_hf); + vnic->hash_mode = +bnxt_rte_to_hwrm_hash_level (bp, + rss->rss_hf, + lvl);/* * Use the supplied key if the key length is
drivers/net/bnxt/bnxt_vnic.c +66 -0
69 lines not on this page · raw message
drivers/net/bnxt/bnxt_vnic.h +5 -0
@@ -11,6 +11,9 @@#define INVALID_VNIC_ID ((uint16_t)-1) +#define BNXT_RSS_LEVEL_INNERMOST 0x2 +#define BNXT_RSS_LEVEL_OUTERMOST 0x1 +struct bnxt_vnic_info {STAILQ_ENTRY (bnxt_vnic_info) next;uint8_t ff_pool_idx;
@@ -69,4 +72,6 @@ int bnxt_alloc_vnic_mem(struct bnxt *bp);int bnxt_vnic_grp_alloc (struct bnxt *bp,struct bnxt_vnic_info *vnic);void prandom_bytes (void *dest_ptr,size_t len);uint16_t bnxt_rte_to_hwrm_hash_types (uint64_t rte_type); +int bnxt_rte_to_hwrm_hash_level (struct bnxt *bp,uint64_t hash_f,uint32_t lvl); +uint64_t bnxt_hwrm_to_rte_rss_level (struct bnxt *bp,uint32_t mode);#endif
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 2/2 net/bnxt: update HWRM structures
In reply to Ajit KhapardeHWRM API to a newer 1.10.1.70 version.
Few fields have been renamed because of this.rx_err_pkt -> rx_discard_pktsrx_drop_pkts -> rx_error_pkts
tx_err_pkts -> tx_discard_pktstx_drop_pkts -> tx_error_pkts
link_signal_mode -> active_fec_signal_mode
tx_bd_long_hi.mss -> tx_bd_long_hi.kid_or_ts_high_mss tx_bd_long_hi.hdr_size -> tx_bd_long_hi.kid_or_ts_low_hdr_size
---v1->v2: fix typo and long comment lines.
--- doc/guides/rel_notes/release_20_11.rst | 1 + drivers/net/bnxt/bnxt_hwrm.c | 7 +- drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/hsi_struct_def_dpdk.h | 9665 ++++++++++++++++-------- 4 files changed, 6416 insertions(+), 3284 deletions(-)
doc/guides/rel_notes/release_20_11.rst +1 -0
@@ -90,6 +90,7 @@ New Features * Added support for 200G PAM4 link speed. * Added support for RSS hash level selection. + * Updated HWRM structures to 1.10.1.70 version. Removed Items
drivers/net/bnxt/bnxt_hwrm.c +4 -3
@@ -1364,7 +1364,8 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, link_info->phy_ver[0 ] = resp->phy_maj; link_info->phy_ver[1 ] = resp->phy_min; link_info->phy_ver[2 ] = resp->phy_bld; - link_info->link_signal_mode =rte_le_to_cpu_16 (resp->link_signal_mode); + link_info->link_signal_mode = +rte_le_to_cpu_16 (resp->active_fec_signal_mode); link_info->force_pam4_link_speed =rte_le_to_cpu_16 (resp->force_pam4_link_speed); link_info->support_pam4_speeds =
@@ -4011,8 +4012,8 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx, stats->q_ibytes[idx] =rte_le_to_cpu_64 (resp->rx_ucast_bytes); stats->q_ibytes[idx] +=rte_le_to_cpu_64 (resp->rx_mcast_bytes); stats->q_ibytes[idx] +=rte_le_to_cpu_64 (resp->rx_bcast_bytes); - stats->q_errors[idx] =rte_le_to_cpu_64 (resp->rx_err_pkts); - stats->q_errors[idx] +=rte_le_to_cpu_64 (resp->rx_drop_pkts); + stats->q_errors[idx] =rte_le_to_cpu_64 (resp->rx_discard_pkts); + stats->q_errors[idx] +=rte_le_to_cpu_64 (resp->rx_error_pkts); }else { stats->q_opackets[idx] =rte_le_to_cpu_64 (resp->tx_ucast_pkts); stats->q_opackets[idx] +=rte_le_to_cpu_64 (resp->tx_mcast_pkts);
drivers/net/bnxt/bnxt_txr.c +8 -19
@@ -216,6 +216,10 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, &txr->tx_desc_ring[txr->tx_prod]; txbd1->lflags =0 ; txbd1->cfa_meta = vlan_tag_flags; +/* Legacy tx_bd_long_hi->mss = +* tx_bd_long_hi->kid_or_ts_high_mss +*/ + txbd1->kid_or_ts_high_mss =0 ;if (txq->vfr_tx_cfa_action) txbd1->cfa_action = txq->vfr_tx_cfa_action;
@@ -235,91 +239,76 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, tx_pkt->outer_l3_len : 0;/* The hdr_size is multiple of 16bit units not 8bit. * Hence divide by 2. +* Also legacy hdr_size = kid_or_ts_low_hdr_size. */ - txbd1->hdr_size = hdr_size >>1 ; - txbd1->mss = tx_pkt->tso_segsz; -RTE_VERIFY (txbd1->mss); + txbd1->kid_or_ts_low_hdr_size = hdr_size >>1 ; + txbd1->kid_or_ts_high_mss = tx_pkt->tso_segsz; +RTE_VERIFY (txbd1->kid_or_ts_high_mss); }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_TCP_UDP_CKSUM ) ==PKT_TX_OIP_IIP_TCP_UDP_CKSUM ) {/* Outer IP, Inner IP, Inner TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_TCP_CKSUM ) ==PKT_TX_OIP_IIP_TCP_CKSUM ) {/* Outer IP, Inner IP, Inner TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_UDP_CKSUM ) ==PKT_TX_OIP_IIP_UDP_CKSUM ) {/* Outer IP, Inner IP, Inner TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IIP_TCP_UDP_CKSUM ) ==PKT_TX_IIP_TCP_UDP_CKSUM ) {/* (Inner) IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IIP_UDP_CKSUM ) ==PKT_TX_IIP_UDP_CKSUM ) {/* (Inner) IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IIP_TCP_CKSUM ) ==PKT_TX_IIP_TCP_CKSUM ) {/* (Inner) IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_IP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_TCP_UDP_CKSUM ) ==PKT_TX_OIP_TCP_UDP_CKSUM ) {/* Outer IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_UDP_CKSUM ) ==PKT_TX_OIP_UDP_CKSUM ) {/* Outer IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_TCP_CKSUM ) ==PKT_TX_OIP_TCP_CKSUM ) {/* Outer IP, (Inner) TCP/UDP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OIP_IIP_CKSUM ) ==PKT_TX_OIP_IIP_CKSUM ) {/* Outer IP, Inner IP CSO */ txbd1->lflags |=TX_BD_FLG_TIP_IP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_TCP_UDP_CKSUM ) ==PKT_TX_TCP_UDP_CKSUM ) {/* TCP/UDP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_TCP_CKSUM ) ==PKT_TX_TCP_CKSUM ) {/* TCP/UDP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_UDP_CKSUM ) ==PKT_TX_UDP_CKSUM ) {/* TCP/UDP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IP_CKSUM ) ==PKT_TX_IP_CKSUM ) {/* IP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_IP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_OUTER_IP_CKSUM ) ==PKT_TX_OUTER_IP_CKSUM ) {/* IP CSO */ txbd1->lflags |=TX_BD_LONG_LFLAGS_T_IP_CHKSUM ; - txbd1->mss =0 ; }else if ((tx_pkt->ol_flags &PKT_TX_IEEE1588_TMST ) ==PKT_TX_IEEE1588_TMST ) {/* PTP */ txbd1->lflags |=TX_BD_LONG_LFLAGS_STAMP ; - txbd1->mss =0 ; } }else { txbd->flags_type |=TX_BD_SHORT_TYPE_TX_BD_SHORT ;
drivers/net/bnxt/hsi_struct_def_dpdk.h +6403 -3262
2,869 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
Quoted 5 lines · Ajit Khaparde
Patches for bnxt PMD to add support for RSS level
selection, update HWRM API.
v1->v2: fix spelling mistakes and long line comments in patch [2/2].
Patchset applied to dpdk-next-net-brcm. Thanks
Quoted 20 lines
Ajit Khaparde (2):
net/bnxt: add support for RSS hash selection
net/bnxt: update HWRM structuresdoc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 + drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 16 +- drivers/net/bnxt/bnxt_rxq.c | 6 + drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 66 + drivers/net/bnxt/bnxt_vnic.h | 5 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 9665 ++++++++++++++++-------- 10 files changed, 6513 insertions(+), 3287 deletions(-)--
2.21.1 (Apple Git-122.3)
PATCH 3/3 doc: fix vector mode info for bnxt
In reply to Ajit KhapardeVector mode is disabled when jumbo frames are enabled. This usage guide was reporting it incorrectly.
--- doc/guides/nics/bnxt.rst | 1 - 1 file changed, 1 deletion(-)
doc/guides/nics/bnxt.rst +0 -1
@@ -836,7 +836,6 @@ This improved performance comes from several optimizations: DEV_RX_OFFLOAD_VLAN_STRIP DEV_RX_OFFLOAD_KEEP_CRC - DEV_RX_OFFLOAD_JUMBO_FRAME DEV_RX_OFFLOAD_IPV4_CKSUM DEV_RX_OFFLOAD_UDP_CKSUM DEV_RX_OFFLOAD_TCP_CKSUM
Signature · 1 line
2.21.1 (Apple Git-122.3)
Lance Richardson
NAKRe: [dpdk-dev] [PATCH 3/3] doc: fix vector mode info for bnxt
Quoted 25 lines · Ajit Khaparde
Vector mode is disabled when jumbo frames are enabled. This usage guide was reporting it incorrectly.
Fixes 1adaf0e0f2ee ("doc: update bnxt guide")Signed-off-by Ajit Khaparde <[email protected]>--- doc/guides/nics/bnxt.rst | 1 - 1 file changed, 1 deletion(-)doc/guides/nics/bnxt.rst +0
-2@@ -836,7 +836,6 @@ This improved performance comes from several optimizations: DEV_RX_OFFLOAD_VLAN_STRIP DEV_RX_OFFLOAD_KEEP_CRC - DEV_RX_OFFLOAD_JUMBO_FRAME DEV_RX_OFFLOAD_IPV4_CKSUM DEV_RX_OFFLOAD_UDP_CKSUM DEV_RX_OFFLOAD_TCP_CKSUM --
Quoted 2 lines
2.21.1 (Apple Git-122.3)
NAK - receive vector mode *is* allowed when jumbo is enabled, as long as the MTU is not large enough to require scattered RX (which also depends on the mbuf size).
Lance
Re: [dpdk-dev] [PATCH 3/3] doc: fix vector mode info for bnxt
Quoted 21 lines · Lance Richardson
Quoted 18 lines · Ajit Khaparde
Vector mode is disabled when jumbo frames are enabled. This usage guide was reporting it incorrectly.
Fixes 1adaf0e0f2ee ("doc: update bnxt guide")Signed-off-by Ajit Khaparde <[email protected]>--- doc/guides/nics/bnxt.rst | 1 - 1 file changed, 1 deletion(-)doc/guides/nics/bnxt.rst +0
-0@@ -836,7 +836,6 @@ This improved performance comes from several optimizations:
Quoted 13 lines
Quoted 9 lines
doc/guides/nics/bnxt.rst +0
-2DEV_RX_OFFLOAD_VLAN_STRIP DEV_RX_OFFLOAD_KEEP_CRC - DEV_RX_OFFLOAD_JUMBO_FRAME DEV_RX_OFFLOAD_IPV4_CKSUM DEV_RX_OFFLOAD_UDP_CKSUM DEV_RX_OFFLOAD_TCP_CKSUM --2.21.1 (Apple Git-122.3)
NAK - receive vector mode *is* allowed when jumbo is enabled, as long as the MTU is not large enough to require scattered RX (which also depends on the mbuf size).
Ok. Fair enough. Let me drop this patch.
Quoted 2 lines
Lance
Quoted 3 lines · Ajit Khaparde
Patches for bnxt PMD to add support for RSS level
selection, update HWRM API.
Patchset applied to dpdk-next-net-brcm.
Quoted 22 lines
Ajit Khaparde (3):
net/bnxt: add support for RSS hash selection
net/bnxt: update HWRM structures
doc: fix vector mode info for bnxtdoc/guides/nics/bnxt.rst | 1 - doc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 + drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 16 +- drivers/net/bnxt/bnxt_rxq.c | 6 + drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 66 + drivers/net/bnxt/bnxt_vnic.h | 5 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 11011 +++++++++++++++-------- 11 files changed, 7153 insertions(+), 3994 deletions(-)--
2.21.1 (Apple Git-122.3)
Quoted 7 lines · Ajit Khaparde
Quoted 3 lines · Ajit Khaparde
Patches for bnxt PMD to add support for RSS level
selection, update HWRM API.Patchset applied to dpdk-next-net-brcm.
Dropped patch [3/3] during merge. Patchwork updated accordingly.
Quoted 23 lines
Quoted 23 lines
Ajit Khaparde (3):
net/bnxt: add support for RSS hash selection
net/bnxt: update HWRM structures
doc: fix vector mode info for bnxtdoc/guides/nics/bnxt.rst | 1 - doc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_ethdev.c | 7 + drivers/net/bnxt/bnxt_flow.c | 2 + drivers/net/bnxt/bnxt_hwrm.c | 16 +- drivers/net/bnxt/bnxt_rxq.c | 6 + drivers/net/bnxt/bnxt_txr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 66 + drivers/net/bnxt/bnxt_vnic.h | 5 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 11011 +++++++++++++++-------- 11 files changed, 7153 insertions(+), 3994 deletions(-)--
2.21.1 (Apple Git-122.3)