* [dpdk-dev] [PATCH 0/7] bnxt patchset
@ 2018-05-18 14:39 Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases Ajit Khaparde
` (7 more replies)
0 siblings, 8 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:39 UTC (permalink / raw)
To: dev
Patchset against dpdk-next.
Contains fixes mostly. Please apply.
Ajit Khaparde (7):
net/bnxt: add fallthrough comments for cascading switch cases
net/bnxt: fix to initialize tx and rx burst for secondary processes
net/bnxt: fix rss hash configuration
net/bnxt: fix to use 1st completion ring for forwarding and async
events
net/bnxt: fix VF resource allocation
net/bnxt: fix xstats support for VF
net/bnxt: fix Rx checksum flags
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_cpr.c | 85 ++++++++++------------------------
drivers/net/bnxt/bnxt_cpr.h | 5 +-
drivers/net/bnxt/bnxt_ethdev.c | 54 +++++++++++-----------
drivers/net/bnxt/bnxt_hwrm.c | 102 +++++++++++++++++++++++++++++++++++++----
drivers/net/bnxt/bnxt_hwrm.h | 3 ++
drivers/net/bnxt/bnxt_irq.c | 28 ++---------
drivers/net/bnxt/bnxt_ring.c | 45 ++++++++++++------
drivers/net/bnxt/bnxt_ring.h | 1 +
drivers/net/bnxt/bnxt_rxq.c | 1 +
drivers/net/bnxt/bnxt_rxr.c | 21 +++++++--
drivers/net/bnxt/bnxt_rxr.h | 6 +++
drivers/net/bnxt/bnxt_stats.c | 5 --
drivers/net/bnxt/bnxt_vnic.c | 2 +
drivers/net/bnxt/bnxt_vnic.h | 1 +
15 files changed, 215 insertions(+), 145 deletions(-)
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
@ 2018-05-18 14:39 ` Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 2/7] net/bnxt: fix to initialize tx and rx burst for secondary processes Ajit Khaparde
` (6 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:39 UTC (permalink / raw)
To: dev
The FALLTHROUGH comment for cascading switch cases was missing in
a few places. This patch adds that.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 3 +++
drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
drivers/net/bnxt/bnxt_rxq.c | 1 +
4 files changed, 9 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 8dde8cc0f..7b4f9a14b 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -27,6 +27,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
+ /* FALLTHROUGH */
bnxt_link_update_op(bp->eth_dev, 1);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9edcc7b7d..f7f23f75a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2432,6 +2432,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev,
switch (filter_op) {
case RTE_ETH_FILTER_ADD:
case RTE_ETH_FILTER_DELETE:
+ /* FALLTHROUGH */
filter = bnxt_get_unused_filter(bp);
if (filter == NULL) {
PMD_DRV_LOG(ERR,
@@ -2897,6 +2898,7 @@ static bool bnxt_dir_type_is_ape_bin_format(uint16_t dir_type)
case BNX_DIR_TYPE_KONG_PATCH:
case BNX_DIR_TYPE_BONO_FW:
case BNX_DIR_TYPE_BONO_PATCH:
+ /* FALLTHROUGH */
return true;
}
@@ -2915,6 +2917,7 @@ static bool bnxt_dir_type_is_other_exec_format(uint16_t dir_type)
case BNX_DIR_TYPE_ISCSI_BOOT:
case BNX_DIR_TYPE_ISCSI_BOOT_IPV6:
case BNX_DIR_TYPE_ISCSI_BOOT_IPV4N6:
+ /* FALLTHROUGH */
return true;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d975cb87d..28aa7476d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2002,6 +2002,7 @@ static uint16_t bnxt_parse_eth_link_duplex(uint32_t conf_link_speed)
switch (conf_link_speed) {
case ETH_LINK_SPEED_10M_HD:
case ETH_LINK_SPEED_100M_HD:
+ /* FALLTHROUGH */
return HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF;
}
return hw_link_duplex;
@@ -2022,6 +2023,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed)
switch (conf_link_speed & ~ETH_LINK_SPEED_FIXED) {
case ETH_LINK_SPEED_100M:
case ETH_LINK_SPEED_100M_HD:
+ /* FALLTHROUGH */
eth_link_speed =
HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB;
break;
@@ -2186,6 +2188,7 @@ static uint16_t bnxt_parse_hw_link_duplex(uint16_t hw_link_duplex)
switch (hw_link_duplex) {
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH:
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL:
+ /* FALLTHROUGH */
eth_link_duplex = ETH_LINK_FULL_DUPLEX;
break;
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF:
@@ -2315,6 +2318,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp)
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0:
+ /* FALLTHROUGH */
bp->port_partition_type = resp->port_partition_type;
break;
default:
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 866fb56b1..c55ddec4b 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -77,6 +77,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
switch (dev_conf->rxmode.mq_mode) {
case ETH_MQ_RX_VMDQ_RSS:
case ETH_MQ_RX_VMDQ_ONLY:
+ /* FALLTHROUGH */
/* ETH_8/64_POOLs */
pools = conf->nb_queue_pools;
/* For each pool, allocate MACVLAN CFA rule & VNIC */
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 2/7] net/bnxt: fix to initialize tx and rx burst for secondary processes
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases Ajit Khaparde
@ 2018-05-18 14:39 ` Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 3/7] net/bnxt: fix rss hash configuration Ajit Khaparde
` (5 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:39 UTC (permalink / raw)
To: dev
We were initializing Tx and Rx burst functions only for primary
processes. Fixing it in this patch.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f7f23f75a..af141d453 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3151,10 +3151,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
}
skip_init:
eth_dev->dev_ops = &bnxt_dev_ops;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return 0;
eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
if (BNXT_PF(bp) && pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 3/7] net/bnxt: fix rss hash configuration
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 2/7] net/bnxt: fix to initialize tx and rx burst for secondary processes Ajit Khaparde
@ 2018-05-18 14:39 ` Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 4/7] net/bnxt: fix to use 1st completion ring for forwarding and async events Ajit Khaparde
` (4 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:39 UTC (permalink / raw)
To: dev
While configuring RSS, the FW needs to know the rss_hash_mode that needs
to be initialized.
Set hash mode to HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT
to allow the FW to use the global mode already configured in the device.
Fixes: bcd4bcc4426f ("net/bnxt: configure RSS")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 1 +
drivers/net/bnxt/bnxt_vnic.c | 2 ++
drivers/net/bnxt/bnxt_vnic.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 28aa7476d..b285761eb 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1462,6 +1462,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
HWRM_PREP(req, VNIC_RSS_CFG);
req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
+ req.hash_mode_flags = vnic->hash_mode;
req.ring_grp_tbl_addr =
rte_cpu_to_le_64(vnic->rss_table_dma_addr);
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 733a5a92c..19d06af55 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -49,6 +49,8 @@ void bnxt_init_vnics(struct bnxt *bp)
vnic->rss_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
+ vnic->hash_mode =
+ HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT;
for (j = 0; j < MAX_QUEUES_PER_VNIC; j++)
vnic->fw_grp_ids[j] = (uint16_t)HWRM_NA_SIGNATURE;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index c60bb543c..c521d7e5a 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -25,6 +25,7 @@ struct bnxt_vnic_info {
uint16_t dflt_ring_grp;
uint16_t mru;
uint16_t hash_type;
+ uint8_t hash_mode;
rte_iova_t rss_table_dma_addr;
uint16_t *rss_table;
rte_iova_t rss_hash_key_dma_addr;
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 4/7] net/bnxt: fix to use 1st completion ring for forwarding and async events
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
` (2 preceding siblings ...)
2018-05-18 14:39 ` [dpdk-dev] [PATCH 3/7] net/bnxt: fix rss hash configuration Ajit Khaparde
@ 2018-05-18 14:39 ` Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
` (3 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:39 UTC (permalink / raw)
To: dev; +Cc: Qingmin Liu, Somnath Kotur
In order to save completion resource, use the first completion ring from
PF or VF as the default completion ring for async event & HWRM forward
response handling. Add bnxt_hwrm_set_async_event_cr() to set
async_event_cr for either PF or VF.
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Qingmin Liu <qingmin.liu@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 84 ++++++++++++------------------------------
drivers/net/bnxt/bnxt_cpr.h | 5 +--
drivers/net/bnxt/bnxt_ethdev.c | 20 +---------
drivers/net/bnxt/bnxt_hwrm.c | 19 ++++++++--
drivers/net/bnxt/bnxt_hwrm.h | 1 +
drivers/net/bnxt/bnxt_irq.c | 28 +++-----------
drivers/net/bnxt/bnxt_ring.c | 45 +++++++++++++++-------
drivers/net/bnxt/bnxt_rxr.c | 17 +++++++--
8 files changed, 91 insertions(+), 128 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 7b4f9a14b..ff20b6fdf 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -132,69 +132,31 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
return;
}
-/* For the default completion ring only */
-int bnxt_alloc_def_cp_ring(struct bnxt *bp)
+int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
{
- struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
- struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
- int rc;
-
- rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
- HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
- 0, HWRM_NA_SIGNATURE,
- HWRM_NA_SIGNATURE);
- if (rc)
- goto err_out;
- cpr->cp_doorbell = (char *)bp->doorbell_base;
- B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
- if (BNXT_PF(bp))
- rc = bnxt_hwrm_func_cfg_def_cp(bp);
- else
- rc = bnxt_hwrm_vf_func_cfg_def_cp(bp);
-
-err_out:
- return rc;
-}
+ bool evt = 0;
-void bnxt_free_def_cp_ring(struct bnxt *bp)
-{
- struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
-
- if (cpr == NULL)
- return;
+ if (bp == NULL || cmp == NULL) {
+ PMD_DRV_LOG(ERR, "invalid NULL argument\n");
+ return evt;
+ }
- bnxt_free_ring(cpr->cp_ring_struct);
- cpr->cp_ring_struct = NULL;
- rte_free(cpr->cp_ring_struct);
- rte_free(cpr);
- bp->def_cp_ring = NULL;
-}
+ switch (CMP_TYPE(cmp)) {
+ case CMPL_BASE_TYPE_HWRM_ASYNC_EVENT:
+ /* Handle any async event */
+ bnxt_handle_async_event(bp, cmp);
+ evt = 1;
+ break;
+ case CMPL_BASE_TYPE_HWRM_FWD_RESP:
+ /* Handle HWRM forwarded responses */
+ bnxt_handle_fwd_req(bp, cmp);
+ evt = 1;
+ break;
+ default:
+ /* Ignore any other events */
+ PMD_DRV_LOG(INFO, "Ignoring %02x completion\n", CMP_TYPE(cmp));
+ break;
+ }
-/* For the default completion ring only */
-int bnxt_init_def_ring_struct(struct bnxt *bp, unsigned int socket_id)
-{
- struct bnxt_cp_ring_info *cpr;
- struct bnxt_ring *ring;
-
- cpr = rte_zmalloc_socket("cpr",
- sizeof(struct bnxt_cp_ring_info),
- RTE_CACHE_LINE_SIZE, socket_id);
- if (cpr == NULL)
- return -ENOMEM;
- bp->def_cp_ring = cpr;
-
- ring = rte_zmalloc_socket("bnxt_cp_ring_struct",
- sizeof(struct bnxt_ring),
- RTE_CACHE_LINE_SIZE, socket_id);
- if (ring == NULL)
- return -ENOMEM;
- cpr->cp_ring_struct = ring;
- ring->bd = (void *)cpr->cp_desc_ring;
- ring->bd_dma = cpr->cp_desc_mapping;
- ring->ring_size = rte_align32pow2(DEFAULT_CP_RING_SIZE);
- ring->ring_mask = ring->ring_size - 1;
- ring->vmem_size = 0;
- ring->vmem = NULL;
-
- return 0;
+ return evt;
}
diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index 6091404f1..6c1e6d2b0 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -72,12 +72,9 @@ struct bnxt_cp_ring_info {
#define RX_CMP_L2_ERRORS \
(RX_PKT_CMPL_ERRORS_BUFFER_ERROR_MASK | RX_PKT_CMPL_ERRORS_CRC_ERROR)
-
struct bnxt;
-int bnxt_alloc_def_cp_ring(struct bnxt *bp);
-void bnxt_free_def_cp_ring(struct bnxt *bp);
-int bnxt_init_def_ring_struct(struct bnxt *bp, unsigned int socket_id);
void bnxt_handle_async_event(struct bnxt *bp, struct cmpl_base *cmp);
void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmp);
+int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp);
#endif
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index af141d453..0aba9a3fc 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -168,23 +168,12 @@ static void bnxt_free_mem(struct bnxt *bp)
bnxt_free_stats(bp);
bnxt_free_tx_rings(bp);
bnxt_free_rx_rings(bp);
- bnxt_free_def_cp_ring(bp);
}
static int bnxt_alloc_mem(struct bnxt *bp)
{
int rc;
- /* Default completion ring */
- rc = bnxt_init_def_ring_struct(bp, SOCKET_ID_ANY);
- if (rc)
- goto alloc_mem_err;
-
- rc = bnxt_alloc_rings(bp, 0, NULL, NULL,
- bp->def_cp_ring, "def_cp");
- if (rc)
- goto alloc_mem_err;
-
rc = bnxt_alloc_vnic_mem(bp);
if (rc)
goto alloc_mem_err;
@@ -509,11 +498,11 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
/* Inherit new configurations */
if (eth_dev->data->nb_rx_queues > bp->max_rx_rings ||
eth_dev->data->nb_tx_queues > bp->max_tx_rings ||
- eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues + 1 >
+ eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues >
bp->max_cp_rings ||
eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues >
bp->max_stat_ctx ||
- (uint32_t)(eth_dev->data->nb_rx_queues + 1) > bp->max_ring_grps) {
+ (uint32_t)(eth_dev->data->nb_rx_queues) > bp->max_ring_grps) {
PMD_DRV_LOG(ERR,
"Insufficient resources to support requested config\n");
PMD_DRV_LOG(ERR,
@@ -3383,10 +3372,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
if (rc)
goto error_free_int;
- rc = bnxt_alloc_def_cp_ring(bp);
- if (rc)
- goto error_free_int;
-
bnxt_enable_int(bp);
bnxt_init_nic(bp);
@@ -3394,7 +3379,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
error_free_int:
bnxt_disable_int(bp);
- bnxt_free_def_cp_ring(bp);
bnxt_hwrm_func_buf_unrgtr(bp);
bnxt_free_int(bp);
bnxt_free_mem(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b285761eb..bf847a828 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1766,7 +1766,7 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
struct bnxt_tx_ring_info *txr = txq->tx_ring;
struct bnxt_ring *ring = txr->tx_ring_struct;
struct bnxt_cp_ring_info *cpr = txq->cp_ring;
- unsigned int idx = bp->rx_cp_nr_rings + i + 1;
+ unsigned int idx = bp->rx_cp_nr_rings + i;
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
bnxt_hwrm_ring_free(bp, ring,
@@ -1792,13 +1792,12 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
struct bnxt_ring *ring = rxr->rx_ring_struct;
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
- unsigned int idx = i + 1;
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
bnxt_hwrm_ring_free(bp, ring,
HWRM_RING_FREE_INPUT_RING_TYPE_RX);
ring->fw_ring_id = INVALID_HW_RING_ID;
- bp->grp_info[idx].rx_fw_ring_id = INVALID_HW_RING_ID;
+ bp->grp_info[i].rx_fw_ring_id = INVALID_HW_RING_ID;
memset(rxr->rx_desc_ring, 0,
rxr->rx_ring_struct->ring_size *
sizeof(*rxr->rx_desc_ring));
@@ -1819,7 +1818,7 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
bp->grp_info[i].ag_fw_ring_id = INVALID_HW_RING_ID;
}
if (cpr->cp_ring_struct->fw_ring_id != INVALID_HW_RING_ID) {
- bnxt_free_cp_ring(bp, cpr, idx);
+ bnxt_free_cp_ring(bp, cpr, i);
bp->grp_info[i].cp_fw_ring_id = INVALID_HW_RING_ID;
cpr->cp_ring_struct->fw_ring_id = INVALID_HW_RING_ID;
}
@@ -2933,6 +2932,18 @@ int bnxt_hwrm_set_vf_vlan(struct bnxt *bp, int vf)
return rc;
}
+int bnxt_hwrm_set_async_event_cr(struct bnxt *bp)
+{
+ int rc;
+
+ if (BNXT_PF(bp))
+ rc = bnxt_hwrm_func_cfg_def_cp(bp);
+ else
+ rc = bnxt_hwrm_vf_func_cfg_def_cp(bp);
+
+ return rc;
+}
+
int bnxt_hwrm_reject_fwd_resp(struct bnxt *bp, uint16_t target_id,
void *encaped, size_t ec_size)
{
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 7c161eea0..4813c7fb6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -63,6 +63,7 @@ int bnxt_hwrm_vf_func_cfg_def_cp(struct bnxt *bp);
int bnxt_hwrm_queue_qportcfg(struct bnxt *bp);
+int bnxt_hwrm_set_async_event_cr(struct bnxt *bp);
int bnxt_hwrm_ring_alloc(struct bnxt *bp,
struct bnxt_ring *ring,
uint32_t ring_type, uint32_t map_index,
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index fd05f66af..7ef7023eb 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -40,30 +40,10 @@ static void bnxt_int_handler(void *param)
if (!CMP_VALID(cmp, raw_cons, cpr->cp_ring_struct))
break;
- switch (CMP_TYPE(cmp)) {
- case CMPL_BASE_TYPE_HWRM_ASYNC_EVENT:
- /* Handle any async event */
- bnxt_handle_async_event(bp, cmp);
- break;
- case CMPL_BASE_TYPE_HWRM_FWD_REQ:
- /* Handle HWRM forwarded responses */
- bnxt_handle_fwd_req(bp, cmp);
- break;
- default:
- /* Ignore any other events */
- if (cmp->type & rte_cpu_to_le_16(0x01)) {
- if (!CMP_VALID(cmp, raw_cons,
- cpr->cp_ring_struct))
- goto no_more;
- }
- PMD_DRV_LOG(INFO,
- "Ignoring %02x completion\n", CMP_TYPE(cmp));
- break;
- }
+ bnxt_event_hwrm_resp_handler(bp, cmp);
raw_cons = NEXT_RAW_CMP(raw_cons);
-
};
-no_more:
+
cpr->cp_raw_cons = raw_cons;
B_CP_DB_REARM(cpr, cpr->cp_raw_cons);
}
@@ -99,7 +79,9 @@ void bnxt_enable_int(struct bnxt *bp)
{
struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
- B_CP_DB_ARM(cpr);
+ /* Only the default completion ring */
+ if (cpr != NULL && cpr->cp_doorbell != NULL)
+ B_CP_DB_ARM(cpr);
}
int bnxt_setup_int(struct bnxt *bp)
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 1e748b949..bb9f6d1c0 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -274,31 +274,48 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
struct bnxt_ring *ring = rxr->rx_ring_struct;
- unsigned int idx = i + 1;
- unsigned int map_idx = idx + bp->rx_cp_nr_rings;
+ unsigned int map_idx = i + bp->rx_cp_nr_rings;
bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id;
/* Rx cmpl */
- rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
- HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
- idx, HWRM_NA_SIGNATURE,
- HWRM_NA_SIGNATURE);
+ rc = bnxt_hwrm_ring_alloc
+ (bp,
+ cp_ring,
+ HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
+ i,
+ HWRM_NA_SIGNATURE,
+ HWRM_NA_SIGNATURE);
if (rc)
goto err_out;
- cpr->cp_doorbell = (char *)bp->doorbell_base + idx * 0x80;
+ cpr->cp_doorbell = (char *)bp->doorbell_base + i * 0x80;
bp->grp_info[i].cp_fw_ring_id = cp_ring->fw_ring_id;
B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
+ if (!i) {
+ /*
+ * In order to save completion resource, use the first
+ * completion ring from PF or VF as the default
+ * completion ring for async event & HWRM
+ * forward response handling.
+ */
+ bp->def_cp_ring = cpr;
+ rc = bnxt_hwrm_set_async_event_cr(bp);
+ if (rc)
+ goto err_out;
+ }
+
/* Rx ring */
- rc = bnxt_hwrm_ring_alloc(bp, ring,
- HWRM_RING_ALLOC_INPUT_RING_TYPE_RX,
- idx, cpr->hw_stats_ctx_id,
- cp_ring->fw_ring_id);
+ rc = bnxt_hwrm_ring_alloc(bp,
+ ring,
+ HWRM_RING_ALLOC_INPUT_RING_TYPE_RX,
+ i,
+ cpr->hw_stats_ctx_id,
+ cp_ring->fw_ring_id);
if (rc)
goto err_out;
rxr->rx_prod = 0;
- rxr->rx_doorbell = (char *)bp->doorbell_base + idx * 0x80;
+ rxr->rx_doorbell = (char *)bp->doorbell_base + i * 0x80;
bp->grp_info[i].rx_fw_ring_id = ring->fw_ring_id;
B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
@@ -330,7 +347,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
}
B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
- rxq->index = idx;
+ rxq->index = i;
}
for (i = 0; i < bp->tx_cp_nr_rings; i++) {
@@ -339,7 +356,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
struct bnxt_tx_ring_info *txr = txq->tx_ring;
struct bnxt_ring *ring = txr->tx_ring_struct;
- unsigned int idx = i + 1 + bp->rx_cp_nr_rings;
+ unsigned int idx = i + bp->rx_cp_nr_rings;
/* Tx cmpl */
rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 6eeb93b7b..a8b5d6683 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -534,6 +534,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t prod = rxr->rx_prod;
uint16_t ag_prod = rxr->ag_prod;
int rc = 0;
+ bool evt = false;
/* If Rx Q was stopped return */
if (rxq->rx_deferred_start)
@@ -558,14 +559,19 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
nb_rx_pkts++;
if (rc == -EBUSY) /* partial completion */
break;
+ } else {
+ evt =
+ bnxt_event_hwrm_resp_handler(rxq->bp,
+ (struct cmpl_base *)rxcmp);
}
+
raw_cons = NEXT_RAW_CMP(raw_cons);
- if (nb_rx_pkts == nb_pkts)
+ if (nb_rx_pkts == nb_pkts || evt)
break;
}
cpr->cp_raw_cons = raw_cons;
- if (prod == rxr->rx_prod && ag_prod == rxr->ag_prod) {
+ if ((prod == rxr->rx_prod && ag_prod == rxr->ag_prod) && !evt) {
/*
* For PMD, there is no need to keep on pushing to REARM
* the doorbell if there are no new completions
@@ -574,9 +580,12 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
}
B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
- B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
+ if (prod != rxr->rx_prod)
+ B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
+
/* Ring the AGG ring DB */
- B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
+ if (ag_prod != rxr->ag_prod)
+ B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
/* Attempt to alloc Rx buf in case of a previous allocation failure. */
if (rc == -ENOMEM) {
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 5/7] net/bnxt: fix VF resource allocation
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
` (3 preceding siblings ...)
2018-05-18 14:39 ` [dpdk-dev] [PATCH 4/7] net/bnxt: fix to use 1st completion ring for forwarding and async events Ajit Khaparde
@ 2018-05-18 14:39 ` Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
` (2 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:39 UTC (permalink / raw)
To: dev; +Cc: Jay Ding, Scott Branden
If the resource requirement of a VF is more than what is allotted
to it by the FW, a VF can request to reallocate some of the resources.
This is possible only when the NIC is running the Resource Manager aware
CHiMP FW.
If necessary, calculate Tx and Rx ring count using the new RM API.
Otherwise use the Tx and Rx ring count as-is. Update the cp ring count
based on the Tx and Rx ring count.
Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 25 +++++++++++---
drivers/net/bnxt/bnxt_hwrm.c | 75 +++++++++++++++++++++++++++++++++++++++++-
drivers/net/bnxt/bnxt_hwrm.h | 2 ++
drivers/net/bnxt/bnxt_ring.h | 1 +
5 files changed, 98 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index a93fbf533..afaaf8c41 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -220,6 +220,7 @@ struct bnxt {
#define BNXT_FLAG_UPDATE_HASH (1 << 5)
#define BNXT_FLAG_PTP_SUPPORTED (1 << 6)
#define BNXT_FLAG_MULTI_HOST (1 << 7)
+#define BNXT_FLAG_NEW_RM (1 << 30)
#define BNXT_FLAG_INIT_DONE (1 << 31)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 0aba9a3fc..62e02aa8a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -406,9 +406,7 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* PF/VF specifics */
if (BNXT_PF(bp))
dev_info->max_vfs = bp->pdev->max_vfs;
- max_rx_rings = RTE_MIN(bp->max_vnics, RTE_MIN(bp->max_l2_ctx,
- RTE_MIN(bp->max_rsscos_ctx,
- bp->max_stat_ctx)));
+ max_rx_rings = RTE_MIN(bp->max_vnics, bp->max_stat_ctx);
/* For the sake of symmetry, max_rx_queues = max_tx_queues */
dev_info->max_rx_queues = max_rx_rings;
dev_info->max_tx_queues = max_rx_rings;
@@ -494,6 +492,25 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
bp->rx_queues = (void *)eth_dev->data->rx_queues;
bp->tx_queues = (void *)eth_dev->data->tx_queues;
+ bp->tx_nr_rings = eth_dev->data->nb_tx_queues;
+ bp->rx_nr_rings = eth_dev->data->nb_rx_queues;
+
+ if (BNXT_VF(bp) && (bp->flags & BNXT_FLAG_NEW_RM)) {
+ int rc;
+
+ rc = bnxt_hwrm_func_reserve_vf_resc(bp);
+ if (rc) {
+ PMD_DRV_LOG(ERR, "HWRM resource alloc fail:%x\n", rc);
+ return -ENOSPC;
+ }
+
+ /* legacy driver needs to get updated values */
+ rc = bnxt_hwrm_func_qcaps(bp);
+ if (rc) {
+ PMD_DRV_LOG(ERR, "hwrm func qcaps fail:%d\n", rc);
+ return -ENOSPC;
+ }
+ }
/* Inherit new configurations */
if (eth_dev->data->nb_rx_queues > bp->max_rx_rings ||
@@ -516,8 +533,6 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
return -ENOSPC;
}
- bp->rx_nr_rings = eth_dev->data->nb_rx_queues;
- bp->tx_nr_rings = eth_dev->data->nb_tx_queues;
bp->rx_cp_nr_rings = bp->rx_nr_rings;
bp->tx_cp_nr_rings = bp->tx_nr_rings;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index bf847a828..ba4ef1676 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -27,6 +27,7 @@
#include <rte_io.h>
#define HWRM_CMD_TIMEOUT 10000
+#define HWRM_SPEC_CODE_1_8_3 0x10803
#define HWRM_VERSION_1_9_1 0x10901
struct bnxt_plcmodes_cfg {
@@ -483,7 +484,7 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
return 0;
}
-int bnxt_hwrm_func_qcaps(struct bnxt *bp)
+static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
{
int rc = 0;
struct hwrm_func_qcaps_input req = {.req_type = 0 };
@@ -573,6 +574,20 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
return rc;
}
+int bnxt_hwrm_func_qcaps(struct bnxt *bp)
+{
+ int rc;
+
+ rc = __bnxt_hwrm_func_qcaps(bp);
+ if (!rc && bp->hwrm_spec_code >= HWRM_SPEC_CODE_1_8_3) {
+ rc = bnxt_hwrm_func_resc_qcaps(bp);
+ if (!rc)
+ bp->flags |= BNXT_FLAG_NEW_RM;
+ }
+
+ return rc;
+}
+
int bnxt_hwrm_func_reset(struct bnxt *bp)
{
int rc = 0;
@@ -642,6 +657,64 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
return rc;
}
+int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp)
+{
+ int rc;
+ struct hwrm_func_vf_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+ struct hwrm_func_vf_cfg_input req = {0};
+
+ HWRM_PREP(req, FUNC_VF_CFG);
+
+ req.enables = rte_cpu_to_le_32
+ (HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_STAT_CTXS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_CMPL_RINGS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS);
+
+ req.num_tx_rings = rte_cpu_to_le_16(bp->tx_nr_rings);
+ req.num_rx_rings = rte_cpu_to_le_16(bp->rx_nr_rings *
+ AGG_RING_MULTIPLIER);
+ req.num_stat_ctxs = rte_cpu_to_le_16(bp->rx_nr_rings + bp->tx_nr_rings);
+ req.num_cmpl_rings = rte_cpu_to_le_16(bp->rx_nr_rings +
+ bp->tx_nr_rings);
+ req.num_hw_ring_grps = rte_cpu_to_le_16(bp->rx_nr_rings);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
+ return rc;
+}
+
+int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
+{
+ int rc;
+ struct hwrm_func_resource_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
+ struct hwrm_func_resource_qcaps_input req = {0};
+
+ HWRM_PREP(req, FUNC_RESOURCE_QCAPS);
+ req.fid = rte_cpu_to_le_16(0xffff);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
+
+ HWRM_CHECK_RESULT();
+
+ if (BNXT_VF(bp)) {
+ bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
+ bp->max_cp_rings = rte_le_to_cpu_16(resp->max_cmpl_rings);
+ bp->max_tx_rings = rte_le_to_cpu_16(resp->max_tx_rings);
+ bp->max_rx_rings = rte_le_to_cpu_16(resp->max_rx_rings);
+ bp->max_ring_grps = rte_le_to_cpu_32(resp->max_hw_ring_grps);
+ bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
+ bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
+ bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
+ }
+
+ HWRM_UNLOCK();
+ return rc;
+}
+
int bnxt_hwrm_ver_get(struct bnxt *bp)
{
int rc = 0;
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 4813c7fb6..60a4ab16a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -111,6 +111,8 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp);
int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link);
int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up);
int bnxt_hwrm_func_qcfg(struct bnxt *bp);
+int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp);
+int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp);
int bnxt_hwrm_allocate_pf_only(struct bnxt *bp);
int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs);
int bnxt_hwrm_func_vf_mac(struct bnxt *bp, uint16_t vf,
diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index 6c86259e8..65bf3e2f5 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -28,6 +28,7 @@
#define BNXT_TPA_MAX 64
#define AGG_RING_SIZE_FACTOR 2
+#define AGG_RING_MULTIPLIER 2
/* These assume 4k pages */
#define MAX_RX_DESC_CNT (8 * 1024)
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
` (4 preceding siblings ...)
2018-05-18 14:39 ` [dpdk-dev] [PATCH 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
@ 2018-05-18 14:40 ` Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-18 17:01 ` [dpdk-dev] [PATCH 0/7] bnxt patchset Ferruh Yigit
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:40 UTC (permalink / raw)
To: dev
Query of port stats is permitted for VF interfaces as well.
Fix the code to allow VFs to query port stats.
Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_hwrm.c | 3 ---
drivers/net/bnxt/bnxt_stats.c | 5 -----
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 62e02aa8a..6e56bfd36 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3160,7 +3160,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- if (BNXT_PF(bp) && pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
+ if (pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
"bnxt_%04x:%02x:%02x:%02x-%s", pci_dev->addr.domain,
pci_dev->addr.bus, pci_dev->addr.devid,
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ba4ef1676..d6fdc1b88 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3131,9 +3131,6 @@ int bnxt_hwrm_port_qstats(struct bnxt *bp)
struct bnxt_pf_info *pf = &bp->pf;
int rc;
- if (!(bp->flags & BNXT_FLAG_PORT_STATS))
- return 0;
-
HWRM_PREP(req, PORT_QSTATS);
req.port_id = rte_cpu_to_le_16(pf->port_id);
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 0797896a6..bbd4e78b7 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -266,11 +266,6 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
unsigned int count, i;
uint64_t tx_drop_pkts;
- if (!(bp->flags & BNXT_FLAG_PORT_STATS)) {
- PMD_DRV_LOG(ERR, "xstats not supported for VF\n");
- return 0;
- }
-
bnxt_hwrm_port_qstats(bp);
bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH 7/7] net/bnxt: fix Rx checksum flags
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
` (5 preceding siblings ...)
2018-05-18 14:40 ` [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
@ 2018-05-18 14:40 ` Ajit Khaparde
2018-05-18 17:01 ` [dpdk-dev] [PATCH 0/7] bnxt patchset Ferruh Yigit
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-18 14:40 UTC (permalink / raw)
To: dev; +Cc: stable
For frames where the hardware is not able to calculate checksum
we are indicating such frames to be bad. And that is incorrect.
Indicate PKT_RX_IP_CKSUM_UNKNOWN or PKT_RX_L4_CKSUM_UNKNOWN
for such frames.
Fixes: 7ec39d8c524b ("net/bnxt: update status of Rx IP/L4 CKSUM")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 4 ++++
drivers/net/bnxt/bnxt_rxr.h | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index a8b5d6683..9d8842926 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -464,11 +464,15 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
+ else if (likely(RX_CMP_IP_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
if (likely(RX_CMP_L4_CS_OK(rxcmp1)))
mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+ else if (likely(RX_CMP_L4_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD;
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index e8c47ca56..5b28f0321 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -36,6 +36,9 @@
(((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS) && \
!((rxcmp1)->errors_v2 & RX_CMP_L4_CS_ERR_BITS))
+#define RX_CMP_L4_CS_UNKNOWN(rxcmp1) \
+ !((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS)
+
#define RX_CMP_IP_CS_ERR_BITS \
rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_IP_CS_ERROR | \
RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR)
@@ -48,6 +51,9 @@
(((rxcmp1)->flags2 & RX_CMP_IP_CS_BITS) && \
!((rxcmp1)->errors_v2 & RX_CMP_IP_CS_ERR_BITS))
+#define RX_CMP_IP_CS_UNKNOWN(rxcmp1) \
+ !((rxcmp1)->flags2 & RX_CMP_IP_CS_BITS)
+
enum pkt_hash_types {
PKT_HASH_TYPE_NONE, /* Undefined type */
PKT_HASH_TYPE_L2, /* Input: src_MAC, dest_MAC */
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [dpdk-dev] [PATCH 0/7] bnxt patchset
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
` (6 preceding siblings ...)
2018-05-18 14:40 ` [dpdk-dev] [PATCH 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
@ 2018-05-18 17:01 ` Ferruh Yigit
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
7 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2018-05-18 17:01 UTC (permalink / raw)
To: Ajit Khaparde, dev
On 5/18/2018 3:39 PM, Ajit Khaparde wrote:
> Patchset against dpdk-next.
> Contains fixes mostly. Please apply.
>
> Ajit Khaparde (7):
> net/bnxt: add fallthrough comments for cascading switch cases
> net/bnxt: fix to initialize tx and rx burst for secondary processes
> net/bnxt: fix rss hash configuration
> net/bnxt: fix to use 1st completion ring for forwarding and async
> events
> net/bnxt: fix VF resource allocation
> net/bnxt: fix xstats support for VF
> net/bnxt: fix Rx checksum flags
Hi Ajit,
Can you please send a new version with ./devtools/check-git-log.sh checks fixed:
$ ./devtools/check-git-log.sh -7
Wrong headline lowercase:
net/bnxt: fix to initialize tx and rx burst for secondary processes
net/bnxt: fix rss hash configuration
Headline too long:
net/bnxt: add fallthrough comments for cascading switch cases
net/bnxt: fix to initialize tx and rx burst for secondary processes
net/bnxt: fix to use 1st completion ring for forwarding and async events
Missing 'Fixes' tag:
net/bnxt: fix to initialize tx and rx burst for secondary processes
Is it candidate for Cc: stable@dpdk.org backport?
net/bnxt: fix rss hash configuration
net/bnxt: fix to use 1st completion ring for forwarding and async events
net/bnxt: fix VF resource allocation
net/bnxt: fix xstats support for VF
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 0/7] bnxt patchset
2018-05-18 17:01 ` [dpdk-dev] [PATCH 0/7] bnxt patchset Ferruh Yigit
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment Ajit Khaparde
` (7 more replies)
0 siblings, 8 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev
Patchset contains fixes mostly; against dpdk-next-net.
Please apply.
v1->v2: updated commit log, messages as requested.
Ajit Khaparde (7):
net/bnxt: add fallthrough comment
net/bnxt: fix Tx and Rx burst for secondary processes
net/bnxt: fix RSS hash configuration
net/bnxt: fix to use 1st cmpl ring for fwd and async event
net/bnxt: fix VF resource allocation
net/bnxt: fix xstats support for VF
net/bnxt: fix Rx checksum flags
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_cpr.c | 85 ++++++++++------------------------
drivers/net/bnxt/bnxt_cpr.h | 5 +-
drivers/net/bnxt/bnxt_ethdev.c | 54 +++++++++++-----------
drivers/net/bnxt/bnxt_hwrm.c | 102 +++++++++++++++++++++++++++++++++++++----
drivers/net/bnxt/bnxt_hwrm.h | 3 ++
drivers/net/bnxt/bnxt_irq.c | 28 ++---------
drivers/net/bnxt/bnxt_ring.c | 45 ++++++++++++------
drivers/net/bnxt/bnxt_ring.h | 1 +
drivers/net/bnxt/bnxt_rxq.c | 1 +
drivers/net/bnxt/bnxt_rxr.c | 21 +++++++--
drivers/net/bnxt/bnxt_rxr.h | 6 +++
drivers/net/bnxt/bnxt_stats.c | 5 --
drivers/net/bnxt/bnxt_vnic.c | 2 +
drivers/net/bnxt/bnxt_vnic.h | 1 +
15 files changed, 215 insertions(+), 145 deletions(-)
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix Tx and Rx burst for secondary processes Ajit Khaparde
` (6 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev
The FALLTHROUGH comment for cascading switch cases was missing in
a few places. This patch adds that.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v1->v2: fix long headline
---
drivers/net/bnxt/bnxt_cpr.c | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 3 +++
drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
drivers/net/bnxt/bnxt_rxq.c | 1 +
4 files changed, 9 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 8dde8cc0f..7b4f9a14b 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -27,6 +27,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
+ /* FALLTHROUGH */
bnxt_link_update_op(bp->eth_dev, 1);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9edcc7b7d..f7f23f75a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2432,6 +2432,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev,
switch (filter_op) {
case RTE_ETH_FILTER_ADD:
case RTE_ETH_FILTER_DELETE:
+ /* FALLTHROUGH */
filter = bnxt_get_unused_filter(bp);
if (filter == NULL) {
PMD_DRV_LOG(ERR,
@@ -2897,6 +2898,7 @@ static bool bnxt_dir_type_is_ape_bin_format(uint16_t dir_type)
case BNX_DIR_TYPE_KONG_PATCH:
case BNX_DIR_TYPE_BONO_FW:
case BNX_DIR_TYPE_BONO_PATCH:
+ /* FALLTHROUGH */
return true;
}
@@ -2915,6 +2917,7 @@ static bool bnxt_dir_type_is_other_exec_format(uint16_t dir_type)
case BNX_DIR_TYPE_ISCSI_BOOT:
case BNX_DIR_TYPE_ISCSI_BOOT_IPV6:
case BNX_DIR_TYPE_ISCSI_BOOT_IPV4N6:
+ /* FALLTHROUGH */
return true;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d975cb87d..28aa7476d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2002,6 +2002,7 @@ static uint16_t bnxt_parse_eth_link_duplex(uint32_t conf_link_speed)
switch (conf_link_speed) {
case ETH_LINK_SPEED_10M_HD:
case ETH_LINK_SPEED_100M_HD:
+ /* FALLTHROUGH */
return HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF;
}
return hw_link_duplex;
@@ -2022,6 +2023,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed)
switch (conf_link_speed & ~ETH_LINK_SPEED_FIXED) {
case ETH_LINK_SPEED_100M:
case ETH_LINK_SPEED_100M_HD:
+ /* FALLTHROUGH */
eth_link_speed =
HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB;
break;
@@ -2186,6 +2188,7 @@ static uint16_t bnxt_parse_hw_link_duplex(uint16_t hw_link_duplex)
switch (hw_link_duplex) {
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH:
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL:
+ /* FALLTHROUGH */
eth_link_duplex = ETH_LINK_FULL_DUPLEX;
break;
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF:
@@ -2315,6 +2318,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp)
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0:
+ /* FALLTHROUGH */
bp->port_partition_type = resp->port_partition_type;
break;
default:
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 866fb56b1..c55ddec4b 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -77,6 +77,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
switch (dev_conf->rxmode.mq_mode) {
case ETH_MQ_RX_VMDQ_RSS:
case ETH_MQ_RX_VMDQ_ONLY:
+ /* FALLTHROUGH */
/* ETH_8/64_POOLs */
pools = conf->nb_queue_pools;
/* For each pool, allocate MACVLAN CFA rule & VNIC */
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix Tx and Rx burst for secondary processes
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: fix RSS hash configuration Ajit Khaparde
` (5 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev; +Cc: stable
We were initializing Tx and Rx burst functions only for primary
processes. Fixing it in this patch.
Fixes: 88920136688c ("net/bnxt: support xstats get by id")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v1->v2: shorten and update commit log and message.
---
drivers/net/bnxt/bnxt_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f7f23f75a..af141d453 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3151,10 +3151,10 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
}
skip_init:
eth_dev->dev_ops = &bnxt_dev_ops;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return 0;
eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
if (BNXT_PF(bp) && pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 3/7] net/bnxt: fix RSS hash configuration
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix Tx and Rx burst for secondary processes Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: fix to use 1st cmpl ring for fwd and async event Ajit Khaparde
` (4 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev; +Cc: stable
While configuring RSS, the FW needs to know the rss_hash_mode that needs
to be initialized.
Set hash mode to HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT
to allow the FW to use the global mode already configured in the device.
Fixes: bcd4bcc4426f ("net/bnxt: configure RSS")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v1->v2: update commit log and message
---
drivers/net/bnxt/bnxt_hwrm.c | 1 +
drivers/net/bnxt/bnxt_vnic.c | 2 ++
drivers/net/bnxt/bnxt_vnic.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 28aa7476d..b285761eb 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1462,6 +1462,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
HWRM_PREP(req, VNIC_RSS_CFG);
req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
+ req.hash_mode_flags = vnic->hash_mode;
req.ring_grp_tbl_addr =
rte_cpu_to_le_64(vnic->rss_table_dma_addr);
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 733a5a92c..19d06af55 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -49,6 +49,8 @@ void bnxt_init_vnics(struct bnxt *bp)
vnic->rss_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
+ vnic->hash_mode =
+ HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT;
for (j = 0; j < MAX_QUEUES_PER_VNIC; j++)
vnic->fw_grp_ids[j] = (uint16_t)HWRM_NA_SIGNATURE;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index c60bb543c..c521d7e5a 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -25,6 +25,7 @@ struct bnxt_vnic_info {
uint16_t dflt_ring_grp;
uint16_t mru;
uint16_t hash_type;
+ uint8_t hash_mode;
rte_iova_t rss_table_dma_addr;
uint16_t *rss_table;
rte_iova_t rss_hash_key_dma_addr;
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 4/7] net/bnxt: fix to use 1st cmpl ring for fwd and async event
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
` (2 preceding siblings ...)
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: fix RSS hash configuration Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
` (3 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev; +Cc: Qingmin Liu, Somnath Kotur
In order to save completion resource, use the first completion ring from
PF or VF as the default completion ring for async event & HWRM forward
response handling. Add bnxt_hwrm_set_async_event_cr() to set
async_event_cr for either PF or VF.
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Qingmin Liu <qingmin.liu@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v1->v2: shorten headline
---
drivers/net/bnxt/bnxt_cpr.c | 84 ++++++++++++------------------------------
drivers/net/bnxt/bnxt_cpr.h | 5 +--
drivers/net/bnxt/bnxt_ethdev.c | 20 +---------
drivers/net/bnxt/bnxt_hwrm.c | 19 ++++++++--
drivers/net/bnxt/bnxt_hwrm.h | 1 +
drivers/net/bnxt/bnxt_irq.c | 28 +++-----------
drivers/net/bnxt/bnxt_ring.c | 45 +++++++++++++++-------
drivers/net/bnxt/bnxt_rxr.c | 17 +++++++--
8 files changed, 91 insertions(+), 128 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 7b4f9a14b..ff20b6fdf 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -132,69 +132,31 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
return;
}
-/* For the default completion ring only */
-int bnxt_alloc_def_cp_ring(struct bnxt *bp)
+int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
{
- struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
- struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
- int rc;
-
- rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
- HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
- 0, HWRM_NA_SIGNATURE,
- HWRM_NA_SIGNATURE);
- if (rc)
- goto err_out;
- cpr->cp_doorbell = (char *)bp->doorbell_base;
- B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
- if (BNXT_PF(bp))
- rc = bnxt_hwrm_func_cfg_def_cp(bp);
- else
- rc = bnxt_hwrm_vf_func_cfg_def_cp(bp);
-
-err_out:
- return rc;
-}
+ bool evt = 0;
-void bnxt_free_def_cp_ring(struct bnxt *bp)
-{
- struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
-
- if (cpr == NULL)
- return;
+ if (bp == NULL || cmp == NULL) {
+ PMD_DRV_LOG(ERR, "invalid NULL argument\n");
+ return evt;
+ }
- bnxt_free_ring(cpr->cp_ring_struct);
- cpr->cp_ring_struct = NULL;
- rte_free(cpr->cp_ring_struct);
- rte_free(cpr);
- bp->def_cp_ring = NULL;
-}
+ switch (CMP_TYPE(cmp)) {
+ case CMPL_BASE_TYPE_HWRM_ASYNC_EVENT:
+ /* Handle any async event */
+ bnxt_handle_async_event(bp, cmp);
+ evt = 1;
+ break;
+ case CMPL_BASE_TYPE_HWRM_FWD_RESP:
+ /* Handle HWRM forwarded responses */
+ bnxt_handle_fwd_req(bp, cmp);
+ evt = 1;
+ break;
+ default:
+ /* Ignore any other events */
+ PMD_DRV_LOG(INFO, "Ignoring %02x completion\n", CMP_TYPE(cmp));
+ break;
+ }
-/* For the default completion ring only */
-int bnxt_init_def_ring_struct(struct bnxt *bp, unsigned int socket_id)
-{
- struct bnxt_cp_ring_info *cpr;
- struct bnxt_ring *ring;
-
- cpr = rte_zmalloc_socket("cpr",
- sizeof(struct bnxt_cp_ring_info),
- RTE_CACHE_LINE_SIZE, socket_id);
- if (cpr == NULL)
- return -ENOMEM;
- bp->def_cp_ring = cpr;
-
- ring = rte_zmalloc_socket("bnxt_cp_ring_struct",
- sizeof(struct bnxt_ring),
- RTE_CACHE_LINE_SIZE, socket_id);
- if (ring == NULL)
- return -ENOMEM;
- cpr->cp_ring_struct = ring;
- ring->bd = (void *)cpr->cp_desc_ring;
- ring->bd_dma = cpr->cp_desc_mapping;
- ring->ring_size = rte_align32pow2(DEFAULT_CP_RING_SIZE);
- ring->ring_mask = ring->ring_size - 1;
- ring->vmem_size = 0;
- ring->vmem = NULL;
-
- return 0;
+ return evt;
}
diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index 6091404f1..6c1e6d2b0 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -72,12 +72,9 @@ struct bnxt_cp_ring_info {
#define RX_CMP_L2_ERRORS \
(RX_PKT_CMPL_ERRORS_BUFFER_ERROR_MASK | RX_PKT_CMPL_ERRORS_CRC_ERROR)
-
struct bnxt;
-int bnxt_alloc_def_cp_ring(struct bnxt *bp);
-void bnxt_free_def_cp_ring(struct bnxt *bp);
-int bnxt_init_def_ring_struct(struct bnxt *bp, unsigned int socket_id);
void bnxt_handle_async_event(struct bnxt *bp, struct cmpl_base *cmp);
void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmp);
+int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp);
#endif
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index af141d453..0aba9a3fc 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -168,23 +168,12 @@ static void bnxt_free_mem(struct bnxt *bp)
bnxt_free_stats(bp);
bnxt_free_tx_rings(bp);
bnxt_free_rx_rings(bp);
- bnxt_free_def_cp_ring(bp);
}
static int bnxt_alloc_mem(struct bnxt *bp)
{
int rc;
- /* Default completion ring */
- rc = bnxt_init_def_ring_struct(bp, SOCKET_ID_ANY);
- if (rc)
- goto alloc_mem_err;
-
- rc = bnxt_alloc_rings(bp, 0, NULL, NULL,
- bp->def_cp_ring, "def_cp");
- if (rc)
- goto alloc_mem_err;
-
rc = bnxt_alloc_vnic_mem(bp);
if (rc)
goto alloc_mem_err;
@@ -509,11 +498,11 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
/* Inherit new configurations */
if (eth_dev->data->nb_rx_queues > bp->max_rx_rings ||
eth_dev->data->nb_tx_queues > bp->max_tx_rings ||
- eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues + 1 >
+ eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues >
bp->max_cp_rings ||
eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues >
bp->max_stat_ctx ||
- (uint32_t)(eth_dev->data->nb_rx_queues + 1) > bp->max_ring_grps) {
+ (uint32_t)(eth_dev->data->nb_rx_queues) > bp->max_ring_grps) {
PMD_DRV_LOG(ERR,
"Insufficient resources to support requested config\n");
PMD_DRV_LOG(ERR,
@@ -3383,10 +3372,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
if (rc)
goto error_free_int;
- rc = bnxt_alloc_def_cp_ring(bp);
- if (rc)
- goto error_free_int;
-
bnxt_enable_int(bp);
bnxt_init_nic(bp);
@@ -3394,7 +3379,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
error_free_int:
bnxt_disable_int(bp);
- bnxt_free_def_cp_ring(bp);
bnxt_hwrm_func_buf_unrgtr(bp);
bnxt_free_int(bp);
bnxt_free_mem(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b285761eb..bf847a828 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1766,7 +1766,7 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
struct bnxt_tx_ring_info *txr = txq->tx_ring;
struct bnxt_ring *ring = txr->tx_ring_struct;
struct bnxt_cp_ring_info *cpr = txq->cp_ring;
- unsigned int idx = bp->rx_cp_nr_rings + i + 1;
+ unsigned int idx = bp->rx_cp_nr_rings + i;
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
bnxt_hwrm_ring_free(bp, ring,
@@ -1792,13 +1792,12 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
struct bnxt_ring *ring = rxr->rx_ring_struct;
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
- unsigned int idx = i + 1;
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
bnxt_hwrm_ring_free(bp, ring,
HWRM_RING_FREE_INPUT_RING_TYPE_RX);
ring->fw_ring_id = INVALID_HW_RING_ID;
- bp->grp_info[idx].rx_fw_ring_id = INVALID_HW_RING_ID;
+ bp->grp_info[i].rx_fw_ring_id = INVALID_HW_RING_ID;
memset(rxr->rx_desc_ring, 0,
rxr->rx_ring_struct->ring_size *
sizeof(*rxr->rx_desc_ring));
@@ -1819,7 +1818,7 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
bp->grp_info[i].ag_fw_ring_id = INVALID_HW_RING_ID;
}
if (cpr->cp_ring_struct->fw_ring_id != INVALID_HW_RING_ID) {
- bnxt_free_cp_ring(bp, cpr, idx);
+ bnxt_free_cp_ring(bp, cpr, i);
bp->grp_info[i].cp_fw_ring_id = INVALID_HW_RING_ID;
cpr->cp_ring_struct->fw_ring_id = INVALID_HW_RING_ID;
}
@@ -2933,6 +2932,18 @@ int bnxt_hwrm_set_vf_vlan(struct bnxt *bp, int vf)
return rc;
}
+int bnxt_hwrm_set_async_event_cr(struct bnxt *bp)
+{
+ int rc;
+
+ if (BNXT_PF(bp))
+ rc = bnxt_hwrm_func_cfg_def_cp(bp);
+ else
+ rc = bnxt_hwrm_vf_func_cfg_def_cp(bp);
+
+ return rc;
+}
+
int bnxt_hwrm_reject_fwd_resp(struct bnxt *bp, uint16_t target_id,
void *encaped, size_t ec_size)
{
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 7c161eea0..4813c7fb6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -63,6 +63,7 @@ int bnxt_hwrm_vf_func_cfg_def_cp(struct bnxt *bp);
int bnxt_hwrm_queue_qportcfg(struct bnxt *bp);
+int bnxt_hwrm_set_async_event_cr(struct bnxt *bp);
int bnxt_hwrm_ring_alloc(struct bnxt *bp,
struct bnxt_ring *ring,
uint32_t ring_type, uint32_t map_index,
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index fd05f66af..7ef7023eb 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -40,30 +40,10 @@ static void bnxt_int_handler(void *param)
if (!CMP_VALID(cmp, raw_cons, cpr->cp_ring_struct))
break;
- switch (CMP_TYPE(cmp)) {
- case CMPL_BASE_TYPE_HWRM_ASYNC_EVENT:
- /* Handle any async event */
- bnxt_handle_async_event(bp, cmp);
- break;
- case CMPL_BASE_TYPE_HWRM_FWD_REQ:
- /* Handle HWRM forwarded responses */
- bnxt_handle_fwd_req(bp, cmp);
- break;
- default:
- /* Ignore any other events */
- if (cmp->type & rte_cpu_to_le_16(0x01)) {
- if (!CMP_VALID(cmp, raw_cons,
- cpr->cp_ring_struct))
- goto no_more;
- }
- PMD_DRV_LOG(INFO,
- "Ignoring %02x completion\n", CMP_TYPE(cmp));
- break;
- }
+ bnxt_event_hwrm_resp_handler(bp, cmp);
raw_cons = NEXT_RAW_CMP(raw_cons);
-
};
-no_more:
+
cpr->cp_raw_cons = raw_cons;
B_CP_DB_REARM(cpr, cpr->cp_raw_cons);
}
@@ -99,7 +79,9 @@ void bnxt_enable_int(struct bnxt *bp)
{
struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
- B_CP_DB_ARM(cpr);
+ /* Only the default completion ring */
+ if (cpr != NULL && cpr->cp_doorbell != NULL)
+ B_CP_DB_ARM(cpr);
}
int bnxt_setup_int(struct bnxt *bp)
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 1e748b949..bb9f6d1c0 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -274,31 +274,48 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
struct bnxt_ring *ring = rxr->rx_ring_struct;
- unsigned int idx = i + 1;
- unsigned int map_idx = idx + bp->rx_cp_nr_rings;
+ unsigned int map_idx = i + bp->rx_cp_nr_rings;
bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id;
/* Rx cmpl */
- rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
- HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
- idx, HWRM_NA_SIGNATURE,
- HWRM_NA_SIGNATURE);
+ rc = bnxt_hwrm_ring_alloc
+ (bp,
+ cp_ring,
+ HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
+ i,
+ HWRM_NA_SIGNATURE,
+ HWRM_NA_SIGNATURE);
if (rc)
goto err_out;
- cpr->cp_doorbell = (char *)bp->doorbell_base + idx * 0x80;
+ cpr->cp_doorbell = (char *)bp->doorbell_base + i * 0x80;
bp->grp_info[i].cp_fw_ring_id = cp_ring->fw_ring_id;
B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
+ if (!i) {
+ /*
+ * In order to save completion resource, use the first
+ * completion ring from PF or VF as the default
+ * completion ring for async event & HWRM
+ * forward response handling.
+ */
+ bp->def_cp_ring = cpr;
+ rc = bnxt_hwrm_set_async_event_cr(bp);
+ if (rc)
+ goto err_out;
+ }
+
/* Rx ring */
- rc = bnxt_hwrm_ring_alloc(bp, ring,
- HWRM_RING_ALLOC_INPUT_RING_TYPE_RX,
- idx, cpr->hw_stats_ctx_id,
- cp_ring->fw_ring_id);
+ rc = bnxt_hwrm_ring_alloc(bp,
+ ring,
+ HWRM_RING_ALLOC_INPUT_RING_TYPE_RX,
+ i,
+ cpr->hw_stats_ctx_id,
+ cp_ring->fw_ring_id);
if (rc)
goto err_out;
rxr->rx_prod = 0;
- rxr->rx_doorbell = (char *)bp->doorbell_base + idx * 0x80;
+ rxr->rx_doorbell = (char *)bp->doorbell_base + i * 0x80;
bp->grp_info[i].rx_fw_ring_id = ring->fw_ring_id;
B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
@@ -330,7 +347,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
}
B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
- rxq->index = idx;
+ rxq->index = i;
}
for (i = 0; i < bp->tx_cp_nr_rings; i++) {
@@ -339,7 +356,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
struct bnxt_tx_ring_info *txr = txq->tx_ring;
struct bnxt_ring *ring = txr->tx_ring_struct;
- unsigned int idx = i + 1 + bp->rx_cp_nr_rings;
+ unsigned int idx = i + bp->rx_cp_nr_rings;
/* Tx cmpl */
rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 6eeb93b7b..a8b5d6683 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -534,6 +534,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t prod = rxr->rx_prod;
uint16_t ag_prod = rxr->ag_prod;
int rc = 0;
+ bool evt = false;
/* If Rx Q was stopped return */
if (rxq->rx_deferred_start)
@@ -558,14 +559,19 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
nb_rx_pkts++;
if (rc == -EBUSY) /* partial completion */
break;
+ } else {
+ evt =
+ bnxt_event_hwrm_resp_handler(rxq->bp,
+ (struct cmpl_base *)rxcmp);
}
+
raw_cons = NEXT_RAW_CMP(raw_cons);
- if (nb_rx_pkts == nb_pkts)
+ if (nb_rx_pkts == nb_pkts || evt)
break;
}
cpr->cp_raw_cons = raw_cons;
- if (prod == rxr->rx_prod && ag_prod == rxr->ag_prod) {
+ if ((prod == rxr->rx_prod && ag_prod == rxr->ag_prod) && !evt) {
/*
* For PMD, there is no need to keep on pushing to REARM
* the doorbell if there are no new completions
@@ -574,9 +580,12 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
}
B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
- B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
+ if (prod != rxr->rx_prod)
+ B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
+
/* Ring the AGG ring DB */
- B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
+ if (ag_prod != rxr->ag_prod)
+ B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
/* Attempt to alloc Rx buf in case of a previous allocation failure. */
if (rc == -ENOMEM) {
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix VF resource allocation
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
` (3 preceding siblings ...)
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: fix to use 1st cmpl ring for fwd and async event Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
` (2 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev; +Cc: Jay Ding, Scott Branden
If the resource requirement of a VF is more than what is allotted
to it by the FW, a VF can request to reallocate some of the resources.
This is possible only when the NIC is running the Resource Manager aware
CHiMP FW.
If necessary, calculate Tx and Rx ring count using the new RM API.
Otherwise use the Tx and Rx ring count as-is. Update the cp ring count
based on the Tx and Rx ring count.
Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 25 +++++++++++---
drivers/net/bnxt/bnxt_hwrm.c | 75 +++++++++++++++++++++++++++++++++++++++++-
drivers/net/bnxt/bnxt_hwrm.h | 2 ++
drivers/net/bnxt/bnxt_ring.h | 1 +
5 files changed, 98 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index a93fbf533..afaaf8c41 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -220,6 +220,7 @@ struct bnxt {
#define BNXT_FLAG_UPDATE_HASH (1 << 5)
#define BNXT_FLAG_PTP_SUPPORTED (1 << 6)
#define BNXT_FLAG_MULTI_HOST (1 << 7)
+#define BNXT_FLAG_NEW_RM (1 << 30)
#define BNXT_FLAG_INIT_DONE (1 << 31)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 0aba9a3fc..62e02aa8a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -406,9 +406,7 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* PF/VF specifics */
if (BNXT_PF(bp))
dev_info->max_vfs = bp->pdev->max_vfs;
- max_rx_rings = RTE_MIN(bp->max_vnics, RTE_MIN(bp->max_l2_ctx,
- RTE_MIN(bp->max_rsscos_ctx,
- bp->max_stat_ctx)));
+ max_rx_rings = RTE_MIN(bp->max_vnics, bp->max_stat_ctx);
/* For the sake of symmetry, max_rx_queues = max_tx_queues */
dev_info->max_rx_queues = max_rx_rings;
dev_info->max_tx_queues = max_rx_rings;
@@ -494,6 +492,25 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
bp->rx_queues = (void *)eth_dev->data->rx_queues;
bp->tx_queues = (void *)eth_dev->data->tx_queues;
+ bp->tx_nr_rings = eth_dev->data->nb_tx_queues;
+ bp->rx_nr_rings = eth_dev->data->nb_rx_queues;
+
+ if (BNXT_VF(bp) && (bp->flags & BNXT_FLAG_NEW_RM)) {
+ int rc;
+
+ rc = bnxt_hwrm_func_reserve_vf_resc(bp);
+ if (rc) {
+ PMD_DRV_LOG(ERR, "HWRM resource alloc fail:%x\n", rc);
+ return -ENOSPC;
+ }
+
+ /* legacy driver needs to get updated values */
+ rc = bnxt_hwrm_func_qcaps(bp);
+ if (rc) {
+ PMD_DRV_LOG(ERR, "hwrm func qcaps fail:%d\n", rc);
+ return -ENOSPC;
+ }
+ }
/* Inherit new configurations */
if (eth_dev->data->nb_rx_queues > bp->max_rx_rings ||
@@ -516,8 +533,6 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
return -ENOSPC;
}
- bp->rx_nr_rings = eth_dev->data->nb_rx_queues;
- bp->tx_nr_rings = eth_dev->data->nb_tx_queues;
bp->rx_cp_nr_rings = bp->rx_nr_rings;
bp->tx_cp_nr_rings = bp->tx_nr_rings;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index bf847a828..ba4ef1676 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -27,6 +27,7 @@
#include <rte_io.h>
#define HWRM_CMD_TIMEOUT 10000
+#define HWRM_SPEC_CODE_1_8_3 0x10803
#define HWRM_VERSION_1_9_1 0x10901
struct bnxt_plcmodes_cfg {
@@ -483,7 +484,7 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
return 0;
}
-int bnxt_hwrm_func_qcaps(struct bnxt *bp)
+static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
{
int rc = 0;
struct hwrm_func_qcaps_input req = {.req_type = 0 };
@@ -573,6 +574,20 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
return rc;
}
+int bnxt_hwrm_func_qcaps(struct bnxt *bp)
+{
+ int rc;
+
+ rc = __bnxt_hwrm_func_qcaps(bp);
+ if (!rc && bp->hwrm_spec_code >= HWRM_SPEC_CODE_1_8_3) {
+ rc = bnxt_hwrm_func_resc_qcaps(bp);
+ if (!rc)
+ bp->flags |= BNXT_FLAG_NEW_RM;
+ }
+
+ return rc;
+}
+
int bnxt_hwrm_func_reset(struct bnxt *bp)
{
int rc = 0;
@@ -642,6 +657,64 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
return rc;
}
+int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp)
+{
+ int rc;
+ struct hwrm_func_vf_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+ struct hwrm_func_vf_cfg_input req = {0};
+
+ HWRM_PREP(req, FUNC_VF_CFG);
+
+ req.enables = rte_cpu_to_le_32
+ (HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_STAT_CTXS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_CMPL_RINGS |
+ HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS);
+
+ req.num_tx_rings = rte_cpu_to_le_16(bp->tx_nr_rings);
+ req.num_rx_rings = rte_cpu_to_le_16(bp->rx_nr_rings *
+ AGG_RING_MULTIPLIER);
+ req.num_stat_ctxs = rte_cpu_to_le_16(bp->rx_nr_rings + bp->tx_nr_rings);
+ req.num_cmpl_rings = rte_cpu_to_le_16(bp->rx_nr_rings +
+ bp->tx_nr_rings);
+ req.num_hw_ring_grps = rte_cpu_to_le_16(bp->rx_nr_rings);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
+ return rc;
+}
+
+int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
+{
+ int rc;
+ struct hwrm_func_resource_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
+ struct hwrm_func_resource_qcaps_input req = {0};
+
+ HWRM_PREP(req, FUNC_RESOURCE_QCAPS);
+ req.fid = rte_cpu_to_le_16(0xffff);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
+
+ HWRM_CHECK_RESULT();
+
+ if (BNXT_VF(bp)) {
+ bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
+ bp->max_cp_rings = rte_le_to_cpu_16(resp->max_cmpl_rings);
+ bp->max_tx_rings = rte_le_to_cpu_16(resp->max_tx_rings);
+ bp->max_rx_rings = rte_le_to_cpu_16(resp->max_rx_rings);
+ bp->max_ring_grps = rte_le_to_cpu_32(resp->max_hw_ring_grps);
+ bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
+ bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
+ bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
+ }
+
+ HWRM_UNLOCK();
+ return rc;
+}
+
int bnxt_hwrm_ver_get(struct bnxt *bp)
{
int rc = 0;
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 4813c7fb6..60a4ab16a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -111,6 +111,8 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp);
int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link);
int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up);
int bnxt_hwrm_func_qcfg(struct bnxt *bp);
+int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp);
+int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp);
int bnxt_hwrm_allocate_pf_only(struct bnxt *bp);
int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs);
int bnxt_hwrm_func_vf_mac(struct bnxt *bp, uint16_t vf,
diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index 6c86259e8..65bf3e2f5 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -28,6 +28,7 @@
#define BNXT_TPA_MAX 64
#define AGG_RING_SIZE_FACTOR 2
+#define AGG_RING_MULTIPLIER 2
/* These assume 4k pages */
#define MAX_RX_DESC_CNT (8 * 1024)
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 6/7] net/bnxt: fix xstats support for VF
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
` (4 preceding siblings ...)
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-22 20:42 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ferruh Yigit
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev; +Cc: stable
Query of port stats is permitted for VF interfaces as well.
Fix the code to allow VFs to query port stats.
Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v1->v2: add stable@dpdk.org for backport
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_hwrm.c | 3 ---
drivers/net/bnxt/bnxt_stats.c | 5 -----
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 62e02aa8a..6e56bfd36 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3160,7 +3160,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- if (BNXT_PF(bp) && pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
+ if (pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
"bnxt_%04x:%02x:%02x:%02x-%s", pci_dev->addr.domain,
pci_dev->addr.bus, pci_dev->addr.devid,
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ba4ef1676..d6fdc1b88 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3131,9 +3131,6 @@ int bnxt_hwrm_port_qstats(struct bnxt *bp)
struct bnxt_pf_info *pf = &bp->pf;
int rc;
- if (!(bp->flags & BNXT_FLAG_PORT_STATS))
- return 0;
-
HWRM_PREP(req, PORT_QSTATS);
req.port_id = rte_cpu_to_le_16(pf->port_id);
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 0797896a6..bbd4e78b7 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -266,11 +266,6 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
unsigned int count, i;
uint64_t tx_drop_pkts;
- if (!(bp->flags & BNXT_FLAG_PORT_STATS)) {
- PMD_DRV_LOG(ERR, "xstats not supported for VF\n");
- return 0;
- }
-
bnxt_hwrm_port_qstats(bp);
bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix Rx checksum flags
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
` (5 preceding siblings ...)
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
@ 2018-05-22 18:13 ` Ajit Khaparde
2018-05-22 20:42 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ferruh Yigit
7 siblings, 0 replies; 21+ messages in thread
From: Ajit Khaparde @ 2018-05-22 18:13 UTC (permalink / raw)
To: dev; +Cc: stable
For frames where the hardware is not able to calculate checksum
we are indicating such frames to be bad. And that is incorrect.
Indicate PKT_RX_IP_CKSUM_UNKNOWN or PKT_RX_L4_CKSUM_UNKNOWN
for such frames.
Fixes: 7ec39d8c524b ("net/bnxt: update status of Rx IP/L4 CKSUM")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 4 ++++
drivers/net/bnxt/bnxt_rxr.h | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index a8b5d6683..9d8842926 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -464,11 +464,15 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
+ else if (likely(RX_CMP_IP_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
if (likely(RX_CMP_L4_CS_OK(rxcmp1)))
mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+ else if (likely(RX_CMP_L4_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD;
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index e8c47ca56..5b28f0321 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -36,6 +36,9 @@
(((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS) && \
!((rxcmp1)->errors_v2 & RX_CMP_L4_CS_ERR_BITS))
+#define RX_CMP_L4_CS_UNKNOWN(rxcmp1) \
+ !((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS)
+
#define RX_CMP_IP_CS_ERR_BITS \
rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_IP_CS_ERROR | \
RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR)
@@ -48,6 +51,9 @@
(((rxcmp1)->flags2 & RX_CMP_IP_CS_BITS) && \
!((rxcmp1)->errors_v2 & RX_CMP_IP_CS_ERR_BITS))
+#define RX_CMP_IP_CS_UNKNOWN(rxcmp1) \
+ !((rxcmp1)->flags2 & RX_CMP_IP_CS_BITS)
+
enum pkt_hash_types {
PKT_HASH_TYPE_NONE, /* Undefined type */
PKT_HASH_TYPE_L2, /* Input: src_MAC, dest_MAC */
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/7] bnxt patchset
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
` (6 preceding siblings ...)
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
@ 2018-05-22 20:42 ` Ferruh Yigit
7 siblings, 0 replies; 21+ messages in thread
From: Ferruh Yigit @ 2018-05-22 20:42 UTC (permalink / raw)
To: Ajit Khaparde, dev
On 5/22/2018 7:13 PM, Ajit Khaparde wrote:
> Patchset contains fixes mostly; against dpdk-next-net.
> Please apply.
>
> v1->v2: updated commit log, messages as requested.
>
> Ajit Khaparde (7):
> net/bnxt: add fallthrough comment
> net/bnxt: fix Tx and Rx burst for secondary processes
> net/bnxt: fix RSS hash configuration
> net/bnxt: fix to use 1st cmpl ring for fwd and async event
> net/bnxt: fix VF resource allocation
> net/bnxt: fix xstats support for VF
> net/bnxt: fix Rx checksum flags
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/7] bnxt patchset
2018-01-26 17:35 ` Ferruh Yigit
@ 2018-01-26 17:37 ` Ferruh Yigit
0 siblings, 0 replies; 21+ messages in thread
From: Ferruh Yigit @ 2018-01-26 17:37 UTC (permalink / raw)
To: Ajit Khaparde, dev
On 1/26/2018 5:35 PM, Ferruh Yigit wrote:
> On 1/25/2018 10:47 PM, Ajit Khaparde wrote:
>> Please apply this patchset.
>> I have incorporated most of the comments that we got in v1.
>> The switch to SPDX tags is in the works and will be submitted separately.
>>
>> Ajit Khaparde (6):
>> net/bnxt: fix size of tx ring in HW
>> net/bnxt: use driver specific dynamic log type
>> net/bnxt: register for more async events
>> net/bnxt: check if MAC address is all zeros
>> net/bnxt: add 100G speed detection
>> net/bnxt: fix number of pools for RSS
>>
>> Somnath Kotur (1):
>> net/bnxt: support for rx/tx_queue_start/stop ops
>
> Series applied to dpdk-next-net/master, thanks.
>
> Except 6/7, which looks like can be independent patch. And since rc2 is close, I
> didn't want that patch to block the set.
Ahh, new version arrived while I am writing this mail, so I will drop existing
ones and apply new version of the set. Thanks.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/7] bnxt patchset
2018-01-25 22:47 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ajit Khaparde
@ 2018-01-26 17:35 ` Ferruh Yigit
2018-01-26 17:37 ` Ferruh Yigit
0 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2018-01-26 17:35 UTC (permalink / raw)
To: Ajit Khaparde, dev
On 1/25/2018 10:47 PM, Ajit Khaparde wrote:
> Please apply this patchset.
> I have incorporated most of the comments that we got in v1.
> The switch to SPDX tags is in the works and will be submitted separately.
>
> Ajit Khaparde (6):
> net/bnxt: fix size of tx ring in HW
> net/bnxt: use driver specific dynamic log type
> net/bnxt: register for more async events
> net/bnxt: check if MAC address is all zeros
> net/bnxt: add 100G speed detection
> net/bnxt: fix number of pools for RSS
>
> Somnath Kotur (1):
> net/bnxt: support for rx/tx_queue_start/stop ops
Series applied to dpdk-next-net/master, thanks.
Except 6/7, which looks like can be independent patch. And since rc2 is close, I
didn't want that patch to block the set.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [dpdk-dev] [PATCH v2 0/7] bnxt patchset
2018-01-22 12:23 [dpdk-dev] [PATCH 2/5] net/bnxt: use driver specific dynamic log type Ferruh Yigit
@ 2018-01-25 22:47 ` Ajit Khaparde
2018-01-26 17:35 ` Ferruh Yigit
0 siblings, 1 reply; 21+ messages in thread
From: Ajit Khaparde @ 2018-01-25 22:47 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
Please apply this patchset.
I have incorporated most of the comments that we got in v1.
The switch to SPDX tags is in the works and will be submitted separately.
Ajit Khaparde (6):
net/bnxt: fix size of tx ring in HW
net/bnxt: use driver specific dynamic log type
net/bnxt: register for more async events
net/bnxt: check if MAC address is all zeros
net/bnxt: add 100G speed detection
net/bnxt: fix number of pools for RSS
Somnath Kotur (1):
net/bnxt: support for rx/tx_queue_start/stop ops
drivers/net/bnxt/bnxt.h | 8 ++
drivers/net/bnxt/bnxt_cpr.c | 19 ++-
drivers/net/bnxt/bnxt_ethdev.c | 282 +++++++++++++++++++++-------------------
drivers/net/bnxt/bnxt_filter.c | 44 +++----
drivers/net/bnxt/bnxt_filter.h | 1 +
drivers/net/bnxt/bnxt_hwrm.c | 181 +++++++++++++++-----------
drivers/net/bnxt/bnxt_hwrm.h | 13 ++
drivers/net/bnxt/bnxt_irq.c | 4 +-
drivers/net/bnxt/bnxt_ring.c | 12 +-
drivers/net/bnxt/bnxt_rxq.c | 77 +++++++++--
drivers/net/bnxt/bnxt_rxq.h | 6 +-
drivers/net/bnxt/bnxt_rxr.c | 23 ++--
drivers/net/bnxt/bnxt_rxr.h | 3 +-
drivers/net/bnxt/bnxt_stats.c | 16 +--
drivers/net/bnxt/bnxt_txq.c | 10 +-
drivers/net/bnxt/bnxt_txq.h | 1 -
drivers/net/bnxt/bnxt_txr.c | 34 ++++-
drivers/net/bnxt/bnxt_txr.h | 2 +
drivers/net/bnxt/bnxt_vnic.c | 14 +-
drivers/net/bnxt/bnxt_vnic.h | 1 -
drivers/net/bnxt/rte_pmd_bnxt.c | 48 +++----
21 files changed, 481 insertions(+), 318 deletions(-)
--
2.14.3 (Apple Git-98)
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2018-05-22 20:42 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 2/7] net/bnxt: fix to initialize tx and rx burst for secondary processes Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 3/7] net/bnxt: fix rss hash configuration Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 4/7] net/bnxt: fix to use 1st completion ring for forwarding and async events Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-18 17:01 ` [dpdk-dev] [PATCH 0/7] bnxt patchset Ferruh Yigit
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix Tx and Rx burst for secondary processes Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: fix RSS hash configuration Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: fix to use 1st cmpl ring for fwd and async event Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-22 20:42 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ferruh Yigit
-- strict thread matches above, loose matches on Subject: below --
2018-01-22 12:23 [dpdk-dev] [PATCH 2/5] net/bnxt: use driver specific dynamic log type Ferruh Yigit
2018-01-25 22:47 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ajit Khaparde
2018-01-26 17:35 ` Ferruh Yigit
2018-01-26 17:37 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).