Bug 1898074 - [nodedev-dumpxml] improve css cap property naming
Summary: [nodedev-dumpxml] improve css cap property naming
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.4
Hardware: s390x
OS: Unspecified
low
low
Target Milestone: rc
: 8.5
Assignee: Thomas Huth
QA Contact: smitterl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-16 10:26 UTC by smitterl
Modified: 2021-02-02 12:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-02 12:08:52 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1865932 1 None None None 2023-06-26 12:18:39 UTC

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


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