Merge branch 'sg_nents' into rdma.git for-next
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 30 Aug 2021 12:49:59 +0000 (09:49 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 30 Aug 2021 12:49:59 +0000 (09:49 -0300)
commit6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac
treec82270181daeb43eb9984b586784b70f13ef1df4
parent65f90c8e38c9900692338864156e7824cf8a6501
parent79fbd3e1241cea83dded06db2b8bcd5893d877d7
Merge branch 'sg_nents' into rdma.git for-next

From Maor Gottlieb
====================

Fix the use of nents and orig_nents in the sg table append helpers. The
nents should be used by the DMA layer to store the number of DMA mapped
sges, the orig_nents is the number of CPU sges.

Since the sg append logic doesn't always create a SGL with exactly
orig_nents entries store a total_nents as well to allow the table to be
properly free'd and reorganize the freeing logic to share across all the
use cases.

====================

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
* 'sg_nents':
  RDMA: Use the sg_table directly and remove the opencoded version from umem
  lib/scatterlist: Fix wrong update of orig_nents
  lib/scatterlist: Provide a dedicated function to support table append
26 files changed:
MAINTAINERS
drivers/infiniband/core/cma.c
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/irdma/verbs.c
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/devx.c
drivers/infiniband/hw/qedr/verbs.c
drivers/infiniband/sw/rdmavt/mr.c
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_net.c
drivers/infiniband/sw/rxe/rxe_resp.c
drivers/net/ethernet/mellanox/mlx5/core/cq.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
drivers/vdpa/mlx5/net/mlx5_vnet.c
include/linux/mlx5/driver.h
include/rdma/ib_verbs.h