linux-stable/include
Luoyouming c5a6776e44 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:32:33 +01:00
..
acpi
asm-generic 15 hotfixes. 11 marked cc:stable. Only three or four of the latter 2022-12-02 13:39:38 -08:00
clocksource
crypto
drm drm/ttm: fix undefined behavior in bit shift for TTM_TT_FLAG_PRIV_POPULATED 2022-12-31 13:32:06 +01:00
dt-bindings clk: imx: rename video_pll1 to video_pll 2022-12-31 13:32:16 +01:00
keys
kunit
kvm
linux crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set() 2022-12-31 13:32:33 +01:00
math-emu
media
memory
misc
net ipvs: use u64_stats_t for the per-cpu counters 2022-12-31 13:32:26 +01:00
pcmcia
ras
rdma
rv
scsi
soc
sound ALSA: pcm: fix undefined behavior in bit shift for SNDRV_PCM_RATE_KNOT 2022-12-31 13:32:14 +01:00
target
trace IB/mad: Don't call to function that might sleep while in atomic context 2022-12-31 13:32:32 +01:00
uapi RDMA/hns: Fix incorrect sge nums calculation 2022-12-31 13:32:33 +01:00
ufs
vdso
video
xen