netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health reporters for NPA
@ 2020-11-23  2:49 George Cherian
  2020-11-23 10:22 ` Jiri Pirko
  0 siblings, 1 reply; 6+ messages in thread
From: George Cherian @ 2020-11-23  2:49 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: netdev, linux-kernel, kuba, davem, Sunil Kovvuri Goutham,
	Linu Cherian, Geethasowjanya Akula, masahiroy,
	willemdebruijn.kernel, saeed



> -----Original Message-----
> From: Jiri Pirko <jiri@resnulli.us>
> Sent: Saturday, November 21, 2020 7:44 PM
> To: George Cherian <gcherian@marvell.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> kuba@kernel.org; davem@davemloft.net; Sunil Kovvuri Goutham
> <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> Geethasowjanya Akula <gakula@marvell.com>; masahiroy@kernel.org;
> willemdebruijn.kernel@gmail.com; saeed@kernel.org
> Subject: Re: [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health
> reporters for NPA
> 
> Sat, Nov 21, 2020 at 05:02:00AM CET, george.cherian@marvell.com wrote:
> >Add health reporters for RVU NPA block.
> >NPA Health reporters handle following HW event groups
> > - GENERAL events
> > - ERROR events
> > - RAS events
> > - RVU event
> >An event counter per event is maintained in SW.
> >
> >Output:
> > # devlink health
> > pci/0002:01:00.0:
> >   reporter npa
> >     state healthy error 0 recover 0
> > # devlink  health dump show pci/0002:01:00.0 reporter npa
> > NPA_AF_GENERAL:
> >        Unmap PF Error: 0
> >        Free Disabled for NIX0 RX: 0
> >        Free Disabled for NIX0 TX: 0
> >        Free Disabled for NIX1 RX: 0
> >        Free Disabled for NIX1 TX: 0
> 
> This is for 2 ports if I'm not mistaken. Then you need to have this reporter
> per-port. Register ports and have reporter for each.
> 
No, these are not port specific reports.
NIX is the Network Interface Controller co-processor block.
There are (max of) 2 such co-processor blocks per SoC.

Moreover, this is an NPA (Network Pool/Buffer Allocator co- processor) reporter.
This tells whether a free or alloc operation is skipped due to the configurations set by
other co-processor blocks (NIX,SSO,TIM etc).

https://www.kernel.org/doc/html/latest/networking/device_drivers/ethernet/marvell/octeontx2.html
> NAK.

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health reporters for NPA
@ 2020-11-23 10:28 George Cherian
  2020-11-23 11:34 ` Jiri Pirko
  0 siblings, 1 reply; 6+ messages in thread
From: George Cherian @ 2020-11-23 10:28 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: netdev, linux-kernel, kuba, davem, Sunil Kovvuri Goutham,
	Linu Cherian, Geethasowjanya Akula, masahiroy,
	willemdebruijn.kernel, saeed

Hi Jiri,

> -----Original Message-----
> From: Jiri Pirko <jiri@resnulli.us>
> Sent: Monday, November 23, 2020 3:52 PM
> To: George Cherian <gcherian@marvell.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> kuba@kernel.org; davem@davemloft.net; Sunil Kovvuri Goutham
> <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> Geethasowjanya Akula <gakula@marvell.com>; masahiroy@kernel.org;
> willemdebruijn.kernel@gmail.com; saeed@kernel.org
> Subject: Re: [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health
> reporters for NPA
> 
> Mon, Nov 23, 2020 at 03:49:06AM CET, gcherian@marvell.com wrote:
> >
> >
> >> -----Original Message-----
> >> From: Jiri Pirko <jiri@resnulli.us>
> >> Sent: Saturday, November 21, 2020 7:44 PM
> >> To: George Cherian <gcherian@marvell.com>
> >> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> >> kuba@kernel.org; davem@davemloft.net; Sunil Kovvuri Goutham
> >> <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> >> Geethasowjanya Akula <gakula@marvell.com>; masahiroy@kernel.org;
> >> willemdebruijn.kernel@gmail.com; saeed@kernel.org
> >> Subject: Re: [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health
> >> reporters for NPA
> >>
> >> Sat, Nov 21, 2020 at 05:02:00AM CET, george.cherian@marvell.com wrote:
> >> >Add health reporters for RVU NPA block.
> >> >NPA Health reporters handle following HW event groups
> >> > - GENERAL events
> >> > - ERROR events
> >> > - RAS events
> >> > - RVU event
> >> >An event counter per event is maintained in SW.
> >> >
> >> >Output:
> >> > # devlink health
> >> > pci/0002:01:00.0:
> >> >   reporter npa
> >> >     state healthy error 0 recover 0  # devlink  health dump show
> >> >pci/0002:01:00.0 reporter npa
> >> > NPA_AF_GENERAL:
> >> >        Unmap PF Error: 0
> >> >        Free Disabled for NIX0 RX: 0
> >> >        Free Disabled for NIX0 TX: 0
> >> >        Free Disabled for NIX1 RX: 0
> >> >        Free Disabled for NIX1 TX: 0
> >>
> >> This is for 2 ports if I'm not mistaken. Then you need to have this
> >> reporter per-port. Register ports and have reporter for each.
> >>
> >No, these are not port specific reports.
> >NIX is the Network Interface Controller co-processor block.
> >There are (max of) 2 such co-processor blocks per SoC.
> 
> Ah. I see. In that case, could you please structure the json differently. Don't
> concatenate the number with the string. Instead of that, please have 2
> subtrees, one for each NIX.
> 
NPA_AF_GENERAL:
        Unmap PF Error: 0
        Free Disabled for NIX0 
		RX: 0
       		TX: 0
        Free Disabled for NIX1
		RX: 0
        		TX: 0

Something like this?

Regards,
-George
> 
> >
> >Moreover, this is an NPA (Network Pool/Buffer Allocator co- processor)
> reporter.
> >This tells whether a free or alloc operation is skipped due to the
> >configurations set by other co-processor blocks (NIX,SSO,TIM etc).
> >
> >https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.kernel.org_doc
> >_html_latest_networking_device-
> 5Fdrivers_ethernet_marvell_octeontx2.htm
> >l&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=npgTSgHrUSLmXpBZJKVhk0
> lE_XNvtVDl8
> >ZA2zBvBqPw&m=FNPm6lB8fRvGYvMqQWer6S9WI6rZIlMmDCqbM8xrnxM
> &s=B47zBTfDlIdM
> >xUmK0hmQkuoZnsGZYSzkvbZUloevT0A&e=
> >> NAK.


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCHv3 net-next 0/3] Add devlink and devlink health reporters to
@ 2020-11-21  4:01 George Cherian
  2020-11-21  4:02 ` [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health reporters for NPA George Cherian
  0 siblings, 1 reply; 6+ messages in thread
From: George Cherian @ 2020-11-21  4:01 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, masahiroy,
	george.cherian, willemdebruijn.kernel, saeed

Add basic devlink and devlink health reporters.
Devlink health reporters are added for NPA and NIX blocks.
These reporters report the error count in respective blocks.

Address Jakub's comment to add devlink support for error reporting.
https://www.spinics.net/lists/netdev/msg670712.html

Change-log:
v4 
 - Rebase to net-next (no logic changes).
 
v3
 - Address Saeed's comments on v2.
 - Renamed the reporter name as hw_*.
 - Call devlink_health_report() when an event is raised.
 - Added recover op too.

v2
 - Address Willem's comments on v1.
 - Fixed the sparse issues, reported by Jakub.


George Cherian (3):
  octeontx2-af: Add devlink suppoort to af driver
  octeontx2-af: Add devlink health reporters for NPA
  octeontx2-af: Add devlink health reporters for NIX

 .../net/ethernet/marvell/octeontx2/Kconfig    |   1 +
 .../ethernet/marvell/octeontx2/af/Makefile    |   2 +-
 .../net/ethernet/marvell/octeontx2/af/rvu.c   |   9 +-
 .../net/ethernet/marvell/octeontx2/af/rvu.h   |   4 +
 .../marvell/octeontx2/af/rvu_devlink.c        | 972 ++++++++++++++++++
 .../marvell/octeontx2/af/rvu_devlink.h        |  82 ++
 .../marvell/octeontx2/af/rvu_struct.h         |  33 +
 7 files changed, 1101 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.h

-- 
2.25.1


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

end of thread, other threads:[~2020-11-23 11:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23  2:49 [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health reporters for NPA George Cherian
2020-11-23 10:22 ` Jiri Pirko
  -- strict thread matches above, loose matches on Subject: below --
2020-11-23 10:28 George Cherian
2020-11-23 11:34 ` Jiri Pirko
2020-11-21  4:01 [PATCHv3 net-next 0/3] Add devlink and devlink health reporters to George Cherian
2020-11-21  4:02 ` [PATCHv4 net-next 2/3] octeontx2-af: Add devlink health reporters for NPA George Cherian
2020-11-21 14:13   ` Jiri Pirko

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).