hw->hw_addr = (uint8_t *)(pci_dev->mem_resource[0].addr);
if (!hw->hw_addr) {
PMD_INIT_LOG(ERR, "Hardware is not available, "
- "as address is NULL\n");
+ "as address is NULL");
return -ENODEV;
}
PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
return -EIO;
}
- PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x\n",
+ PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
hw->aq.api_maj_ver, hw->aq.api_min_ver,
((hw->nvm.version >> 12) & 0xf),
/* Disable LLDP */
ret = i40e_aq_stop_lldp(hw, true, NULL);
if (ret != I40E_SUCCESS) /* Its failure can be ignored */
- PMD_INIT_LOG(INFO, "Failed to stop lldp\n");
+ PMD_INIT_LOG(INFO, "Failed to stop lldp");
/* Clear PXE mode */
i40e_clear_pxe_mode(hw);
/* Initialize the queue management */
ret = i40e_res_pool_init(&pf->qp_pool, 0, hw->func_caps.num_tx_qp);
if (ret < 0) {
- PMD_INIT_LOG(ERR, "Failed to init queue pool\n");
+ PMD_INIT_LOG(ERR, "Failed to init queue pool");
goto err_qp_pool_init;
}
ret = i40e_res_pool_init(&pf->msix_pool, 1,
hw->func_caps.num_msix_vectors - 1);
if (ret < 0) {
- PMD_INIT_LOG(ERR, "Failed to init MSIX pool\n");
+ PMD_INIT_LOG(ERR, "Failed to init MSIX pool");
goto err_msix_pool_init;
}
phy_conf.eeer = phy_ab.eeer_val;
phy_conf.low_power_ctrl = phy_ab.d3_lpan;
- PMD_DRV_LOG(DEBUG, "\n\tCurrent: abilities %x, link_speed %x\n"
- "\tConfig: abilities %x, link_speed %x",
- phy_ab.abilities, phy_ab.link_speed,
+ PMD_DRV_LOG(DEBUG, "\tCurrent: abilities %x, link_speed %x",
+ phy_ab.abilities, phy_ab.link_speed);
+ PMD_DRV_LOG(DEBUG, "\tConfig: abilities %x, link_speed %x",
phy_conf.abilities, phy_conf.link_speed);
status = i40e_aq_set_phy_config(hw, &phy_conf, NULL);
if ((dev->data->dev_conf.link_duplex != ETH_LINK_AUTONEG_DUPLEX) &&
(dev->data->dev_conf.link_duplex != ETH_LINK_FULL_DUPLEX)) {
- PMD_INIT_LOG(ERR, "Invalid link_duplex (%hu) for port %hhu\n",
+ PMD_INIT_LOG(ERR, "Invalid link_duplex (%hu) for port %hhu",
dev->data->dev_conf.link_duplex,
dev->data->port_id);
return -EINVAL;
/* Initialize VSI */
ret = i40e_vsi_init(vsi);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to init VSI\n");
+ PMD_DRV_LOG(ERR, "Failed to init VSI");
goto err_up;
}
/* Enable all queues which have been configured */
ret = i40e_vsi_switch_queues(vsi, TRUE);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to enable VSI\n");
+ PMD_DRV_LOG(ERR, "Failed to enable VSI");
goto err_up;
}
if ((vsi->type == I40E_VSI_MAIN) || (vsi->type == I40E_VSI_VMDQ2)) {
ret = i40e_aq_set_vsi_broadcast(hw, vsi->seid, true, NULL);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(INFO, "fail to set vsi broadcast\n");
+ PMD_DRV_LOG(INFO, "fail to set vsi broadcast");
}
/* Apply link configure */
ret = i40e_apply_link_speed(dev);
if (I40E_SUCCESS != ret) {
- PMD_DRV_LOG(ERR, "Fail to apply link setting\n");
+ PMD_DRV_LOG(ERR, "Fail to apply link setting");
goto err_up;
}
status = i40e_aq_set_vsi_unicast_promiscuous(hw, vsi->seid,
true, NULL);
if (status != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous\n");
+ PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous");
status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
TRUE, NULL);
if (status != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n");
+ PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous");
}
status = i40e_aq_set_vsi_unicast_promiscuous(hw, vsi->seid,
false, NULL);
if (status != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous\n");
+ PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous");
status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
false, NULL);
if (status != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n");
+ PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous");
}
static void
ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, TRUE, NULL);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n");
+ PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous");
}
static void
ret = i40e_aq_set_vsi_multicast_promiscuous(hw,
vsi->seid, FALSE, NULL);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n");
+ PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous");
}
/*
if (status != I40E_SUCCESS) {
link.link_speed = ETH_LINK_SPEED_100;
link.link_duplex = ETH_LINK_FULL_DUPLEX;
- PMD_DRV_LOG(ERR, "Failed to get link info\n");
+ PMD_DRV_LOG(ERR, "Failed to get link info");
goto out;
}
int ret;
if (!is_valid_assigned_ether_addr(mac_addr)) {
- PMD_DRV_LOG(ERR, "Invalid ethernet address\n");
+ PMD_DRV_LOG(ERR, "Invalid ethernet address");
return;
}
if (is_same_ether_addr(mac_addr, &(pf->dev_addr))) {
- PMD_DRV_LOG(INFO, "Ignore adding permanent mac address\n");
+ PMD_DRV_LOG(INFO, "Ignore adding permanent mac address");
return;
}
ret = i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_ONLY,
mac_addr->addr_bytes, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to write mac address\n");
+ PMD_DRV_LOG(ERR, "Failed to write mac address");
return;
}
ret = i40e_vsi_add_mac(vsi, mac_addr);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter\n");
+ PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter");
return;
}
ret = i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_ONLY,
hw->mac.perm_addr, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to write mac address\n");
+ PMD_DRV_LOG(ERR, "Failed to write mac address");
return;
}
I40E_MAX_CAP_ELE_NUM;
buf = rte_zmalloc("i40e", len, 0);
if (!buf) {
- PMD_DRV_LOG(ERR, "Failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
ret = i40e_aq_discover_capabilities(hw, buf, len, &size,
i40e_aqc_opc_list_func_capabilities, NULL);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to discover capabilities\n");
+ PMD_DRV_LOG(ERR, "Failed to discover capabilities");
/* Free the temporary buffer after being used */
rte_free(buf);
/* First check if FW support SRIOV */
if (dev->pci_dev->max_vfs && !hw->func_caps.sr_iov_1_1) {
- PMD_INIT_LOG(ERR, "HW configuration doesn't support SRIOV\n");
+ PMD_INIT_LOG(ERR, "HW configuration doesn't support SRIOV");
return -EINVAL;
}
pf->flags = I40E_FLAG_HEADER_SPLIT_DISABLED;
pf->max_num_vsi = RTE_MIN(hw->func_caps.num_vsis, I40E_MAX_NUM_VSIS);
- PMD_INIT_LOG(INFO, "Max supported VSIs:%u\n", pf->max_num_vsi);
+ PMD_INIT_LOG(INFO, "Max supported VSIs:%u", pf->max_num_vsi);
/* Allocate queues for pf */
if (hw->func_caps.rss) {
pf->flags |= I40E_FLAG_RSS;
sum_queues = pf->lan_nb_qps;
/* Default VSI is not counted in */
sum_vsis = 0;
- PMD_INIT_LOG(INFO, "PF queue pairs:%u\n", pf->lan_nb_qps);
+ PMD_INIT_LOG(INFO, "PF queue pairs:%u", pf->lan_nb_qps);
if (hw->func_caps.sr_iov_1_1 && dev->pci_dev->max_vfs) {
pf->flags |= I40E_FLAG_SRIOV;
pf->vf_nb_qps = RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF;
if (dev->pci_dev->max_vfs > hw->func_caps.num_vfs) {
PMD_INIT_LOG(ERR, "Config VF number %u, "
- "max supported %u.\n",
+ "max supported %u.",
dev->pci_dev->max_vfs,
hw->func_caps.num_vfs);
return -EINVAL;
}
if (pf->vf_nb_qps > I40E_MAX_QP_NUM_PER_VF) {
PMD_INIT_LOG(ERR, "FVL VF queue %u, "
- "max support %u queues.\n",
+ "max support %u queues.",
pf->vf_nb_qps, I40E_MAX_QP_NUM_PER_VF);
return -EINVAL;
}
pf->vf_num = dev->pci_dev->max_vfs;
sum_queues += pf->vf_nb_qps * pf->vf_num;
sum_vsis += pf->vf_num;
- PMD_INIT_LOG(INFO, "Max VF num:%u each has queue pairs:%u\n",
+ PMD_INIT_LOG(INFO, "Max VF num:%u each has queue pairs:%u",
pf->vf_num, pf->vf_nb_qps);
} else
pf->vf_num = 0;
pf->vmdq_nb_qps = I40E_DEFAULT_QP_NUM_VMDQ;
sum_queues += pf->vmdq_nb_qps;
sum_vsis += 1;
- PMD_INIT_LOG(INFO, "VMDQ queue pairs:%u\n", pf->vmdq_nb_qps);
+ PMD_INIT_LOG(INFO, "VMDQ queue pairs:%u", pf->vmdq_nb_qps);
}
if (hw->func_caps.fd) {
if (sum_vsis > pf->max_num_vsi ||
sum_queues > hw->func_caps.num_rx_qp) {
- PMD_INIT_LOG(ERR, "VSI/QUEUE setting can't be satisfied\n");
- PMD_INIT_LOG(ERR, "Max VSIs: %u, asked:%u\n",
+ PMD_INIT_LOG(ERR, "VSI/QUEUE setting can't be satisfied");
+ PMD_INIT_LOG(ERR, "Max VSIs: %u, asked:%u",
pf->max_num_vsi, sum_vsis);
- PMD_INIT_LOG(ERR, "Total queue pairs:%u, asked:%u\n",
+ PMD_INIT_LOG(ERR, "Total queue pairs:%u, asked:%u",
hw->func_caps.num_rx_qp, sum_queues);
return -EINVAL;
}
- /* Each VSI occupy 1 MSIX interrupt at least, plus IRQ0 for misc intr cause */
+ /* Each VSI occupy 1 MSIX interrupt at least, plus IRQ0 for misc intr
+ * cause */
if (sum_vsis > hw->func_caps.num_msix_vectors - 1) {
- PMD_INIT_LOG(ERR, "Too many VSIs(%u), "
- "MSIX intr(%u) not enough\n",
+ PMD_INIT_LOG(ERR, "Too many VSIs(%u), MSIX intr(%u) not enough",
sum_vsis, hw->func_caps.num_msix_vectors);
return -EINVAL;
}
switch_config = (struct i40e_aqc_get_switch_config_resp *)\
rte_zmalloc("i40e", I40E_AQ_LARGE_BUF, 0);
if (!switch_config) {
- PMD_DRV_LOG(ERR, "Failed to allocated memory\n");
+ PMD_DRV_LOG(ERR, "Failed to allocated memory");
return -ENOMEM;
}
ret = i40e_aq_get_switch_config(hw, switch_config,
I40E_AQ_LARGE_BUF, &start_seid, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get switch configurations\n");
+ PMD_DRV_LOG(ERR, "Failed to get switch configurations");
goto fail;
}
num_reported = rte_le_to_cpu_16(switch_config->header.num_reported);
if (num_reported != 1) { /* The number should be 1 */
- PMD_DRV_LOG(ERR, "Wrong number of switch config reported\n");
+ PMD_DRV_LOG(ERR, "Wrong number of switch config reported");
goto fail;
}
pf->mac_seid = rte_le_to_cpu_16(element->uplink_seid);
pf->main_vsi_seid = rte_le_to_cpu_16(element->seid);
} else
- PMD_DRV_LOG(INFO, "Unknown element type\n");
+ PMD_DRV_LOG(INFO, "Unknown element type");
fail:
rte_free(switch_config);
entry = rte_zmalloc("i40e", sizeof(*entry), 0);
if (entry == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate memory for resource pool\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate memory for resource pool");
return -ENOMEM;
}
int insert;
if (pool == NULL) {
- PMD_DRV_LOG(ERR, "Invalid parameter\n");
+ PMD_DRV_LOG(ERR, "Invalid parameter");
return -EINVAL;
}
/* Not find, return */
if (valid_entry == NULL) {
- PMD_DRV_LOG(ERR, "Failed to find entry\n");
+ PMD_DRV_LOG(ERR, "Failed to find entry");
return -EINVAL;
}
struct pool_entry *entry, *valid_entry;
if (pool == NULL || num == 0) {
- PMD_DRV_LOG(ERR, "Invalid parameter\n");
+ PMD_DRV_LOG(ERR, "Invalid parameter");
return -EINVAL;
}
if (pool->num_free < num) {
- PMD_DRV_LOG(ERR, "No resource. ask:%u, available:%u\n",
+ PMD_DRV_LOG(ERR, "No resource. ask:%u, available:%u",
num, pool->num_free);
return -ENOMEM;
}
/* Not find one to satisfy the request, return */
if (valid_entry == NULL) {
- PMD_DRV_LOG(ERR, "No valid entry found\n");
+ PMD_DRV_LOG(ERR, "No valid entry found");
return -ENOMEM;
}
/**
entry = rte_zmalloc("res_pool", sizeof(*entry), 0);
if (entry == NULL) {
PMD_DRV_LOG(ERR, "Failed to allocate memory for "
- "resource pool\n");
+ "resource pool");
return -ENOMEM;
}
entry->base = valid_entry->base;
/* If DCB is not supported, only default TC is supported */
if (!hw->func_caps.dcb && enabled_tcmap != I40E_DEFAULT_TCMAP) {
- PMD_DRV_LOG(ERR, "DCB is not enabled, only TC0 is supported\n");
+ PMD_DRV_LOG(ERR, "DCB is not enabled, only TC0 is supported");
return -EINVAL;
}
if (!bitmap_is_subset(hw->func_caps.enabled_tcmap, enabled_tcmap)) {
PMD_DRV_LOG(ERR, "Enabled TC map 0x%x not applicable to "
- "HW support 0x%x\n", hw->func_caps.enabled_tcmap,
+ "HW support 0x%x", hw->func_caps.enabled_tcmap,
enabled_tcmap);
return -EINVAL;
}
int ret;
if (vsi == NULL || info == NULL) {
- PMD_DRV_LOG(ERR, "invalid parameters\n");
+ PMD_DRV_LOG(ERR, "invalid parameters");
return I40E_ERR_PARAM;
}
hw = I40E_VSI_TO_HW(vsi);
ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to update VSI params\n");
+ PMD_DRV_LOG(ERR, "Failed to update VSI params");
return ret;
}
return ret;
if (!vsi->seid) {
- PMD_DRV_LOG(ERR, "seid not valid\n");
+ PMD_DRV_LOG(ERR, "seid not valid");
return -EINVAL;
}
ret = i40e_aq_config_vsi_tc_bw(hw, vsi->seid, &tc_bw_data, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to configure TC BW\n");
+ PMD_DRV_LOG(ERR, "Failed to configure TC BW");
return ret;
}
return -EINVAL;
if (!TAILQ_EMPTY(&veb->head)) {
- PMD_DRV_LOG(ERR, "VEB still has VSI attached, can't remove\n");
+ PMD_DRV_LOG(ERR, "VEB still has VSI attached, can't remove");
return -EACCES;
}
if (NULL == pf || vsi == NULL) {
PMD_DRV_LOG(ERR, "veb setup failed, "
- "associated VSI shouldn't null\n");
+ "associated VSI shouldn't null");
return NULL;
}
hw = I40E_PF_TO_HW(pf);
veb = rte_zmalloc("i40e_veb", sizeof(struct i40e_veb), 0);
if (!veb) {
- PMD_DRV_LOG(ERR, "Failed to allocate memory for veb\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate memory for veb");
goto fail;
}
I40E_DEFAULT_TCMAP, false, false, &veb->seid, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Add veb failed, aq_err: %d\n",
+ PMD_DRV_LOG(ERR, "Add veb failed, aq_err: %d",
hw->aq.asq_last_status);
goto fail;
}
ret = i40e_aq_get_veb_parameters(hw, veb->seid, NULL, NULL,
&veb->stats_idx, NULL, NULL, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Get veb statics index failed, aq_err: %d\n",
+ PMD_DRV_LOG(ERR, "Get veb statics index failed, aq_err: %d",
hw->aq.asq_last_status);
goto fail;
}
if (vsi->type != I40E_VSI_MAIN) {
/* Remove vsi from parent's sibling list */
if (vsi->parent_vsi == NULL || vsi->parent_vsi->veb == NULL) {
- PMD_DRV_LOG(ERR, "VSI's parent VSI is NULL\n");
+ PMD_DRV_LOG(ERR, "VSI's parent VSI is NULL");
return I40E_ERR_PARAM;
}
TAILQ_REMOVE(&vsi->parent_vsi->veb->head,
/* Remove all switch element of the VSI */
ret = i40e_aq_delete_element(hw, vsi->seid, NULL);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to delete element\n");
+ PMD_DRV_LOG(ERR, "Failed to delete element");
}
i40e_res_pool_free(&pf->qp_pool, vsi->base_queue);
struct i40e_mac_filter *f;
PMD_DRV_LOG(WARNING, "Cannot remove the default "
- "macvlan filter\n");
+ "macvlan filter");
/* It needs to add the permanent mac into mac list */
f = rte_zmalloc("macv_filter", sizeof(*f), 0);
if (f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
(void)rte_memcpy(&f->macaddr.addr_bytes, hw->mac.perm_addr,
memset(&bw_config, 0, sizeof(bw_config));
ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid, &bw_config, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "VSI failed to get bandwidth configuration %u\n",
+ PMD_DRV_LOG(ERR, "VSI failed to get bandwidth configuration %u",
hw->aq.asq_last_status);
return ret;
}
&ets_sla_config, NULL);
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(ERR, "VSI failed to get TC bandwdith "
- "configuration %u\n", hw->aq.asq_last_status);
+ "configuration %u", hw->aq.asq_last_status);
return ret;
}
/* Not store the info yet, just print out */
- PMD_DRV_LOG(INFO, "VSI bw limit:%u\n", bw_config.port_bw_limit);
- PMD_DRV_LOG(INFO, "VSI max_bw:%u\n", bw_config.max_bw);
+ PMD_DRV_LOG(INFO, "VSI bw limit:%u", bw_config.port_bw_limit);
+ PMD_DRV_LOG(INFO, "VSI max_bw:%u", bw_config.max_bw);
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
- PMD_DRV_LOG(INFO, "\tVSI TC%u:share credits %u\n", i,
+ PMD_DRV_LOG(INFO, "\tVSI TC%u:share credits %u", i,
ets_sla_config.share_credits[i]);
- PMD_DRV_LOG(INFO, "\tVSI TC%u:credits %u\n", i,
+ PMD_DRV_LOG(INFO, "\tVSI TC%u:credits %u", i,
rte_le_to_cpu_16(ets_sla_config.credits[i]));
PMD_DRV_LOG(INFO, "\tVSI TC%u: max credits: %u", i,
rte_le_to_cpu_16(ets_sla_config.credits[i / 4]) >>
if (type != I40E_VSI_MAIN && uplink_vsi == NULL) {
PMD_DRV_LOG(ERR, "VSI setup failed, "
- "VSI link shouldn't be NULL\n");
+ "VSI link shouldn't be NULL");
return NULL;
}
if (type == I40E_VSI_MAIN && uplink_vsi != NULL) {
PMD_DRV_LOG(ERR, "VSI setup failed, MAIN VSI "
- "uplink VSI should be NULL\n");
+ "uplink VSI should be NULL");
return NULL;
}
uplink_vsi->veb = i40e_veb_setup(pf, uplink_vsi);
if (NULL == uplink_vsi->veb) {
- PMD_DRV_LOG(ERR, "VEB setup failed\n");
+ PMD_DRV_LOG(ERR, "VEB setup failed");
return NULL;
}
}
vsi = rte_zmalloc("i40e_vsi", sizeof(struct i40e_vsi), 0);
if (!vsi) {
- PMD_DRV_LOG(ERR, "Failed to allocate memory for vsi\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate memory for vsi");
return NULL;
}
TAILQ_INIT(&vsi->mac_list);
ctxt.vf_num = 0;
ret = i40e_aq_get_vsi_params(hw, &ctxt, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get VSI params\n");
+ PMD_DRV_LOG(ERR, "Failed to get VSI params");
goto fail_msix_alloc;
}
(void)rte_memcpy(&vsi->info, &ctxt.info,
/* Configure tc, enabled TC0 only */
if (i40e_vsi_update_tc_bandwidth(vsi, I40E_DEFAULT_TCMAP) !=
I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to update TC bandwidth\n");
+ PMD_DRV_LOG(ERR, "Failed to update TC bandwidth");
goto fail_msix_alloc;
}
I40E_DEFAULT_TCMAP);
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(ERR, "Failed to configure "
- "TC queue mapping\n");
+ "TC queue mapping");
goto fail_msix_alloc;
}
ctxt.seid = vsi->seid;
/* Update VSI parameters */
ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to update VSI params\n");
+ PMD_DRV_LOG(ERR, "Failed to update VSI params");
goto fail_msix_alloc;
}
I40E_DEFAULT_TCMAP);
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(ERR, "Failed to configure "
- "TC queue mapping\n");
+ "TC queue mapping");
goto fail_msix_alloc;
}
ctxt.info.up_enable_bits = I40E_DEFAULT_TCMAP;
*/
}
else {
- PMD_DRV_LOG(ERR, "VSI: Not support other type VSI yet\n");
+ PMD_DRV_LOG(ERR, "VSI: Not support other type VSI yet");
goto fail_msix_alloc;
}
if (vsi->type != I40E_VSI_MAIN) {
ret = i40e_aq_add_vsi(hw, &ctxt, NULL);
if (ret) {
- PMD_DRV_LOG(ERR, "add vsi failed, aq_err=%d\n",
+ PMD_DRV_LOG(ERR, "add vsi failed, aq_err=%d",
hw->aq.asq_last_status);
goto fail_msix_alloc;
}
/* MAC/VLAN configuration */
ret = i40e_vsi_add_mac(vsi, &broadcast);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter\n");
+ PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter");
goto fail_msix_alloc;
}
(void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
if (ret)
- PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan stripping\n",
+ PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan stripping",
on ? "enable" : "disable");
return ret;
ret = i40e_vlan_pvid_set(dev, data->dev_conf.txmode.pvid,
data->dev_conf.txmode.hw_vlan_insert_pvid);
if (ret)
- PMD_DRV_LOG(INFO, "Failed to update VSI params\n");
+ PMD_DRV_LOG(INFO, "Failed to update VSI params");
return ret;
}
memset(&link_status, 0, sizeof(link_status));
ret = i40e_aq_get_link_info(hw, FALSE, &link_status, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get link status information\n");
+ PMD_DRV_LOG(ERR, "Failed to get link status information");
goto write_reg; /* Disable flow control */
}
an_info = hw->phy.link_info.an_info;
if (!(an_info & I40E_AQ_AN_COMPLETED)) {
- PMD_DRV_LOG(INFO, "Link auto negotiation not completed\n");
+ PMD_DRV_LOG(INFO, "Link auto negotiation not completed");
ret = I40E_ERR_NOT_READY;
goto write_reg; /* Disable flow control */
}
}
/* Check if it is timeout */
if (j >= I40E_CHK_Q_ENA_COUNT) {
- PMD_DRV_LOG(ERR, "Failed to %s tx queue[%u]\n",
+ PMD_DRV_LOG(ERR, "Failed to %s tx queue[%u]",
(on ? "enable" : "disable"), q_idx);
return I40E_ERR_TIMEOUT;
}
/* Check if it is timeout */
if (j >= I40E_CHK_Q_ENA_COUNT) {
- PMD_DRV_LOG(ERR, "Failed to %s rx queue[%u]\n",
+ PMD_DRV_LOG(ERR, "Failed to %s rx queue[%u]",
(on ? "enable" : "disable"), q_idx);
return I40E_ERR_TIMEOUT;
}
/* enable rx queues before enabling tx queues */
ret = i40e_vsi_switch_rx_queues(vsi, on);
if (ret) {
- PMD_DRV_LOG(ERR, "Failed to switch rx queues\n");
+ PMD_DRV_LOG(ERR, "Failed to switch rx queues");
return ret;
}
ret = i40e_vsi_switch_tx_queues(vsi, on);
/* Stop tx queues before stopping rx queues */
ret = i40e_vsi_switch_tx_queues(vsi, on);
if (ret) {
- PMD_DRV_LOG(ERR, "Failed to switch tx queues\n");
+ PMD_DRV_LOG(ERR, "Failed to switch tx queues");
return ret;
}
ret = i40e_vsi_switch_rx_queues(vsi, on);
ret = i40e_rx_queue_init(data->rx_queues[i]);
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(ERR, "Failed to do RX queue "
- "initialization\n");
+ "initialization");
break;
}
}
err = i40e_vsi_tx_init(vsi);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to do vsi TX initialization\n");
+ PMD_DRV_LOG(ERR, "Failed to do vsi TX initialization");
return err;
}
err = i40e_vsi_rx_init(vsi);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to do vsi RX initialization\n");
+ PMD_DRV_LOG(ERR, "Failed to do vsi RX initialization");
return err;
}
/* Clear the event first */
I40E_WRITE_REG(hw, I40E_GLGEN_VFLRSTAT(index),
(0x1 << offset));
- PMD_DRV_LOG(INFO, "VF %u reset occured\n", abs_vf_id);
+ PMD_DRV_LOG(INFO, "VF %u reset occured", abs_vf_id);
/**
* Only notify a VF reset event occured,
* don't trigger another SW reset
*/
ret = i40e_pf_host_vf_reset(&pf->vfs[i], 0);
if (ret != I40E_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to do VF reset\n");
+ PMD_DRV_LOG(ERR, "Failed to do VF reset");
}
}
}
info.msg_size = I40E_AQ_BUF_SZ;
info.msg_buf = rte_zmalloc("msg_buffer", I40E_AQ_BUF_SZ, 0);
if (!info.msg_buf) {
- PMD_DRV_LOG(ERR, "Failed to allocate mem\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate mem");
return;
}
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(INFO, "Failed to read msg from AdminQ, "
- "aq_err: %u\n", hw->aq.asq_last_status);
+ "aq_err: %u", hw->aq.asq_last_status);
break;
}
opcode = rte_le_to_cpu_16(info.desc.opcode);
info.msg_size);
break;
default:
- PMD_DRV_LOG(ERR, "Request %u is not supported yet\n",
+ PMD_DRV_LOG(ERR, "Request %u is not supported yet",
opcode);
break;
}
/* Shared IRQ case, return */
if (!(cause & I40E_PFINT_ICR0_INTEVENT_MASK)) {
PMD_DRV_LOG(INFO, "Port%d INT0:share IRQ case, "
- "no INT event to process\n", hw->pf_id);
+ "no INT event to process", hw->pf_id);
goto done;
}
if (cause & I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK) {
- PMD_DRV_LOG(INFO, "INT:Link status changed\n");
+ PMD_DRV_LOG(INFO, "INT:Link status changed");
i40e_dev_link_update(dev, 0);
}
if (cause & I40E_PFINT_ICR0_ECC_ERR_MASK)
- PMD_DRV_LOG(INFO, "INT:Unrecoverable ECC Error\n");
+ PMD_DRV_LOG(INFO, "INT:Unrecoverable ECC Error");
if (cause & I40E_PFINT_ICR0_MAL_DETECT_MASK)
- PMD_DRV_LOG(INFO, "INT:Malicious programming detected\n");
+ PMD_DRV_LOG(INFO, "INT:Malicious programming detected");
if (cause & I40E_PFINT_ICR0_GRST_MASK)
- PMD_DRV_LOG(INFO, "INT:Global Resets Requested\n");
+ PMD_DRV_LOG(INFO, "INT:Global Resets Requested");
if (cause & I40E_PFINT_ICR0_PCI_EXCEPTION_MASK)
- PMD_DRV_LOG(INFO, "INT:PCI EXCEPTION occured\n");
+ PMD_DRV_LOG(INFO, "INT:PCI EXCEPTION occured");
if (cause & I40E_PFINT_ICR0_HMC_ERR_MASK)
- PMD_DRV_LOG(INFO, "INT:HMC error occured\n");
+ PMD_DRV_LOG(INFO, "INT:HMC error occured");
/* Add processing func to deal with VF reset vent */
if (cause & I40E_PFINT_ICR0_VFLR_MASK) {
- PMD_DRV_LOG(INFO, "INT:VF reset detected\n");
+ PMD_DRV_LOG(INFO, "INT:VF reset detected");
i40e_dev_handle_vfr_event(dev);
}
/* Find admin queue event */
if (cause & I40E_PFINT_ICR0_ADMINQ_MASK) {
- PMD_DRV_LOG(INFO, "INT:ADMINQ event\n");
+ PMD_DRV_LOG(INFO, "INT:ADMINQ event");
i40e_dev_handle_aq_msg(dev);
}
req_list = rte_zmalloc("macvlan_add", ele_buff_size, 0);
if (req_list == NULL) {
- PMD_DRV_LOG(ERR, "Fail to allocate memory\n");
+ PMD_DRV_LOG(ERR, "Fail to allocate memory");
return I40E_ERR_NO_MEMORY;
}
ret = i40e_aq_add_macvlan(hw, vsi->seid, req_list,
actual_num, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to add macvlan filter\n");
+ PMD_DRV_LOG(ERR, "Failed to add macvlan filter");
goto DONE;
}
num += actual_num;
req_list = rte_zmalloc("macvlan_remove", ele_buff_size, 0);
if (req_list == NULL) {
- PMD_DRV_LOG(ERR, "Fail to allocate memory\n");
+ PMD_DRV_LOG(ERR, "Fail to allocate memory");
return I40E_ERR_NO_MEMORY;
}
ret = i40e_aq_remove_macvlan(hw, vsi->seid, req_list,
actual_num, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to remove macvlan filter\n");
+ PMD_DRV_LOG(ERR, "Failed to remove macvlan filter");
goto DONE;
}
num += actual_num;
if (vsi->vfta[j] & (1 << k)) {
if (i > num - 1) {
PMD_DRV_LOG(ERR, "vlan number "
- "not match\n");
+ "not match");
return I40E_ERR_PARAM;
}
(void)rte_memcpy(&mv_f[i].macaddr,
TAILQ_FOREACH(f, &vsi->mac_list, next) {
if (i > num - 1) {
- PMD_DRV_LOG(ERR, "buffer number not match\n");
+ PMD_DRV_LOG(ERR, "buffer number not match");
return I40E_ERR_PARAM;
}
(void)rte_memcpy(&mv_f[i].macaddr, &f->macaddr, ETH_ADDR_LEN);
mv_f = rte_zmalloc("macvlan_data", num * sizeof(*mv_f), 0);
if (mv_f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
mac_num = vsi->mac_num;
if (mac_num == 0) {
- PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr\n");
+ PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr");
return I40E_ERR_PARAM;
}
mv_f = rte_zmalloc("macvlan_data", mac_num * sizeof(*mv_f), 0);
if (mv_f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
mac_num = vsi->mac_num;
if (mac_num == 0) {
- PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr\n");
+ PMD_DRV_LOG(ERR, "Error! VSI doesn't have a mac addr");
return I40E_ERR_PARAM;
}
mv_f = rte_zmalloc("macvlan_data", mac_num * sizeof(*mv_f), 0);
if (mv_f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
mv_f = rte_zmalloc("macvlan_data", vlan_num * sizeof(*mv_f), 0);
if (mv_f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
/* Add the mac addr into mac list */
f = rte_zmalloc("macv_filter", sizeof(*f), 0);
if (f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
ret = I40E_ERR_NO_MEMORY;
goto DONE;
}
vlan_num = vsi->vlan_num;
if (vlan_num == 0) {
- PMD_DRV_LOG(ERR, "VLAN number shouldn't be 0\n");
+ PMD_DRV_LOG(ERR, "VLAN number shouldn't be 0");
return I40E_ERR_PARAM;
}
mv_f = rte_zmalloc("macvlan_data", vlan_num * sizeof(*mv_f), 0);
if (mv_f == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate memory\n");
+ PMD_DRV_LOG(ERR, "failed to allocate memory");
return I40E_ERR_NO_MEMORY;
}
vf->link_up =
vpe->event_data.link_event.link_status;
vf->pend_msg |= PFMSG_LINK_CHANGE;
- PMD_DRV_LOG(INFO, "Link status update:%s\n",
+ PMD_DRV_LOG(INFO, "Link status update:%s",
vf->link_up ? "up" : "down");
break;
case I40E_VIRTCHNL_EVENT_RESET_IMPENDING:
vf->vf_reset = true;
vf->pend_msg |= PFMSG_RESET_IMPENDING;
- PMD_DRV_LOG(INFO, "vf is reseting\n");
+ PMD_DRV_LOG(INFO, "vf is reseting");
break;
case I40E_VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
vf->dev_closed = true;
vf->pend_msg |= PFMSG_DRIVER_CLOSE;
- PMD_DRV_LOG(INFO, "PF driver closed\n");
+ PMD_DRV_LOG(INFO, "PF driver closed");
break;
default:
- PMD_DRV_LOG(ERR, "%s: Unknown event %d from pf\n",
+ PMD_DRV_LOG(ERR, "%s: Unknown event %d from pf",
__func__, vpe->event);
}
} else {
I40E_VIRTCHNL_OP_UNKNOWN, ops);
if (!ret)
- PMD_DRV_LOG(ERR, "There is incomplete cmd %d\n", vf->pend_cmd);
+ PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd);
return !ret;
}
err = i40e_aq_send_msg_to_pf(hw, args->ops, I40E_SUCCESS,
args->in_args, args->in_args_size, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "fail to send cmd %d\n", args->ops);
+ PMD_DRV_LOG(ERR, "fail to send cmd %d", args->ops);
return err;
}
if (!err && args->ops == info.ops)
_clear_cmd(vf);
else if (err)
- PMD_DRV_LOG(ERR, "Failed to read message from AdminQ\n");
+ PMD_DRV_LOG(ERR, "Failed to read message from AdminQ");
else if (args->ops != info.ops)
- PMD_DRV_LOG(ERR, "command mismatch, expect %u, get %u\n",
+ PMD_DRV_LOG(ERR, "command mismatch, expect %u, get %u",
args->ops, info.ops);
return (err | info.result);
err = i40evf_execute_vf_cmd(dev, &args);
if (err) {
- PMD_INIT_LOG(ERR, "fail to execute command OP_VERSION\n");
+ PMD_INIT_LOG(ERR, "fail to execute command OP_VERSION");
return err;
}
/* We are talking with DPDK host */
if (pver->major == I40E_DPDK_VERSION_MAJOR) {
vf->host_is_dpdk = TRUE;
- PMD_DRV_LOG(INFO, "Detect PF host is DPDK app\n");
+ PMD_DRV_LOG(INFO, "Detect PF host is DPDK app");
}
/* It's linux host driver */
else if ((pver->major != version.major) ||
(pver->minor != version.minor)) {
PMD_INIT_LOG(ERR, "pf/vf API version mismatch. "
- "(%u.%u)-(%u.%u)\n", pver->major, pver->minor,
+ "(%u.%u)-(%u.%u)", pver->major, pver->minor,
version.major, version.minor);
return -1;
}
err = i40evf_execute_vf_cmd(dev, &args);
if (err) {
- PMD_DRV_LOG(ERR, "fail to execute command OP_GET_VF_RESOURCE\n");
+ PMD_DRV_LOG(ERR, "fail to execute command OP_GET_VF_RESOURCE");
return err;
}
if (err)
PMD_DRV_LOG(ERR, "fail to execute command "
- "CONFIG_PROMISCUOUS_MODE\n");
+ "CONFIG_PROMISCUOUS_MODE");
return err;
}
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
- PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_OFFLOAD\n");
+ PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_OFFLOAD");
return err;
}
struct i40e_virtchnl_pvid_info tpid_info;
if (dev == NULL || info == NULL) {
- PMD_DRV_LOG(ERR, "invalid parameters\n");
+ PMD_DRV_LOG(ERR, "invalid parameters");
return I40E_ERR_PARAM;
}
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
- PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_PVID\n");
+ PMD_DRV_LOG(ERR, "fail to execute command CFG_VLAN_PVID");
return err;
}
len = sizeof(*queue_info) + sizeof(*queue_cfg) * nb_qpairs;
queue_info = rte_zmalloc("queue_info", len, 0);
if (queue_info == NULL) {
- PMD_INIT_LOG(ERR, "failed alloc memory for queue_info\n");
+ PMD_INIT_LOG(ERR, "failed alloc memory for queue_info");
return -1;
}
queue_info->vsi_id = vf->vsi_res->vsi_id;
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command "
- "OP_CONFIG_VSI_QUEUES\n");
+ "OP_CONFIG_VSI_QUEUES");
rte_free(queue_info);
return err;
args.out_size = I40E_AQ_BUF_SZ;
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
- PMD_DRV_LOG(ERR, "fail to execute command OP_ENABLE_QUEUES\n");
+ PMD_DRV_LOG(ERR, "fail to execute command OP_ENABLE_QUEUES");
return err;
}
args.out_size = I40E_AQ_BUF_SZ;
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
- PMD_DRV_LOG(ERR, "fail to switch %s %u %s\n",
+ PMD_DRV_LOG(ERR, "fail to switch %s %u %s",
isrx ? "RX" : "TX", qid, on ? "on" : "off");
return err;
if (rxq->start_rx_per_q)
continue;
if (i40evf_dev_rx_queue_start(dev, i) != 0) {
- PMD_DRV_LOG(ERR, "Fail to start queue %u\n", i);
+ PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
return -1;
}
}
if (txq->start_tx_per_q)
continue;
if (i40evf_dev_tx_queue_start(dev, i) != 0) {
- PMD_DRV_LOG(ERR, "Fail to start queue %u\n", i);
+ PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
return -1;
}
}
/* Stop TX queues first */
for (i = 0; i < dev->data->nb_tx_queues; i++) {
if (i40evf_dev_tx_queue_stop(dev, i) != 0) {
- PMD_DRV_LOG(ERR, "Fail to start queue %u\n", i);
+ PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
return -1;
}
}
/* Then stop RX queues */
for (i = 0; i < dev->data->nb_rx_queues; i++) {
if (i40evf_dev_rx_queue_stop(dev, i) != 0) {
- PMD_DRV_LOG(ERR, "Fail to start queue %u\n", i);
+ PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
return -1;
}
}
struct vf_cmd_info args;
if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x\n",
+ PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x",
addr->addr_bytes[0], addr->addr_bytes[1],
addr->addr_bytes[2], addr->addr_bytes[3],
addr->addr_bytes[4], addr->addr_bytes[5]);
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command "
- "OP_ADD_ETHER_ADDRESS\n");
+ "OP_ADD_ETHER_ADDRESS");
return err;
}
struct vf_cmd_info args;
if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Invalid mac:%x-%x-%x-%x-%x-%x\n",
+ PMD_DRV_LOG(ERR, "Invalid mac:%x-%x-%x-%x-%x-%x",
addr->addr_bytes[0], addr->addr_bytes[1],
addr->addr_bytes[2], addr->addr_bytes[3],
addr->addr_bytes[4], addr->addr_bytes[5]);
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command "
- "OP_DEL_ETHER_ADDRESS\n");
+ "OP_DEL_ETHER_ADDRESS");
return err;
}
err = i40evf_execute_vf_cmd(dev, &args);
if (err) {
- PMD_DRV_LOG(ERR, "fail to execute command OP_GET_STATS\n");
+ PMD_DRV_LOG(ERR, "fail to execute command OP_GET_STATS");
return err;
}
pstats = (struct i40e_eth_stats *)args.out_buffer;
args.out_size = I40E_AQ_BUF_SZ;
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
- PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN\n");
+ PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN");
return err;
}
args.out_size = I40E_AQ_BUF_SZ;
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
- PMD_DRV_LOG(ERR, "fail to execute command OP_DEL_VLAN\n");
+ PMD_DRV_LOG(ERR, "fail to execute command OP_DEL_VLAN");
return err;
}
args.out_size = I40E_AQ_BUF_SZ;
err = i40evf_execute_vf_cmd(dev, &args);
if (err) {
- PMD_DRV_LOG(ERR, "fail to execute command OP_GET_LINK_STAT\n");
+ PMD_DRV_LOG(ERR, "fail to execute command OP_GET_LINK_STAT");
return err;
}
int i, reset;
if (i40e_vf_reset(hw) != I40E_SUCCESS) {
- PMD_INIT_LOG(ERR, "Reset VF NIC failed\n");
+ PMD_INIT_LOG(ERR, "Reset VF NIC failed");
return -1;
}
/**
}
if (i >= MAX_RESET_WAIT_CNT) {
- PMD_INIT_LOG(ERR, "Reset VF NIC failed\n");
+ PMD_INIT_LOG(ERR, "Reset VF NIC failed");
return -1;
}
err = i40evf_set_mac_type(hw);
if (err) {
- PMD_INIT_LOG(ERR, "set_mac_type failed: %d\n", err);
+ PMD_INIT_LOG(ERR, "set_mac_type failed: %d", err);
goto err;
}
i40e_init_adminq_parameter(hw);
err = i40e_init_adminq(hw);
if (err) {
- PMD_INIT_LOG(ERR, "init_adminq failed: %d\n", err);
+ PMD_INIT_LOG(ERR, "init_adminq failed: %d", err);
goto err;
}
/* Reset VF and wait until it's complete */
if (i40evf_reset_vf(hw)) {
- PMD_INIT_LOG(ERR, "reset NIC failed\n");
+ PMD_INIT_LOG(ERR, "reset NIC failed");
goto err_aq;
}
/* VF reset, shutdown admin queue and initialize again */
if (i40e_shutdown_adminq(hw) != I40E_SUCCESS) {
- PMD_INIT_LOG(ERR, "i40e_shutdown_adminq failed\n");
+ PMD_INIT_LOG(ERR, "i40e_shutdown_adminq failed");
return -1;
}
i40e_init_adminq_parameter(hw);
if (i40e_init_adminq(hw) != I40E_SUCCESS) {
- PMD_INIT_LOG(ERR, "init_adminq failed\n");
+ PMD_INIT_LOG(ERR, "init_adminq failed");
return -1;
}
if (i40evf_check_api_version(dev) != 0) {
- PMD_INIT_LOG(ERR, "check_api version failed\n");
+ PMD_INIT_LOG(ERR, "check_api version failed");
goto err_aq;
}
bufsz = sizeof(struct i40e_virtchnl_vf_resource) +
(I40E_MAX_VF_VSI * sizeof(struct i40e_virtchnl_vsi_resource));
vf->vf_res = rte_zmalloc("vf_res", bufsz, 0);
if (!vf->vf_res) {
- PMD_INIT_LOG(ERR, "unable to allocate vf_res memory\n");
+ PMD_INIT_LOG(ERR, "unable to allocate vf_res memory");
goto err_aq;
}
if (i40evf_get_vf_resource(dev) != 0) {
- PMD_INIT_LOG(ERR, "i40evf_get_vf_config failed\n");
+ PMD_INIT_LOG(ERR, "i40evf_get_vf_config failed");
goto err_alloc;
}
}
if (!vf->vsi_res) {
- PMD_INIT_LOG(ERR, "no LAN VSI found\n");
+ PMD_INIT_LOG(ERR, "no LAN VSI found");
goto err_alloc;
}
hw->hw_addr = (void *)eth_dev->pci_dev->mem_resource[0].addr;
if(i40evf_init_vf(eth_dev) != 0) {
- PMD_INIT_LOG(ERR, "Init vf failed\n");
+ PMD_INIT_LOG(ERR, "Init vf failed");
return -1;
}
err = i40e_alloc_rx_queue_mbufs(rxq);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf");
return err;
}
err = i40evf_switch_queue(dev, TRUE, rx_queue_id, TRUE);
if (err)
- PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on\n",
+ PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
rx_queue_id);
}
err = i40evf_switch_queue(dev, TRUE, rx_queue_id, FALSE);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off\n",
+ PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off",
rx_queue_id);
return err;
}
err = i40evf_switch_queue(dev, FALSE, tx_queue_id, TRUE);
if (err)
- PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on\n",
+ PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on",
tx_queue_id);
}
err = i40evf_switch_queue(dev, FALSE, tx_queue_id, FALSE);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of\n",
+ PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of",
tx_queue_id);
return err;
}
vf->max_pkt_len > I40E_FRAME_SIZE_MAX) {
PMD_DRV_LOG(ERR, "maximum packet length must "
"be larger than %u and smaller than %u,"
- "as jumbo frame is enabled\n",
+ "as jumbo frame is enabled",
(uint32_t)ETHER_MAX_LEN,
(uint32_t)I40E_FRAME_SIZE_MAX);
return I40E_ERR_CONFIG;
vf->max_pkt_len > ETHER_MAX_LEN) {
PMD_DRV_LOG(ERR, "maximum packet length must be "
"larger than %u and smaller than %u, "
- "as jumbo frame is disabled\n",
+ "as jumbo frame is disabled",
(uint32_t)ETHER_MIN_LEN,
(uint32_t)ETHER_MAX_LEN);
return I40E_ERR_CONFIG;
dev->data->nb_tx_queues);
if (i40evf_rx_init(dev) != 0){
- PMD_DRV_LOG(ERR, "failed to do RX init\n");
+ PMD_DRV_LOG(ERR, "failed to do RX init");
return -1;
}
i40evf_tx_init(dev);
if (i40evf_configure_queues(dev) != 0) {
- PMD_DRV_LOG(ERR, "configure queues failed\n");
+ PMD_DRV_LOG(ERR, "configure queues failed");
goto err_queue;
}
if (i40evf_config_irq_map(dev)) {
- PMD_DRV_LOG(ERR, "config_irq_map failed\n");
+ PMD_DRV_LOG(ERR, "config_irq_map failed");
goto err_queue;
}
(void)rte_memcpy(mac_addr.addr_bytes, hw->mac.addr,
sizeof(mac_addr.addr_bytes));
if (i40evf_add_mac_addr(dev, &mac_addr)) {
- PMD_DRV_LOG(ERR, "Failed to add mac addr\n");
+ PMD_DRV_LOG(ERR, "Failed to add mac addr");
goto err_queue;
}
if (i40evf_start_queues(dev) != 0) {
- PMD_DRV_LOG(ERR, "enable queues failed\n");
+ PMD_DRV_LOG(ERR, "enable queues failed");
goto err_mac;
}
{
memset(stats, 0, sizeof(*stats));
if (i40evf_get_statics(dev, stats))
- PMD_DRV_LOG(ERR, "Get statics failed\n");
+ PMD_DRV_LOG(ERR, "Get statics failed");
}
static void
}
if (i >= VFRESET_MAX_WAIT_CNT) {
- PMD_DRV_LOG(ERR, "VF reset timeout\n");
+ PMD_DRV_LOG(ERR, "VF reset timeout");
return -ETIMEDOUT;
}
qsel.tx_queues = qsel.rx_queues;
ret = i40e_pf_host_switch_queues(vf, &qsel, false);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Disable VF queues failed\n");
+ PMD_DRV_LOG(ERR, "Disable VF queues failed");
return -EFAULT;
}
/* remove VSI */
ret = i40e_vsi_release(vf->vsi);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Release VSI failed\n");
+ PMD_DRV_LOG(ERR, "Release VSI failed");
return -EFAULT;
}
}
}
if (i >= VFRESET_MAX_WAIT_CNT) {
- PMD_DRV_LOG(ERR, "Wait VF PCI transaction end timeout\n");
+ PMD_DRV_LOG(ERR, "Wait VF PCI transaction end timeout");
return -ETIMEDOUT;
}
vf->vsi = i40e_vsi_setup(vf->pf, I40E_VSI_SRIOV,
vf->pf->main_vsi, vf->vf_idx);
if (vf->vsi == NULL) {
- PMD_DRV_LOG(ERR, "Add vsi failed\n");
+ PMD_DRV_LOG(ERR, "Add vsi failed");
return -EFAULT;
}
ret = i40e_pf_vf_queues_mapping(vf);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "queue mapping error\n");
+ PMD_DRV_LOG(ERR, "queue mapping error");
i40e_vsi_release(vf->vsi);
return -EFAULT;
}
vf_res = rte_zmalloc("i40e_vf_res", len, 0);
if (vf_res == NULL) {
- PMD_DRV_LOG(ERR, "failed to allocate mem\n");
+ PMD_DRV_LOG(ERR, "failed to allocate mem");
ret = I40E_ERR_NO_MEMORY;
vf_res = NULL;
len = 0;
if (msg == NULL || msglen <= sizeof(*qconfig) ||
qconfig->num_queue_pairs > vsi->nb_qps) {
- PMD_DRV_LOG(ERR, "vsi_queue_config_info argument wrong\n");
+ PMD_DRV_LOG(ERR, "vsi_queue_config_info argument wrong");
ret = I40E_ERR_PARAM;
goto send_msg;
}
(struct i40e_virtchnl_irq_map_info *)msg;
if (msg == NULL || msglen < sizeof(struct i40e_virtchnl_irq_map_info)) {
- PMD_DRV_LOG(ERR, "buffer too short\n");
+ PMD_DRV_LOG(ERR, "buffer too short");
ret = I40E_ERR_PARAM;
goto send_msg;
}
/* Assume VF only have 1 vector to bind all queues */
if (irqmap->num_vectors != 1) {
- PMD_DRV_LOG(ERR, "DKDK host only support 1 vector\n");
+ PMD_DRV_LOG(ERR, "DKDK host only support 1 vector");
ret = I40E_ERR_PARAM;
goto send_msg;
}
if (irqmap->vecmap[0].vector_id == 0) {
- PMD_DRV_LOG(ERR, "DPDK host don't support use IRQ0\n");
+ PMD_DRV_LOG(ERR, "DPDK host don't support use IRQ0");
ret = I40E_ERR_PARAM;
goto send_msg;
}
struct ether_addr *mac;
if (msg == NULL || msglen <= sizeof(*addr_list)) {
- PMD_DRV_LOG(ERR, "add_ether_address argument too short\n");
+ PMD_DRV_LOG(ERR, "add_ether_address argument too short");
ret = I40E_ERR_PARAM;
goto send_msg;
}
struct ether_addr *mac;
if (msg == NULL || msglen <= sizeof(*addr_list)) {
- PMD_DRV_LOG(ERR, "delete_ether_address argument too short\n");
+ PMD_DRV_LOG(ERR, "delete_ether_address argument too short");
ret = I40E_ERR_PARAM;
goto send_msg;
}
uint16_t *vid;
if (msg == NULL || msglen <= sizeof(*vlan_filter_list)) {
- PMD_DRV_LOG(ERR, "add_vlan argument too short\n");
+ PMD_DRV_LOG(ERR, "add_vlan argument too short");
ret = I40E_ERR_PARAM;
goto send_msg;
}
uint16_t *vid;
if (msg == NULL || msglen <= sizeof(*vlan_filter_list)) {
- PMD_DRV_LOG(ERR, "delete_vlan argument too short\n");
+ PMD_DRV_LOG(ERR, "delete_vlan argument too short");
ret = I40E_ERR_PARAM;
goto send_msg;
}
ret = i40e_vsi_config_vlan_stripping(vf->vsi,
!!offload->enable_vlan_strip);
if (ret != 0)
- PMD_DRV_LOG(ERR, "Failed to configure vlan stripping\n");
+ PMD_DRV_LOG(ERR, "Failed to configure vlan stripping");
send_msg:
i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD,
uint16_t vf_id = abs_vf_id - hw->func_caps.vf_base_id;
if (!dev || vf_id > pf->vf_num - 1 || !pf->vfs) {
- PMD_DRV_LOG(ERR, "invalid argument\n");
+ PMD_DRV_LOG(ERR, "invalid argument");
return;
}
vf = &pf->vfs[vf_id];
if (!vf->vsi) {
- PMD_DRV_LOG(ERR, "NO VSI associated with VF found\n");
+ PMD_DRV_LOG(ERR, "NO VSI associated with VF found");
i40e_pf_host_send_msg_to_vf(vf, opcode,
I40E_ERR_NO_AVAILABLE_VSI, NULL, 0);
return;
switch (opcode) {
case I40E_VIRTCHNL_OP_VERSION :
- PMD_DRV_LOG(INFO, "OP_VERSION received\n");
+ PMD_DRV_LOG(INFO, "OP_VERSION received");
i40e_pf_host_process_cmd_version(vf);
break;
case I40E_VIRTCHNL_OP_RESET_VF :
- PMD_DRV_LOG(INFO, "OP_RESET_VF received\n");
+ PMD_DRV_LOG(INFO, "OP_RESET_VF received");
i40e_pf_host_process_cmd_reset_vf(vf);
break;
case I40E_VIRTCHNL_OP_GET_VF_RESOURCES:
- PMD_DRV_LOG(INFO, "OP_GET_VF_RESOURCES received\n");
+ PMD_DRV_LOG(INFO, "OP_GET_VF_RESOURCES received");
i40e_pf_host_process_cmd_get_vf_resource(vf);
break;
case I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES:
- PMD_DRV_LOG(INFO, "OP_CONFIG_VSI_QUEUES received\n");
+ PMD_DRV_LOG(INFO, "OP_CONFIG_VSI_QUEUES received");
i40e_pf_host_process_cmd_config_vsi_queues(vf,
msg, msglen);
break;
case I40E_VIRTCHNL_OP_CONFIG_IRQ_MAP:
- PMD_DRV_LOG(INFO, "OP_CONFIG_IRQ_MAP received\n");
+ PMD_DRV_LOG(INFO, "OP_CONFIG_IRQ_MAP received");
i40e_pf_host_process_cmd_config_irq_map(vf, msg, msglen);
break;
case I40E_VIRTCHNL_OP_ENABLE_QUEUES:
- PMD_DRV_LOG(INFO, "OP_ENABLE_QUEUES received\n");
+ PMD_DRV_LOG(INFO, "OP_ENABLE_QUEUES received");
i40e_pf_host_process_cmd_enable_queues(vf,
msg, msglen);
break;
case I40E_VIRTCHNL_OP_DISABLE_QUEUES:
- PMD_DRV_LOG(INFO, "OP_DISABLE_QUEUE received\n");
+ PMD_DRV_LOG(INFO, "OP_DISABLE_QUEUE received");
i40e_pf_host_process_cmd_disable_queues(vf,
msg, msglen);
break;
case I40E_VIRTCHNL_OP_ADD_ETHER_ADDRESS:
- PMD_DRV_LOG(INFO, "OP_ADD_ETHER_ADDRESS received\n");
+ PMD_DRV_LOG(INFO, "OP_ADD_ETHER_ADDRESS received");
i40e_pf_host_process_cmd_add_ether_address(vf,
msg, msglen);
break;
case I40E_VIRTCHNL_OP_DEL_ETHER_ADDRESS:
- PMD_DRV_LOG(INFO, "OP_DEL_ETHER_ADDRESS received\n");
+ PMD_DRV_LOG(INFO, "OP_DEL_ETHER_ADDRESS received");
i40e_pf_host_process_cmd_del_ether_address(vf,
msg, msglen);
break;
case I40E_VIRTCHNL_OP_ADD_VLAN:
- PMD_DRV_LOG(INFO, "OP_ADD_VLAN received\n");
+ PMD_DRV_LOG(INFO, "OP_ADD_VLAN received");
i40e_pf_host_process_cmd_add_vlan(vf, msg, msglen);
break;
case I40E_VIRTCHNL_OP_DEL_VLAN:
- PMD_DRV_LOG(INFO, "OP_DEL_VLAN received\n");
+ PMD_DRV_LOG(INFO, "OP_DEL_VLAN received");
i40e_pf_host_process_cmd_del_vlan(vf, msg, msglen);
break;
case I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE:
- PMD_DRV_LOG(INFO, "OP_CONFIG_PROMISCUOUS_MODE received\n");
+ PMD_DRV_LOG(INFO, "OP_CONFIG_PROMISCUOUS_MODE received");
i40e_pf_host_process_cmd_config_promisc_mode(vf, msg, msglen);
break;
case I40E_VIRTCHNL_OP_GET_STATS:
- PMD_DRV_LOG(INFO, "OP_GET_STATS received\n");
+ PMD_DRV_LOG(INFO, "OP_GET_STATS received");
i40e_pf_host_process_cmd_get_stats(vf);
break;
case I40E_VIRTCHNL_OP_GET_LINK_STAT:
- PMD_DRV_LOG(INFO, "OP_GET_LINK_STAT received\n");
+ PMD_DRV_LOG(INFO, "OP_GET_LINK_STAT received");
i40e_pf_host_process_cmd_get_link_status(vf);
break;
case I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD:
- PMD_DRV_LOG(INFO, "OP_CFG_VLAN_OFFLOAD received\n");
+ PMD_DRV_LOG(INFO, "OP_CFG_VLAN_OFFLOAD received");
i40e_pf_host_process_cmd_cfg_vlan_offload(vf, msg, msglen);
break;
case I40E_VIRTCHNL_OP_CFG_VLAN_PVID:
- PMD_DRV_LOG(INFO, "OP_CFG_VLAN_PVID received\n");
+ PMD_DRV_LOG(INFO, "OP_CFG_VLAN_PVID received");
i40e_pf_host_process_cmd_cfg_pvid(vf, msg, msglen);
break;
/* Don't add command supported below, which will
* return an error code.
*/
case I40E_VIRTCHNL_OP_FCOE:
- PMD_DRV_LOG(ERR, "OP_FCOE received, not supported\n");
+ PMD_DRV_LOG(ERR, "OP_FCOE received, not supported");
default:
- PMD_DRV_LOG(ERR, "%u received, not supported\n", opcode);
+ PMD_DRV_LOG(ERR, "%u received, not supported", opcode);
i40e_pf_host_send_msg_to_vf(vf, opcode,
I40E_ERR_PARAM, NULL, 0);
break;
uint8_t l3_len)
{
if (!l2_len) {
- PMD_DRV_LOG(DEBUG, "L2 length set to 0\n");
+ PMD_DRV_LOG(DEBUG, "L2 length set to 0");
return;
}
*td_offset |= (l2_len >> 1) << I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
if (!l3_len) {
- PMD_DRV_LOG(DEBUG, "L3 length set to 0\n");
+ PMD_DRV_LOG(DEBUG, "L3 length set to 0");
return;
}
diag = rte_mempool_get_bulk(rxq->mp, (void *)rxep,
rxq->rx_free_thresh);
if (unlikely(diag != 0)) {
- PMD_DRV_LOG(ERR, "Failed to get mbufs in bulk\n");
+ PMD_DRV_LOG(ERR, "Failed to get mbufs in bulk");
return -ENOMEM;
}
uint16_t i, j;
PMD_RX_LOG(DEBUG, "Rx mbuf alloc failed for "
- "port_id=%u, queue_id=%u\n",
+ "port_id=%u, queue_id=%u",
rxq->port_id, rxq->queue_id);
rxq->rx_nb_avail = 0;
rxq->rx_tail = (uint16_t)(rxq->rx_tail - nb_rx);
err = i40e_alloc_rx_queue_mbufs(rxq);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate RX queue mbuf");
return err;
}
err = i40e_switch_rx_queue(hw, rx_queue_id + q_base, TRUE);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on\n",
+ PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
rx_queue_id);
i40e_rx_queue_release_mbufs(rxq);
err = i40e_switch_rx_queue(hw, rx_queue_id + q_base, FALSE);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off\n",
+ PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off",
rx_queue_id);
return err;
}
if (tx_queue_id < dev->data->nb_tx_queues) {
err = i40e_switch_tx_queue(hw, tx_queue_id + q_base, TRUE);
if (err)
- PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on\n",
+ PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on",
tx_queue_id);
}
err = i40e_switch_tx_queue(hw, tx_queue_id + q_base, FALSE);
if (err) {
- PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of\n",
+ PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of",
tx_queue_id);
return err;
}
if (!vsi || queue_idx >= vsi->nb_qps) {
PMD_DRV_LOG(ERR, "VSI not available or queue "
- "index exceeds the maximum\n");
+ "index exceeds the maximum");
return I40E_ERR_PARAM;
}
if (((nb_desc * sizeof(union i40e_rx_desc)) % I40E_ALIGN) != 0 ||
(nb_desc > I40E_MAX_RING_DESC) ||
(nb_desc < I40E_MIN_RING_DESC)) {
PMD_DRV_LOG(ERR, "Number (%u) of receive descriptors is "
- "invalid\n", nb_desc);
+ "invalid", nb_desc);
return I40E_ERR_PARAM;
}
socket_id);
if (!rxq) {
PMD_DRV_LOG(ERR, "Failed to allocate memory for "
- "rx queue data structure\n");
+ "rx queue data structure");
return (-ENOMEM);
}
rxq->mp = mp;
socket_id);
if (!rz) {
i40e_dev_rx_queue_release(rxq);
- PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for RX\n");
+ PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for RX");
return (-ENOMEM);
}
socket_id);
if (!rxq->sw_ring) {
i40e_dev_rx_queue_release(rxq);
- PMD_DRV_LOG(ERR, "Failed to allocate memory for SW ring\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate memory for SW ring");
return (-ENOMEM);
}
#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are "
"satisfied. Rx Burst Bulk Alloc function will be "
- "used on port=%d, queue=%d.\n",
+ "used on port=%d, queue=%d.",
rxq->port_id, rxq->queue_id);
dev->rx_pkt_burst = i40e_recv_pkts_bulk_alloc;
#endif /* RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC */
PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are "
"not satisfied, Scattered Rx is requested, "
"or RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC is "
- "not enabled on port=%d, queue=%d.\n",
+ "not enabled on port=%d, queue=%d.",
rxq->port_id, rxq->queue_id);
}
struct i40e_rx_queue *q = (struct i40e_rx_queue *)rxq;
if (!q) {
- PMD_DRV_LOG(DEBUG, "Pointer to rxq is NULL\n");
+ PMD_DRV_LOG(DEBUG, "Pointer to rxq is NULL");
return;
}
uint16_t desc = 0;
if (unlikely(rx_queue_id >= dev->data->nb_rx_queues)) {
- PMD_DRV_LOG(ERR, "Invalid RX queue id %u\n", rx_queue_id);
+ PMD_DRV_LOG(ERR, "Invalid RX queue id %u", rx_queue_id);
return 0;
}
int ret;
if (unlikely(offset >= rxq->nb_rx_desc)) {
- PMD_DRV_LOG(ERR, "Invalid RX queue id %u\n", offset);
+ PMD_DRV_LOG(ERR, "Invalid RX queue id %u", offset);
return 0;
}
if (!vsi || queue_idx >= vsi->nb_qps) {
PMD_DRV_LOG(ERR, "VSI is NULL, or queue index (%u) "
- "exceeds the maximum\n", queue_idx);
+ "exceeds the maximum", queue_idx);
return I40E_ERR_PARAM;
}
(nb_desc > I40E_MAX_RING_DESC) ||
(nb_desc < I40E_MIN_RING_DESC)) {
PMD_DRV_LOG(ERR, "Number (%u) of transmit descriptors is "
- "invalid\n", nb_desc);
+ "invalid", nb_desc);
return I40E_ERR_PARAM;
}
socket_id);
if (!txq) {
PMD_DRV_LOG(ERR, "Failed to allocate memory for "
- "tx queue structure\n");
+ "tx queue structure");
return (-ENOMEM);
}
socket_id);
if (!tz) {
i40e_dev_tx_queue_release(txq);
- PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for TX\n");
+ PMD_DRV_LOG(ERR, "Failed to reserve DMA memory for TX");
return (-ENOMEM);
}
socket_id);
if (!txq->sw_ring) {
i40e_dev_tx_queue_release(txq);
- PMD_DRV_LOG(ERR, "Failed to allocate memory for SW TX ring\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate memory for SW TX ring");
return (-ENOMEM);
}
/* Use a simple TX queue without offloads or multi segs if possible */
if (((txq->txq_flags & I40E_SIMPLE_FLAGS) == I40E_SIMPLE_FLAGS) &&
(txq->tx_rs_thresh >= I40E_TX_MAX_BURST)) {
- PMD_INIT_LOG(INFO, "Using simple tx path\n");
+ PMD_INIT_LOG(INFO, "Using simple tx path");
dev->tx_pkt_burst = i40e_xmit_pkts_simple;
} else {
- PMD_INIT_LOG(INFO, "Using full-featured tx path\n");
+ PMD_INIT_LOG(INFO, "Using full-featured tx path");
dev->tx_pkt_burst = i40e_xmit_pkts;
}
struct i40e_tx_queue *q = (struct i40e_tx_queue *)txq;
if (!q) {
- PMD_DRV_LOG(DEBUG, "Pointer to TX queue is NULL\n");
+ PMD_DRV_LOG(DEBUG, "Pointer to TX queue is NULL");
return;
}
uint16_t i;
if (!rxq || !rxq->sw_ring) {
- PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL\n");
+ PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL");
return;
}
uint16_t i;
if (!txq || !txq->sw_ring) {
- PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL\n");
+ PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL");
return;
}
uint16_t i, prev, size;
if (!txq) {
- PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL\n");
+ PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL");
return;
}
err = i40e_clear_lan_tx_queue_context(hw, pf_q);
if (err != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failure of clean lan tx queue context\n");
+ PMD_DRV_LOG(ERR, "Failure of clean lan tx queue context");
return err;
}
err = i40e_set_lan_tx_queue_context(hw, pf_q, &tx_ctx);
if (err != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failure of set lan tx queue context\n");
+ PMD_DRV_LOG(ERR, "Failure of set lan tx queue context");
return err;
}
struct rte_mbuf *mbuf = rte_rxmbuf_alloc(rxq->mp);
if (unlikely(!mbuf)) {
- PMD_DRV_LOG(ERR, "Failed to allocate mbuf for RX\n");
+ PMD_DRV_LOG(ERR, "Failed to allocate mbuf for RX");
return -ENOMEM;
}
rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
PMD_DRV_LOG(ERR, "maximum packet length must "
"be larger than %u and smaller than %u,"
- "as jumbo frame is enabled\n",
+ "as jumbo frame is enabled",
(uint32_t)ETHER_MAX_LEN,
(uint32_t)I40E_FRAME_SIZE_MAX);
return I40E_ERR_CONFIG;
rxq->max_pkt_len > ETHER_MAX_LEN) {
PMD_DRV_LOG(ERR, "maximum packet length must be "
"larger than %u and smaller than %u, "
- "as jumbo frame is disabled\n",
+ "as jumbo frame is disabled",
(uint32_t)ETHER_MIN_LEN,
(uint32_t)ETHER_MAX_LEN);
return I40E_ERR_CONFIG;
err = i40e_rx_queue_config(rxq);
if (err < 0) {
- PMD_DRV_LOG(ERR, "Failed to config RX queue\n");
+ PMD_DRV_LOG(ERR, "Failed to config RX queue");
return err;
}
err = i40e_clear_lan_rx_queue_context(hw, pf_q);
if (err != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to clear LAN RX queue context\n");
+ PMD_DRV_LOG(ERR, "Failed to clear LAN RX queue context");
return err;
}
err = i40e_set_lan_rx_queue_context(hw, pf_q, &rx_ctx);
if (err != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to set LAN RX queue context\n");
+ PMD_DRV_LOG(ERR, "Failed to set LAN RX queue context");
return err;
}