[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY5PR18MB3298C4C84704BCE864133C33C62D0@BY5PR18MB3298.namprd18.prod.outlook.com>
Date: Fri, 4 Sep 2020 12:29:04 +0000
From: Sunil Kovvuri Goutham <sgoutham@...vell.com>
To: Jiri Pirko <jiri@...nulli.us>
CC: Jakub Kicinski <kuba@...nel.org>,
"sundeep.lkml@...il.com" <sundeep.lkml@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
Subject: RE: [EXT] Re: [net-next PATCH 0/2] Introduce mbox tracepoints for
Octeontx2
> -----Original Message-----
> From: Jiri Pirko <jiri@...nulli.us>
> Sent: Friday, September 4, 2020 5:41 PM
> To: Sunil Kovvuri Goutham <sgoutham@...vell.com>
> Cc: Jakub Kicinski <kuba@...nel.org>; sundeep.lkml@...il.com;
> davem@...emloft.net; netdev@...r.kernel.org; Subbaraya Sundeep
> Bhatta <sbhatta@...vell.com>
> Subject: Re: [EXT] Re: [net-next PATCH 0/2] Introduce mbox tracepoints for
> Octeontx2
>
> Fri, Sep 04, 2020 at 10:49:45AM CEST, sgoutham@...vell.com wrote:
> >
> >
> >> -----Original Message-----
> >> From: Jiri Pirko <jiri@...nulli.us>
> >> Sent: Friday, September 4, 2020 2:07 PM
> >> To: Sunil Kovvuri Goutham <sgoutham@...vell.com>
> >> Cc: Jakub Kicinski <kuba@...nel.org>; sundeep.lkml@...il.com;
> >> davem@...emloft.net; netdev@...r.kernel.org; Subbaraya Sundeep
> Bhatta
> >> <sbhatta@...vell.com>
> >> Subject: Re: [EXT] Re: [net-next PATCH 0/2] Introduce mbox
> >> tracepoints for
> >> Octeontx2
> >>
> >> Fri, Sep 04, 2020 at 07:39:54AM CEST, sgoutham@...vell.com wrote:
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Jakub Kicinski <kuba@...nel.org>
> >> >> Sent: Friday, September 4, 2020 12:48 AM
> >> >> To: sundeep.lkml@...il.com
> >> >> Cc: davem@...emloft.net; netdev@...r.kernel.org; Sunil Kovvuri
> >> >> Goutham <sgoutham@...vell.com>; Subbaraya Sundeep Bhatta
> >> >> <sbhatta@...vell.com>
> >> >> Subject: [EXT] Re: [net-next PATCH 0/2] Introduce mbox tracepoints
> >> >> for
> >> >> Octeontx2
> >> >>
> >> >> External Email
> >> >>
> >> >> ------------------------------------------------------------------
> >> >> ---
> >> >> - On Thu, 3 Sep 2020 12:48:16 +0530 sundeep.lkml@...il.com wrote:
> >> >> > From: Subbaraya Sundeep <sbhatta@...vell.com>
> >> >> >
> >> >> > This patchset adds tracepoints support for mailbox.
> >> >> > In Octeontx2, PFs and VFs need to communicate with AF for
> >> >> > allocating and freeing resources. Once all the configuration is
> >> >> > done by AF for a PF/VF then packet I/O can happen on PF/VF
> queues.
> >> >> > When an interface is brought up many mailbox messages are sent
> >> >> > to AF for initializing queues. Say a VF is brought up then each
> >> >> > message is sent to PF and PF forwards to AF and response also
> >> >> > traverses
> >> from AF to PF and then VF.
> >> >> > To aid debugging, tracepoints are added at places where messages
> >> >> > are allocated, sent and message interrupts.
> >> >> > Below is the trace of one of the messages from VF to AF and AF
> >> >> > response back to VF:
> >> >>
> >> >> Could you use the devlink tracepoint? trace_devlink_hwmsg() ?
> >> >
> >> >Thanks for the suggestion.
> >> >In our case the mailbox is central to 3 different drivers and there
> >> >would be a 4th one once crypto driver is accepted. We cannot add
> >> >devlink to all of them inorder to use the devlink trace points.
> >>
> >> I guess you have 1 pci device, right? Devlink instance is created per
> >> pci device.
> >>
> >
> >No, there are 3 drivers registering to 3 PCI device IDs and there can
> >be many instances of the same devices. So there can be 10's of instances of
> AF, PF and VFs.
>
> So you can still have per-pci device devlink instance and use the tracepoint
> Jakub suggested.
>
Two things
- As I mentioned above, there is a Crypto driver which uses the same mbox APIs
which is in the process of upstreaming. There also we would need trace points.
Not sure registering to devlink just for the sake of tracepoint is proper.
- The devlink trace message is like this
TRACE_EVENT(devlink_hwmsg,
. . .
TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%zu",
__get_str(bus_name), __get_str(dev_name),
__get_str(driver_name), __entry->incoming, __entry->type,
(int) __entry->len, __get_dynamic_array(buf), __entry->len)
);
Whatever debug message we want as output doesn't fit into this.
Thanks,
Sunil.
Powered by blists - more mailing lists