net/tap: add missing newlines in logs
authorThomas Monjalon <thomas@monjalon.net>
Thu, 6 Jul 2017 15:28:48 +0000 (17:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Jul 2017 08:09:13 +0000 (11:09 +0300)
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>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
drivers/net/tap/rte_eth_tap.c
drivers/net/tap/tap_flow.c

index a4e5d11..f4782c6 100644 (file)
@@ -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;
        }
 
@@ -1275,7 +1275,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 {
@@ -1296,22 +1296,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;
        }
@@ -1320,7 +1320,7 @@ 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;
                }
@@ -1332,7 +1332,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
 
                /* Replicate remote MAC address */
                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;
                }
@@ -1340,7 +1340,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;
                }
@@ -1353,7 +1353,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;
                }
@@ -1363,7 +1363,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;
                }
index 18425eb..7373b59 100644 (file)
@@ -1517,7 +1517,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;
@@ -1557,7 +1557,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);
@@ -1653,7 +1653,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;