mbox series

[v3,net-next,0/7] ethtool support for fec and link configuration

Message ID 1612157084-101715-1-git-send-email-hkelam@marvell.com
Headers show
Series ethtool support for fec and link configuration | expand

Message

Hariprasad Kelam Feb. 1, 2021, 5:24 a.m. UTC
This series of patches add support for forward error correction(fec) and
physical link configuration. Patches 1&2 adds necessary mbox handlers for fec
mode configuration request and to fetch stats. Patch 3 registers driver
callbacks for fec mode configuration and display. Patch 4&5 adds support of mbox
handlers for configuring link parameters like speed/duplex and autoneg etc.
Patche 6&7 registers driver callbacks for physical link configuration.

Change-log:
v2:
	- Fixed review comments
	- Corrected indentation issues
        - Return -ENOMEM incase of mbox allocation failure
	- added validation for input fecparams bitmask values
        - added more comments

V3:
	- Removed inline functions
        - Make use of ethtool helpers APIs to display supported
          advertised modes
        - corrected indentation issues
        - code changes such that return early in case of failure
          to aid branch prediction


Christina Jacob (6):
  octeontx2-af: forward error correction configuration
  octeontx2-pf: ethtool fec mode support
  octeontx2-af: Physical link configuration support
  octeontx2-af: advertised link modes support on cgx
  octeontx2-pf: ethtool physical link status
  octeontx2-pf: ethtool physical link configuration

Felix Manlunas (1):
  octeontx2-af: Add new CGX_CMD to get PHY FEC statistics

 drivers/net/ethernet/marvell/octeontx2/af/cgx.c    | 258 ++++++++++++-
 drivers/net/ethernet/marvell/octeontx2/af/cgx.h    |  10 +
 .../net/ethernet/marvell/octeontx2/af/cgx_fw_if.h  |  70 +++-
 drivers/net/ethernet/marvell/octeontx2/af/mbox.h   |  87 ++++-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |   4 +
 .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    |  80 +++++
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |  20 ++
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   6 +
 .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  | 399 ++++++++++++++++++++-
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |   3 +
 10 files changed, 930 insertions(+), 7 deletions(-)

--
2.7.4

Comments

Jesse Brandeburg Feb. 3, 2021, 12:41 a.m. UTC | #1
Hariprasad Kelam wrote:

> This series of patches add support for forward error correction(fec) and

> physical link configuration. Patches 1&2 adds necessary mbox handlers for fec

> mode configuration request and to fetch stats. Patch 3 registers driver

> callbacks for fec mode configuration and display. Patch 4&5 adds support of mbox

> handlers for configuring link parameters like speed/duplex and autoneg etc.

> Patche 6&7 registers driver callbacks for physical link configuration.


For the series, in addition to the fact that Willem already replied to
the previous posting of v3 that it looked good.

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Jesse Brandeburg Feb. 3, 2021, 12:43 a.m. UTC | #2
Hariprasad Kelam wrote:

> From: Christina Jacob <cjacob@marvell.com>

> 

> CGX block supports forward error correction modes baseR

> and RS. This patch adds support to set encoding mode

> and to read corrected/uncorrected block counters

> 

> Adds new mailbox handlers set_fec to configure encoding modes

> and fec_stats to read counters and also increase mbox timeout

> to accomdate firmware command response timeout.

> 

> Along with new CGX_CMD_SET_FEC command add other commands to

> sync with kernel enum list with firmware.

> 

> Signed-off-by: Christina Jacob <cjacob@marvell.com>

> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>

> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>


Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Jesse Brandeburg Feb. 3, 2021, 12:44 a.m. UTC | #3
Hariprasad Kelam wrote:

> From: Christina Jacob <cjacob@marvell.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@marvell.com>

> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>

> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>


Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Jesse Brandeburg Feb. 3, 2021, 12:45 a.m. UTC | #4
Hariprasad Kelam wrote:

> From: Christina Jacob <cjacob@marvell.com>

> 

> CGX supports setting advertised link modes on physical link.

> This patch adds support to derive cgx mode from ethtool

> link mode and pass it to firmware to configure the same.

> 

> Signed-off-by: Christina Jacob <cjacob@marvell.com>

> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>

> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>


Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Jesse Brandeburg Feb. 3, 2021, 12:46 a.m. UTC | #5
Hariprasad Kelam wrote:

> From: Christina Jacob <cjacob@marvell.com>

> 

> Register get_link_ksettings callback to get link status information

> from the driver. As virtual function (vf) shares same physical link

> same API is used for both the drivers and for loop back drivers

> simply returns the fixed values as its does not have physical link.

> 

> ethtool eth3

> Settings for eth3:

>         Supported ports: [ ]

>         Supported link modes:   10baseT/Half 10baseT/Full

>                                 100baseT/Half 100baseT/Full

>                                 1000baseT/Half 1000baseT/Full

>                                 10000baseKR/Full

>                                 1000baseX/Full

>         Supports auto-negotiation: No

>         Supported FEC modes: BaseR RS

>         Advertised link modes:  Not reported

>         Advertised pause frame use: No

>         Advertised auto-negotiation: No

>         Advertised FEC modes: None

> 

> ethtool lbk0

> Settings for lbk0:

> 	Speed: 100000Mb/s

>         Duplex: Full

> 

> Signed-off-by: Christina Jacob <cjacob@marvell.com>

> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>

> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>


besides the slightly long lines, looks good.
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>