# Re: \[PATCH 04/15\] soc: octeontx2: Add mailbox support infra

- From: Sunil Kovvuri \<hidden\>
- Date: 2018-08-28 13:23:58 
- List: netdev
- Page: https://ratatoskr.run/netdev/2018/08/5365456
- Thread: https://ratatoskr.run/linux-arm-kernel/2018/08/5365334/t.md

```text
On Tue, Aug 28, 2018 at 6:22 PM Arnd Bergmann [ref] wrote:
>
> On Tue, Aug 28, 2018 at 2:48 PM Sunil Kovvuri [ref] wrote:
> >
> > On Tue, Aug 28, 2018 at 5:33 PM Arnd Bergmann [ref] wrote:
> > >
> > > On Tue, Aug 28, 2018 at 12:57 PM [ref] wrote:
> > > >
> > > > From: Aleksey Makarov <redacted>
> > > >
> > > > This patch adds mailbox support infrastructure APIs.
> > > > Each RVU device has a dedicated 64KB mailbox region
> > > > shared with it's peer for communication. RVU AF has
> > > > a separate mailbox region shared with each of RVU PFs
> > > > and a RVU PF has a separate region shared with each of
> > > > it's VF.
> > > >
> > > > These set of APIs are used by this driver (RVU AF) and
> > > > other RVU PF/VF drivers eg netdev, crypto e.t.c.
> > > >
> > > > Signed-off-by: Aleksey Makarov <redacted>
> > > > Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> > > > Signed-off-by: Lukasz Bartosik <redacted>
> > >
> > > Why does this driver not use the drivers/mailbox/ infrastructure?
> > >
> > This is a common administrative software driver which will be handling requests
> > from kernel drivers and as well as drivers in userspace applications.
> > We had to keep mailbox communication infrastructure same across all usages.
>
> Can you explain more about the usage of userspace applications
> and what interface you plan to use into the kernel?

Any PCI device here irrespective in what domain (kernel or userspace)
they are in
use common mailbox communication. Which is
# Write a mailbox msg (format is agreed between all parties) into
shared (between AF and other PF/VFs)
   memory region and trigger a interrupt to admin function.
# Admin function processes the msg and puts reply in the same memory
region and trigger
   IRQ to the requesting device. If the device has a driver instance
in kernel then it uses
   IRQ and userspace applications does polling on the IRQ status bit.

>
> Do you things like AF_XDP and virtual machines, or something else?

I meant drivers in DPDK which may or may not use AF_XDP.
And yes if a PCI device is attached to a virtual machine then that
also uses the same mailbox communication.

Sunil.

>
>         Arnd
```
