OSDN Git Service

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)
commit402ca53644ff1928f2ea68cce6fe41b2b5f38510
tree6d7fae0746afb0151a6b9ccc2ffd79ff69c38fed
parent026bae0cb428102228d110780d90e6ae44bbe4c7
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