Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1596754

Summary: iblinkinfo --diffcheck does not accept as many keys as the man page indicates
Product: Red Hat Enterprise Linux 7 Reporter: Charles Haithcock <chaithco>
Component: infiniband-diagsAssignee: Honggang LI <honli>
Status: CLOSED ERRATA QA Contact: Mike Stowell <mstowell>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: bhu, honli, infiniband-qe, mstowell, rdma-dev-team
Target Milestone: rc   
Target Release: 7.6   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: infiniband-diags-2.0.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:17:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1532680    

Description Charles Haithcock 2018-06-29 15:47:04 UTC
Description of problem:

The man page for iblinkinfo --diffcheck indicates: 


--diffcheck <key(s)> Specify what diff checks should  be  done  in  the
       --diff  option  above.  Comma separate multiple diff check key(s).  The
       available diff checks are: sw = switches, ca = channel adapters, router
       =  routers,  port  =  port  connections,  lid  =  lids, nodedesc = node
       descriptions.


However, the source takes only 'port', 'state', 'lid', and 'nodedesc': 

src/iblinkinfo.c:
static int process_opt(void *context, int ch, char *optarg)
{
        struct ibnd_config *cfg = context;
        char *p;

        switch (ch) {
- - - - - - - - - - - - [SNIP] - - - - - - - - - - - - 
        case 4:                         // --diffcheck 
                diffcheck_flags = 0;
                p = strtok(optarg, ",");
                while (p) {
                        if (!strcasecmp(p, "port"))
                                diffcheck_flags |= DIFF_FLAG_PORT_CONNECTION;
                        else if (!strcasecmp(p, "state"))
                                diffcheck_flags |= DIFF_FLAG_PORT_STATE;
                        else if (!strcasecmp(p, "lid"))
                                diffcheck_flags |= DIFF_FLAG_LID;
                        else if (!strcasecmp(p, "nodedesc"))
                                diffcheck_flags |= DIFF_FLAG_NODE_DESCRIPTION;
                        else {
                                fprintf(stderr, "invalid diff check key: %s\n",
                                        p);
                                return -1;
                        }
                        p = strtok(NULL, ",");
                }
                break;




Version-Release number of selected component (if applicable):

infiniband-diags-2.0.0


How reproducible:

Always


Steps to Reproduce:
1. run 'ibdiagnet --diffcheck sw --diff <cache file>' or something similar 
2.
3.

Actual results:

"invalid diff check key: ..." errors


Expected results:


Additional info:

Comment 2 Charles Haithcock 2018-06-29 15:51:32 UTC
As an aside, if this is a problem with documentation rather than functionality, I can simply clone this case for docs and close this out.

Comment 3 Honggang LI 2018-07-10 02:47:46 UTC
https://github.com/linux-rdma/infiniband-diags/pull/15

This documentation issue will be fixed in upstream. Will backport it for rhel-7.6.

Comment 6 Mike Stowell 2018-08-07 18:43:35 UTC
Verified infiniband-diags-2.0.0-2.el7.x86_64 contains the updated manpage text:

$ man iblinkinfo
[...]
       --diffcheck  <key(s)>  Specify  what  diff checks should be done in the --diff option above.  Comma separate
       multiple diff check key(s).  The available diff checks are: port = port connections, state = port state, lid
       = lids, nodedesc = node descriptions.  Note that port, lid, and nodedesc are checked only for the node types
       that are specified (e.g.  switches-only, cas-only).  If port is specified alongside lid or nodedesc,  remote
       port lids and node descriptions will also be compared.
[...]

Comment 8 errata-xmlrpc 2018-10-30 11:17:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3208