Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours

Jakub Kicinski
2019-02-28T16:08:38Z

On Thu, 28 Feb 2019 09:44:29 +0100, Jiri Pirko wrote:
> >Okay, so let me explain the way I see it, and you can explain your way
> >or tell me where you disagree. Those devlink ports and netdevs are pf
> >ports and vf ports, which most refer to as "representor". If one sends
> >packets to the netdev indicated in DEVLINK_ATTR_PORT_NETDEV_*
> >attributes they will _egress_ the switch from that port. For physical
> >port that means going onto the Ethernet or IB wire. For PCIe it means
> >getting DMAed over the PCIe link to host memory.
> >
> >There is a netdev construct on the host which is in charge of that
> >host memory. Maybe we shall call that host netdev?
> >
> >(I said I don't like "representor" for the reason that people don't
> >refer to the physical port as "representor" even though it has exactly
> >the semantics we are following. This distinction between behaviour of
> >physical and PCI ports is what leads to confusion, I think.)
> >
> >Let me bring out the moose :)
> >
> > HOST A || HOST B
> > ||
> > PF A | V | V | V | V || PF B | V | V | V
> > |*F |*F |*F |*F ... || |*F |*F |*F ...
> >*port A0 |*port A1 | 0 | 1 | 2 | 3 ||*port B0 |*port B1 | 0 | 1 | 2
> > ||
> > PCI Express link || PCI Express link
> > \ \ \ | | | | | / / /
> > \ \ \ | | | | | / / /
> > /\ \______\______\'___|___|__________|_______'____/___/___/__ /\
> > || |+PF0s0|+PF0s1 |+VF0|+VF1| ...| |+PF1s0|+PF1s1|+VF0|+VF1| ||
> > i || |------ ------ ----- ---- ----|--- ------ ------ ---- ----| || i
> >d n H || | <<========== | || d n H
> >e s O || | ==========>> | || e s O
> >v t S || | SR-IOV e-switch | || v t S
> >l a T || | <<========== | || l a T
> >i n || | ==========>> | || i n
> >n c A || | ________ _________ ________ | || n c B
> >k e || | |+Phys 0 |+Phys 1 |+Phys 2 | | || k e
> > || \---------------------------------------------------------/ ||
> > \/ | | | \/
> > | | |
> > || ||
> > MAC 0 || MAC 1 || MAC 2
> > || ||
> >
> >Things marked with + are devlink ports and have port (-repr-) netdevs
> >(including physical ports).
> >Things marked with * are host netdevs, don't have devlink ports.
>
> Okay, I got it. So you say that devlink ports should always be only
> ports of eswitch.
>
> PF host netdev should have "devlink port" instance, correct?
> But it still "belongs" under the ASIC represented by the devlink
> instance...

Yes, I think so.