Skip to contentSkip to conversation

net/bnxt: statistic related fixes

PATCH In review Stephen Hemminger 3 participants 5 messages Jan 22, 2020 – Jan 23, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

cover net/bnxt: statistic related fixes

A couple of minor things in bnxt statistics

Stephen Hemminger (2):
net/bnxt: do not print error if stats queried before start net/bnxt: remove unnecessary memset

 drivers/net/bnxt/bnxt_stats.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/2 net/bnxt: do not print error if stats queried before start

When using pktgen lots of unnecessary errors are printed because pktgen queries statistics before device is started.

Fixes 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
---
 drivers/net/bnxt/bnxt_stats.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/bnxt/bnxt_stats.c +1 -3
index 20a16a629fb5..65f90e0d8588 100644
@@ -390,10 +390,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 		return rc;
 
 	memset(bnxt_stats, 0, sizeof(*bnxt_stats));
-	if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
-		PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+	if (!(bp->flags & BNXT_FLAG_INIT_DONE))
 		return -EIO;
-	}
 
 	num_q_stats = RTE_MIN(bp->rx_cp_nr_rings,
 			      (unsigned int)RTE_ETHDEV_QUEUE_STAT_CNTRS);
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/2 net/bnxt: remove unnecessary memset

In reply to Stephen Hemminger

The rte_ethdev layer already zeros statistics before calling the device.

Fixes 57d5e5bc86e4 ("net/bnxt: add statistics")
---
 drivers/net/bnxt/bnxt_stats.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/bnxt/bnxt_stats.c +0 -1
index 65f90e0d8588..32f112b5ba35 100644
@@ -389,7 +389,6 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	memset(bnxt_stats, 0, sizeof(*bnxt_stats));
 	if (!(bp->flags & BNXT_FLAG_INIT_DONE))
 		return -EIO;
 
Signature · 1 line
2.20.1
#3 lore raw
In reply to Stephen Hemminger
Quoted 16 lines · Stephen Hemminger

A couple of minor things in bnxt statistics

Stephen Hemminger (2):
net/bnxt: do not print error if stats queried before start net/bnxt: remove unnecessary memset

 drivers/net/bnxt/bnxt_stats.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patches applied to dpdk-next-net-brcm. Thanks

--
2.20.1

#4 lore raw
Quoted 5 lines · Ajit Khaparde
Quoted 2 lines · Stephen Hemminger

A couple of minor things in bnxt statistics

Quoted 9 lines
Quoted 8 lines

Stephen Hemminger (2):
net/bnxt: do not print error if stats queried before start net/bnxt: remove unnecessary memset

 drivers/net/bnxt/bnxt_stats.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patches applied to dpdk-next-net-brcm. Thanks

Hi Ajit,

It seems they are not pushed into your tree. Please ping me when you do, I can pull afterwards.