• J
    nfp: improve order of interfaces in breakout mode · 2eb333c4
    Jakub Kicinski 提交于
    For historical reasons we enumerate the vNICs in order.  This means
    that if user configures breakout on a multiport card, the first
    interface of the second port will have its MAC address changed.
    
    What's worse, when moved from static information (HWInfo) to using
    management FW (NSP), more features started depending on the port ids.
    Right now in case of breakout first subport of the second port and
    second subport of the first port will have their link info swapped.
    
    Revise the ordering scheme so that first subport maintains its address.
    Side effect of this change is that we will use base lane ids in
    devlink (i.e. 40G ports will be 4 ids apart), e.g.:
    
    pci/0000:04:00.0/0: type eth netdev p6p1
    pci/0000:04:00.0/4: type eth netdev p6p2
    
    Note that behaviour of phys_port_id is not changed since there is
    a separate id number for the subport there.
    
    Fixes: ec8b1fbe ("nfp: support port splitting via devlink")
    Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    2eb333c4
nfp_port.c 5.5 KB