]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Report mlx5 TSO capabilities when querying device
authorBodong Wang <bodong@mellanox.com>
Fri, 17 Jun 2016 12:02:20 +0000 (15:02 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 23 Jun 2016 15:09:18 +0000 (11:09 -0400)
commit3bacab6d2ea0d4f0d218cca6000dcf6b82da802d
tree6d7fae0746afb0151a6b9ccc2ffd79ff69c38fed
parent5f56d58758de3981497d751ea8f42191e18ca05d
IB/mlx5: Report mlx5 TSO capabilities when querying device

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: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/user.h