[PATCH v4 11/16] net/nbl: add nbl ethdev configuration

Ivan Malov ivan.malov at arknetworks.am
Wed Aug 13 12:40:00 CEST 2025


Hi Dimon,

On Tue, 12 Aug 2025, Dimon Zhao wrote:

> NBL device add ethdev configuration
>
> Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
> ---
> drivers/net/nbl/nbl_dev/nbl_dev.c         | 33 +++++++++++++++++++++--
> drivers/net/nbl/nbl_include/nbl_include.h |  3 ++-
> 2 files changed, 33 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/nbl/nbl_dev/nbl_dev.c b/drivers/net/nbl/nbl_dev/nbl_dev.c
> index c4fd2dbfd6..86defd621d 100644
> --- a/drivers/net/nbl/nbl_dev/nbl_dev.c
> +++ b/drivers/net/nbl/nbl_dev/nbl_dev.c
> @@ -4,15 +4,44 @@
>
> #include "nbl_dev.h"
>
> -int nbl_dev_configure(struct rte_eth_dev *eth_dev)
> +static int nbl_dev_port_configure(struct nbl_adapter *adapter)
> {
> -	RTE_SET_USED(eth_dev);
> +	adapter->state = NBL_ETHDEV_CONFIGURED;
> +
> 	return 0;
> }
>
> +int nbl_dev_configure(struct rte_eth_dev *eth_dev)
> +{
> +	struct rte_eth_dev_data *dev_data = eth_dev->data;
> +	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;
> +
> +	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);
> +	return ret;
> +}
> +
> int nbl_dev_port_start(struct rte_eth_dev *eth_dev)
> {
> 	RTE_SET_USED(eth_dev);
> +

Unrelated?

> 	return 0;
> }
>
> diff --git a/drivers/net/nbl/nbl_include/nbl_include.h b/drivers/net/nbl/nbl_include/nbl_include.h
> index 8902c44972..e10fcc9254 100644
> --- a/drivers/net/nbl/nbl_include/nbl_include.h
> +++ b/drivers/net/nbl/nbl_include/nbl_include.h
> @@ -132,9 +132,10 @@ struct nbl_common_info {
> 	/* curr_network 0 means kernel network, 1 means user network */
> 	u8 curr_network:1;
> 	u8 is_vf:1;
> +	u8 pf_start:1;

By the looks of it, not used in this patch. Unrelated?

Thank you.

> 	u8 specific_dma:1;
> 	u8 dma_set_msb:1;
> -	u8 rsv:3;
> +	u8 rsv:2;
> 	struct nbl_board_port_info board_info;
> };
>
> -- 
> 2.34.1
>
>


More information about the dev mailing list