DPDK patches and discussions
 help / color / mirror / Atom feed
From: Keith Wiles <keith.wiles@intel.com>
To: dev@dpdk.org
Cc: pascal.mazon@6wind.com
Subject: [dpdk-dev] [PATCH 5/5] net/tap: remove unused variable and minor cleanup
Date: Thu,  2 Feb 2017 16:33:30 -0600	[thread overview]
Message-ID: <20170202223330.39240-5-keith.wiles@intel.com> (raw)
In-Reply-To: <20170202223330.39240-1-keith.wiles@intel.com>

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 4f7eacf..238824e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -390,9 +390,7 @@ tap_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *tap_stats)
 		tap_stats->q_ibytes[i] = pmd->rxq[i].stats.ibytes;
 		rx_total += tap_stats->q_ipackets[i];
 		rx_bytes_total += tap_stats->q_ibytes[i];
-	}
 
-	for (i = 0; i < imax; i++) {
 		tap_stats->q_opackets[i] = pmd->txq[i].stats.opackets;
 		tap_stats->q_errors[i] = pmd->txq[i].stats.errs;
 		tap_stats->q_obytes[i] = pmd->txq[i].stats.obytes;
@@ -417,9 +415,7 @@ tap_stats_reset(struct rte_eth_dev *dev)
 	for (i = 0; i < pmd->nb_queues; i++) {
 		pmd->rxq[i].stats.ipackets = 0;
 		pmd->rxq[i].stats.ibytes = 0;
-	}
 
-	for (i = 0; i < pmd->nb_queues; i++) {
 		pmd->txq[i].stats.opackets = 0;
 		pmd->txq[i].stats.errs = 0;
 		pmd->txq[i].stats.obytes = 0;
@@ -633,11 +629,11 @@ static const struct eth_dev_ops ops = {
 };
 
 static int
-pmd_mac_address(int fd, struct rte_eth_dev *dev, struct ether_addr *addr)
+pmd_mac_address(int fd, struct ether_addr *addr)
 {
 	struct ifreq ifr;
 
-	if ((fd <= 0) || !dev || !addr)
+	if ((fd <= 0) || !addr)
 		return -1;
 
 	memset(&ifr, 0, sizeof(ifr));
@@ -725,7 +721,7 @@ eth_dev_tap_create(const char *name, char *tap_name)
 	pmd->rxq[0].fd = fd;
 	pmd->txq[0].fd = fd;
 
-	if (pmd_mac_address(fd, dev, &pmd->eth_addr) < 0) {
+	if (pmd_mac_address(fd, &pmd->eth_addr) < 0) {
 		RTE_LOG(ERR, PMD, "Unable to get MAC address\n");
 		goto error_exit;
 	}
-- 
2.8.0.GIT

  parent reply	other threads:[~2017-02-02 22:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 22:33 [dpdk-dev] [PATCH 1/5] nic/tap: fix tap docs for device name Keith Wiles
2017-02-02 22:33 ` [dpdk-dev] [PATCH 2/5] net/tap: fix multi-queue support Keith Wiles
2017-02-03  9:37   ` Pascal Mazon
2017-02-03 20:32     ` Wiles, Keith
2017-02-02 22:33 ` [dpdk-dev] [PATCH 3/5] net/tap: remove redundant fds array Keith Wiles
2017-02-03  9:38   ` Pascal Mazon
2017-02-02 22:33 ` [dpdk-dev] [PATCH 4/5] net/tap: fix up log message to correct channel Keith Wiles
2017-02-03  9:45   ` Pascal Mazon
2017-02-02 22:33 ` Keith Wiles [this message]
2017-02-03  9:47   ` [dpdk-dev] [PATCH 5/5] net/tap: remove unused variable and minor cleanup Pascal Mazon
2017-02-03  9:32 ` [dpdk-dev] [PATCH 1/5] nic/tap: fix tap docs for device name Pascal Mazon
2017-02-03 11:48   ` Ferruh Yigit
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 1/6] net/tap: " Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 2/6] net/tap: remove redundant fds array Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 3/6] net/tap: remove unused variable and minor cleanup Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 4/6] net/tap: fix multi-queue support Keith Wiles
2017-02-06 15:45   ` Pascal Mazon
2017-02-06 15:57     ` Wiles, Keith
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 5/6] net/tap: cleanup log messages Keith Wiles
2017-02-05 16:05 ` [dpdk-dev] [PATCH v2 6/6] net/tap: link set down must be before close Keith Wiles
2017-02-06 15:57   ` Pascal Mazon
2017-02-06 16:03     ` Wiles, Keith
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 1/7] net/tap: fix tap docs for device name Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 2/7] net/tap: remove redundant fds array Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 3/7] net/tap: remove unused variable and minor cleanup Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 4/7] net/tap: fix multi-queue support Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 5/7] net/tap: cleanup log messages Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 6/7] net/tap: link set down must be done before close Keith Wiles
2017-02-06 19:40 ` [dpdk-dev] [PATCH v3 7/7] net/tap: move closing fds to pmd close from pmd stop Keith Wiles
2017-02-07  8:51   ` Pascal Mazon
2017-02-07 14:06     ` Ferruh Yigit

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=20170202223330.39240-5-keith.wiles@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=pascal.mazon@6wind.com \
    /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).