linux-kernel.vger.kernel.org archive mirror
 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; 15+ 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] 15+ messages in thread
* Re: [Patch v2 net-next 3/7] octeontx2-pf: ethtool fec mode support
@ 2021-01-30 10:05 Hariprasad Kelam
  0 siblings, 0 replies; 15+ messages in thread
From: Hariprasad Kelam @ 2021-01-30 10:05 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:01 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 3/7] octeontx2-pf: ethtool fec mode
> support
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Wed, Jan 27, 2021 at 4:03 AM Hariprasad Kelam <hkelam@marvell.com>
> wrote:
> >
> > From: Christina Jacob <cjacob@marvell.com>
> >
> > Add ethtool support to configure fec modes baser/rs and support to
> > fecth FEC stats from CGX as well PHY.
> >
> > Configure fec mode
> >         - ethtool --set-fec eth0 encoding rs/baser/off/auto Query fec
> > mode
> >         - ethtool --show-fec eth0
> >
> > Signed-off-by: Christina Jacob <cjacob@marvell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> > Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> > ---
> >  .../ethernet/marvell/octeontx2/nic/otx2_common.c   |  23 +++
> >  .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   6 +
> >  .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  | 181
> ++++++++++++++++++++-
> >  .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |   3 +
> >  4 files changed, 211 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> > index bdfa2e2..f7e5450 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> > @@ -60,6 +60,22 @@ void otx2_update_lmac_stats(struct otx2_nic *pfvf)
> >         mutex_unlock(&pfvf->mbox.lock);  }
> >
> > +void otx2_update_lmac_fec_stats(struct otx2_nic *pfvf) {
> > +       struct msg_req *req;
> > +
> > +       if (!netif_running(pfvf->netdev))
> > +               return;
> > +       mutex_lock(&pfvf->mbox.lock);
> > +       req = otx2_mbox_alloc_msg_cgx_fec_stats(&pfvf->mbox);
> > +       if (!req) {
> > +               mutex_unlock(&pfvf->mbox.lock);
> > +               return;
> > +       }
> > +       otx2_sync_mbox_msg(&pfvf->mbox);
> 
> Perhaps simpler to have a single exit from the critical section:
> 
Agreed will fix this in next version.

>   if (req)
>     otx2_update_lmac_fec_stats
> 
> > +       mutex_unlock(&pfvf->mbox.lock); }
> 
> Also, should this function return an error on failure? The caller returns errors
> in other cases.

Caller of this function otx2_get_sset_count . Where driver suppose to return number of stats. 
This function is just to update local netdev counters fec_corr_blks/ fec_uncorr_blks. So failure
Of this function should not effect.

Thanks,
Hariprasad k

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

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

Thread overview: 15+ 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 10:05 [Patch v2 net-next 3/7] octeontx2-pf: ethtool fec mode support Hariprasad Kelam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).