Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

Samudrala, Sridhar
2019-03-13T16:03:20Z

On 3/13/2019 12:37 AM, Jiri Pirko wrote:
> Wed, Mar 13, 2019 at 07:17:04AM CET, sridhar.samudrala@intel.com wrote:
>>
>> On 3/12/2019 7:02 AM, Jiri Pirko wrote:
>>
>>>
>>>>
>>>>> I originally planned to implement sriov orchestration api in devlink too.
>>>>
>>>> Interesting, would you mind elaborating?
>>>
>>> I have to think about it. But something like this:
>>>
>>> After bootup, you see only physical port, PF switch port and PF host leg.
>>
>> Is this after changing the eswitch mode to 'switchdev'
>
> I believe so. For new drivers, this should be default and only option.
>
>
>>
>>> $ devlink port show
>>> pci/0000:05:00.0/0: type eth netdev enp5s0np0 flavour physical switch_id 00154d130d2
>>
>> Is this the uplink port representor?
>
> Yes
>
>
>>
>>> pci/0000:05:00.0/1: type eth netdev ??? flavour pci_pf_host
>>> peer pci/0000:05:00.0/10000
>>
>> I guess this is PF netdev
>
> Yes, port
>
>
>>
>>> pci/0000:05:00.0/10000: type eth netdev enp5s0npf0pf0s0 flavour pci_pf pf 0 subport 0
>>> switch_id 00154d130d2f peer pci/0000:05:00.0/1
>>
>> and this one is PF port representor netdev
>
> Yes, port
>
>
>>
>>>
>>> To create new PF subport under PF 0:
>>> $ devlink dev port add pci/0000:05:00.0 flavour pci_pf pf 0
>>
>> Can we consider l2-fwd offload macvlan device also as a subport of PF?
>
> What does this have to with with macvlan? Macvlan is a separate soft
> driver.

ethtool -k <pf> l2-fwd-offload on
ip link add link <pf> type macvlan

will create a macvlan netdev but it is backed by a set of separate HW
queues and switching is offloaded to HW. This can be considered as a
subport. In i40e, it is a VMDq VSI.