net/tap: add missing newlines in logs
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:02f96a0a82
("net/tap: add TUN/TAP device PMD") Fixes:268483dc20
("net/tap: add preliminary support for flow API") Fixes:2bc06869cd
("net/tap: add remote netdevice traffic capture") Fixes:bf7b7f437b
("net/tap: create netdevice during probing") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
This commit is contained in:
parent
db75c7af19
commit
013b83b82e
@ -145,7 +145,7 @@ tun_alloc(struct pmd_internals *pmd)
|
|||||||
|
|
||||||
fd = open(TUN_TAP_DEV_PATH, O_RDWR);
|
fd = open(TUN_TAP_DEV_PATH, O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
RTE_LOG(ERR, PMD, "Unable to create TAP interface");
|
RTE_LOG(ERR, PMD, "Unable to create TAP interface\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1275,7 +1275,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
|
|||||||
if (!pmd->flower_support) {
|
if (!pmd->flower_support) {
|
||||||
if (remote_iface[0]) {
|
if (remote_iface[0]) {
|
||||||
RTE_LOG(ERR, PMD,
|
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);
|
pmd->name);
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
} else {
|
} else {
|
||||||
@ -1296,22 +1296,22 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
|
|||||||
*/
|
*/
|
||||||
pmd->nlsk_fd = nl_init(0);
|
pmd->nlsk_fd = nl_init(0);
|
||||||
if (pmd->nlsk_fd == -1) {
|
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);
|
pmd->name);
|
||||||
goto disable_rte_flow;
|
goto disable_rte_flow;
|
||||||
}
|
}
|
||||||
pmd->if_index = if_nametoindex(pmd->name);
|
pmd->if_index = if_nametoindex(pmd->name);
|
||||||
if (!pmd->if_index) {
|
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;
|
goto disable_rte_flow;
|
||||||
}
|
}
|
||||||
if (qdisc_create_multiq(pmd->nlsk_fd, pmd->if_index) < 0) {
|
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);
|
pmd->name);
|
||||||
goto disable_rte_flow;
|
goto disable_rte_flow;
|
||||||
}
|
}
|
||||||
if (qdisc_create_ingress(pmd->nlsk_fd, pmd->if_index) < 0) {
|
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);
|
pmd->name);
|
||||||
goto disable_rte_flow;
|
goto disable_rte_flow;
|
||||||
}
|
}
|
||||||
@ -1320,7 +1320,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
|
|||||||
if (strlen(remote_iface)) {
|
if (strlen(remote_iface)) {
|
||||||
pmd->remote_if_index = if_nametoindex(remote_iface);
|
pmd->remote_if_index = if_nametoindex(remote_iface);
|
||||||
if (!pmd->remote_if_index) {
|
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);
|
pmd->name, remote_iface);
|
||||||
goto error_remote;
|
goto error_remote;
|
||||||
}
|
}
|
||||||
@ -1332,7 +1332,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
|
|||||||
|
|
||||||
/* Replicate remote MAC address */
|
/* Replicate remote MAC address */
|
||||||
if (tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, REMOTE_ONLY) < 0) {
|
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);
|
pmd->name, pmd->remote_iface);
|
||||||
goto error_remote;
|
goto error_remote;
|
||||||
}
|
}
|
||||||
@ -1340,7 +1340,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
|
|||||||
ETHER_ADDR_LEN);
|
ETHER_ADDR_LEN);
|
||||||
/* The desired MAC is already in ifreq after SIOCGIFHWADDR. */
|
/* The desired MAC is already in ifreq after SIOCGIFHWADDR. */
|
||||||
if (tap_ioctl(pmd, SIOCSIFHWADDR, &ifr, 0, LOCAL_ONLY) < 0) {
|
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);
|
pmd->name, remote_iface);
|
||||||
goto error_remote;
|
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);
|
qdisc_flush(pmd->nlsk_fd, pmd->remote_if_index);
|
||||||
if (qdisc_create_ingress(pmd->nlsk_fd,
|
if (qdisc_create_ingress(pmd->nlsk_fd,
|
||||||
pmd->remote_if_index) < 0) {
|
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);
|
pmd->remote_iface);
|
||||||
goto error_remote;
|
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_BROADCAST) < 0 ||
|
||||||
tap_flow_implicit_create(pmd, TAP_REMOTE_BROADCASTV6) < 0) {
|
tap_flow_implicit_create(pmd, TAP_REMOTE_BROADCASTV6) < 0) {
|
||||||
RTE_LOG(ERR, PMD,
|
RTE_LOG(ERR, PMD,
|
||||||
"%s: failed to create implicit rules.",
|
"%s: failed to create implicit rules.\n",
|
||||||
pmd->name);
|
pmd->name);
|
||||||
goto error_remote;
|
goto error_remote;
|
||||||
}
|
}
|
||||||
|
@ -1517,7 +1517,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,
|
|||||||
|
|
||||||
remote_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
|
remote_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
|
||||||
if (!remote_flow) {
|
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;
|
goto fail;
|
||||||
}
|
}
|
||||||
msg = &remote_flow->msg;
|
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);
|
err = nl_send(pmd->nlsk_fd, &msg->nh);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
RTE_LOG(ERR, PMD, "Failure sending nl request");
|
RTE_LOG(ERR, PMD, "Failure sending nl request\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
err = nl_recv_ack(pmd->nlsk_fd);
|
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;
|
*(const void **)arg = &tap_flow_ops;
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
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);
|
(void *)dev, filter_type);
|
||||||
}
|
}
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user