lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221125140150.79646-1-alexandr.lobakin@intel.com>
Date:   Fri, 25 Nov 2022 15:01:50 +0100
From:   Alexander Lobakin <alexandr.lobakin@...el.com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     Alexander Lobakin <alexandr.lobakin@...el.com>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
        netdev@...r.kernel.org, oss-drivers@...igine.com,
        Yu Xiao <yu.xiao@...igine.com>,
        Louis Peens <louis.peens@...igine.com>
Subject: Re: [PATCH net-next v2] nfp: ethtool: support reporting link modes

From: Simon Horman <simon.horman@...igine.com>
Date: Fri, 25 Nov 2022 12:30:30 +0100

> From: Yu Xiao <yu.xiao@...igine.com>
> 
> Add support for reporting link modes,
> including `Supported link modes` and `Advertised link modes`,
> via ethtool $DEV.
> 
> A new command `SPCODE_READ_MEDIA` is added to read info from
> management firmware. Also, the mapping table `nfp_eth_media_table`
> associates the link modes between NFP and kernel. Both of them
> help to support this ability.
> 
> Signed-off-by: Yu Xiao <yu.xiao@...igine.com>
> Reviewed-by: Louis Peens <louis.peens@...igine.com>
> Signed-off-by: Simon Horman <simon.horman@...igine.com>

[...]

> @@ -1100,4 +1101,20 @@ int nfp_nsp_read_module_eeprom(struct nfp_nsp *state, int eth_index,
>  	kfree(buf);
>  
>  	return ret;
> +};
> +
> +int nfp_nsp_read_media(struct nfp_nsp *state, void *buf, unsigned int size)
> +{
> +	struct nfp_nsp_command_buf_arg media = {
> +		{
> +			.code		= SPCODE_READ_MEDIA,
> +			.option		= size,
> +		},

One minor here: the initializers below are designated, but the one
above is anonymous, there should be

		.arg = {
			.code		= ...
			.option		= ...
		},

ideally.
Up to you whether to send a new rev or leave it as it is, from me:

Reviewed-by: Alexander Lobakin <alexandr.lobakin@...el.com>

(please pick it up manually if you send a new rev)

> +		.in_buf		= buf,
> +		.in_size	= size,
> +		.out_buf	= buf,
> +		.out_size	= size,
> +	};
> +
> +	return nfp_nsp_command_buf(state, &media);
>  }

[...]

> -- 
> 2.30.2

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ