DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] null: remove unnecessary memset
Date: Wed,  3 Jun 2015 14:13:12 -0700	[thread overview]
Message-ID: <1433365992-9173-4-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1433365992-9173-1-git-send-email-stephen@networkplumber.org>

The stats area is already cleared before calling eth_stats_get().

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/null/rte_eth_null.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 7792315..e244595 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -296,7 +296,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 		return;
 
 	internal = dev->data->dev_private;
-	memset(igb_stats, 0, sizeof(*igb_stats));
 	num_stats = RTE_MIN((unsigned)RTE_ETHDEV_QUEUE_STAT_CNTRS,
 			RTE_MIN(internal->nb_rx_queues,
 				RTE_DIM(internal->rx_null_queues)));
-- 
2.1.4

  parent reply	other threads:[~2015-06-03 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 21:13 [dpdk-dev] [PATCH 0/3] get rid of unnecessary memset's Stephen Hemminger
2015-06-03 21:13 ` [dpdk-dev] [PATCH 1/3] bonding: remove useless memset Stephen Hemminger
2015-06-03 21:13 ` [dpdk-dev] [PATCH 2/3] ethdev: " Stephen Hemminger
2015-06-03 21:13 ` Stephen Hemminger [this message]
2015-06-04  8:47 ` [dpdk-dev] [PATCH 0/3] get rid of unnecessary memset's Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433365992-9173-4-git-send-email-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).