DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pascal Mazon <pascal.mazon@6wind.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/tap: add missing newlines in logs
Date: Mon, 10 Jul 2017 09:07:39 +0200	[thread overview]
Message-ID: <a1a658ae-fe3e-540a-aa20-a6bfb333fff0@6wind.com> (raw)
In-Reply-To: <20170706152848.26632-1-thomas@monjalon.net>

Acked-by: Pascal Mazon <pascal.mazon@6wind.com>

On 07/06/2017 05:28 PM, Thomas Monjalon wrote:
> Some logs are missing the newline character \n.
>
> The logs using only line can be checked with this command:
> 	git grep 'RTE_LOG(.*".*[^n]"' drivers/net/tap/
>
> Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
> Fixes: 268483dc2086 ("net/tap: add preliminary support for flow API")
> Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture")
> Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>   drivers/net/tap/rte_eth_tap.c | 22 +++++++++++-----------
>   drivers/net/tap/tap_flow.c    |  6 +++---
>   2 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index f82f08802..110670e15 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -145,7 +145,7 @@ tun_alloc(struct pmd_internals *pmd)
>   
>   	fd = open(TUN_TAP_DEV_PATH, O_RDWR);
>   	if (fd < 0) {
> -		RTE_LOG(ERR, PMD, "Unable to create TAP interface");
> +		RTE_LOG(ERR, PMD, "Unable to create TAP interface\n");
>   		goto error;
>   	}
>   
> @@ -1269,7 +1269,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
>   	if (!pmd->flower_support) {
>   		if (remote_iface[0]) {
>   			RTE_LOG(ERR, PMD,
> -				"%s: kernel does not support TC rules, required for remote feature.",
> +				"%s: kernel does not support TC rules, required for remote feature.\n",
>   				pmd->name);
>   			goto error_exit;
>   		} else {
> @@ -1290,22 +1290,22 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
>   	 */
>   	pmd->nlsk_fd = nl_init(0);
>   	if (pmd->nlsk_fd == -1) {
> -		RTE_LOG(WARNING, PMD, "%s: failed to create netlink socket.",
> +		RTE_LOG(WARNING, PMD, "%s: failed to create netlink socket.\n",
>   			pmd->name);
>   		goto disable_rte_flow;
>   	}
>   	pmd->if_index = if_nametoindex(pmd->name);
>   	if (!pmd->if_index) {
> -		RTE_LOG(ERR, PMD, "%s: failed to get if_index.", pmd->name);
> +		RTE_LOG(ERR, PMD, "%s: failed to get if_index.\n", pmd->name);
>   		goto disable_rte_flow;
>   	}
>   	if (qdisc_create_multiq(pmd->nlsk_fd, pmd->if_index) < 0) {
> -		RTE_LOG(ERR, PMD, "%s: failed to create multiq qdisc.",
> +		RTE_LOG(ERR, PMD, "%s: failed to create multiq qdisc.\n",
>   			pmd->name);
>   		goto disable_rte_flow;
>   	}
>   	if (qdisc_create_ingress(pmd->nlsk_fd, pmd->if_index) < 0) {
> -		RTE_LOG(ERR, PMD, "%s: failed to create ingress qdisc.",
> +		RTE_LOG(ERR, PMD, "%s: failed to create ingress qdisc.\n",
>   			pmd->name);
>   		goto disable_rte_flow;
>   	}
> @@ -1314,14 +1314,14 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
>   	if (strlen(remote_iface)) {
>   		pmd->remote_if_index = if_nametoindex(remote_iface);
>   		if (!pmd->remote_if_index) {
> -			RTE_LOG(ERR, PMD, "%s: failed to get %s if_index.",
> +			RTE_LOG(ERR, PMD, "%s: failed to get %s if_index.\n",
>   				pmd->name, remote_iface);
>   			goto error_remote;
>   		}
>   		snprintf(pmd->remote_iface, RTE_ETH_NAME_MAX_LEN,
>   			 "%s", remote_iface);
>   		if (tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, REMOTE_ONLY) < 0) {
> -			RTE_LOG(ERR, PMD, "%s: failed to get %s MAC address.",
> +			RTE_LOG(ERR, PMD, "%s: failed to get %s MAC address.\n",
>   				pmd->name, pmd->remote_iface);
>   			goto error_remote;
>   		}
> @@ -1329,7 +1329,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
>   			   ETHER_ADDR_LEN);
>   		/* The desired MAC is already in ifreq after SIOCGIFHWADDR. */
>   		if (tap_ioctl(pmd, SIOCSIFHWADDR, &ifr, 0, LOCAL_ONLY) < 0) {
> -			RTE_LOG(ERR, PMD, "%s: failed to get %s MAC address.",
> +			RTE_LOG(ERR, PMD, "%s: failed to get %s MAC address.\n",
>   				pmd->name, remote_iface);
>   			goto error_remote;
>   		}
> @@ -1342,7 +1342,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
>   		qdisc_flush(pmd->nlsk_fd, pmd->remote_if_index);
>   		if (qdisc_create_ingress(pmd->nlsk_fd,
>   					 pmd->remote_if_index) < 0) {
> -			RTE_LOG(ERR, PMD, "%s: failed to create ingress qdisc.",
> +			RTE_LOG(ERR, PMD, "%s: failed to create ingress qdisc.\n",
>   				pmd->remote_iface);
>   			goto error_remote;
>   		}
> @@ -1352,7 +1352,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
>   		    tap_flow_implicit_create(pmd, TAP_REMOTE_BROADCAST) < 0 ||
>   		    tap_flow_implicit_create(pmd, TAP_REMOTE_BROADCASTV6) < 0) {
>   			RTE_LOG(ERR, PMD,
> -				"%s: failed to create implicit rules.",
> +				"%s: failed to create implicit rules.\n",
>   				pmd->name);
>   			goto error_remote;
>   		}
> diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
> index a0dd5048a..e6a24d4ea 100644
> --- a/drivers/net/tap/tap_flow.c
> +++ b/drivers/net/tap/tap_flow.c
> @@ -1371,7 +1371,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,
>   
>   	remote_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
>   	if (!remote_flow) {
> -		RTE_LOG(ERR, PMD, "Cannot allocate memory for rte_flow");
> +		RTE_LOG(ERR, PMD, "Cannot allocate memory for rte_flow\n");
>   		goto fail;
>   	}
>   	msg = &remote_flow->msg;
> @@ -1396,7 +1396,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,
>   	}
>   	err = nl_send(pmd->nlsk_fd, &msg->nh);
>   	if (err < 0) {
> -		RTE_LOG(ERR, PMD, "Failure sending nl request");
> +		RTE_LOG(ERR, PMD, "Failure sending nl request\n");
>   		goto fail;
>   	}
>   	err = nl_recv_ack(pmd->nlsk_fd);
> @@ -1492,7 +1492,7 @@ tap_dev_filter_ctrl(struct rte_eth_dev *dev,
>   		*(const void **)arg = &tap_flow_ops;
>   		return 0;
>   	default:
> -		RTE_LOG(ERR, PMD, "%p: filter type (%d) not supported",
> +		RTE_LOG(ERR, PMD, "%p: filter type (%d) not supported\n",
>   			(void *)dev, filter_type);
>   	}
>   	return -EINVAL;

  reply	other threads:[~2017-07-10  7:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 15:28 Thomas Monjalon
2017-07-10  7:07 ` Pascal Mazon [this message]
2017-07-18  7:51   ` 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=a1a658ae-fe3e-540a-aa20-a6bfb333fff0@6wind.com \
    --to=pascal.mazon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).