* [dpdk-dev] [PATCH] net/tap: add missing newlines in logs
@ 2017-07-06 15:28 Thomas Monjalon
2017-07-10 7:07 ` Pascal Mazon
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2017-07-06 15:28 UTC (permalink / raw)
To: pascal.mazon; +Cc: dev
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;
--
2.13.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/tap: add missing newlines in logs
2017-07-06 15:28 [dpdk-dev] [PATCH] net/tap: add missing newlines in logs Thomas Monjalon
@ 2017-07-10 7:07 ` Pascal Mazon
2017-07-18 7:51 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Mazon @ 2017-07-10 7:07 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/tap: add missing newlines in logs
2017-07-10 7:07 ` Pascal Mazon
@ 2017-07-18 7:51 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-07-18 7:51 UTC (permalink / raw)
To: Pascal Mazon, Thomas Monjalon; +Cc: dev
On 7/10/2017 8:07 AM, Pascal Mazon wrote:
>
> 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/
This shows that some other drivers have same problem.
Any volunteer to fix them are quite welcome.
>>
>> 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>
> Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-18 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 15:28 [dpdk-dev] [PATCH] net/tap: add missing newlines in logs Thomas Monjalon
2017-07-10 7:07 ` Pascal Mazon
2017-07-18 7:51 ` Ferruh Yigit
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).