From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 493BAFFA for ; Fri, 3 Feb 2017 10:45:42 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id b65so19953942wmf.0 for ; Fri, 03 Feb 2017 01:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=TgKa5ypRQ6BFe3wTVZVwljDB8ui75uGzcmKJbKo1FyM=; b=D1sKLfcGpz2MFUkb8Jp/ZyeyppHf9g5kzNRzZuvDMftrwQ9x4appPBAkoAqaLEYUsc k5/MYN5xY51SDuXcwOMTFiB3qtI4KOjYpYdkIWfBIl9P6lVIGd3Q+6Um5GoteU3gzKwS Ia8+BR9HT/k3wAXk1Re/3otW81QZcHypkDOtuiXiLVgrbU26+J7N/F2nBq8HcR7+5jHD cElnnACvhOJxrIdAVa8DZESYjEeY9Yij8ULOGTKHn1UNLOZFjHflv5svU7MekOHLOZm9 /tJsvTWkTCFe4CVnBcBOImyM1an8+LbWGmrG7h9Iry66kc9fRV6wyKGX91v6JP84GG77 bZLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=TgKa5ypRQ6BFe3wTVZVwljDB8ui75uGzcmKJbKo1FyM=; b=k/qK0El/Fk20qfYL7fvVnNU7xE9+1pJ5frdymSzYbtcEEWi7EEJuB9SGsJXA/BDjTm yJK/3JjHKyIfX12Sj85yBlcIbq7zz/tRcfHTC5edbIZIpkpWCNgDBAMFCkcH3uIhtcc/ WbP7zIZr2OQluw/AbuFLj3E1YHTFQ3UDNZMYYxuroZO4CgxPl6N22A4F+VCNLRQuxFN6 rxV/6eLaDFl4COnsO9t9X4T9ihuRPvCw+KlkZsZMu36AF16EMIC7p5KUJrngmpOFIcXC bkz/6WkZwT7i07NaX2MoLQZkTMDICw7f35y+zPPiMNE+OqLi221XAGfnuCIBkc7JW9xK F/rg== X-Gm-Message-State: AMke39lAtM3tvm+c4bFR5zWXmXT72O+cldo6MP3zDdxDwW7HYTxhtZQj+2EJqQPnGPsOVgt8 X-Received: by 10.28.88.6 with SMTP id m6mr585912wmb.4.1486115141911; Fri, 03 Feb 2017 01:45:41 -0800 (PST) Received: from paques.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l37sm44275289wrc.41.2017.02.03.01.45.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2017 01:45:41 -0800 (PST) Date: Fri, 3 Feb 2017 10:45:32 +0100 From: Pascal Mazon To: Keith Wiles Cc: dev@dpdk.org Message-ID: <20170203104532.756aa998@paques.dev.6wind.com> In-Reply-To: <20170202223330.39240-4-keith.wiles@intel.com> References: <20170202223330.39240-1-keith.wiles@intel.com> <20170202223330.39240-4-keith.wiles@intel.com> Organization: 6WIND X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 4/5] net/tap: fix up log message to correct channel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 09:45:42 -0000 On Thu, 2 Feb 2017 16:33:29 -0600 Keith Wiles wrote: > Signed-off-by: Keith Wiles > --- > drivers/net/tap/rte_eth_tap.c | 39 +++++++++++++++++++-------------------- > 1 file changed, 19 insertions(+), 20 deletions(-) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index 6673182..4f7eacf 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -167,7 +167,7 @@ tun_alloc(char *name, uint16_t qid) > > /* Set the TUN/TAP configuration and get the name if needed > */ if (ioctl(fd, TUNSETIFF, (void *)&ifr) < 0) { > - RTE_LOG(ERR, PMD, "Unable to set TUNSETIFF for %s\n", > + RTE_LOG(WARNING, PMD, "Unable to set TUNSETIFF for > %s\n", ifr.ifr_name); > perror("TUNSETIFF"); > goto error; > @@ -206,7 +206,7 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) /* allocate the next mbuf */ > mbuf = rte_pktmbuf_alloc(rxq->mp); > if (unlikely(!mbuf)) { > - RTE_LOG(WARNING, PMD, "Unable to allocate mbuf\n"); > + RTE_LOG(WARNING, PMD, "TAP unable to allocate > mbuf\n"); break; > } > > @@ -559,8 +559,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, > int fd; > > if ((rx_queue_id >= internals->nb_queues) || !mp) { > - RTE_LOG(ERR, PMD, "nb_queues %d mp %p\n", > - internals->nb_queues, mp); > + RTE_LOG(WARNING, PMD, "nb_queues %d too small or mempool > NULL\n", > + internals->nb_queues); > return -1; > } > > @@ -572,7 +572,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, > RTE_PKTMBUF_HEADROOM); > > if (buf_size < ETH_FRAME_LEN) { > - RTE_LOG(ERR, PMD, > + RTE_LOG(WARNING, PMD, > "%s: %d bytes will not fit in mbuf (%d bytes)\n", > dev->data->name, ETH_FRAME_LEN, buf_size); > return -ENOMEM; > @@ -582,7 +582,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, > if (fd == -1) > return -1; > > - RTE_LOG(INFO, PMD, "RX TAP device name %s, qid %d on fd %d\n", > + RTE_LOG(DEBUG, PMD, " RX TAP device name %s, qid %d on fd %d\n", > internals->name, rx_queue_id, > internals->rxq[rx_queue_id].fd); > return 0; > @@ -605,7 +605,7 @@ tap_tx_queue_setup(struct rte_eth_dev *dev, > if (ret == -1) > return -1; > > - RTE_LOG(INFO, PMD, "TX TAP device name %s, qid %d on fd %d\n", > + RTE_LOG(DEBUG, PMD, " TX TAP device name %s, qid %d on fd %d\n", > internals->name, tx_queue_id, > internals->txq[tx_queue_id].fd); > return 0; > @@ -643,7 +643,7 @@ pmd_mac_address(int fd, struct rte_eth_dev *dev, struct > ether_addr *addr) memset(&ifr, 0, sizeof(ifr)); > > if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { > - RTE_LOG(ERR, PMD, "ioctl failed (SIOCGIFHWADDR) (%s)\n", > + RTE_LOG(WARNING, PMD, "ioctl failed (SIOCGIFHWADDR) (%s)\n", > ifr.ifr_name); > return -1; > } > @@ -662,26 +662,25 @@ eth_dev_tap_create(const char *name, char *tap_name) > struct rte_eth_dev_data *data = NULL; > int i, fd = -1; > > - RTE_LOG(INFO, PMD, > - "%s: Create TAP Ethernet device with %d queues on numa %u\n", > - name, RTE_PMD_TAP_MAX_QUEUES, rte_socket_id()); > + RTE_LOG(DEBUG, PMD, " TAP device with %d queues on numa %u\n", > + RTE_PMD_TAP_MAX_QUEUES, rte_socket_id()); > > data = rte_zmalloc_socket(tap_name, sizeof(*data), 0, numa_node); > if (!data) { > - RTE_LOG(ERR, PMD, "Failed to allocate data\n"); > + RTE_LOG(ERR, PMD, "TAP Failed to allocate data\n"); > goto error_exit; > } > > pmd = rte_zmalloc_socket(tap_name, sizeof(*pmd), 0, numa_node); > if (!pmd) { > - RTE_LOG(ERR, PMD, "Unable to allocate internal struct\n"); > + RTE_LOG(ERR, PMD, "TAP Unable to allocate internal > struct\n"); goto error_exit; > } > > /* Use the name and not the tap_name */ > dev = rte_eth_dev_allocate(tap_name); > if (!dev) { > - RTE_LOG(ERR, PMD, "Unable to allocate device struct\n"); > + RTE_LOG(ERR, PMD, "TAP Unable to allocate device struct\n"); > goto error_exit; > } > > @@ -712,7 +711,7 @@ eth_dev_tap_create(const char *name, char *tap_name) > /* Create the first Tap device */ > fd = tun_alloc(tap_name, 0); > if (fd < 0) { > - RTE_LOG(ERR, PMD, "tun_alloc() failed\n"); > + RTE_LOG(ERR, PMD, "TAP tun_alloc() failed for %s\n", > tap_name); goto error_exit; > } > > @@ -734,7 +733,7 @@ eth_dev_tap_create(const char *name, char *tap_name) > return 0; > > error_exit: > - RTE_PMD_DEBUG_TRACE("Unable to initialize %s\n", name); > + RTE_LOG(DEBUG, PMD, "TAP Unable to initialize %s\n", name); > > if (fd > 0) > close(fd); > @@ -787,7 +786,7 @@ rte_pmd_tap_probe(const char *name, const char *params) > DEFAULT_TAP_NAME, tap_unit++); > > if (params && (params[0] != '\0')) { > - RTE_LOG(INFO, PMD, "paramaters (%s)\n", params); > + RTE_LOG(DEBUG, PMD, "paramaters (%s)\n", params); > > kvlist = rte_kvargs_parse(params, valid_arguments); > if (kvlist) { > @@ -812,14 +811,14 @@ rte_pmd_tap_probe(const char *name, const char *params) > } > pmd_link.link_speed = speed; > > - RTE_LOG(INFO, PMD, "Initializing pmd_tap for %s as %s\n", > + RTE_LOG(NOTICE, PMD, "Initializing pmd_tap for %s as %s\n", > name, tap_name); > > ret = eth_dev_tap_create(name, tap_name); > > leave: > if (ret == -1) { > - RTE_LOG(INFO, PMD, "Failed to create pmd for %s as %s\n", > + RTE_LOG(ERR, PMD, "Failed to create pmd for %s as %s\n", > name, tap_name); > tap_unit--; /* Restore the unit number */ > } > @@ -837,7 +836,7 @@ rte_pmd_tap_remove(const char *name) > struct pmd_internals *internals; > int i; > > - RTE_LOG(INFO, PMD, "Closing TUN/TAP Ethernet device on numa %u\n", > + RTE_LOG(DEBUG, PMD, "Closing TUN/TAP Ethernet device on numa %u\n", > rte_socket_id()); > > /* find the ethdev entry */ Acked-by: Pascal Mazon