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 997756 - the vports and maxvports info are missing in the nodedev-dumpxml
Summary: the vports and maxvports info are missing in the nodedev-dumpxml
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1022430 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-16 07:22 UTC by Xuesong Zhang
Modified: 2014-04-04 20:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-04 20:57:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xuesong Zhang 2013-08-16 07:22:48 UTC
Description of problem:
The "vports" and "maxvports" info didn't be generated by command nodedev-dumpxml.

In the following link, we can see that: 
"vport_ops" could contain two optional sub-elements: vports, and max_vports. vports shows the number of vport in use. max_vports shows the maximum vports the HBA supports. 

http://libvirt.org/formatnode.html

Version-Release number of selected component (if applicable):
libvirt-0.10.2-22.el6.x86_64
qemu-img-rhev-0.12.1.2-2.384.el6.x86_64
kernel-2.6.32-396.el6.x86_64

How reproducible:
100%

Steps:
1. find one NPIV host, find the node which type is "scsi_host".
# virsh nodedev-list --tree
......
 +- pci_0000_04_00_1
  |       |
  |       +- scsi_host5
  |           |
  |           +- scsi_host4806
  |           |
  |           +- scsi_target5_0_0
  |           |   |
  |           |   +- scsi_5_0_0_0
  |           |     
  |           +- scsi_target5_0_1
  |           |   |
  |           |   +- scsi_5_0_1_0
  |           |     
  |           +- scsi_target5_0_2
  |           |   |
  |           |   +- scsi_5_0_2_0
  |           |       |
  |           |       +- block_sdb_3600a0b80005adb0b0000ab2d4cae9254
  |           |         
  |           +- scsi_target5_0_3
  |               |
  |               +- scsi_5_0_3_0
  |                   |
  |                   +- block_sdc_3600a0b80005adb0b0000ab2d4cae9254
......

2. check the nodedev-dumpxml info of node "scsi_host5", there isn't any vports and maxvports info be shown in the dumpxml.
# virsh nodedev-dumpxml scsi_host5
<device>
  <name>scsi_host5</name>
  <parent>pci_0000_04_00_1</parent>
  <capability type='scsi_host'>
    <host>5</host>
    <capability type='fc_host'>
      <wwnn>2001001b32a9da4e</wwnn>
      <wwpn>2101001b32a9da4e</wwpn>
      <fabric_wwn>2001000dec9877c1</fabric_wwn>
    </capability>
    <capability type='vport_ops' />
  </capability>
</device>

3. check the vports and maxvports info with the kernel command line:
# cat /sys/class/fc_host/host5/npiv_vports_inuse
1
# cat /sys/class/fc_host/host5/max_npiv_vports 
127


Actual results:
as steps.

Expected results:
The vports and maxvports info (which is the info in step3) should be shown in the dumpxml.

Addtional info:

Comment 1 Xuesong Zhang 2013-08-16 07:41:13 UTC
Add the addtional info for reference:

In rhel7, the vports and maxvports info can be seen.
Here is the output:

# virsh nodedev-dumpxml scsi_host5<device>
  <name>scsi_host5</name>
  <path>/sys/devices/pci0000:00/0000:00:0d.0/0000:04:00.1/host5</path>
  <parent>pci_0000_04_00_1</parent>
  <capability type='scsi_host'>
    <host>5</host>
    <capability type='fc_host'>
      <wwnn>2001001b32a9da4e</wwnn>
      <wwpn>2101001b32a9da4e</wwpn>
      <fabric_wwn>2001000dec9877c1</fabric_wwn>
    </capability>
    <capability type='vport_ops'>
      <max_vports>127</max_vports>
      <vports>1</vports>
    </capability>
  </capability>
</device>

Comment 5 Jiri Denemark 2014-04-01 08:48:48 UTC
Fixed upstream by v1.0.3-162-g448be8f:

commit 448be8f706693327d77756fb47aa275edfb14977
Author: Osier Yang <jyang>
Date:   Tue Jan 8 01:05:32 2013 +0800

    nodedev: Dump max vports and vports in use for HBA's XML
    
    This enrichs HBA's xml by dumping the number of max vports and
    vports in use. Format is like:
    
      <capability type='vport_ops'>
        <max_vports>164</max_vports>
        <vports>5</vports>
      </capability>
    
    * docs/formatnode.html.in: (Document the new XML)
    * docs/schemas/nodedev.rng: (Add the schema)
    * src/conf/node_device_conf.h: (New member for data.scsi_host)
    * src/node_device/node_device_linux_sysfs.c: (Collect the value of
      max_vports and vports)

Comment 6 Jiri Denemark 2014-04-02 08:52:41 UTC
*** Bug 1022430 has been marked as a duplicate of this bug. ***

Comment 7 Laine Stump 2014-04-02 11:23:45 UTC
This points out the pitfalls of using the upstream website as a reference for the functionality present in a downstream (RHEL6) version of libvirt.

The source package for libvirt on RHEL contains a complete copy of the XML reference pages *as they apply to that version of libvirt*; that (and the RHEL "Virt Guides") are what should be used as references to libvirt functionality, not the documentation on the upstream website, which describes the most recent libvirt code as it exists at the head of the master branch in upstream git.

Comment 12 RHEL Program Management 2014-04-04 20:57:24 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


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