DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
@ 2015-07-28 15:38 Maryam Tahhan
  2015-07-29  2:19 ` Lu, Wenzhuo
  2015-07-29  8:48 ` Ananyev, Konstantin
  0 siblings, 2 replies; 5+ messages in thread
From: Maryam Tahhan @ 2015-07-28 15:38 UTC (permalink / raw)
  To: dev

Fix afebc86be1346136125af8026dc215f81c202c50. oerrors was txdgpc -
hw_stats->gptc, txdgpc is the number of packets DMA'ed by the host
and was being reset on every call to read stats so it could be < gptc.
Because we currently have no way to add txdgpc to struct hw_stats so
that we can maintain a persistent value per port oerrors has now been
set to 0. References to txdgpc is now removed as we don't use it. This
patch also removes rxnfgpc as it's not used anywhere.

Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 082f361..3687ebf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2040,7 +2040,6 @@ static void
 ixgbe_read_stats_registers(struct ixgbe_hw *hw, struct ixgbe_hw_stats
 						   *hw_stats, uint64_t *total_missed_rx,
 						   uint64_t *total_qbrc, uint64_t *total_qprc,
-						   uint64_t *rxnfgpc, uint64_t *txdgpc,
 						   uint64_t *total_qprdc)
 {
 	uint32_t bprc, lxon, lxoff, total;
@@ -2093,8 +2092,6 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw, struct ixgbe_hw_stats
 
 	/* Note that gprc counts missed packets */
 	hw_stats->gprc += IXGBE_READ_REG(hw, IXGBE_GPRC);
-	*rxnfgpc += IXGBE_READ_REG(hw, IXGBE_RXNFGPC);
-	*txdgpc += IXGBE_READ_REG(hw, IXGBE_TXDGPC);
 
 	if (hw->mac.type != ixgbe_mac_82598EB) {
 		hw_stats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCL);
@@ -2188,18 +2185,15 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	struct ixgbe_hw_stats *hw_stats =
 			IXGBE_DEV_PRIVATE_TO_STATS(dev->data->dev_private);
 	uint64_t total_missed_rx, total_qbrc, total_qprc, total_qprdc;
-	uint64_t rxnfgpc, txdgpc;
 	unsigned i;
 
 	total_missed_rx = 0;
 	total_qbrc = 0;
 	total_qprc = 0;
 	total_qprdc = 0;
-	rxnfgpc = 0;
-	txdgpc = 0;
 
 	ixgbe_read_stats_registers(hw, hw_stats, &total_missed_rx, &total_qbrc,
-			&total_qprc, &rxnfgpc, &txdgpc, &total_qprdc);
+			&total_qprc, &total_qprdc);
 
 	if (stats == NULL)
 		return;
@@ -2235,9 +2229,7 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	                  hw_stats->fclast;
 
 	/* Tx Errors */
-	/*txdgpc: packets that are DMA'ed*/
-	/*gptc: packets that are sent*/
-	stats->oerrors  = txdgpc - hw_stats->gptc;
+	stats->oerrors  = 0;
 }
 
 static void
@@ -2262,7 +2254,6 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstats *xstats,
 	struct ixgbe_hw_stats *hw_stats =
 			IXGBE_DEV_PRIVATE_TO_STATS(dev->data->dev_private);
 	uint64_t total_missed_rx, total_qbrc, total_qprc, total_qprdc;
-	uint64_t rxnfgpc, txdgpc;
 	unsigned i, count = IXGBE_NB_XSTATS;
 
 	if (n < count)
@@ -2272,11 +2263,9 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstats *xstats,
 	total_qbrc = 0;
 	total_qprc = 0;
 	total_qprdc = 0;
-	rxnfgpc = 0;
-	txdgpc = 0;
 
 	ixgbe_read_stats_registers(hw, hw_stats, &total_missed_rx, &total_qbrc,
-							   &total_qprc, &rxnfgpc, &txdgpc, &total_qprdc);
+							   &total_qprc, &total_qprdc);
 
 	/* If this is a reset xstats is NULL, and we have cleared the
 	 * registers by reading them.
-- 
2.4.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
  2015-07-28 15:38 [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0 Maryam Tahhan
@ 2015-07-29  2:19 ` Lu, Wenzhuo
  2015-07-29  8:48 ` Ananyev, Konstantin
  1 sibling, 0 replies; 5+ messages in thread
From: Lu, Wenzhuo @ 2015-07-29  2:19 UTC (permalink / raw)
  To: Tahhan, Maryam, dev

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maryam Tahhan
> Sent: Tuesday, July 28, 2015 11:38 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
> 
> Fix afebc86be1346136125af8026dc215f81c202c50. oerrors was txdgpc -
> hw_stats->gptc, txdgpc is the number of packets DMA'ed by the host and was
> being reset on every call to read stats so it could be < gptc.
> Because we currently have no way to add txdgpc to struct hw_stats so that we
> can maintain a persistent value per port oerrors has now been set to 0.
> References to txdgpc is now removed as we don't use it. This patch also
> removes rxnfgpc as it's not used anywhere.
> 
> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
  2015-07-28 15:38 [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0 Maryam Tahhan
  2015-07-29  2:19 ` Lu, Wenzhuo
@ 2015-07-29  8:48 ` Ananyev, Konstantin
  2015-07-29 23:19   ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Ananyev, Konstantin @ 2015-07-29  8:48 UTC (permalink / raw)
  To: Tahhan, Maryam, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maryam Tahhan
> Sent: Tuesday, July 28, 2015 4:38 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
> 
> Fix afebc86be1346136125af8026dc215f81c202c50. oerrors was txdgpc -
> hw_stats->gptc, txdgpc is the number of packets DMA'ed by the host
> and was being reset on every call to read stats so it could be < gptc.
> Because we currently have no way to add txdgpc to struct hw_stats so
> that we can maintain a persistent value per port oerrors has now been
> set to 0. References to txdgpc is now removed as we don't use it. This
> patch also removes rxnfgpc as it's not used anywhere.
> 

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 17 +++--------------
>  1 file changed, 3 insertions(+), 14 deletions(-)
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
  2015-07-29  8:48 ` Ananyev, Konstantin
@ 2015-07-29 23:19   ` Thomas Monjalon
  2015-07-30  9:18     ` Tahhan, Maryam
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2015-07-29 23:19 UTC (permalink / raw)
  To: Tahhan, Maryam; +Cc: dev

> > Fix afebc86be1346136125af8026dc215f81c202c50. oerrors was txdgpc -
> > hw_stats->gptc, txdgpc is the number of packets DMA'ed by the host
> > and was being reset on every call to read stats so it could be < gptc.
> > Because we currently have no way to add txdgpc to struct hw_stats so
> > that we can maintain a persistent value per port oerrors has now been
> > set to 0. References to txdgpc is now removed as we don't use it. This
> > patch also removes rxnfgpc as it's not used anywhere.
> > 
> > Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks

It's a bit sad.
Is it a consequence of forbidding updates in the base driver?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
  2015-07-29 23:19   ` Thomas Monjalon
@ 2015-07-30  9:18     ` Tahhan, Maryam
  0 siblings, 0 replies; 5+ messages in thread
From: Tahhan, Maryam @ 2015-07-30  9:18 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, July 30, 2015 12:20 AM
> To: Tahhan, Maryam
> Cc: dev@dpdk.org; Ananyev, Konstantin
> Subject: Re: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0
> 
> > > Fix afebc86be1346136125af8026dc215f81c202c50. oerrors was txdgpc -
> > > hw_stats->gptc, txdgpc is the number of packets DMA'ed by the host
> > > and was being reset on every call to read stats so it could be < gptc.
> > > Because we currently have no way to add txdgpc to struct hw_stats so
> > > that we can maintain a persistent value per port oerrors has now
> > > been set to 0. References to txdgpc is now removed as we don't use
> > > it. This patch also removes rxnfgpc as it's not used anywhere.
> > >
> > > Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
> > Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 
> Applied, thanks
> 
> It's a bit sad.
> Is it a consequence of forbidding updates in the base driver?

Yes, that's exactly it.

In the meantime I'm going to look at/investigate another way to allow us to maintain additional (anything not in struct hw_stats) per port stats/registers in addition to the base driver. 

All the best
Maryam

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-30  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28 15:38 [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix oerrors by setting it to 0 Maryam Tahhan
2015-07-29  2:19 ` Lu, Wenzhuo
2015-07-29  8:48 ` Ananyev, Konstantin
2015-07-29 23:19   ` Thomas Monjalon
2015-07-30  9:18     ` Tahhan, Maryam

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).