Project

General

Profile

Bug #10253

sol_uverbs is confused about bits

Added by John Levon 9 months ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2019-01-16
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage smatch

Description


/export/home/gk/src/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../../common/io/ib/clients/of/sol_uverbs/sol_uverbs.c:3009 sol_uverbs_ibt_to_of_device_cap_flags() warn: should this be a bitwise op?
/export/home/gk/src/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../../common/io/ib/clients/of/sol_uverbs/sol_uverbs.c:3072 sol_uverbs_ibt_to_of_page_sz() warn: should this be a bitwise op?
/export/home/gk/src/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../../common/io/ib/clients/of/sol_uverbs/sol_uverbs_qp.c:1695 uverbs_query_copy_info() warn: bitwise AND condition is false here

from code like:

3009         if (flags && IBT_HCA_RESIZE_CHAN)
3010                 of_flags |= IB_DEVICE_RESIZE_MAX_WR;

3072         if (page_szs && IBT_PAGE_4K)
3073                 of_page_sz |= 1LL << 12;


uverbs_query_copy_info() has a different issue:
 782         IBT_ALL_SIGNALED        = 0,    /* All sends signaled */

1695         if ((src->qp_flags & IBT_ALL_SIGNALED) == IBT_ALL_SIGNALED) {

foo & 0 is definitely going to equal 0

History

#1

Updated by John Levon 9 months ago

  • Tags changed from needs-triage to needs-triage smatch

Also available in: Atom PDF