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: <20180604230700.GB14873@lunn.ch>
Date:   Tue, 5 Jun 2018 01:07:00 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     "Steven J. Hill" <steven.hill@...ium.com>
Cc:     netdev@...r.kernel.org, Carlos Munoz <cmunoz@...ium.com>
Subject: Re: [PATCH net-next v11 04/10] netdev: cavium: octeon: Add Octeon
 III BGX Ports

> +static int bgx_port_get_qlm_speed(struct bgx_port_priv	*priv, int qlm)
> +{
> +	enum lane_mode lmode;
> +	u64 data;
> +
> +	data = oct_csr_read(GSER_LANE_MODE(priv->node, qlm));
> +	lmode = data & 0xf;
> +
> +	switch (lmode) {
> +	case R_25G_REFCLK100:
> +		return 2500;
> +	case R_5G_REFCLK100:
> +		return 5000;
> +	case R_8G_REFCLK100:
> +		return 8000;
> +	case R_125G_REFCLK15625_KX:
> +		return 1250;
> +	case R_3125G_REFCLK15625_XAUI:
> +		return 3125;
> +	case R_103125G_REFCLK15625_KR:
> +		return 10312;
> +	case R_125G_REFCLK15625_SGMII:
> +		return 1250;
> +	case R_5G_REFCLK15625_QSGMII:
> +		return 5000;
> +	case R_625G_REFCLK15625_RXAUI:
> +		return 6250;
> +	case R_25G_REFCLK125:
> +		return 2500;
> +	case R_5G_REFCLK125:
> +		return 5000;
> +	case R_8G_REFCLK125:
> +		return 8000;
> +	default:
> +		return 0;
> +	}


> +	struct port_status status;
> +	int speed;
> +
> +	/* The simulator always uses a 1Gbps full duplex port */
> +	if (octeon_is_simulation()) {
> +		status.link = 1;
> +		status.duplex = DUPLEX_FULL;
> +		status.speed = 1000;
> +	} else {
> +		/* Use the qlm speed */
> +		speed = bgx_port_get_qlm_speed(priv, priv->qlm);
> +		status.link = 1;
> +		status.duplex = DUPLEX_FULL;
> +		status.speed = speed * 8 / 10;
> +	}

Hi Steve

That looks like it gives some odd speeds.

2500 * 8 / 10 = 2Gbps
5000 * 8 / 10 = 4Gbps
8000 * 8 / 10 = 6.4Gbps
10312 * 8 /10 = 8.249Gbps

Is this correct. We are more used to 10/100/1000/2.5G/5G/10G/40G/100G.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ