[PATCH v4] net/cpfl: get running host ID for CPFL PMD
Stephen Hemminger
stephen at networkplumber.org
Tue Jun 4 18:17:41 CEST 2024
On Thu, 30 May 2024 09:39:58 +0000
Shaiq Wani <shaiq.wani at intel.com> wrote:
> + 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?
Also, please put one blank line between functions, it makes code easier to read.
More information about the dev
mailing list