@@ -88,15 +88,14 @@ nfp_flower_ctrl_vnic_recv(void *rx_queue,
* responsibility of avoiding it. But we have
* to give some info about the error
*/
- PMD_RX_LOG(ERR,
- "mbuf overflow likely due to the RX offset.\n"
- "\t\tYour mbuf size should have extra space for"
- " RX offset=%u bytes.\n"
- "\t\tCurrently you just have %u bytes available"
- " but the received packet is %u bytes long",
- hw->rx_offset,
- rxq->mbuf_size - hw->rx_offset,
- mb->data_len);
+ PMD_RX_LOG(ERR, "mbuf overflow likely due to the RX offset.\n"
+ "\t\tYour mbuf size should have extra space for"
+ " RX offset=%u bytes.\n"
+ "\t\tCurrently you just have %u bytes available"
+ " but the received packet is %u bytes long",
+ hw->rx_offset,
+ rxq->mbuf_size - hw->rx_offset,
+ mb->data_len);
rte_pktmbuf_free(mb);
break;
}
@@ -464,7 +464,7 @@ nfp_flower_repr_rx_burst(void *rx_queue,
total_dequeue = rte_ring_dequeue_burst(repr->ring, (void *)rx_pkts,
nb_pkts, &available);
if (total_dequeue != 0) {
- PMD_RX_LOG(DEBUG, "Representor Rx burst for %s, port_id: 0x%x, "
+ PMD_RX_LOG(DEBUG, "Representor Rx burst for %s, port_id: %#x, "
"received: %u, available: %u", repr->name,
repr->port_id, total_dequeue, available);
@@ -510,7 +510,7 @@ nfp_flower_repr_tx_burst(void *tx_queue,
pf_tx_queue = dev->data->tx_queues[0];
sent = nfp_flower_pf_xmit_pkts(pf_tx_queue, tx_pkts, nb_pkts);
if (sent != 0) {
- PMD_TX_LOG(DEBUG, "Representor Tx burst for %s, port_id: 0x%x transmitted: %u",
+ PMD_TX_LOG(DEBUG, "Representor Tx burst for %s, port_id: %#x transmitted: %hu",
repr->name, repr->port_id, sent);
repr->repr_stats.opackets += sent;
}
@@ -381,8 +381,6 @@ nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev,
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- PMD_INIT_FUNC_TRACE();
-
nfp_net_tx_desc_limits(hw, &min_tx_desc, &max_tx_desc);
/* Validating number of descriptors */
@@ -455,8 +455,6 @@ nfp_net_nfdk_tx_queue_setup(struct rte_eth_dev *dev,
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- PMD_INIT_FUNC_TRACE();
-
nfp_net_tx_desc_limits(hw, &min_tx_desc, &max_tx_desc);
/* Validating number of descriptors */
@@ -207,7 +207,7 @@ __nfp_net_reconfig(struct nfp_net_hw *hw,
hw->qcp_cfg);
if (hw->qcp_cfg == NULL) {
- PMD_INIT_LOG(ERR, "Bad configuration queue pointer");
+ PMD_DRV_LOG(ERR, "Bad configuration queue pointer");
return -ENXIO;
}
@@ -224,15 +224,15 @@ __nfp_net_reconfig(struct nfp_net_hw *hw,
if (new == 0)
break;
if ((new & NFP_NET_CFG_UPDATE_ERR) != 0) {
- PMD_INIT_LOG(ERR, "Reconfig error: 0x%08x", new);
+ PMD_DRV_LOG(ERR, "Reconfig error: %#08x", new);
return -1;
}
if (cnt >= NFP_NET_POLL_TIMEOUT) {
- PMD_INIT_LOG(ERR, "Reconfig timeout for 0x%08x after"
- " %ums", update, cnt);
+ PMD_DRV_LOG(ERR, "Reconfig timeout for %#08x after %u ms",
+ update, cnt);
return -EIO;
}
- nanosleep(&wait, 0); /* waiting for a 1ms */
+ nanosleep(&wait, 0); /* Waiting for a 1ms */
}
PMD_DRV_LOG(DEBUG, "Ack DONE");
return 0;
@@ -390,8 +390,6 @@ nfp_net_configure(struct rte_eth_dev *dev)
* called after that internal process
*/
- PMD_INIT_LOG(DEBUG, "Configure");
-
dev_conf = &dev->data->dev_conf;
rxmode = &dev_conf->rxmode;
txmode = &dev_conf->txmode;
@@ -401,20 +399,20 @@ nfp_net_configure(struct rte_eth_dev *dev)
/* Checking TX mode */
if (txmode->mq_mode != RTE_ETH_MQ_TX_NONE) {
- PMD_INIT_LOG(INFO, "TX mq_mode DCB and VMDq not supported");
+ PMD_DRV_LOG(ERR, "TX mq_mode DCB and VMDq not supported");
return -EINVAL;
}
/* Checking RX mode */
if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) != 0 &&
(hw->cap & NFP_NET_CFG_CTRL_RSS_ANY) == 0) {
- PMD_INIT_LOG(INFO, "RSS not supported");
+ PMD_DRV_LOG(ERR, "RSS not supported");
return -EINVAL;
}
/* Checking MTU set */
if (rxmode->mtu > NFP_FRAME_SIZE_MAX) {
- PMD_INIT_LOG(ERR, "MTU (%u) larger than NFP_FRAME_SIZE_MAX (%u) not supported",
+ PMD_DRV_LOG(ERR, "MTU (%u) larger than NFP_FRAME_SIZE_MAX (%u)",
rxmode->mtu, NFP_FRAME_SIZE_MAX);
return -ERANGE;
}
@@ -552,8 +550,7 @@ nfp_net_set_mac_addr(struct rte_eth_dev *dev,
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) != 0 &&
(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR) == 0) {
- PMD_INIT_LOG(INFO, "MAC address unable to change when"
- " port enabled");
+ PMD_DRV_LOG(ERR, "MAC address unable to change when port enabled");
return -EBUSY;
}
@@ -567,7 +564,7 @@ nfp_net_set_mac_addr(struct rte_eth_dev *dev,
(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR) != 0)
ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
if (nfp_net_reconfig(hw, ctrl, update) != 0) {
- PMD_INIT_LOG(INFO, "MAC address update failed");
+ PMD_DRV_LOG(ERR, "MAC address update failed");
return -EIO;
}
return 0;
@@ -582,21 +579,21 @@ nfp_configure_rx_interrupt(struct rte_eth_dev *dev,
if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
dev->data->nb_rx_queues) != 0) {
- PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
- " intr_vec", dev->data->nb_rx_queues);
+ PMD_DRV_LOG(ERR, "Failed to allocate %d rx_queues intr_vec",
+ dev->data->nb_rx_queues);
return -ENOMEM;
}
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_UIO) {
- PMD_INIT_LOG(INFO, "VF: enabling RX interrupt with UIO");
+ PMD_DRV_LOG(INFO, "VF: enabling RX interrupt with UIO");
/* UIO just supports one queue and no LSC*/
nn_cfg_writeb(hw, NFP_NET_CFG_RXR_VEC(0), 0);
if (rte_intr_vec_list_index_set(intr_handle, 0, 0) != 0)
return -1;
} else {
- PMD_INIT_LOG(INFO, "VF: enabling RX interrupt with VFIO");
+ PMD_DRV_LOG(INFO, "VF: enabling RX interrupt with VFIO");
for (i = 0; i < dev->data->nb_rx_queues; i++) {
/*
* The first msix vector is reserved for non
@@ -605,8 +602,6 @@ nfp_configure_rx_interrupt(struct rte_eth_dev *dev,
nn_cfg_writeb(hw, NFP_NET_CFG_RXR_VEC(i), i + 1);
if (rte_intr_vec_list_index_set(intr_handle, i, i + 1) != 0)
return -1;
- PMD_INIT_LOG(DEBUG, "intr_vec[%d]= %d", i,
- rte_intr_vec_list_index_get(intr_handle, i));
}
}
@@ -691,8 +686,6 @@ nfp_net_promisc_enable(struct rte_eth_dev *dev)
struct nfp_net_hw *hw;
struct nfp_flower_representor *repr;
- PMD_DRV_LOG(DEBUG, "Promiscuous mode enable");
-
if ((dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) != 0) {
repr = dev->data->dev_private;
hw = repr->app_fw_flower->pf_hw;
@@ -701,7 +694,7 @@ nfp_net_promisc_enable(struct rte_eth_dev *dev)
}
if ((hw->cap & NFP_NET_CFG_CTRL_PROMISC) == 0) {
- PMD_INIT_LOG(INFO, "Promiscuous mode not supported");
+ PMD_DRV_LOG(ERR, "Promiscuous mode not supported");
return -ENOTSUP;
}
@@ -774,9 +767,6 @@ nfp_net_link_update(struct rte_eth_dev *dev,
struct rte_eth_link link;
struct nfp_eth_table *nfp_eth_table;
-
- PMD_DRV_LOG(DEBUG, "Link update");
-
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
/* Read link status */
@@ -1636,9 +1626,9 @@ nfp_net_rss_reta_write(struct rte_eth_dev *dev,
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if (reta_size != NFP_NET_CFG_RSS_ITBL_SZ) {
- PMD_DRV_LOG(ERR, "The size of hash lookup table configured "
- "(%d) doesn't match the number hardware can supported "
- "(%d)", reta_size, NFP_NET_CFG_RSS_ITBL_SZ);
+ PMD_DRV_LOG(ERR, "The size of hash lookup table configured (%hu)"
+ " doesn't match hardware can supported (%d)",
+ reta_size, NFP_NET_CFG_RSS_ITBL_SZ);
return -EINVAL;
}
@@ -1719,9 +1709,9 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
return -EINVAL;
if (reta_size != NFP_NET_CFG_RSS_ITBL_SZ) {
- PMD_DRV_LOG(ERR, "The size of hash lookup table configured "
- "(%d) doesn't match the number hardware can supported "
- "(%d)", reta_size, NFP_NET_CFG_RSS_ITBL_SZ);
+ PMD_DRV_LOG(ERR, "The size of hash lookup table configured (%d)"
+ " doesn't match hardware can supported (%d)",
+ reta_size, NFP_NET_CFG_RSS_ITBL_SZ);
return -EINVAL;
}
@@ -1827,7 +1817,7 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev,
}
if (rss_conf->rss_key_len > NFP_NET_CFG_RSS_KEY_SZ) {
- PMD_DRV_LOG(ERR, "hash key too long");
+ PMD_DRV_LOG(ERR, "RSS hash key too long");
return -EINVAL;
}
@@ -1910,9 +1900,6 @@ nfp_net_rss_config_default(struct rte_eth_dev *dev)
uint16_t rx_queues = dev->data->nb_rx_queues;
struct rte_eth_rss_reta_entry64 nfp_reta_conf[2];
- PMD_DRV_LOG(INFO, "setting default RSS conf for %u queues",
- rx_queues);
-
nfp_reta_conf[0].mask = ~0x0;
nfp_reta_conf[1].mask = ~0x0;
@@ -1929,7 +1916,7 @@ nfp_net_rss_config_default(struct rte_eth_dev *dev)
dev_conf = &dev->data->dev_conf;
if (dev_conf == NULL) {
- PMD_DRV_LOG(INFO, "wrong rss conf");
+ PMD_DRV_LOG(ERR, "Wrong rss conf");
return -EINVAL;
}
rss_conf = dev_conf->rx_adv_conf.rss_conf;
@@ -130,7 +130,7 @@ nfp_cpp_bridge_serve_write(int sockfd,
uint32_t tmpbuf[16];
struct nfp_cpp_area *area;
- PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__,
+ PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu", __func__,
sizeof(off_t), sizeof(size_t));
/* Reading the count param */
@@ -149,9 +149,9 @@ nfp_cpp_bridge_serve_write(int sockfd,
cpp_id = (offset >> 40) << 8;
nfp_offset = offset & ((1ull << 40) - 1);
- PMD_CPP_LOG(DEBUG, "%s: count %zu and offset %jd\n", __func__, count,
+ PMD_CPP_LOG(DEBUG, "%s: count %zu and offset %jd", __func__, count,
offset);
- PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %jd\n", __func__,
+ PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %jd", __func__,
cpp_id, nfp_offset);
/* Adjust length if not aligned */
@@ -162,7 +162,7 @@ nfp_cpp_bridge_serve_write(int sockfd,
}
while (count > 0) {
- /* configure a CPP PCIe2CPP BAR for mapping the CPP target */
+ /* Configure a CPP PCIe2CPP BAR for mapping the CPP target */
area = nfp_cpp_area_alloc_with_name(cpp, cpp_id, "nfp.cdev",
nfp_offset, curlen);
if (area == NULL) {
@@ -170,7 +170,7 @@ nfp_cpp_bridge_serve_write(int sockfd,
return -EIO;
}
- /* mapping the target */
+ /* Mapping the target */
err = nfp_cpp_area_acquire(area);
if (err < 0) {
PMD_CPP_LOG(ERR, "area acquire failed");
@@ -183,7 +183,7 @@ nfp_cpp_bridge_serve_write(int sockfd,
if (len > sizeof(tmpbuf))
len = sizeof(tmpbuf);
- PMD_CPP_LOG(DEBUG, "%s: Receive %u of %zu\n", __func__,
+ PMD_CPP_LOG(DEBUG, "%s: Receive %u of %zu", __func__,
len, count);
err = recv(sockfd, tmpbuf, len, MSG_WAITALL);
if (err != (int)len) {
@@ -235,7 +235,7 @@ nfp_cpp_bridge_serve_read(int sockfd,
uint32_t tmpbuf[16];
struct nfp_cpp_area *area;
- PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__,
+ PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu", __func__,
sizeof(off_t), sizeof(size_t));
/* Reading the count param */
@@ -254,9 +254,9 @@ nfp_cpp_bridge_serve_read(int sockfd,
cpp_id = (offset >> 40) << 8;
nfp_offset = offset & ((1ull << 40) - 1);
- PMD_CPP_LOG(DEBUG, "%s: count %zu and offset %jd\n", __func__, count,
+ PMD_CPP_LOG(DEBUG, "%s: count %zu and offset %jd", __func__, count,
offset);
- PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %jd\n", __func__,
+ PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %jd", __func__,
cpp_id, nfp_offset);
/* Adjust length if not aligned */
@@ -293,7 +293,7 @@ nfp_cpp_bridge_serve_read(int sockfd,
nfp_cpp_area_free(area);
return -EIO;
}
- PMD_CPP_LOG(DEBUG, "%s: sending %u of %zu\n", __func__,
+ PMD_CPP_LOG(DEBUG, "%s: sending %u of %zu", __func__,
len, count);
err = send(sockfd, tmpbuf, len, 0);
@@ -353,7 +353,7 @@ nfp_cpp_bridge_serve_ioctl(int sockfd,
tmp = nfp_cpp_model(cpp);
- PMD_CPP_LOG(DEBUG, "%s: sending NFP model %08x\n", __func__, tmp);
+ PMD_CPP_LOG(DEBUG, "%s: sending NFP model %08x", __func__, tmp);
err = send(sockfd, &tmp, 4, 0);
if (err != 4) {
@@ -363,7 +363,7 @@ nfp_cpp_bridge_serve_ioctl(int sockfd,
tmp = nfp_cpp_interface(cpp);
- PMD_CPP_LOG(DEBUG, "%s: sending NFP interface %08x\n", __func__, tmp);
+ PMD_CPP_LOG(DEBUG, "%s: sending NFP interface %08x", __func__, tmp);
err = send(sockfd, &tmp, 4, 0);
if (err != 4) {
@@ -440,11 +440,11 @@ nfp_cpp_bridge_service_func(void *args)
while (1) {
ret = recv(datafd, &op, 4, 0);
if (ret <= 0) {
- PMD_CPP_LOG(DEBUG, "%s: socket close\n", __func__);
+ PMD_CPP_LOG(DEBUG, "%s: socket close", __func__);
break;
}
- PMD_CPP_LOG(DEBUG, "%s: getting op %u\n", __func__, op);
+ PMD_CPP_LOG(DEBUG, "%s: getting op %u", __func__, op);
if (op == NFP_BRIDGE_OP_READ)
nfp_cpp_bridge_serve_read(datafd, cpp);
@@ -60,8 +60,6 @@ nfp_net_start(struct rte_eth_dev *dev)
pf_dev = NFP_NET_DEV_PRIVATE_TO_PF(dev->data->dev_private);
app_fw_nic = NFP_PRIV_TO_APP_FW_NIC(pf_dev->app_fw_priv);
- PMD_INIT_LOG(DEBUG, "Start");
-
/* Disabling queues just in case... */
nfp_net_disable_queues(dev);
@@ -194,8 +192,6 @@ nfp_net_stop(struct rte_eth_dev *dev)
{
struct nfp_net_hw *hw;
- PMD_INIT_LOG(DEBUG, "Stop");
-
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
nfp_net_disable_queues(dev);
@@ -220,8 +216,6 @@ nfp_net_set_link_up(struct rte_eth_dev *dev)
{
struct nfp_net_hw *hw;
- PMD_DRV_LOG(DEBUG, "Set link up");
-
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
@@ -237,8 +231,6 @@ nfp_net_set_link_down(struct rte_eth_dev *dev)
{
struct nfp_net_hw *hw;
- PMD_DRV_LOG(DEBUG, "Set link down");
-
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
@@ -261,8 +253,6 @@ nfp_net_close(struct rte_eth_dev *dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- PMD_INIT_LOG(DEBUG, "Close");
-
pf_dev = NFP_NET_DEV_PRIVATE_TO_PF(dev->data->dev_private);
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
pci_dev = RTE_ETH_DEV_TO_PCI(dev);
@@ -491,8 +481,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
struct nfp_app_fw_nic *app_fw_nic;
struct rte_ether_addr *tmp_ether_addr;
- PMD_INIT_FUNC_TRACE();
-
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
/* Use backpointer here to the PF of this eth_dev */
@@ -513,7 +501,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
*/
hw = app_fw_nic->ports[port];
- PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
+ PMD_INIT_LOG(DEBUG, "Working with physical port number: %hu, "
"NFP internal port number: %d", port, hw->nfp_idx);
rte_eth_copy_pci_info(eth_dev, pci_dev);
@@ -579,9 +567,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
tx_base = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);
rx_base = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
- PMD_INIT_LOG(DEBUG, "tx_base: 0x%" PRIx64 "", tx_base);
- PMD_INIT_LOG(DEBUG, "rx_base: 0x%" PRIx64 "", rx_base);
-
hw->tx_bar = pf_dev->qc_bar + tx_base * NFP_QCP_QUEUE_ADDR_SZ;
hw->rx_bar = pf_dev->qc_bar + rx_base * NFP_QCP_QUEUE_ADDR_SZ;
eth_dev->data->dev_private = hw;
@@ -627,7 +612,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
- PMD_INIT_LOG(INFO, "port %d VendorID=0x%x DeviceID=0x%x "
+ PMD_INIT_LOG(INFO, "port %d VendorID=%#x DeviceID=%#x "
"mac=" RTE_ETHER_ADDR_PRT_FMT,
eth_dev->data->port_id, pci_dev->id.vendor_id,
pci_dev->id.device_id,
@@ -997,7 +982,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
goto pf_cleanup;
}
- PMD_INIT_LOG(DEBUG, "qc_bar address: 0x%p", pf_dev->qc_bar);
+ PMD_INIT_LOG(DEBUG, "qc_bar address: %p", pf_dev->qc_bar);
/*
* PF initialization has been done at this point. Call app specific
@@ -41,8 +41,6 @@ nfp_netvf_start(struct rte_eth_dev *dev)
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- PMD_INIT_LOG(DEBUG, "Start");
-
/* Disabling queues just in case... */
nfp_net_disable_queues(dev);
@@ -136,8 +134,6 @@ nfp_netvf_start(struct rte_eth_dev *dev)
static int
nfp_netvf_stop(struct rte_eth_dev *dev)
{
- PMD_INIT_LOG(DEBUG, "Stop");
-
nfp_net_disable_queues(dev);
/* Clear queues */
@@ -170,8 +166,6 @@ nfp_netvf_close(struct rte_eth_dev *dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- PMD_INIT_LOG(DEBUG, "Close");
-
pci_dev = RTE_ETH_DEV_TO_PCI(dev);
/*
@@ -265,8 +259,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
const struct nfp_dev_info *dev_info;
struct rte_ether_addr *tmp_ether_addr;
- PMD_INIT_FUNC_TRACE();
-
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
dev_info = nfp_dev_info_get(pci_dev->id.device_id);
@@ -301,7 +293,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
hw->eth_xstats_base = rte_malloc("rte_eth_xstat",
sizeof(struct rte_eth_xstat) * nfp_net_xstats_size(eth_dev), 0);
if (hw->eth_xstats_base == NULL) {
- PMD_INIT_LOG(ERR, "no memory for xstats base values on device %s!",
+ PMD_INIT_LOG(ERR, "No memory for xstats base values on device %s!",
pci_dev->device.name);
return -ENOMEM;
}
@@ -312,9 +304,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
rx_bar_off = nfp_qcp_queue_offset(dev_info, start_q);
- PMD_INIT_LOG(DEBUG, "tx_bar_off: 0x%" PRIx64 "", tx_bar_off);
- PMD_INIT_LOG(DEBUG, "rx_bar_off: 0x%" PRIx64 "", rx_bar_off);
-
hw->tx_bar = (uint8_t *)pci_dev->mem_resource[2].addr + tx_bar_off;
hw->rx_bar = (uint8_t *)pci_dev->mem_resource[2].addr + rx_bar_off;
@@ -345,7 +334,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
tmp_ether_addr = &hw->mac_addr;
if (rte_is_valid_assigned_ether_addr(tmp_ether_addr) == 0) {
- PMD_INIT_LOG(INFO, "Using random mac address for port %d", port);
+ PMD_INIT_LOG(INFO, "Using random mac address for port %hu", port);
/* Using random mac addresses for VFs */
rte_eth_random_addr(&hw->mac_addr.addr_bytes[0]);
nfp_net_write_mac(hw, &hw->mac_addr.addr_bytes[0]);
@@ -359,7 +348,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
- PMD_INIT_LOG(INFO, "port %d VendorID=0x%x DeviceID=0x%x "
+ PMD_INIT_LOG(INFO, "port %hu VendorID=%#x DeviceID=%#x "
"mac=" RTE_ETHER_ADDR_PRT_FMT,
eth_dev->data->port_id, pci_dev->id.vendor_id,
pci_dev->id.device_id,
@@ -12,7 +12,6 @@ extern int nfp_logtype_init;
#define PMD_INIT_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, nfp_logtype_init, \
"%s(): " fmt "\n", __func__, ## args)
-#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int nfp_logtype_rx;
@@ -192,7 +192,7 @@ nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq)
uint64_t dma_addr;
struct nfp_net_dp_buf *rxe = rxq->rxbufs;
- PMD_RX_LOG(DEBUG, "Fill Rx Freelist for %u descriptors",
+ PMD_RX_LOG(DEBUG, "Fill Rx Freelist for %hu descriptors",
rxq->rx_count);
for (i = 0; i < rxq->rx_count; i++) {
@@ -212,14 +212,13 @@ nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq)
rxd->fld.dma_addr_hi = (dma_addr >> 32) & 0xffff;
rxd->fld.dma_addr_lo = dma_addr & 0xffffffff;
rxe[i].mbuf = mbuf;
- PMD_RX_LOG(DEBUG, "[%d]: %" PRIx64, i, dma_addr);
}
/* Make sure all writes are flushed before telling the hardware */
rte_wmb();
/* Not advertising the whole ring as the firmware gets confused if so */
- PMD_RX_LOG(DEBUG, "Increment FL write pointer in %u", rxq->rx_count - 1);
+ PMD_RX_LOG(DEBUG, "Increment FL write pointer in %hu", rxq->rx_count - 1);
nfp_qcp_ptr_add(rxq->qcp_fl, NFP_QCP_WRITE_PTR, rxq->rx_count - 1);
@@ -432,7 +431,7 @@ nfp_net_parse_meta_qinq(const struct nfp_meta_parsed *meta,
if (meta->vlan[0].offload == 0)
mb->vlan_tci = rte_cpu_to_le_16(meta->vlan[0].tci);
mb->vlan_tci_outer = rte_cpu_to_le_16(meta->vlan[1].tci);
- PMD_RX_LOG(DEBUG, "Received outer vlan is %u inter vlan is %u",
+ PMD_RX_LOG(DEBUG, "Received outer vlan TCI is %u inner vlan TCI is %u",
mb->vlan_tci_outer, mb->vlan_tci);
mb->ol_flags |= RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_RX_QINQ_STRIPPED;
}
@@ -754,12 +753,11 @@ nfp_net_recv_pkts(void *rx_queue,
* responsibility of avoiding it. But we have
* to give some info about the error
*/
- PMD_RX_LOG(ERR,
- "mbuf overflow likely due to the RX offset.\n"
+ PMD_RX_LOG(ERR, "mbuf overflow likely due to the RX offset.\n"
"\t\tYour mbuf size should have extra space for"
" RX offset=%u bytes.\n"
"\t\tCurrently you just have %u bytes available"
- " but the received packet is %u bytes long",
+ " but the received packet is %hu bytes long",
hw->rx_offset,
rxq->mbuf_size - hw->rx_offset,
mb->data_len);
@@ -888,8 +886,6 @@ nfp_net_rx_queue_setup(struct rte_eth_dev *dev,
hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- PMD_INIT_FUNC_TRACE();
-
nfp_net_rx_desc_limits(hw, &min_rx_desc, &max_rx_desc);
/* Validating number of descriptors */
@@ -965,9 +961,6 @@ nfp_net_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
- PMD_RX_LOG(DEBUG, "rxbufs=%p hw_ring=%p dma_addr=0x%" PRIx64,
- rxq->rxbufs, rxq->rxds, (unsigned long)rxq->dma);
-
nfp_net_reset_rx_queue(rxq);
rxq->hw = hw;