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]
Date:   Wed, 27 Jan 2021 14:26:26 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Hariprasad Kelam <hkelam@...vell.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        davem@...emloft.net, kuba@...nel.org, sgoutham@...vell.com,
        lcherian@...vell.com, gakula@...vell.com, jerinj@...vell.com,
        sbhatta@...vell.com, Christina Jacob <cjacob@...vell.com>
Subject: Re: [Patch v2 net-next 4/7] octeontx2-af: Physical link
 configuration support

On Wed, Jan 27, 2021 at 01:15:49PM +0530, Hariprasad Kelam wrote:
> From: Christina Jacob <cjacob@...vell.com>
> 
> CGX LMAC, the physical interface support link configuration parameters
> like speed, auto negotiation, duplex  etc. Firmware saves these into
> memory region shared between firmware and this driver.
> 
> This patch adds mailbox handler set_link_mode, fw_data_get to
> configure and read these parameters.
> 
> Signed-off-by: Christina Jacob <cjacob@...vell.com>
> Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> Signed-off-by: Hariprasad Kelam <hkelam@...vell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/cgx.c    | 60 +++++++++++++++++++++-
>  drivers/net/ethernet/marvell/octeontx2/af/cgx.h    |  2 +
>  .../net/ethernet/marvell/octeontx2/af/cgx_fw_if.h  | 18 ++++++-
>  drivers/net/ethernet/marvell/octeontx2/af/mbox.h   | 21 ++++++++
>  .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    | 17 ++++++
>  5 files changed, 115 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> index b3ae84c..42ee67e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> @@ -658,6 +658,39 @@ static inline void cgx_link_usertable_init(void)
>  	cgx_lmactype_string[LMAC_MODE_USXGMII] = "USXGMII";
>  }
>  
> +static inline int cgx_link_usertable_index_map(int speed)
> +{

Hi Christina, Hariprasad

No inline functions in .c files please. Let the compiler decide.


> +	switch (speed) {
> +	case SPEED_10:
> +		return CGX_LINK_10M;
> +	case SPEED_100:
> +		return CGX_LINK_100M;
> +	case SPEED_1000:
> +		return CGX_LINK_1G;
> +	case SPEED_2500:
> +		return CGX_LINK_2HG;
> +	case SPEED_5000:
> +		return CGX_LINK_5G;
> +	case SPEED_10000:
> +		return CGX_LINK_10G;
> +	case SPEED_20000:
> +		return CGX_LINK_20G;
> +	case SPEED_25000:
> +		return CGX_LINK_25G;
> +	case SPEED_40000:
> +		return CGX_LINK_40G;
> +	case SPEED_50000:
> +		return CGX_LINK_50G;
> +	case 80000:
> +		return CGX_LINK_80G;
> +	case SPEED_100000:
> +		return CGX_LINK_100G;
> +	case SPEED_UNKNOWN:
> +		return CGX_LINK_NONE;
> +	}
> +	return CGX_LINK_NONE;
> +}
> +
>  static inline void link_status_user_format(u64 lstat,
>  					   struct cgx_link_user_info *linfo,
>  					   struct cgx *cgx, u8 lmac_id)

So it looks like previous reviews did not catch inline functions. So
lets say, no new inline functions.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ