linux-stable/include
Luoyouming 1b6a27666d RDMA/hns: Fix incorrect sge nums calculation
[ Upstream commit 0c5e259b06 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:19 +01:00
..
acpi ACPI: APEI: Fix integer overflow in ghes_estatus_pool_init() 2022-11-10 18:17:24 +01:00
asm-generic mm/khugepaged: fix GUP-fast interaction by sending IPI 2022-12-14 11:40:50 +01:00
clocksource
crypto
drm drm/ttm: fix undefined behavior in bit shift for TTM_TT_FLAG_PRIV_POPULATED 2022-12-31 13:25:53 +01:00
dt-bindings dt-bindings: clock: Add support for external MCLKs for LPASS on SC7280 2022-12-31 13:26:07 +01:00
keys
kunit kunit: fix assert_type for comparison macros 2022-09-01 13:00:32 -06:00
kvm
linux crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set() 2022-12-31 13:26:19 +01:00
math-emu
media media: v4l: subdev: Fail graciously when getting try data for NULL state 2022-11-10 18:17:24 +01:00
memory
misc
net ipvs: use u64_stats_t for the per-cpu counters 2022-12-31 13:26:12 +01:00
pcmcia
ras mm, hwpoison: enable memory error handling on 1GB hugepage 2022-08-08 18:06:44 -07:00
rdma
rv
scsi scsi: stex: Properly zero out the passthrough command structure 2022-10-15 08:02:56 +02:00
soc ARM: at91: pm: avoid soft resetting AC DLL 2022-11-26 09:27:26 +01:00
sound ALSA: pcm: fix undefined behavior in bit shift for SNDRV_PCM_RATE_KNOT 2022-12-31 13:26:01 +01:00
target
trace IB/mad: Don't call to function that might sleep while in atomic context 2022-12-31 13:26:18 +01:00
uapi RDMA/hns: Fix incorrect sge nums calculation 2022-12-31 13:26:19 +01:00
ufs scsi: ufs: core: Enable link lost interrupt 2022-08-11 22:04:32 -04:00
vdso
video
xen x86/xen: Add support for HVMOP_set_evtchn_upcall_vector 2022-08-12 11:28:21 +02:00