• Tariq Toukan's avatar
    net/mlx5e: RX, Add XDP multi-buffer support in Striding RQ · f52ac702
    Tariq Toukan authored
    Here we add support for multi-buffer XDP handling in Striding RQ, which
    is our default out-of-the-box RQ type. Before this series, loading such
    an XDP program would fail, until you switch to the legacy RQ (by
    unsetting the rx_striding_rq priv-flag).
    
    To overcome the lack of headroom and tailroom between the strides, we
    allocate a side page to be used for the descriptor (xdp_buff / skb) and
    the linear part. When an XDP program is attached, we structure the
    xdp_buff so that it contains no data in the linear part, and the whole
    packet resides in the fragments.
    
    In case of XDP_PASS, where an SKB still needs to be created, we copy up
    to 256 bytes to its linear part, to match the current behavior, and
    satisfy functions that assume finding the packet headers in the SKB
    linear part (like eth_type_trans).
    
    Performance testing:
    
    Packet rate test, 64 bytes, 32 channels, MTU 9000 bytes.
    CPU: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz.
    NIC: ConnectX-6 Dx, at 100 Gbps.
    
    +----------+-------------+-------------+---------+
    | Test     | Legacy RQ   | Striding RQ | Speedup |
    +----------+-------------+-------------+---------+
    | XDP_DROP | 101,615,544 | 117,191,020 | +15%    |
    +----------+-------------+-------------+---------+
    | XDP_TX   |  95,608,169 | 117,043,422 | +22%    |
    +----------+-------------+-------------+---------+
    Reviewed-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f52ac702
params.c 42.6 KB