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 - iblinkinfo --diffcheck does not accept as many keys as the man page indicates
Summary: iblinkinfo --diffcheck does not accept as many keys as the man page indicates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: infiniband-diags
Version: 7.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.6
Assignee: Honggang LI
QA Contact: Mike Stowell
URL:
Whiteboard:
Depends On:
Blocks: 1532680
TreeView+ depends on / blocked
 
Reported: 2018-06-29 15:47 UTC by Charles Haithcock
Modified: 2021-09-09 14:50 UTC (History)
5 users (show)

Fixed In Version: infiniband-diags-2.0.0-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 11:17:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3208 0 None None None 2018-10-30 11:18:34 UTC

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


Note You need to log in before you can comment on or make changes to this bug.