/* Check h/w version compatibility with driver. */
ver = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_VRRS);
- PMD_INIT_LOG(DEBUG, "Harware version : %d\n", ver);
+ PMD_INIT_LOG(DEBUG, "Harware version : %d", ver);
if (ver & 0x1)
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS, 1);
else {
- PMD_INIT_LOG(ERR, "Uncompatiable h/w version, should be 0x1\n");
+ PMD_INIT_LOG(ERR, "Uncompatiable h/w version, should be 0x1");
return -EIO;
}
/* Check UPT version compatibility with driver. */
ver = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_UVRS);
- PMD_INIT_LOG(DEBUG, "UPT harware version : %d\n", ver);
+ PMD_INIT_LOG(DEBUG, "UPT harware version : %d", ver);
if (ver & 0x1)
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_UVRS, 1);
else {
- PMD_INIT_LOG(ERR, "Incompatiable UPT version.\n");
+ PMD_INIT_LOG(ERR, "Incompatiable UPT version.");
return -EIO;
}
ether_addr_copy((struct ether_addr *) hw->perm_addr,
ð_dev->data->mac_addrs[0]);
- PMD_INIT_LOG(DEBUG, "MAC Address : %02x:%02x:%02x:%02x:%02x:%02x\n",
+ PMD_INIT_LOG(DEBUG, "MAC Address : %02x:%02x:%02x:%02x:%02x:%02x",
hw->perm_addr[0], hw->perm_addr[1], hw->perm_addr[2],
hw->perm_addr[3], hw->perm_addr[4], hw->perm_addr[5]);
"shared", rte_socket_id(), 8);
if (mz == NULL) {
- PMD_INIT_LOG(ERR, "ERROR: Creating shared zone\n");
+ PMD_INIT_LOG(ERR, "ERROR: Creating shared zone");
return -ENOMEM;
}
memset(mz->addr, 0, mz->len);
mz = gpa_zone_reserve(dev, size, "queuedesc",
rte_socket_id(), VMXNET3_QUEUE_DESC_ALIGN);
if (mz == NULL) {
- PMD_INIT_LOG(ERR, "ERROR: Creating queue descriptors zone\n");
+ PMD_INIT_LOG(ERR, "ERROR: Creating queue descriptors zone");
return -ENOMEM;
}
memset(mz->addr, 0, mz->len);
rte_socket_id(), CACHE_LINE_SIZE);
if (mz == NULL) {
PMD_INIT_LOG(ERR,
- "ERROR: Creating rss_conf structure zone\n");
+ "ERROR: Creating rss_conf structure zone");
return -ENOMEM;
}
memset(mz->addr, 0, mz->len);
}
PMD_INIT_LOG(DEBUG,
- "Writing MAC Address : %02x:%02x:%02x:%02x:%02x:%02x\n",
+ "Writing MAC Address : %02x:%02x:%02x:%02x:%02x:%02x",
hw->perm_addr[0], hw->perm_addr[1], hw->perm_addr[2],
hw->perm_addr[3], hw->perm_addr[4], hw->perm_addr[5]);
status = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
if (status != 0) {
- PMD_INIT_LOG(ERR, "Device activation in %s(): UNSUCCESSFUL\n", __func__);
+ PMD_INIT_LOG(ERR, "Device activation in %s(): UNSUCCESSFUL", __func__);
return -1;
}
*/
ret = vmxnet3_dev_rxtx_init(dev);
if (ret != VMXNET3_SUCCESS) {
- PMD_INIT_LOG(ERR, "Device receive init in %s: UNSUCCESSFUL\n", __func__);
+ PMD_INIT_LOG(ERR, "Device receive init in %s: UNSUCCESSFUL", __func__);
return ret;
}
*/
#if PROCESS_SYS_EVENTS == 1
events = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_ECR);
- PMD_INIT_LOG(DEBUG, "Reading events: 0x%X\n\n", events);
+ PMD_INIT_LOG(DEBUG, "Reading events: 0x%X", events);
vmxnet3_process_events(hw);
#endif
return status;
PMD_INIT_FUNC_TRACE();
if (hw->adapter_stopped == TRUE) {
- PMD_INIT_LOG(DEBUG, "Device already closed.\n");
+ PMD_INIT_LOG(DEBUG, "Device already closed.");
return;
}
/* reset the device */
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_RESET_DEV);
- PMD_INIT_LOG(DEBUG, "Device reset.\n");
+ PMD_INIT_LOG(DEBUG, "Device reset.");
hw->adapter_stopped = FALSE;
vmxnet3_dev_clear_queues(dev);
ret = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
if (!ret) {
- PMD_INIT_LOG(ERR, "Link Status Negative : %s()\n", __func__);
+ PMD_INIT_LOG(ERR, "Link Status Negative : %s()", __func__);
return -1;
}
uint32_t events = hw->shared->ecr;
if (!events) {
- PMD_INIT_LOG(ERR, "No events to process in %s()\n", __func__);
+ PMD_INIT_LOG(ERR, "No events to process in %s()", __func__);
return;
}
/* Check if link state has changed */
if (events & VMXNET3_ECR_LINK)
PMD_INIT_LOG(ERR,
- "Process events in %s(): VMXNET3_ECR_LINK event\n", __func__);
+ "Process events in %s(): VMXNET3_ECR_LINK event", __func__);
/* Check if there is an error on xmit/recv queues */
if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) {
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_QUEUE_STATUS);
if (hw->tqd_start->status.stopped)
- PMD_INIT_LOG(ERR, "tq error 0x%x\n",
+ PMD_INIT_LOG(ERR, "tq error 0x%x",
hw->tqd_start->status.error);
if (hw->rqd_start->status.stopped)
- PMD_INIT_LOG(ERR, "rq error 0x%x\n",
+ PMD_INIT_LOG(ERR, "rq error 0x%x",
hw->rqd_start->status.error);
/* Reset the device */
}
if (events & VMXNET3_ECR_DIC)
- PMD_INIT_LOG(ERR, "Device implementation change event.\n");
+ PMD_INIT_LOG(ERR, "Device implementation change event.");
if (events & VMXNET3_ECR_DEBUG)
- PMD_INIT_LOG(ERR, "Debug event generated by device.\n");
+ PMD_INIT_LOG(ERR, "Debug event generated by device.");
}
#endif
return;
PMD_RX_LOG(DEBUG,
- "RXQ: cmd0 base : 0x%p cmd1 base : 0x%p comp ring base : 0x%p.\n",
+ "RXQ: cmd0 base : 0x%p cmd1 base : 0x%p comp ring base : 0x%p.",
rxq->cmd_ring[0].base, rxq->cmd_ring[1].base, rxq->comp_ring.base);
PMD_RX_LOG(DEBUG,
- "RXQ: cmd0 basePA : 0x%lx cmd1 basePA : 0x%lx comp ring basePA : 0x%lx.\n",
+ "RXQ: cmd0 basePA : 0x%lx cmd1 basePA : 0x%lx comp ring basePA : 0x%lx.",
(unsigned long)rxq->cmd_ring[0].basePA,
(unsigned long)rxq->cmd_ring[1].basePA,
(unsigned long)rxq->comp_ring.basePA);
avail = vmxnet3_cmd_ring_desc_avail(&rxq->cmd_ring[0]);
PMD_RX_LOG(DEBUG,
- "RXQ:cmd0: size=%u; free=%u; next2proc=%u; queued=%u\n",
+ "RXQ:cmd0: size=%u; free=%u; next2proc=%u; queued=%u",
(uint32_t)rxq->cmd_ring[0].size, avail,
rxq->comp_ring.next2proc,
rxq->cmd_ring[0].size - avail);
avail = vmxnet3_cmd_ring_desc_avail(&rxq->cmd_ring[1]);
- PMD_RX_LOG(DEBUG, "RXQ:cmd1 size=%u; free=%u; next2proc=%u; queued=%u\n",
+ PMD_RX_LOG(DEBUG, "RXQ:cmd1 size=%u; free=%u; next2proc=%u; queued=%u",
(uint32_t)rxq->cmd_ring[1].size, avail, rxq->comp_ring.next2proc,
rxq->cmd_ring[1].size - avail);
if (txq == NULL)
return;
- PMD_TX_LOG(DEBUG, "TXQ: cmd base : 0x%p comp ring base : 0x%p.\n",
+ PMD_TX_LOG(DEBUG, "TXQ: cmd base : 0x%p comp ring base : 0x%p.",
txq->cmd_ring.base, txq->comp_ring.base);
- PMD_TX_LOG(DEBUG, "TXQ: cmd basePA : 0x%lx comp ring basePA : 0x%lx.\n",
+ PMD_TX_LOG(DEBUG, "TXQ: cmd basePA : 0x%lx comp ring basePA : 0x%lx.",
(unsigned long)txq->cmd_ring.basePA,
(unsigned long)txq->comp_ring.basePA);
avail = vmxnet3_cmd_ring_desc_avail(&txq->cmd_ring);
- PMD_TX_LOG(DEBUG, "TXQ: size=%u; free=%u; next2proc=%u; queued=%u\n",
+ PMD_TX_LOG(DEBUG, "TXQ: size=%u; free=%u; next2proc=%u; queued=%u",
(uint32_t)txq->cmd_ring.size, avail,
txq->comp_ring.next2proc, txq->cmd_ring.size - avail);
}
completed++;
}
- PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.\n", completed);
+ PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed);
}
uint16_t
hw = txq->hw;
if (txq->stopped) {
- PMD_TX_LOG(DEBUG, "Tx queue is stopped.\n");
+ PMD_TX_LOG(DEBUG, "Tx queue is stopped.");
return 0;
}
txm = tx_pkts[nb_tx];
/* Don't support scatter packets yet, free them if met */
if (txm->pkt.nb_segs != 1) {
- PMD_TX_LOG(DEBUG, "Don't support scatter packets yet, drop!\n");
+ PMD_TX_LOG(DEBUG, "Don't support scatter packets yet, drop!");
rte_pktmbuf_free(tx_pkts[nb_tx]);
txq->stats.drop_total++;
/* Needs to minus ether header len */
if (txm->pkt.data_len > (hw->cur_mtu + ETHER_HDR_LEN)) {
- PMD_TX_LOG(DEBUG, "Packet data_len higher than MTU\n");
+ PMD_TX_LOG(DEBUG, "Packet data_len higher than MTU");
rte_pktmbuf_free(tx_pkts[nb_tx]);
txq->stats.drop_total++;
nb_tx++;
} else {
- PMD_TX_LOG(DEBUG, "No free tx cmd desc(s)\n");
+ PMD_TX_LOG(DEBUG, "No free tx cmd desc(s)");
txq->stats.drop_total += (nb_pkts - nb_tx);
break;
}
/* Allocate blank mbuf for the current Rx Descriptor */
mbuf = rte_rxmbuf_alloc(rxq->mp);
if (mbuf == NULL) {
- PMD_RX_LOG(ERR, "Error allocating mbuf in %s\n", __func__);
+ PMD_RX_LOG(ERR, "Error allocating mbuf in %s", __func__);
rxq->stats.rx_buf_alloc_failure++;
err = ENOMEM;
break;
rcd = &rxq->comp_ring.base[rxq->comp_ring.next2proc].rcd;
if (rxq->stopped) {
- PMD_RX_LOG(DEBUG, "Rx queue is stopped.\n");
+ PMD_RX_LOG(DEBUG, "Rx queue is stopped.");
return 0;
}
} else {
- PMD_RX_LOG(DEBUG, "rxd idx: %d ring idx: %d.\n", idx, ring_idx);
+ PMD_RX_LOG(DEBUG, "rxd idx: %d ring idx: %d.", idx, ring_idx);
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER
VMXNET3_ASSERT(rcd->len <= rxd->len);
if (rxd->btype != VMXNET3_RXD_BTYPE_HEAD) {
PMD_RX_LOG(DEBUG,
"Alert : Misbehaving device, incorrect "
- " buffer type used. iPacket dropped.\n");
+ " buffer type used. iPacket dropped.");
rte_pktmbuf_free_seg(rbi->m);
goto rcd_done;
}
if (!rcd->fcs) {
rxq->stats.drop_fcs++;
- PMD_RX_LOG(ERR, "Recv packet dropped due to frame err.\n");
+ PMD_RX_LOG(ERR, "Recv packet dropped due to frame err.");
}
- PMD_RX_LOG(ERR, "Error in received packet rcd#:%d rxd:%d\n",
+ PMD_RX_LOG(ERR, "Error in received packet rcd#:%d rxd:%d",
(int)(rcd - (struct Vmxnet3_RxCompDesc *)
rxq->comp_ring.base), rcd->rxdIdx);
rte_pktmbuf_free_seg(rxm);
/* Check for hardware stripped VLAN tag */
if (rcd->ts) {
- PMD_RX_LOG(ERR, "Received packet with vlan ID: %d.\n",
+ PMD_RX_LOG(ERR, "Received packet with vlan ID: %d.",
rcd->tci);
rxm->ol_flags = PKT_RX_VLAN_PKT;
if (nb_rxd > rxq->cmd_ring[0].size) {
PMD_RX_LOG(ERR,
"Used up quota of receiving packets,"
- " relinquish control.\n");
+ " relinquish control.");
break;
}
}
if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS) !=
ETH_TXQ_FLAGS_NOMULTSEGS) {
- PMD_INIT_LOG(ERR, "TX Multi segment not support yet\n");
+ PMD_INIT_LOG(ERR, "TX Multi segment not support yet");
return -EINVAL;
}
if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOOFFLOADS) !=
ETH_TXQ_FLAGS_NOOFFLOADS) {
- PMD_INIT_LOG(ERR, "TX not support offload function yet\n");
+ PMD_INIT_LOG(ERR, "TX not support offload function yet");
return -EINVAL;
}
txq = rte_zmalloc("ethdev_tx_queue", sizeof(struct vmxnet3_tx_queue), CACHE_LINE_SIZE);
if (txq == NULL) {
- PMD_INIT_LOG(ERR, "Can not allocate tx queue structure\n");
+ PMD_INIT_LOG(ERR, "Can not allocate tx queue structure");
return -ENOMEM;
}
/* Tx vmxnet ring length should be between 512-4096 */
if (nb_desc < VMXNET3_DEF_TX_RING_SIZE) {
- PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Min: %u\n",
+ PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Min: %u",
VMXNET3_DEF_TX_RING_SIZE);
return -EINVAL;
} else if (nb_desc > VMXNET3_TX_RING_MAX_SIZE) {
- PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Max: %u\n",
+ PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Max: %u",
VMXNET3_TX_RING_MAX_SIZE);
return -EINVAL;
} else {
mz = ring_dma_zone_reserve(dev, "txdesc", queue_idx, size, socket_id);
if (mz == NULL) {
- PMD_INIT_LOG(ERR, "ERROR: Creating queue descriptors zone\n");
+ PMD_INIT_LOG(ERR, "ERROR: Creating queue descriptors zone");
return -ENOMEM;
}
memset(mz->addr, 0, mz->len);
ring->buf_info = rte_zmalloc("tx_ring_buf_info",
ring->size * sizeof(vmxnet3_buf_info_t), CACHE_LINE_SIZE);
if (ring->buf_info == NULL) {
- PMD_INIT_LOG(ERR, "ERROR: Creating tx_buf_info structure\n");
+ PMD_INIT_LOG(ERR, "ERROR: Creating tx_buf_info structure");
return -ENOMEM;
}
if (dev->data->dev_conf.rxmode.max_rx_pkt_len > buf_size) {
PMD_INIT_LOG(ERR, "buf_size = %u, max_pkt_len = %u, "
- "VMXNET3 don't support scatter packets yet\n",
+ "VMXNET3 don't support scatter packets yet",
buf_size, dev->data->dev_conf.rxmode.max_rx_pkt_len);
return -EINVAL;
}
rxq = rte_zmalloc("ethdev_rx_queue", sizeof(struct vmxnet3_rx_queue), CACHE_LINE_SIZE);
if (rxq == NULL) {
- PMD_INIT_LOG(ERR, "Can not allocate rx queue structure\n");
+ PMD_INIT_LOG(ERR, "Can not allocate rx queue structure");
return -ENOMEM;
}
/* Rx vmxnet rings length should be between 256-4096 */
if (nb_desc < VMXNET3_DEF_RX_RING_SIZE) {
- PMD_INIT_LOG(ERR, "VMXNET3 Rx Ring Size Min: 256\n");
+ PMD_INIT_LOG(ERR, "VMXNET3 Rx Ring Size Min: 256");
return -EINVAL;
} else if (nb_desc > VMXNET3_RX_RING_MAX_SIZE) {
- PMD_INIT_LOG(ERR, "VMXNET3 Rx Ring Size Max: 4096\n");
+ PMD_INIT_LOG(ERR, "VMXNET3 Rx Ring Size Max: 4096");
return -EINVAL;
} else {
ring0->size = nb_desc;
mz = ring_dma_zone_reserve(dev, "rxdesc", queue_idx, size, socket_id);
if (mz == NULL) {
- PMD_INIT_LOG(ERR, "ERROR: Creating queue descriptors zone\n");
+ PMD_INIT_LOG(ERR, "ERROR: Creating queue descriptors zone");
return -ENOMEM;
}
memset(mz->addr, 0, mz->len);
ring->buf_info = rte_zmalloc(mem_name, ring->size * sizeof(vmxnet3_buf_info_t), CACHE_LINE_SIZE);
if (ring->buf_info == NULL) {
- PMD_INIT_LOG(ERR, "ERROR: Creating rx_buf_info structure\n");
+ PMD_INIT_LOG(ERR, "ERROR: Creating rx_buf_info structure");
return -ENOMEM;
}
}
/* Passing 0 as alloc_num will allocate full ring */
ret = vmxnet3_post_rx_bufs(rxq, j);
if (ret <= 0) {
- PMD_INIT_LOG(ERR, "ERROR: Posting Rxq: %d buffers ring: %d\n", i, j);
+ PMD_INIT_LOG(ERR, "ERROR: Posting Rxq: %d buffers ring: %d", i, j);
return -ret;
}
/* Updating device with the index:next2fill to fill the mbufs for coming packets */
vf_table[i] = 0;
/* To-Do: Provide another routine in dev_ops for user config */
- PMD_INIT_LOG(DEBUG, "Registering VLAN portid: %"PRIu8" tag %u\n",
+ PMD_INIT_LOG(DEBUG, "Registering VLAN portid: %"PRIu8" tag %u",
dev->data->port_id, vf_table[i]);
}