• Jakub Kicinski's avatar
    nfp: improve order of interfaces in breakout mode · 2eb333c4
    Jakub Kicinski authored
    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: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2eb333c4
nfp_main.h 4.64 KB