• Jakub Kicinski's avatar
    ethtool: rss: don't report key if device doesn't support it · ec6e57be
    Jakub Kicinski authored
    marvell/otx2 and mvpp2 do not support setting different
    keys for different RSS contexts. Contexts have separate
    indirection tables but key is shared with all other contexts.
    This is likely fine, indirection table is the most important
    piece.
    
    Don't report the key-related parameters from such drivers.
    This prevents driver-errors, e.g. otx2 always writes
    the main key, even when user asks to change per-context key.
    The second reason is that without this change tracking
    the keys by the core gets complicated. Even if the driver
    correctly reject setting key with rss_context != 0,
    change of the main key would have to be reflected in
    the XArray for all additional contexts.
    
    Since the additional contexts don't have their own keys
    not including the attributes (in Netlink speak) seems
    intuitive. ethtool CLI seems to deal with it just fine.
    
    Having to set the flag in majority of the drivers is
    a bit tedious but not reporting the key is a safer
    default.
    Reviewed-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
    Reviewed-by: default avatarJoe Damato <jdamato@fastly.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ec6e57be
ethtool.c 8.98 KB