On Mon, Apr 18, 2016 at 7:25 PM, Majd Dibbiny <majd@xxxxxxxxxxxx> wrote: > From: Bodong Wang <bodong@xxxxxxxxxxxx> > > mlx5 based hardware supports LSO for Raw Ethernet QPs. > LSO (large segment offload) applied here is mainly used > for TCP (also known as TSO). > > Signed-off-by: Bodong Wang <bodong@xxxxxxxxxxxx> > Signed-off-by: Majd Dibbiny <majd@xxxxxxxxxxxx> > Signed-off-by: Matan Barak <matanb@xxxxxxxxxxxx> > --- > drivers/infiniband/hw/mlx5/main.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c > index 5acf346..09502ad 100644 > --- a/drivers/infiniband/hw/mlx5/main.c > +++ b/drivers/infiniband/hw/mlx5/main.c > @@ -454,6 +454,7 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, > int max_rq_sg; > int max_sq_sg; > u64 min_page_size = 1ull << MLX5_CAP_GEN(mdev, log_pg_sz); > + u64 max_lso; > > if (uhw->inlen || uhw->outlen) > return -EINVAL; > @@ -508,10 +509,18 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, > if (MLX5_CAP_GEN(mdev, block_lb_mc)) > props->device_cap_flags |= IB_DEVICE_BLOCK_MULTICAST_LOOPBACK; > > - if (MLX5_CAP_GEN(dev->mdev, eth_net_offloads) && > - (MLX5_CAP_ETH(dev->mdev, csum_cap))) > + if (MLX5_CAP_GEN(dev->mdev, eth_net_offloads)) { > + if (MLX5_CAP_ETH(mdev, csum_cap)) > props->device_cap_flags |= IB_DEVICE_RAW_IP_CSUM; > > + max_lso = MLX5_CAP_ETH(mdev, max_lso_cap); > + if (max_lso) { > + props->lso_caps.max_lso = 1 << max_lso; > + props->lso_caps.supported_qpts |= > + 1 << IB_QPT_RAW_ETHERTYPE; what?! This QP type is not supported by the driver > + } > + } > + > if (MLX5_CAP_GEN(mdev, ipoib_basic_offloads)) { > props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM; > props->device_cap_flags |= IB_DEVICE_UD_TSO; > -- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html