struct rte_ether_addr eth_addr;
int s;
- PMD_DRV_LOG(DEBUG, "%s: retry count %d\n",
+ PMD_DRV_LOG(DEBUG, "%s: retry count %d",
__func__, hv->eal_hot_plug_retry);
if (hv->eal_hot_plug_retry++ > NETVSC_MAX_HOTADD_RETRY)
di = opendir(buf);
if (!di) {
PMD_DRV_LOG(DEBUG, "%s: can't open directory %s, "
- "retrying in 1 second\n", __func__, buf);
+ "retrying in 1 second", __func__, buf);
goto retry;
}
/* trying to get mac address if this is a network device*/
s = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
if (s == -1) {
- PMD_DRV_LOG(ERR, "Failed to create socket errno %d\n",
+ PMD_DRV_LOG(ERR, "Failed to create socket errno %d",
errno);
break;
}
ret = ioctl(s, SIOCGIFHWADDR, &req);
close(s);
if (ret == -1) {
- PMD_DRV_LOG(ERR, "Failed to send SIOCGIFHWADDR for "
- "device %s\n", dir->d_name);
+ PMD_DRV_LOG(ERR,
+ "Failed to send SIOCGIFHWADDR for device %s",
+ dir->d_name);
break;
}
if (req.ifr_hwaddr.sa_family != ARPHRD_ETHER) {
RTE_DIM(eth_addr.addr_bytes));
if (rte_is_same_ether_addr(ð_addr, dev->data->mac_addrs)) {
- PMD_DRV_LOG(NOTICE, "Found matching MAC address, "
- "adding device %s network name %s\n",
+ PMD_DRV_LOG(NOTICE,
+ "Found matching MAC address, adding device %s network name %s",
d->name, dir->d_name);
ret = rte_eal_hotplug_add(d->bus->name, d->name,
d->args);
if (ret) {
PMD_DRV_LOG(ERR,
- "Failed to add PCI device %s\n",
+ "Failed to add PCI device %s",
d->name);
break;
}
struct rte_devargs *d = &hv->devargs;
int ret;
- PMD_DRV_LOG(INFO, "Device notification type=%d device_name=%s\n",
+ PMD_DRV_LOG(INFO, "Device notification type=%d device_name=%s",
type, device_name);
switch (type) {
ret = rte_devargs_parse(d, device_name);
if (ret) {
PMD_DRV_LOG(ERR,
- "devargs parsing failed ret=%d\n", ret);
+ "devargs parsing failed ret=%d", ret);
return;
}
error = rte_dev_event_callback_register(NULL, netvsc_hotadd_callback,
hv);
if (error) {
- PMD_DRV_LOG(ERR, "failed to register device event callback\n");
+ PMD_DRV_LOG(ERR, "failed to register device event callback");
return error;
}
ret = rte_dev_event_monitor_start();
if (ret) {
- PMD_DRV_LOG(ERR, "Failed to start device event monitoring\n");
+ PMD_DRV_LOG(ERR, "Failed to start device event monitoring");
return ret;
}
return port;
}
- PMD_DRV_LOG(NOTICE, "found matching VF port %d\n", port);
+ PMD_DRV_LOG(NOTICE, "found matching VF port %d", port);
ret = rte_eth_dev_owner_get(port, &owner);
if (ret < 0) {
PMD_DRV_LOG(ERR, "Can not find owner for port %d", port);
/* Tell VSP to switch data path to synthentic */
hn_vf_remove(hv);
- PMD_DRV_LOG(NOTICE, "Start to remove port %d\n", port_id);
+ PMD_DRV_LOG(NOTICE, "Start to remove port %d", port_id);
rte_rwlock_write_lock(&hv->vf_lock);
/* Give back ownership */
ret = rte_eth_dev_owner_unset(port_id, hv->owner.id);
if (ret)
- PMD_DRV_LOG(ERR, "rte_eth_dev_owner_unset failed ret=%d\n",
+ PMD_DRV_LOG(ERR, "rte_eth_dev_owner_unset failed ret=%d",
ret);
hv->vf_ctx.vf_attached = false;
hn_eth_rmv_event_callback, hv);
if (ret)
PMD_DRV_LOG(ERR,
- "rte_eth_dev_callback_unregister failed ret=%d\n",
+ "rte_eth_dev_callback_unregister failed ret=%d",
ret);
/* Detach and release port_id from system */
ret = rte_eth_dev_stop(port_id);
if (ret)
- PMD_DRV_LOG(ERR, "rte_eth_dev_stop failed port_id=%u ret=%d\n",
+ PMD_DRV_LOG(ERR, "rte_eth_dev_stop failed port_id=%u ret=%d",
port_id, ret);
ret = rte_eth_dev_close(port_id);
if (ret)
- PMD_DRV_LOG(ERR, "rte_eth_dev_close failed port_id=%u ret=%d\n",
+ PMD_DRV_LOG(ERR, "rte_eth_dev_close failed port_id=%u ret=%d",
port_id, ret);
ret = rte_dev_remove(dev);
{
struct hn_data *hv = cb_arg;
- PMD_DRV_LOG(NOTICE, "Removing VF portid %d\n", port_id);
+ PMD_DRV_LOG(NOTICE, "Removing VF portid %d", port_id);
rte_eal_alarm_set(1, hn_remove_delayed, hv);
return 0;
ret = rte_eth_tx_queue_info_get(dev->data->port_id, i, &txinfo);
if (ret) {
PMD_DRV_LOG(ERR,
- "rte_eth_tx_queue_info_get failed ret=%d\n",
+ "rte_eth_tx_queue_info_get failed ret=%d",
ret);
return ret;
}
&txinfo.conf);
if (ret) {
PMD_DRV_LOG(ERR,
- "rte_eth_tx_queue_setup failed ret=%d\n",
+ "rte_eth_tx_queue_setup failed ret=%d",
ret);
return ret;
}
ret = rte_eth_rx_queue_info_get(dev->data->port_id, i, &rxinfo);
if (ret) {
PMD_DRV_LOG(ERR,
- "rte_eth_rx_queue_info_get failed ret=%d\n",
+ "rte_eth_rx_queue_info_get failed ret=%d",
ret);
return ret;
}
&rxinfo.conf, rx_queue->mb_pool);
if (ret) {
PMD_DRV_LOG(ERR,
- "rte_eth_rx_queue_setup failed ret=%d\n",
+ "rte_eth_rx_queue_setup failed ret=%d",
ret);
return ret;
}
goto exit;
}
- PMD_DRV_LOG(NOTICE, "configuring VF port %d\n", port);
+ PMD_DRV_LOG(NOTICE, "configuring VF port %d", port);
ret = hn_vf_configure(dev, &dev->data->dev_conf);
if (ret) {
- PMD_DRV_LOG(ERR, "Failed to configure VF port %d\n",
+ PMD_DRV_LOG(ERR, "Failed to configure VF port %d",
port);
goto exit;
}
ret = hn_setup_vf_queues(port, dev);
if (ret) {
PMD_DRV_LOG(ERR,
- "Failed to configure VF queues port %d\n",
+ "Failed to configure VF queues port %d",
port);
goto exit;
}
- PMD_DRV_LOG(NOTICE, "Starting VF port %d\n", port);
+ PMD_DRV_LOG(NOTICE, "Starting VF port %d", port);
ret = rte_eth_dev_start(port);
if (ret) {
- PMD_DRV_LOG(ERR, "rte_eth_dev_start failed ret=%d\n",
+ PMD_DRV_LOG(ERR, "rte_eth_dev_start failed ret=%d",
ret);
goto exit;
}
hv);
if (ret) {
PMD_DRV_LOG(ERR,
- "Registering callback failed for "
- "vf port %d ret %d\n",
+ "Registering callback failed for vf port %d ret %d",
hv->vf_ctx.vf_port, ret);
return ret;
}