Bug 1898074

Summary: [nodedev-dumpxml] improve css cap property naming
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: smitterl
Component: libvirtAssignee: Thomas Huth <thuth>
Status: CLOSED UPSTREAM QA Contact: smitterl
Severity: low Docs Contact:
Priority: low    
Version: 8.4CC: berrange, cohuck, dzheng, jsuchane, mprivozn, thuth, virt-maint
Target Milestone: rcKeywords: Triaged, Upstream
Target Release: 8.5   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-02 12:08:52 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:

Description smitterl 2020-11-16 10:26:31 UTC
Description of problem:
As css ids and ccw ids have the same format it can become confusing. Proposal: Use "schid" instead of "devno" for subchannel id.
 
Version-Release number of selected component (if applicable):
libvirt-6.0.0-30.module+el8.4.0+8705+34397d87.s390x


How reproducible:
100%

Steps to Reproduce:
1. Confirm that the host has ccw devices, virsh nodedev-list should list for example ccw_0_0_570d and it's corresponding channel css_0_0_25ac.
2. virsh nodedev-dumpxml css_0_0_25ac.

Actual results:
<device>
...
  <capability type='css'>
    <cssid>0x0</cssid>
    <ssid>0x0</ssid>
    <devno>0x25ac</devno>
  </capability>
</device>


Expected results:
<device>
...
  <capability type='css'>
    <cssid>0x0</cssid>
    <ssid>0x0</ssid>
    <schid>0x25ac</schid>
  </capability>
</device>

Additional info:
By [2] "devno" is for the actual device behind the subchannel while "schid" is for example used in kernel s390 drivers [1]. 

[1] https://www.kernel.org/doc/html/v5.8/driver-api/s390-drivers.html
[2] https://www.ibm.com/support/knowledgecenter/en/linuxonibm/com.ibm.linux.z.lkdd/lkdd_r_sys_view_subchan.html

Comment 1 Thomas Huth 2021-01-27 17:38:36 UTC
Daniel, do you think we could still the output of nodedev-dumpxml here without breaking the compatibility promise of libvirt?

Comment 2 Daniel Berrangé 2021-01-27 17:59:18 UTC
(In reply to Thomas Huth from comment #1)
> Daniel, do you think we could still the output of nodedev-dumpxml here
> without breaking the compatibility promise of libvirt?

Afraid not, the best we can do is improve documentation.

Comment 3 Thomas Huth 2021-01-29 09:52:32 UTC
If I've got Cornelia's blog right (https://virtualpenguins.blogspot.com/2017/03/channel-io-whats-in-channel-subsystem.html), the third value here is not the "schid" itself anyway, but the subchannel number. All three values, cssid, ssid and subchannel number can then be used to create a subchannel identification word ("schid").

Anyway, I'll try to come up with a patch for libvirt that improves the documentation here a little bit.

Comment 4 Thomas Huth 2021-01-29 10:09:19 UTC
Suggested patch:
https://www.redhat.com/archives/libvir-list/2021-January/msg01203.html

Comment 5 Cornelia Huck 2021-01-29 10:13:13 UTC
(In reply to Thomas Huth from comment #3)
> If I've got Cornelia's blog right
> (https://virtualpenguins.blogspot.com/2017/03/channel-io-whats-in-channel-
> subsystem.html), the third value here is not the "schid" itself anyway, but
> the subchannel number. All three values, cssid, ssid and subchannel number
> can then be used to create a subchannel identification word ("schid").

Yes, that's right (also see the PoP pg 14-1 for how the schid is constructed, even though it does not mention the cssid).

Comment 6 Michal Privoznik 2021-02-01 15:04:24 UTC
Merged upstream as:

b943099c87 docs: Clarify the documentation of the <css> elements

v7.0.0-185-gb943099c87

Comment 7 smitterl 2021-02-02 12:08:52 UTC
Thanks everybody. I checked on upstream https://libvirt.org/formatnode.html