From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Mazon Subject: Re: [PATCH 5/5] net/tap: remove unused variable and minor cleanup Date: Fri, 3 Feb 2017 10:47:18 +0100 Message-ID: <20170203104718.66a3eb43@paques.dev.6wind.com> References: <20170202223330.39240-1-keith.wiles@intel.com> <20170202223330.39240-5-keith.wiles@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Keith Wiles Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id BDCB62B96 for ; Fri, 3 Feb 2017 10:47:28 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id r141so19210892wmg.1 for ; Fri, 03 Feb 2017 01:47:28 -0800 (PST) In-Reply-To: <20170202223330.39240-5-keith.wiles@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 2 Feb 2017 16:33:30 -0600 Keith Wiles wrote: > Signed-off-by: Keith Wiles > --- > 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; > } Acked-by: Pascal Mazon