iproute2/rdma
Leon Romanovsky bb4cc9cca4 rdma: Don't allocate sparse array
The addition of driver QP type with index 0xFF caused to the following
clang compilation error:

res.c:152:10: warning: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare]
        if (idx < ARRAY_SIZE(qp_types_str) && qp_types_str[idx])
            ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Instead of allocating very sparse array, simply create separate check
for the driver QP type.

Fixes: 39307384ce ("rdma: Add driver QP type string")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-11 09:19:27 -07:00
..
include/uapi/rdma rdma: update uapi headers 2021-11-18 10:00:19 -08:00
.gitignore rdma: Add basic infrastructure for RDMA tool 2017-08-21 17:07:44 -07:00
dev.c lib: json_print: Add print_on_off() 2020-11-13 19:43:15 -07:00
link.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
Makefile rdma: Add SRQ resource tracking information 2021-04-28 15:37:16 +00:00
rdma.c Unify batch processing across tools 2020-11-13 19:43:15 -07:00
rdma.h Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-next 2021-02-23 23:03:42 -08:00
res-cmid.c rdma: Add "PID" criteria support for statistic counter auto mode 2020-08-06 16:26:04 +00:00
res-cq.c lib: json_print: Add print_on_off() 2020-11-13 19:43:15 -07:00
res-ctx.c rdma: Add context resource tracking information 2021-04-28 15:36:59 +00:00
res-mr.c rdma: Add support to get MR in raw format 2020-07-05 18:11:37 +00:00
res-pd.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
res-qp.c rdma: Add support to get QP in raw format 2020-07-05 18:11:00 +00:00
res-srq.c rdma: Limit copy data by the destination size 2022-01-11 09:18:16 -07:00
res.c rdma: Don't allocate sparse array 2022-01-11 09:19:27 -07:00
res.h rdma: Add SRQ resource tracking information 2021-04-28 15:37:16 +00:00
stat-mr.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
stat.c rdma: Add optional-counters set/unset support 2021-10-15 17:52:57 -06:00
stat.h rdma: Add "stat show mr" support 2019-10-27 10:28:30 -07:00
sys.c rdma: Add copy-on-fork to get sys command 2021-05-03 14:43:13 +00:00
utils.c rdma: Add SRQ resource tracking information 2021-04-28 15:37:16 +00:00