netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>,
	Jiri Pirko <jiri@resnulli.us>
Cc: davem@davemloft.net, oss-drivers@netronome.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/8] devlink: add PF and VF port flavours
Date: Thu, 28 Feb 2019 09:24:33 -0700	[thread overview]
Message-ID: <0671e26e-2bb5-5360-e062-70abfaf1faf7@gmail.com> (raw)
In-Reply-To: <20190227144239.55481885@cakuba.netronome.com>

On 2/27/19 3:42 PM, Jakub Kicinski wrote:
> On Wed, 27 Feb 2019 21:17:27 +0100, Jiri Pirko wrote:
>> Wed, Feb 27, 2019 at 06:23:26PM CET, jakub.kicinski@netronome.com wrote:
>>> On Wed, 27 Feb 2019 13:41:35 +0100, Jiri Pirko wrote:  
>>>> Wed, Feb 27, 2019 at 01:23:27PM CET, jiri@resnulli.us wrote:  
>>>>> Tue, Feb 26, 2019 at 07:24:30PM CET, jakub.kicinski@netronome.com wrote:    
>>>>>> Current port flavours cover simple switches and DSA.  Add PF
>>>>>> and VF flavours to cover "switchdev" SR-IOV NICs.
>>>>>>
>>>>>> Example devlink user space output:
>>>>>>
>>>>>> $ devlink port
>>>>>> pci/0000:82:00.0/0: type eth netdev p4p1 flavour physical
>>>>>> pci/0000:82:00.0/10000: type eth netdev eth0 flavour pcie_pf pf 0
>>>>>> pci/0000:82:00.0/10001: type eth netdev eth1 flavour pcie_vf pf 0 vf 0
>>>>>> pci/0000:82:00.0/10002: type eth netdev eth2 flavour pcie_vf pf 0 vf 1    
>>>>>
>>>>> Wait a second, howcome pf and vfs have the same PCI address?    
>>>>
>>>> Oh, I think you have these as eswitch port representors. Confusing...  
>>>
>>> FWIW I don't like the word representor, its a port. We don't call
>>> physical ports "representors" even though from ASIC's point of view
>>> they are exactly the same.  
>>
>> My point is, they are not PFs and VFs. We have to find a way to clearly
>> see what's what.
> 
> 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.
> 

That would a good update to the commit message or cover letter.

  parent reply	other threads:[~2019-02-28 16:24 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 18:24 [PATCH net-next 0/8] devlink: add PF and VF port flavours Jakub Kicinski
2019-02-26 18:24 ` [PATCH net-next 1/8] nfp: split devlink port init from registration Jakub Kicinski
2019-02-26 18:24 ` [PATCH net-next 2/8] devlink: add PF and VF port flavours Jakub Kicinski
2019-02-27 12:16   ` Jiri Pirko
2019-03-04  4:59     ` Parav Pandit
2019-03-04  7:30       ` Jiri Pirko
2019-03-20 17:29         ` Abodunrin, Akeem G
2019-03-21 12:26           ` Jiri Pirko
2019-02-27 12:23   ` Jiri Pirko
2019-02-27 12:41     ` Jiri Pirko
2019-02-27 17:23       ` Jakub Kicinski
2019-02-27 20:17         ` Jiri Pirko
2019-02-27 22:42           ` Jakub Kicinski
2019-02-28  8:44             ` Jiri Pirko
2019-02-28 16:08               ` Jakub Kicinski
2019-02-28 16:24             ` David Ahern [this message]
2019-02-26 18:24 ` [PATCH net-next 3/8] nfp: register devlink ports of all reprs Jakub Kicinski
2019-02-26 18:24 ` [PATCH net-next 4/8] devlink: allow subports on devlink PCI ports Jakub Kicinski
2019-02-27 12:37   ` Jiri Pirko
2019-02-27 18:30     ` Jakub Kicinski
2019-02-28  8:56       ` Jiri Pirko
2019-02-28 13:32         ` Jiri Pirko
2019-02-28 16:24         ` Jakub Kicinski
2019-03-01  7:25           ` Jiri Pirko
2019-03-01 16:04             ` Jakub Kicinski
2019-03-01 16:20               ` Jiri Pirko
2019-03-04 16:15       ` Jason Gunthorpe
2019-03-05  1:03         ` Jakub Kicinski
2019-03-05  1:30           ` Jason Gunthorpe
2019-03-05  2:11             ` Jakub Kicinski
2019-03-05 22:11               ` Jason Gunthorpe
2019-03-04  5:00     ` Parav Pandit
2019-02-26 18:24 ` [PATCH net-next 5/8] nfp: switch to devlink_port_get_phys_port_name() Jakub Kicinski
2019-02-26 18:24 ` [PATCH net-next 6/8] devlink: introduce port's peer netdevs Jakub Kicinski
2019-02-27 13:08   ` Jiri Pirko
2019-02-27 18:47     ` Jakub Kicinski
2019-02-28  9:00       ` Jiri Pirko
2019-02-28 16:36         ` Jakub Kicinski
2019-03-01  7:37           ` Jiri Pirko
2019-03-01 16:05             ` Jakub Kicinski
2019-03-04  5:07     ` Parav Pandit
2019-02-26 18:24 ` [PATCH net-next 7/8] nfp: expose PF " Jakub Kicinski
2019-02-26 18:24 ` [PATCH net-next 8/8] devlink: fix kdoc Jakub Kicinski
2019-02-27 13:13   ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0671e26e-2bb5-5360-e062-70abfaf1faf7@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).