Commit 5c0a1aea authored by Junxian Huang's avatar Junxian Huang Committed by Juan Zhou
Browse files

RDMA/hns: Add a max length of gid table

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8HZ7W



--------------------------------------------------------------------------

IB-core and rdma-core restrict the sgid_index specified by users,
which is uint8_t/u8 data type, to only be within the range of 0-255,
so it's meaningless to support excessively large gid_table_len.

On the other hand, ib-core creates as many sysfs gid files as
gid_table_len, most of which are not only useless because of the
reason above, but also greatly increase the traversal time of
the sysfs gid files for applications.

This patch limits the maximum length of gid table to 256.

Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
parent 7a5b9459
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment