linux-stable/include
Luoyouming 0c5e259b06 RDMA/hns: Fix incorrect sge nums calculation
The user usually configures the number of sge through the max_send_sge
parameter when creating qp, and configures the maximum size of inline data
that can be sent through max_inline_data. Inline uses sge to fill data to
send. Expect the following:

1) When the sge space cannot hold inline data, the sge space needs to be
   expanded to accommodate all inline data

2) When the sge space is enough to accommodate inline data, the upper
   limit of inline data can be increased so that users can send larger
   inline data

Currently case one is not implemented. When the inline data is larger than
the sge space, an error of insufficient sge space occurs.  This part of
the code needs to be reimplemented according to the expected rules. The
calculation method of sge num is modified to take the maximum value of
max_send_sge and the sge for max_inline_data to solve this problem.

Fixes: 05201e01be ("RDMA/hns: Refactor process of setting extended sge")
Fixes: 30b707886a ("RDMA/hns: Support inline data in extented sge space for RC")
Link: https://lore.kernel.org/r/20221108133847.2304539-3-xuhaoyue1@hisilicon.com
Signed-off-by: Luoyouming <luoyouming@huawei.com>
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2022-11-18 20:19:49 -04:00
..
acpi ACPI: APEI: Fix integer overflow in ghes_estatus_pool_init() 2022-10-13 20:40:09 +02:00
asm-generic ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph() 2022-10-20 17:10:27 +02:00
clocksource
crypto
drm Merge drm/drm-fixes into drm-misc-fixes 2022-10-20 09:09:00 +02:00
dt-bindings These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
keys
kunit kunit: declare kunit_assert structs as const 2022-10-07 10:19:18 -06:00
kvm
linux fbdev fixes for kernel 6.1-rc3: 2022-10-30 11:31:14 -07:00
math-emu
media media fixes for v6.1-rc2 2022-10-22 15:30:15 -07:00
memory
misc
net RDMA/mana: Remove redefinition of basic u64 type 2022-11-14 10:16:46 +02:00
pcmcia
ras
rdma RDMA/opa_vnic: fix spelling typo in comment 2022-10-19 10:02:37 +03:00
rv
scsi SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
soc RISC-V Patches for the 6.1 Merge Window, Part 2 2022-10-14 11:21:11 -07:00
sound ASoC: Fixes for v6.1 2022-10-27 08:26:32 +02:00
target
trace Merge branch 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma 2022-11-11 11:35:12 +02:00
uapi RDMA/hns: Fix incorrect sge nums calculation 2022-11-18 20:19:49 -04:00
ufs SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
vdso
video
xen xen/virtio: enable grant based virtio on x86 2022-10-10 14:31:26 +02:00