All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch v2 net-next 0/7]  ethtool support for fec and link configuration
@ 2021-01-27  7:45 Hariprasad Kelam
  2021-01-27  7:45 ` [Patch v2 net-next 1/7] octeontx2-af: forward error correction configuration Hariprasad Kelam
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Hariprasad Kelam @ 2021-01-27  7:45 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: davem, kuba, sgoutham, lcherian, gakula, jerinj, sbhatta,
	Hariprasad Kelam

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


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    | 257 +++++++++++++-
 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    |  82 +++++
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |  23 ++
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   6 +
 .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  | 393 ++++++++++++++++++++-
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |   3 +
 10 files changed, 928 insertions(+), 7 deletions(-)

--
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support
@ 2021-01-30  9:38 Hariprasad Kelam
  0 siblings, 0 replies; 16+ messages in thread
From: Hariprasad Kelam @ 2021-01-30  9:38 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: netdev, linux-kernel, davem, kuba, Sunil Kovvuri Goutham,
	Linu Cherian, Geethasowjanya Akula, Jerin Jacob Kollanukkaran,
	Subbaraya Sundeep Bhatta, Christina Jacob

Hi Andrew Lunn,



> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Wednesday, January 27, 2021 6:56 PM
> To: Hariprasad Kelam <hkelam@marvell.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> davem@davemloft.net; kuba@kernel.org; Sunil Kovvuri Goutham
> <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> Geethasowjanya Akula <gakula@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>;
> Christina Jacob <cjacob@marvell.com>
> Subject: [EXT] 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@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>
> > ---
> >  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.
>
  will fix this in next version
 
> 
> > +	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

Thanks for the review. I will fix this in next version.

Thanks,
Hariprasad k

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support
@ 2021-01-30  9:54 Hariprasad Kelam
  0 siblings, 0 replies; 16+ messages in thread
From: Hariprasad Kelam @ 2021-01-30  9:54 UTC (permalink / raw)
  To: Willem de Bruijn
  Cc: Network Development, LKML, David Miller, Jakub Kicinski,
	Sunil Kovvuri Goutham, Linu Cherian, Geethasowjanya Akula,
	Jerin Jacob Kollanukkaran, Subbaraya Sundeep Bhatta,
	Christina Jacob

Hi Willem,



> -----Original Message-----
> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Sent: Thursday, January 28, 2021 2:04 AM
> To: Hariprasad Kelam <hkelam@marvell.com>
> Cc: Network Development <netdev@vger.kernel.org>; LKML <linux-
> kernel@vger.kernel.org>; David Miller <davem@davemloft.net>; Jakub
> Kicinski <kuba@kernel.org>; Sunil Kovvuri Goutham
> <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> Geethasowjanya Akula <gakula@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>;
> Christina Jacob <cjacob@marvell.com>
> Subject: [EXT] Re: [Patch v2 net-next 4/7] octeontx2-af: Physical link
> configuration support
> 
> On Wed, Jan 27, 2021 at 4:02 AM Hariprasad Kelam <hkelam@marvell.com>
> 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>
> 
> > +int rvu_mbox_handler_cgx_set_link_mode(struct rvu *rvu,
> > +                                      struct cgx_set_link_mode_req *req,
> > +                                      struct cgx_set_link_mode_rsp
> > +*rsp) {
> > +       int pf = rvu_get_pf(req->hdr.pcifunc);
> > +       u8 cgx_idx, lmac;
> > +       void *cgxd;
> > +
> > +       if (!is_cgx_config_permitted(rvu, req->hdr.pcifunc))
> > +               return -EPERM;
> > +
> > +       rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_idx, &lmac);
> > +       cgxd = rvu_cgx_pdata(cgx_idx, rvu);
> > +       rsp->status =  cgx_set_link_mode(cgxd, req->args, cgx_idx,
> > + lmac);
> 
> nit: two spaces after assignment operator.
> 
> on the point of no new inline: do also check the status in patchwork.
> that also flags such issues.
Thanks for the review. Will fix in next version.

Thanks,
Hariprasad k

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-30  9:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  7:45 [Patch v2 net-next 0/7] ethtool support for fec and link configuration Hariprasad Kelam
2021-01-27  7:45 ` [Patch v2 net-next 1/7] octeontx2-af: forward error correction configuration Hariprasad Kelam
2021-01-27 20:15   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 2/7] octeontx2-af: Add new CGX_CMD to get PHY FEC statistics Hariprasad Kelam
2021-01-27 20:20   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 3/7] octeontx2-pf: ethtool fec mode support Hariprasad Kelam
2021-01-27 20:30   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support Hariprasad Kelam
2021-01-27 13:26   ` Andrew Lunn
2021-01-27 20:33   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 5/7] octeontx2-af: advertised link modes support on cgx Hariprasad Kelam
2021-01-27  7:45 ` [Patch v2 net-next 6/7] octeontx2-pf: ethtool physical link status Hariprasad Kelam
2021-01-27 13:51   ` Andrew Lunn
2021-01-27  7:45 ` [Patch v2 net-next 7/7] octeontx2-pf: ethtool physical link configuration Hariprasad Kelam
2021-01-30  9:38 [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support Hariprasad Kelam
2021-01-30  9:54 Hariprasad Kelam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.