[2/8] net/af_xdp: remove unused Tx counter

Message ID 1564046068-21905-3-git-send-email-david.marchand@redhat.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series oerrors stats fixes for virtual pmds |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand July 25, 2019, 9:14 a.m. UTC
  This Tx counter is now unused.

Fixes: 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Xiaolong Ye July 25, 2019, 3:49 p.m. UTC | #1
On 07/25, David Marchand wrote:
>This Tx counter is now unused.
>
>Fixes: 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")

err_pkts seems not introduced by this commit?

>
>Signed-off-by: David Marchand <david.marchand@redhat.com>
>---
> drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
>index 33352e1..41ed5b2 100644
>--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
>+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
>@@ -97,7 +97,6 @@ struct pkt_rx_queue {
> 
> struct tx_stats {
> 	uint64_t tx_pkts;
>-	uint64_t err_pkts;
> 	uint64_t tx_bytes;
> };
> 
>@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
> 		stats->imissed += xdp_stats.rx_dropped;
> 
> 		stats->opackets += stats->q_opackets[i];
>-		stats->oerrors += txq->stats.err_pkts;
> 		stats->obytes += stats->q_obytes[i];
> 	}
> 
>-- 
>1.8.3.1
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
  
David Marchand July 25, 2019, 7:04 p.m. UTC | #2
On Thu, Jul 25, 2019 at 5:49 PM Ye Xiaolong <xiaolong.ye@intel.com> wrote:
>
> On 07/25, David Marchand wrote:
> >This Tx counter is now unused.
> >
> >Fixes: 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")
>
> err_pkts seems not introduced by this commit?

This commit removed the only place where it was used.

>
> >
> >Signed-off-by: David Marchand <david.marchand@redhat.com>
> >---
> > drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> >diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
> >index 33352e1..41ed5b2 100644
> >--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> >+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> >@@ -97,7 +97,6 @@ struct pkt_rx_queue {
> >
> > struct tx_stats {
> >       uint64_t tx_pkts;
> >-      uint64_t err_pkts;
> >       uint64_t tx_bytes;
> > };
> >
> >@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
> >               stats->imissed += xdp_stats.rx_dropped;
> >
> >               stats->opackets += stats->q_opackets[i];
> >-              stats->oerrors += txq->stats.err_pkts;
> >               stats->obytes += stats->q_obytes[i];
> >       }
> >
> >--
> >1.8.3.1
> >
>
> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Thanks.
  
Xiaolong Ye July 26, 2019, 1:33 a.m. UTC | #3
On 07/25, David Marchand wrote:
>On Thu, Jul 25, 2019 at 5:49 PM Ye Xiaolong <xiaolong.ye@intel.com> wrote:
>>
>> On 07/25, David Marchand wrote:
>> >This Tx counter is now unused.
>> >
>> >Fixes: 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")
>>
>> err_pkts seems not introduced by this commit?
>
>This commit removed the only place where it was used.
>

Got it, make sense.

Thanks,
Xiaolong
>>
>> >
>> >Signed-off-by: David Marchand <david.marchand@redhat.com>
>> >---
>> > drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
>> > 1 file changed, 2 deletions(-)
>> >
>> >diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
>> >index 33352e1..41ed5b2 100644
>> >--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
>> >+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
>> >@@ -97,7 +97,6 @@ struct pkt_rx_queue {
>> >
>> > struct tx_stats {
>> >       uint64_t tx_pkts;
>> >-      uint64_t err_pkts;
>> >       uint64_t tx_bytes;
>> > };
>> >
>> >@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>> >               stats->imissed += xdp_stats.rx_dropped;
>> >
>> >               stats->opackets += stats->q_opackets[i];
>> >-              stats->oerrors += txq->stats.err_pkts;
>> >               stats->obytes += stats->q_obytes[i];
>> >       }
>> >
>> >--
>> >1.8.3.1
>> >
>>
>> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
>
>Thanks.
>
>-- 
>David Marchand
  

Patch

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 33352e1..41ed5b2 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -97,7 +97,6 @@  struct pkt_rx_queue {
 
 struct tx_stats {
 	uint64_t tx_pkts;
-	uint64_t err_pkts;
 	uint64_t tx_bytes;
 };
 
@@ -456,7 +455,6 @@  eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed += xdp_stats.rx_dropped;
 
 		stats->opackets += stats->q_opackets[i];
-		stats->oerrors += txq->stats.err_pkts;
 		stats->obytes += stats->q_obytes[i];
 	}