- We should not use DEBUGOUT* / DEBUGFUNC macros in pmd.
These macros come as compat wrappers for base driver.
- We should avoid calling RTE_LOG directly as pmd provides a wrapper for logs.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Jay Rolette <rolette@infiniteio.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
DEFAULT_TX_RS_THRESH);
if (tx_free_thresh >= (nb_desc - 3)) {
- RTE_LOG(ERR, PMD, "tx_free_thresh must be less than the "
- "number of TX descriptors minus 3. (tx_free_thresh=%u "
- "port=%d queue=%d)\n", (unsigned int)tx_free_thresh,
- (int)dev->data->port_id, (int)queue_idx);
+ PMD_INIT_LOG(ERR, "tx_free_thresh must be less than the "
+ "number of TX descriptors minus 3. "
+ "(tx_free_thresh=%u port=%d queue=%d)",
+ (unsigned int)tx_free_thresh,
+ (int)dev->data->port_id, (int)queue_idx);
return -(EINVAL);
}
if (tx_rs_thresh > tx_free_thresh) {
- RTE_LOG(ERR, PMD, "tx_rs_thresh must be less than or equal to "
- "tx_free_thresh. (tx_free_thresh=%u tx_rs_thresh=%u "
- "port=%d queue=%d)\n", (unsigned int)tx_free_thresh,
- (unsigned int)tx_rs_thresh, (int)dev->data->port_id,
- (int)queue_idx);
+ PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than or equal to "
+ "tx_free_thresh. (tx_free_thresh=%u "
+ "tx_rs_thresh=%u port=%d queue=%d)",
+ (unsigned int)tx_free_thresh,
+ (unsigned int)tx_rs_thresh,
+ (int)dev->data->port_id,
+ (int)queue_idx);
return -(EINVAL);
}
* accumulates WTHRESH descriptors.
*/
if (tx_conf->tx_thresh.wthresh != 0 && tx_rs_thresh != 1) {
- RTE_LOG(ERR, PMD, "TX WTHRESH must be set to 0 if "
- "tx_rs_thresh is greater than 1. (tx_rs_thresh=%u "
- "port=%d queue=%d)\n", (unsigned int)tx_rs_thresh,
- (int)dev->data->port_id, (int)queue_idx);
+ PMD_INIT_LOG(ERR, "TX WTHRESH must be set to 0 if "
+ "tx_rs_thresh is greater than 1. (tx_rs_thresh=%u "
+ "port=%d queue=%d)", (unsigned int)tx_rs_thresh,
+ (int)dev->data->port_id, (int)queue_idx);
return -(EINVAL);
}
* EM devices don't support drop_en functionality
*/
if (rx_conf->rx_drop_en) {
- RTE_LOG(ERR, PMD, "drop_en functionality not supported by device\n");
+ PMD_INIT_LOG(ERR, "drop_en functionality not supported by "
+ "device");
return (-EINVAL);
}
* So force the release of the faulty lock.
*/
if (e1000_get_hw_semaphore_generic(hw) < 0) {
- DEBUGOUT("SMBI lock released");
+ PMD_DRV_LOG(DEBUG, "SMBI lock released");
}
e1000_put_hw_semaphore_generic(hw);
if (hw->bus.func > E1000_FUNC_1)
mask <<= 2;
if (hw->mac.ops.acquire_swfw_sync(hw, mask) < 0) {
- DEBUGOUT1("SWFW phy%d lock released", hw->bus.func);
+ PMD_DRV_LOG(DEBUG, "SWFW phy%d lock released",
+ hw->bus.func);
}
hw->mac.ops.release_swfw_sync(hw, mask);
*/
mask = E1000_SWFW_EEP_SM;
if (hw->mac.ops.acquire_swfw_sync(hw, mask) < 0) {
- DEBUGOUT("SWFW common locks released");
+ PMD_DRV_LOG(DEBUG, "SWFW common locks released");
}
hw->mac.ops.release_swfw_sync(hw, mask);
}
static int
rte_igbvf_pmd_init(const char *name __rte_unused, const char *params __rte_unused)
{
- DEBUGFUNC("rte_igbvf_pmd_init");
+ PMD_INIT_FUNC_TRACE();
rte_eth_driver_register(&rte_igbvf_pmd);
return (0);
retval = e1000_read_mbx(hw, msgbuf, mbx_size, vf);
if (retval) {
- RTE_LOG(ERR, PMD, "Error mbx recv msg from VF %d\n", vf);
+ PMD_INIT_LOG(ERR, "Error mbx recv msg from VF %d", vf);
return retval;
}
retval = igb_vf_set_vlan(dev, vf, msgbuf);
break;
default:
- RTE_LOG(DEBUG, PMD, "Unhandled Msg %8.8x\n", (unsigned) msgbuf[0]);
+ PMD_INIT_LOG(DEBUG, "Unhandled Msg %8.8x",
+ (unsigned) msgbuf[0]);
retval = E1000_ERR_MBX;
break;
}
* driver.
*/
if (tx_conf->tx_free_thresh != 0)
- RTE_LOG(WARNING, PMD,
- "The tx_free_thresh parameter is not "
- "used for the 1G driver.\n");
+ PMD_INIT_LOG(WARNING, "The tx_free_thresh parameter is not "
+ "used for the 1G driver.");
if (tx_conf->tx_rs_thresh != 0)
- RTE_LOG(WARNING, PMD,
- "The tx_rs_thresh parameter is not "
- "used for the 1G driver.\n");
+ PMD_INIT_LOG(WARNING, "The tx_rs_thresh parameter is not "
+ "used for the 1G driver.");
if (tx_conf->tx_thresh.wthresh == 0)
- RTE_LOG(WARNING, PMD,
- "To improve 1G driver performance, consider setting "
- "the TX WTHRESH value to 4, 8, or 16.\n");
+ PMD_INIT_LOG(WARNING, "To improve 1G driver performance, "
+ "consider setting the TX WTHRESH value to 4, 8, "
+ "or 16.");
/* Free memory prior to re-allocation if needed */
if (dev->data->tx_queues[queue_idx] != NULL) {