net/i40e: fiX statstic inconsistent when port stopped
PATCH 1/1 net/i40e: fiX statstic inconsistent when port stopped
rx_good_bytes and rx_good_packets statstic is inconsistent when port stopped,ipackets statistic is minus the discard packets but rx_bytes statistic not. Also,i40e has no statstic of discard bytes, so we have to delete discard packets item from rx_good_packets statstic.
--- drivers/net/i40e/i40e_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/i40e/i40e_ethdev.c +1 -2
@@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + pf->main_vsi->eth_stats.rx_multicast + - pf->main_vsi->eth_stats.rx_broadcast - - pf->main_vsi->eth_stats.rx_discards; + pf->main_vsi->eth_stats.rx_broadcast; stats->opackets = pf->main_vsi->eth_stats.tx_unicast + pf->main_vsi->eth_stats.tx_multicast + pf->main_vsi->eth_stats.tx_broadcast;
Signature · 1 line
2.5.5
Hi, zhaowei
Few comments below:
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao1
Sent: Tuesday, July 26, 2016 10:06 AM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped
Avoid typo:
fiX -> fix;
statstic -> statistic
And there are some requirements based on the subject and commit log in , such as:
* The summary line should be around 50 characters.
* The text of the commit message should be wrapped at 72 characters.
Please check the doc " doc/guides/contributing/patches.rst" and use " scripts/check-git-log.sh" to help you.
Quoted 27 lines
rx_good_bytesandrx_good_packetsstatstic is inconsistent when port stopped,ipackets statistic is minus the discard packets butrx_bytesstatistic not.
Also,i40e has no statstic of discard bytes, so we have to delete discard packets item fromrx_good_packetsstatstic.Fixes 9aace75fc82e ("i40e: fix statistics")Signed-off-by Wei Zhao1 <[email protected]>--- drivers/net/i40e/i40e_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/i40e/i40e_ethdev.c +1
-2@@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + pf->main_vsi->eth_stats.rx_multicast + - pf->main_vsi->eth_stats.rx_broadcast - - pf->main_vsi->eth_stats.rx_discards; + pf->main_vsi->eth_stats.rx_broadcast; stats->opackets = pf->main_vsi->eth_stats.tx_unicast + pf->main_vsi->eth_stats.tx_multicast +
Quoted 1 line
pf->main_vsi->eth_stats.tx_broadcast;
rx_discards is included in imiss. So I think it's better to minus the discard count.
/Jingjing
Hi, Wu Jingjing
Thanks for your feedback .I didn't find statistic of discard bytes i40e data sheet,
so I have to delete discard packets item from rx_good_packets statistic. In other words, we have no way to to minus the discard byte count from rx_good_bytes. Also I will make some change to meet requirements of commit log and subject.
-----Original Message-----
From: Wu, Jingjing
Sent: Friday, July 29, 2016 10:50 AM
To: Zhao1, Wei <[email protected]>
Cc: [email protected]
Subject: RE: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped
Hi, zhaowei
Few comments below:
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wei Zhao1
Sent: Tuesday, July 26, 2016 10:06 AM
To: [email protected]
Cc: Zhao1, Wei
Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped
Avoid typo:
fiX -> fix;
statstic -> statistic
And there are some requirements based on the subject and commit log in , such as:
* The summary line should be around 50 characters.
* The text of the commit message should be wrapped at 72 characters.
Please check the doc " doc/guides/contributing/patches.rst" and use " scripts/check-git-log.sh" to help you.
Quoted 27 lines
rx_good_bytesandrx_good_packetsstatstic is inconsistent when port stopped,ipackets statistic is minus the discard packets butrx_bytesstatistic not.
Also,i40e has no statstic of discard bytes, so we have to delete discard packets item fromrx_good_packetsstatstic.Fixes 9aace75fc82e ("i40e: fix statistics")Signed-off-by Wei Zhao1 <[email protected]>--- drivers/net/i40e/i40e_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/net/i40e/i40e_ethdev.cindex 11a5804..553dfd9 100644drivers/net/i40e/i40e_ethdev.c +1
-2@@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + pf->main_vsi->eth_stats.rx_multicast + - pf->main_vsi->eth_stats.rx_broadcast - - pf->main_vsi->eth_stats.rx_discards; + pf->main_vsi->eth_stats.rx_broadcast; stats->opackets = pf->main_vsi->eth_stats.tx_unicast + pf->main_vsi->eth_stats.tx_multicast +
Quoted 1 line
pf->main_vsi->eth_stats.tx_broadcast;
rx_discards is included in imiss. So I think it's better to minus the discard count.
/Jingjing