• Bodong Wang's avatar
    IB/mlx5: Report mlx5 TSO capabilities when querying device · 402ca536
    Bodong Wang authored
    Enable mlx5 based hardware to report TCP segmentation offload (TSO)
    capabilities from kernel to user space. A TSO enabled NIC will accept
    big chunks of data with sizes greater than MTU for TCP traffic.  The TSO
    engine will break the data into separate packets and will insert headers
    automatically.
    
    The capabilities are exposed to user space through query_device by uhw
    directly. The following capabilities are reported:
    
    1. The maximum payload size in bytes supported for segmentation by TSO
       engine.
    2. Bitmap showing which QP types are supported by TSO operation. The bitmap
       is built by members from 'enmu ib_qp_type'. For example, similar code
       should be performed if UD QP is supported:
    	supported_qpts |= 1 << IB_QPT_UD;
    
    To make user-space library aware of whether kernel supports uhw or not, a
    new flag: cmds_supp_uhw will be returned back to user-space through
    alloc_ucontext.
    Signed-off-by: default avatarBodong Wang <bodong@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    402ca536
main.c 75.5 KB