On Tue, 19 Aug 2025 03:22:31 -0700 Dimon Zhao <dimon.z...@nebula-matrix.com> wrote:
> > +int nbl_dev_configure(struct rte_eth_dev *eth_dev) > +{ > + struct rte_eth_dev_data *dev_data = eth_dev->data; > + enum rte_eth_rx_mq_mode rx_mq_mode = > eth_dev->data->dev_conf.rxmode.mq_mode; > + struct nbl_adapter *adapter = ETH_DEV_TO_NBL_DEV_PF_PRIV(eth_dev); > + int ret; > + > + NBL_LOG(INFO, "Begin to configure the device, state: %d", > adapter->state); > + > + if (dev_data == NULL || adapter == NULL) > + return -EINVAL; > + > + > + if (rx_mq_mode != RTE_ETH_MQ_RX_NONE && rx_mq_mode != > RTE_ETH_MQ_RX_RSS) { > + NBL_LOG(INFO, "Rx mq mode %d is not supported", rx_mq_mode); Should be NBL_LOG(ERR and return -ENOTSUP > + return -EINVAL; > + } > + > + dev_data->dev_conf.intr_conf.lsc = 0; > + > + switch (adapter->state) { > + case NBL_ETHDEV_CONFIGURED: > + case NBL_ETHDEV_INITIALIZED: > + ret = nbl_dev_port_configure(adapter); > + break; > + default: > + ret = -EINVAL; > + break; > + } > + > + NBL_LOG(INFO, "configure the device done %d", ret); Should be at DEBUG level. Device should not print anything to log when used by a non buggy application. > + return ret; > +}