* [dpdk-dev] [PATCH v2 0/4] bnxt patches
@ 2019-07-25 4:59 Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics Somnath Kotur
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 4:59 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
This set contains bug fixes for commits that made it into
19.08, so it's imperative that these go into 19.08 as well
Please apply
Kalesh AP (3):
net/bnxt: fix to use chimp hwrm channel for few commands
net/bnxt: fix endianness issue
net/bnxt: reduce verbosity of a message
Santoshkumar Karanappa Rastapur (1):
net/bnxt: fix extended port counter statistics
drivers/net/bnxt/bnxt_hwrm.c | 22 +++++++++++-----------
drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
2 files changed, 25 insertions(+), 21 deletions(-)
--
v2: Removed a commit from the set as it got in as part of
Lance's commit (net/bnxt: use dedicated cpr for async events)
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics
2019-07-25 4:59 [dpdk-dev] [PATCH v2 0/4] bnxt patches Somnath Kotur
@ 2019-07-25 4:59 ` Somnath Kotur
2019-07-25 7:21 ` David Marchand
2019-07-25 7:37 ` Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 2/4] net/bnxt: fix to use chimp hwrm channel for few commands Somnath Kotur
` (3 subsequent siblings)
4 siblings, 2 replies; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 4:59 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
We were trying to fill in more rx extended stats than the size allocated
for stats causing segfault. Fixed this by adding an explicit check.
Rearranged the code to return statistic values in xstats_get as per the
names returned in xstats_get_names.
Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 4e74f8a..69ac2dd 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -427,8 +427,12 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
bnxt_hwrm_port_qstats(bp);
bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);
bnxt_hwrm_ext_port_qstats(bp);
- rx_port_stats_ext_cnt = bp->fw_rx_port_stats_ext_size / stat_size;
- tx_port_stats_ext_cnt = bp->fw_tx_port_stats_ext_size / stat_size;
+ rx_port_stats_ext_cnt = RTE_MIN(RTE_DIM(bnxt_rx_ext_stats_strings),
+ (bp->fw_rx_port_stats_ext_size /
+ stat_size));
+ tx_port_stats_ext_cnt = RTE_MIN(RTE_DIM(bnxt_tx_ext_stats_strings),
+ (bp->fw_tx_port_stats_ext_size /
+ stat_size));
count = RTE_DIM(bnxt_rx_stats_strings) +
RTE_DIM(bnxt_tx_stats_strings) + 1/* For tx_drop_pkts */ +
@@ -463,22 +467,22 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
count++;
- for (i = 0; i < tx_port_stats_ext_cnt; i++) {
- uint64_t *tx_stats_ext = (uint64_t *)bp->hw_tx_port_stats_ext;
+ for (i = 0; i < rx_port_stats_ext_cnt; i++) {
+ uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
xstats[count].value = rte_le_to_cpu_64
- (*(uint64_t *)((char *)tx_stats_ext +
- bnxt_tx_ext_stats_strings[i].offset));
+ (*(uint64_t *)((char *)rx_stats_ext +
+ bnxt_rx_ext_stats_strings[i].offset));
count++;
}
- for (i = 0; i < rx_port_stats_ext_cnt; i++) {
- uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
+ for (i = 0; i < tx_port_stats_ext_cnt; i++) {
+ uint64_t *tx_stats_ext = (uint64_t *)bp->hw_tx_port_stats_ext;
xstats[count].value = rte_le_to_cpu_64
- (*(uint64_t *)((char *)rx_stats_ext +
- bnxt_rx_ext_stats_strings[i].offset));
+ (*(uint64_t *)((char *)tx_stats_ext +
+ bnxt_tx_ext_stats_strings[i].offset));
count++;
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/4] net/bnxt: fix to use chimp hwrm channel for few commands
2019-07-25 4:59 [dpdk-dev] [PATCH v2 0/4] bnxt patches Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics Somnath Kotur
@ 2019-07-25 4:59 ` Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 3/4] net/bnxt: fix endianness issue Somnath Kotur
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 4:59 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Modified to send the tunnel redirect commands to Chimp as Kong does not
support these commands.
Fixes: 11e5e19695c7bfb3 ("net/bnxt: support redirecting tunnel packets to VF")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 045ce4a..1587ca1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4524,10 +4524,10 @@ int bnxt_hwrm_ext_port_qstats(struct bnxt *bp)
bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, CFA_REDIRECT_TUNNEL_TYPE_ALLOC, BNXT_USE_KONG(bp));
+ HWRM_PREP(req, CFA_REDIRECT_TUNNEL_TYPE_ALLOC, BNXT_USE_CHIMP_MB);
req.tunnel_type = type;
req.dest_fid = bp->fw_fid;
- rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
@@ -4543,10 +4543,10 @@ int bnxt_hwrm_ext_port_qstats(struct bnxt *bp)
bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, CFA_REDIRECT_TUNNEL_TYPE_FREE, BNXT_USE_KONG(bp));
+ HWRM_PREP(req, CFA_REDIRECT_TUNNEL_TYPE_FREE, BNXT_USE_CHIMP_MB);
req.tunnel_type = type;
req.dest_fid = bp->fw_fid;
- rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
@@ -4561,9 +4561,9 @@ int bnxt_hwrm_tunnel_redirect_query(struct bnxt *bp, uint32_t *type)
bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, CFA_REDIRECT_QUERY_TUNNEL_TYPE, BNXT_USE_KONG(bp));
+ HWRM_PREP(req, CFA_REDIRECT_QUERY_TUNNEL_TYPE, BNXT_USE_CHIMP_MB);
req.src_fid = bp->fw_fid;
- rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
if (type)
@@ -4582,10 +4582,10 @@ int bnxt_hwrm_tunnel_redirect_info(struct bnxt *bp, uint8_t tun_type,
bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, CFA_REDIRECT_TUNNEL_TYPE_INFO, BNXT_USE_KONG(bp));
+ HWRM_PREP(req, CFA_REDIRECT_TUNNEL_TYPE_INFO, BNXT_USE_CHIMP_MB);
req.src_fid = bp->fw_fid;
req.tunnel_type = tun_type;
- rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
if (dst_fid)
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 3/4] net/bnxt: fix endianness issue
2019-07-25 4:59 [dpdk-dev] [PATCH v2 0/4] bnxt patches Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 2/4] net/bnxt: fix to use chimp hwrm channel for few commands Somnath Kotur
@ 2019-07-25 4:59 ` Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 4/4] net/bnxt: reduce verbosity of a message Somnath Kotur
2019-07-25 15:57 ` [dpdk-dev] [PATCH v2 0/4] bnxt patches Ferruh Yigit
4 siblings, 0 replies; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 4:59 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Use rte_cpu_to_le_16/32 while parsing the hwrm command response.
Fixes: 11e5e19695c7bfb3 ("net/bnxt: support redirecting tunnel packets to VF")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 1587ca1..39c71bc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4567,7 +4567,7 @@ int bnxt_hwrm_tunnel_redirect_query(struct bnxt *bp, uint32_t *type)
HWRM_CHECK_RESULT();
if (type)
- *type = resp->tunnel_mask;
+ *type = rte_le_to_cpu_32(resp->tunnel_mask);
HWRM_UNLOCK();
@@ -4589,7 +4589,7 @@ int bnxt_hwrm_tunnel_redirect_info(struct bnxt *bp, uint8_t tun_type,
HWRM_CHECK_RESULT();
if (dst_fid)
- *dst_fid = resp->dest_fid;
+ *dst_fid = rte_le_to_cpu_16(resp->dest_fid);
PMD_DRV_LOG(DEBUG, "dst_fid: %x\n", resp->dest_fid);
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 4/4] net/bnxt: reduce verbosity of a message
2019-07-25 4:59 [dpdk-dev] [PATCH v2 0/4] bnxt patches Somnath Kotur
` (2 preceding siblings ...)
2019-07-25 4:59 ` [dpdk-dev] [PATCH 3/4] net/bnxt: fix endianness issue Somnath Kotur
@ 2019-07-25 4:59 ` Somnath Kotur
2019-07-25 15:57 ` [dpdk-dev] [PATCH v2 0/4] bnxt patches Ferruh Yigit
4 siblings, 0 replies; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 4:59 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Change verbosity of a message to DEBUG from ERROR.
This is just debug message.
Fixes: 3e92fd4e4ec0c7b ("net/bnxt: use dynamic log type")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 39c71bc..74b8d00 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2261,7 +2261,7 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
STAILQ_FOREACH(flow, &vnic->flow_list, next) {
filter = flow->filter;
- PMD_DRV_LOG(ERR, "filter type %d\n", filter->filter_type);
+ PMD_DRV_LOG(DEBUG, "filter type %d\n", filter->filter_type);
if (filter->filter_type == HWRM_CFA_EM_FILTER)
rc = bnxt_hwrm_clear_em_filter(bp, filter);
else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics
2019-07-25 4:59 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics Somnath Kotur
@ 2019-07-25 7:21 ` David Marchand
2019-07-25 7:40 ` Somnath Kotur
2019-07-25 7:37 ` Somnath Kotur
1 sibling, 1 reply; 11+ messages in thread
From: David Marchand @ 2019-07-25 7:21 UTC (permalink / raw)
To: Somnath Kotur; +Cc: dev, Yigit, Ferruh
On Thu, Jul 25, 2019 at 7:05 AM Somnath Kotur
<somnath.kotur@broadcom.com> wrote:
>
> From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
>
> We were trying to fill in more rx extended stats than the size allocated
> for stats causing segfault. Fixed this by adding an explicit check.
> Rearranged the code to return statistic values in xstats_get as per the
> names returned in xstats_get_names.
>
> Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
>
> Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
> Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> ---
> drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
> 1 file changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
> index 4e74f8a..69ac2dd 100644
> --- a/drivers/net/bnxt/bnxt_stats.c
> +++ b/drivers/net/bnxt/bnxt_stats.c
[snip]
> @@ -463,22 +467,22 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
> xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
> count++;
>
> - for (i = 0; i < tx_port_stats_ext_cnt; i++) {
> - uint64_t *tx_stats_ext = (uint64_t *)bp->hw_tx_port_stats_ext;
> + for (i = 0; i < rx_port_stats_ext_cnt; i++) {
> + uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
>
> xstats[count].value = rte_le_to_cpu_64
> - (*(uint64_t *)((char *)tx_stats_ext +
> - bnxt_tx_ext_stats_strings[i].offset));
> + (*(uint64_t *)((char *)rx_stats_ext +
> + bnxt_rx_ext_stats_strings[i].offset));
>
> count++;
> }
>
> - for (i = 0; i < rx_port_stats_ext_cnt; i++) {
> - uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
> + for (i = 0; i < tx_port_stats_ext_cnt; i++) {
> + uint64_t *tx_stats_ext = (uint64_t *)bp->hw_tx_port_stats_ext;
>
> xstats[count].value = rte_le_to_cpu_64
> - (*(uint64_t *)((char *)rx_stats_ext +
> - bnxt_rx_ext_stats_strings[i].offset));
> + (*(uint64_t *)((char *)tx_stats_ext +
> + bnxt_tx_ext_stats_strings[i].offset));
>
> count++;
> }
> --
> 1.8.3.1
>
This whole hunk just adds some noise, right? or is there anything fixed in it?
--
David Marchand
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics
2019-07-25 4:59 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics Somnath Kotur
2019-07-25 7:21 ` David Marchand
@ 2019-07-25 7:37 ` Somnath Kotur
1 sibling, 0 replies; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 7:37 UTC (permalink / raw)
To: dev, Santoshkumar Karanappa Rastapur; +Cc: Ferruh Yigit
+Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
On Thu, Jul 25, 2019 at 10:35 AM Somnath Kotur <somnath.kotur@broadcom.com>
wrote:
> From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
>
> We were trying to fill in more rx extended stats than the size allocated
> for stats causing segfault. Fixed this by adding an explicit check.
> Rearranged the code to return statistic values in xstats_get as per the
> names returned in xstats_get_names.
>
> Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
>
> Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
> Signed-off-by: Santoshkumar Karanappa Rastapur <
> santosh.rastapur@broadcom.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> ---
> drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
> 1 file changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
> index 4e74f8a..69ac2dd 100644
> --- a/drivers/net/bnxt/bnxt_stats.c
> +++ b/drivers/net/bnxt/bnxt_stats.c
> @@ -427,8 +427,12 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev
> *eth_dev,
> bnxt_hwrm_port_qstats(bp);
> bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);
> bnxt_hwrm_ext_port_qstats(bp);
> - rx_port_stats_ext_cnt = bp->fw_rx_port_stats_ext_size / stat_size;
> - tx_port_stats_ext_cnt = bp->fw_tx_port_stats_ext_size / stat_size;
> + rx_port_stats_ext_cnt = RTE_MIN(RTE_DIM(bnxt_rx_ext_stats_strings),
> + (bp->fw_rx_port_stats_ext_size /
> + stat_size));
> + tx_port_stats_ext_cnt = RTE_MIN(RTE_DIM(bnxt_tx_ext_stats_strings),
> + (bp->fw_tx_port_stats_ext_size /
> + stat_size));
>
> count = RTE_DIM(bnxt_rx_stats_strings) +
> RTE_DIM(bnxt_tx_stats_strings) + 1/* For tx_drop_pkts */ +
> @@ -463,22 +467,22 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev
> *eth_dev,
> xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
> count++;
>
> - for (i = 0; i < tx_port_stats_ext_cnt; i++) {
> - uint64_t *tx_stats_ext = (uint64_t
> *)bp->hw_tx_port_stats_ext;
> + for (i = 0; i < rx_port_stats_ext_cnt; i++) {
> + uint64_t *rx_stats_ext = (uint64_t
> *)bp->hw_rx_port_stats_ext;
>
> xstats[count].value = rte_le_to_cpu_64
> - (*(uint64_t *)((char
> *)tx_stats_ext +
> -
> bnxt_tx_ext_stats_strings[i].offset));
> + (*(uint64_t *)((char
> *)rx_stats_ext +
> +
> bnxt_rx_ext_stats_strings[i].offset));
>
> count++;
> }
>
> - for (i = 0; i < rx_port_stats_ext_cnt; i++) {
> - uint64_t *rx_stats_ext = (uint64_t
> *)bp->hw_rx_port_stats_ext;
> + for (i = 0; i < tx_port_stats_ext_cnt; i++) {
> + uint64_t *tx_stats_ext = (uint64_t
> *)bp->hw_tx_port_stats_ext;
>
> xstats[count].value = rte_le_to_cpu_64
> - (*(uint64_t *)((char
> *)rx_stats_ext +
> -
> bnxt_rx_ext_stats_strings[i].offset));
> + (*(uint64_t *)((char
> *)tx_stats_ext +
> +
> bnxt_tx_ext_stats_strings[i].offset));
>
> count++;
> }
> --
> 1.8.3.1
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics
2019-07-25 7:21 ` David Marchand
@ 2019-07-25 7:40 ` Somnath Kotur
2019-07-25 7:54 ` Santoshkumar Karanappa Rastapur
0 siblings, 1 reply; 11+ messages in thread
From: Somnath Kotur @ 2019-07-25 7:40 UTC (permalink / raw)
To: David Marchand, Santoshkumar Karanappa Rastapur; +Cc: dev, Yigit, Ferruh
+Santosh
On Thu, Jul 25, 2019 at 12:52 PM David Marchand <david.marchand@redhat.com>
wrote:
> On Thu, Jul 25, 2019 at 7:05 AM Somnath Kotur
> <somnath.kotur@broadcom.com> wrote:
> >
> > From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
> >
> > We were trying to fill in more rx extended stats than the size allocated
> > for stats causing segfault. Fixed this by adding an explicit check.
> > Rearranged the code to return statistic values in xstats_get as per the
> > names returned in xstats_get_names.
> >
> > Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
> >
> > Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
> > Signed-off-by: Santoshkumar Karanappa Rastapur <
> santosh.rastapur@broadcom.com>
> > Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> > ---
> > drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
> > 1 file changed, 14 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_stats.c
> b/drivers/net/bnxt/bnxt_stats.c
> > index 4e74f8a..69ac2dd 100644
> > --- a/drivers/net/bnxt/bnxt_stats.c
> > +++ b/drivers/net/bnxt/bnxt_stats.c
>
> [snip]
>
> > @@ -463,22 +467,22 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev
> *eth_dev,
> > xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
> > count++;
> >
> > - for (i = 0; i < tx_port_stats_ext_cnt; i++) {
> > - uint64_t *tx_stats_ext = (uint64_t
> *)bp->hw_tx_port_stats_ext;
> > + for (i = 0; i < rx_port_stats_ext_cnt; i++) {
> > + uint64_t *rx_stats_ext = (uint64_t
> *)bp->hw_rx_port_stats_ext;
> >
> > xstats[count].value = rte_le_to_cpu_64
> > - (*(uint64_t *)((char
> *)tx_stats_ext +
> > -
> bnxt_tx_ext_stats_strings[i].offset));
> > + (*(uint64_t *)((char
> *)rx_stats_ext +
> > +
> bnxt_rx_ext_stats_strings[i].offset));
> >
> > count++;
> > }
> >
> > - for (i = 0; i < rx_port_stats_ext_cnt; i++) {
> > - uint64_t *rx_stats_ext = (uint64_t
> *)bp->hw_rx_port_stats_ext;
> > + for (i = 0; i < tx_port_stats_ext_cnt; i++) {
> > + uint64_t *tx_stats_ext = (uint64_t
> *)bp->hw_tx_port_stats_ext;
> >
> > xstats[count].value = rte_le_to_cpu_64
> > - (*(uint64_t *)((char
> *)rx_stats_ext +
> > -
> bnxt_rx_ext_stats_strings[i].offset));
> > + (*(uint64_t *)((char
> *)tx_stats_ext +
> > +
> bnxt_tx_ext_stats_strings[i].offset));
> >
> > count++;
> > }
> > --
> > 1.8.3.1
> >
>
> This whole hunk just adds some noise, right? or is there anything fixed in
> it?
>
>
> --
> David Marchand
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics
2019-07-25 7:40 ` Somnath Kotur
@ 2019-07-25 7:54 ` Santoshkumar Karanappa Rastapur
2019-07-25 7:57 ` David Marchand
0 siblings, 1 reply; 11+ messages in thread
From: Santoshkumar Karanappa Rastapur @ 2019-07-25 7:54 UTC (permalink / raw)
To: Somnath Kotur; +Cc: David Marchand, dev, Yigit, Ferruh
On Thu, Jul 25, 2019 at 1:09 PM Somnath Kotur <somnath.kotur@broadcom.com>
wrote:
> +Santosh
>
> On Thu, Jul 25, 2019 at 12:52 PM David Marchand <david.marchand@redhat.com>
> wrote:
>
>> On Thu, Jul 25, 2019 at 7:05 AM Somnath Kotur
>> <somnath.kotur@broadcom.com> wrote:
>> >
>> > From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
>> >
>> > We were trying to fill in more rx extended stats than the size allocated
>> > for stats causing segfault. Fixed this by adding an explicit check.
>> > Rearranged the code to return statistic values in xstats_get as per the
>> > names returned in xstats_get_names.
>> >
>> > Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
>> >
>> > Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
>> > Signed-off-by: Santoshkumar Karanappa Rastapur <
>> santosh.rastapur@broadcom.com>
>> > Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
>> > ---
>> > drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
>> > 1 file changed, 14 insertions(+), 10 deletions(-)
>> >
>> > diff --git a/drivers/net/bnxt/bnxt_stats.c
>> b/drivers/net/bnxt/bnxt_stats.c
>> > index 4e74f8a..69ac2dd 100644
>> > --- a/drivers/net/bnxt/bnxt_stats.c
>> > +++ b/drivers/net/bnxt/bnxt_stats.c
>>
>> [snip]
>>
>> > @@ -463,22 +467,22 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev
>> *eth_dev,
>> > xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
>> > count++;
>> >
>> > - for (i = 0; i < tx_port_stats_ext_cnt; i++) {
>> > - uint64_t *tx_stats_ext = (uint64_t
>> *)bp->hw_tx_port_stats_ext;
>> > + for (i = 0; i < rx_port_stats_ext_cnt; i++) {
>> > + uint64_t *rx_stats_ext = (uint64_t
>> *)bp->hw_rx_port_stats_ext;
>> >
>> > xstats[count].value = rte_le_to_cpu_64
>> > - (*(uint64_t *)((char
>> *)tx_stats_ext +
>> > -
>> bnxt_tx_ext_stats_strings[i].offset));
>> > + (*(uint64_t *)((char
>> *)rx_stats_ext +
>> > +
>> bnxt_rx_ext_stats_strings[i].offset));
>> >
>> > count++;
>> > }
>> >
>> > - for (i = 0; i < rx_port_stats_ext_cnt; i++) {
>> > - uint64_t *rx_stats_ext = (uint64_t
>> *)bp->hw_rx_port_stats_ext;
>> > + for (i = 0; i < tx_port_stats_ext_cnt; i++) {
>> > + uint64_t *tx_stats_ext = (uint64_t
>> *)bp->hw_tx_port_stats_ext;
>> >
>> > xstats[count].value = rte_le_to_cpu_64
>> > - (*(uint64_t *)((char
>> *)rx_stats_ext +
>> > -
>> bnxt_rx_ext_stats_strings[i].offset));
>> > + (*(uint64_t *)((char
>> *)tx_stats_ext +
>> > +
>> bnxt_tx_ext_stats_strings[i].offset));
>> >
>> > count++;
>> > }
>> > --
>> > 1.8.3.1
>> >
>>
>> This whole hunk just adds some noise, right? or is there anything fixed
>> in it?
>>
>>
>> --
>> David Marchand
>>
>
In bnxt_dev_xstats_get_names_op, we were filling statistics names in
xstats_names in this order.
bnxt_rx_stats_strings
bnxt_tx_stats_strings
bnxt_rx_ext_stats_strings
bnxt_tx_ext_stats_strings
Where as in bnxt_dev_xstats_get_op, we were returning stats values in
xstats in this order.
bnxt_rx_stats_strings
bnxt_tx_stats_strings
bnxt_tx_ext_stats_strings
bnxt_rx_ext_stats_strings
We were ending up displaying extended Tx stats values against extended Rx
stats names and vice versa.
This above code fixes this order.
Regards
-Santosh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics
2019-07-25 7:54 ` Santoshkumar Karanappa Rastapur
@ 2019-07-25 7:57 ` David Marchand
0 siblings, 0 replies; 11+ messages in thread
From: David Marchand @ 2019-07-25 7:57 UTC (permalink / raw)
To: Santoshkumar Karanappa Rastapur; +Cc: Somnath Kotur, dev, Yigit, Ferruh
On Thu, Jul 25, 2019 at 9:54 AM Santoshkumar Karanappa Rastapur
<santosh.rastapur@broadcom.com> wrote:
>
>
>
> On Thu, Jul 25, 2019 at 1:09 PM Somnath Kotur <somnath.kotur@broadcom.com> wrote:
>>
>> +Santosh
>>
>> On Thu, Jul 25, 2019 at 12:52 PM David Marchand <david.marchand@redhat.com> wrote:
>>>
>>> On Thu, Jul 25, 2019 at 7:05 AM Somnath Kotur
>>> <somnath.kotur@broadcom.com> wrote:
>>> >
>>> > From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
>>> >
>>> > We were trying to fill in more rx extended stats than the size allocated
>>> > for stats causing segfault. Fixed this by adding an explicit check.
>>> > Rearranged the code to return statistic values in xstats_get as per the
>>> > names returned in xstats_get_names.
>>> >
>>> > Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
>>> >
>>> > Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
>>> > Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
>>> > Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
>>> > ---
>>> > drivers/net/bnxt/bnxt_stats.c | 24 ++++++++++++++----------
>>> > 1 file changed, 14 insertions(+), 10 deletions(-)
>>> >
>>> > diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
>>> > index 4e74f8a..69ac2dd 100644
>>> > --- a/drivers/net/bnxt/bnxt_stats.c
>>> > +++ b/drivers/net/bnxt/bnxt_stats.c
>>>
>>> [snip]
>>>
>>> > @@ -463,22 +467,22 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
>>> > xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
>>> > count++;
>>> >
>>> > - for (i = 0; i < tx_port_stats_ext_cnt; i++) {
>>> > - uint64_t *tx_stats_ext = (uint64_t *)bp->hw_tx_port_stats_ext;
>>> > + for (i = 0; i < rx_port_stats_ext_cnt; i++) {
>>> > + uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
>>> >
>>> > xstats[count].value = rte_le_to_cpu_64
>>> > - (*(uint64_t *)((char *)tx_stats_ext +
>>> > - bnxt_tx_ext_stats_strings[i].offset));
>>> > + (*(uint64_t *)((char *)rx_stats_ext +
>>> > + bnxt_rx_ext_stats_strings[i].offset));
>>> >
>>> > count++;
>>> > }
>>> >
>>> > - for (i = 0; i < rx_port_stats_ext_cnt; i++) {
>>> > - uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
>>> > + for (i = 0; i < tx_port_stats_ext_cnt; i++) {
>>> > + uint64_t *tx_stats_ext = (uint64_t *)bp->hw_tx_port_stats_ext;
>>> >
>>> > xstats[count].value = rte_le_to_cpu_64
>>> > - (*(uint64_t *)((char *)rx_stats_ext +
>>> > - bnxt_rx_ext_stats_strings[i].offset));
>>> > + (*(uint64_t *)((char *)tx_stats_ext +
>>> > + bnxt_tx_ext_stats_strings[i].offset));
>>> >
>>> > count++;
>>> > }
>>> > --
>>> > 1.8.3.1
>>> >
>>>
>>> This whole hunk just adds some noise, right? or is there anything fixed in it?
>>>
>>>
>>> --
>>> David Marchand
>
>
>
> In bnxt_dev_xstats_get_names_op, we were filling statistics names in xstats_names in this order.
>
> bnxt_rx_stats_strings
>
> bnxt_tx_stats_strings
>
> bnxt_rx_ext_stats_strings
>
> bnxt_tx_ext_stats_strings
>
>
>
> Where as in bnxt_dev_xstats_get_op, we were returning stats values in xstats in this order.
>
> bnxt_rx_stats_strings
>
> bnxt_tx_stats_strings
>
> bnxt_tx_ext_stats_strings
>
> bnxt_rx_ext_stats_strings
>
>
>
> We were ending up displaying extended Tx stats values against extended Rx stats names and vice versa.
>
> This above code fixes this order.
Erf, I must have read your commitlog too quickly, or you could have
split it in two patches, anyway understood.
--
David Marchand
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/4] bnxt patches
2019-07-25 4:59 [dpdk-dev] [PATCH v2 0/4] bnxt patches Somnath Kotur
` (3 preceding siblings ...)
2019-07-25 4:59 ` [dpdk-dev] [PATCH 4/4] net/bnxt: reduce verbosity of a message Somnath Kotur
@ 2019-07-25 15:57 ` Ferruh Yigit
4 siblings, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2019-07-25 15:57 UTC (permalink / raw)
To: Somnath Kotur, dev
On 7/25/2019 5:59 AM, Somnath Kotur wrote:
> This set contains bug fixes for commits that made it into
> 19.08, so it's imperative that these go into 19.08 as well
>
> Please apply
>
> Kalesh AP (3):
> net/bnxt: fix to use chimp hwrm channel for few commands
> net/bnxt: fix endianness issue
> net/bnxt: reduce verbosity of a message
>
> Santoshkumar Karanappa Rastapur (1):
> net/bnxt: fix extended port counter statistics
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-07-25 22:39 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 4:59 [dpdk-dev] [PATCH v2 0/4] bnxt patches Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix extended port counter statistics Somnath Kotur
2019-07-25 7:21 ` David Marchand
2019-07-25 7:40 ` Somnath Kotur
2019-07-25 7:54 ` Santoshkumar Karanappa Rastapur
2019-07-25 7:57 ` David Marchand
2019-07-25 7:37 ` Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 2/4] net/bnxt: fix to use chimp hwrm channel for few commands Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 3/4] net/bnxt: fix endianness issue Somnath Kotur
2019-07-25 4:59 ` [dpdk-dev] [PATCH 4/4] net/bnxt: reduce verbosity of a message Somnath Kotur
2019-07-25 15:57 ` [dpdk-dev] [PATCH v2 0/4] bnxt patches 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).