• Maxim Mikityanskiy's avatar
    net/mlx5e: xsk: Use queue indices starting from 0 for XSK queues · 3db4c85c
    Maxim Mikityanskiy authored
    In the initial implementation of XSK in mlx5e, XSK RQs coexisted with
    regular RQs in the same channel. The main idea was to allow RSS work the
    same for regular traffic, without need to reconfigure RSS to exclude XSK
    queues.
    
    However, this scheme didn't prove to be beneficial, mainly because of
    incompatibility with other vendors. Some tools don't properly support
    using higher indices for XSK queues, some tools get confused with the
    double amount of RQs exposed in sysfs. Some use cases are purely XSK,
    and allocating the same amount of unused regular RQs is a waste of
    resources.
    
    This commit changes the queuing scheme to the standard one, where XSK
    RQs replace regular RQs on the channels where XSK sockets are open. Two
    RQs still exist in the channel to allow failsafe disable of XSK, but
    only one is exposed at a time. The next commit will achieve the desired
    memory save by flushing the buffers when the regular RQ is unused.
    
    As the result of this transition:
    
    1. It's possible to use RSS contexts over XSK RQs.
    
    2. It's possible to dedicate all queues to XSK.
    
    3. When XSK RQs coexist with regular RQs, the admin should make sure no
    unwanted traffic goes into XSK RQs by either excluding them from RSS or
    settings up the XDP program to return XDP_PASS for non-XSK traffic.
    
    4. When using a mixed fleet of mlx5e devices and other netdevs, the same
    configuration can be applied. If the application supports the fallback
    to copy mode on unsupported drivers, it will work too.
    Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
    Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    3db4c85c
ipoib_vlan.c 9.6 KB