[PATCH v4] net/cpfl: get running host ID for CPFL PMD

Wani, Shaiq shaiq.wani at intel.com
Wed Jun 5 07:48:39 CEST 2024



> +	if (uname(&unamedata) != 0)
> +		PMD_INIT_LOG(ERR, "Cannot fetch node_name for host\n");
> +	else if (strstr(unamedata.nodename, "ipu-imc"))
> +		PMD_INIT_LOG(ERR, "CPFL PMD cannot be running on IMC.");
> +	else if (strstr(unamedata.nodename, "ipu-acc"))
> +		host_id = CPFL_HOST_ID_ACC;

The nodename in uname is the same as the hostname.
This can be changed by user, is that ok?

We are making an assumption that user will not have hostname as ipu-acc or ipu-imc.
If this is okay, I will upload a new patch taking care of the blank line between the functions.

Also, please put one blank line between functions, it makes code easier to read.



More information about the dev mailing list