Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Dmitrii Shcherbakov
Thanks again for the feedback - much appreciated! Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Thu, Feb 3, 2022 at 6:52 PM Michal Prívozník wrote: > > On 2/3/22 15:45, Laine Stump wrote: > > On 2/2/22 1:04 PM, Michal Prívozník wrote: > >> > >> Laine, a

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Dmitrii Shcherbakov
Squashed & auto-tested here: https://gitlab.com/dmitriis/libvirt/-/commits/2021-ignore-eperm-for-vid0 https://gitlab.com/dmitriis/libvirt/-/pipelines/462532823 Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Wed, Feb 2, 2022 at 11:10 PM Dmitrii Shcherbakov wrote: > >

Re: [libvirt PATCH v8 3/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-02 Thread Dmitrii Shcherbakov
> The reason is that when somebody backports these patches onto one of previous releases then they would get needless conflict only because of this file. Ack, I'll make a note of that for the future changes, thanks guiding me with this! Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitr

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-02 Thread Dmitrii Shcherbakov
ges and with squashing them so it's a +1 from me, thanks a lot for doing this! Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Wed, Feb 2, 2022 at 9:04 PM Michal Prívozník wrote: > > On 2/1/22 09:28, Dmitrii Shcherbakov wrote: > > SmartNIC DPUs may not expose some privileged esw

[libvirt PATCH v8 2/3] Allow VF vlanid to be passed as a pointer

2022-02-01 Thread Dmitrii Shcherbakov
There should be a way to show no intent in programming a VLAN at all (including clearing it). This allows handling error conditions differently when VLAN clearing is explicit (vlan id == 0) vs implicit (vlanid == NULL - try to clear it if possible). Signed-off-by: Dmitrii Shcherbakov --- src

[libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-01 Thread Dmitrii Shcherbakov
source/linux/+bug/1957753 [4] https://github.com/torvalds/linux/blob/v5.15/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c#L427-L434 Dmitrii Shcherbakov (3): Set VF MAC and VLAN ID in two different operations Allow VF vlanid to be passed as a pointer Ignore EPERM on implicit clearing o

[libvirt PATCH v8 1/3] Set VF MAC and VLAN ID in two different operations

2022-02-01 Thread Dmitrii Shcherbakov
This has a benefit of being able to handle error codes for those operations separately which is useful when drivers allow setting a MAC address but do not allow setting a VLAN (which is the case with some SmartNIC DPUs). Signed-off-by: Dmitrii Shcherbakov --- src/libvirt_private.syms | 7

[libvirt PATCH v8 3/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-01 Thread Dmitrii Shcherbakov
is used. Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 14 ++ src/util/virnetdev.c | 11 ++- tests/virnetdevtest.c | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index 666a593b58..f5453257ab 100644 --- a/NEWS.rst

[libvirt PATCH v7 3/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-12-02 Thread Dmitrii Shcherbakov
is used. Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 14 ++ src/util/virnetdev.c | 11 ++- tests/virnetdevtest.c | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index 4d690ff64b..89d7e54f32 100644 --- a/NEWS.rst

[libvirt PATCH v7 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-12-02 Thread Dmitrii Shcherbakov
ithout libnl (fixed Windows builds). [1] https://docs.mellanox.com/display/BlueFieldSWv35111601/Modes+of+Operation#ModesofOperation-SmartNICmode [2] https://github.com/torvalds/linux/blob/v5.15/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c#L427-L434 Dmitrii Shcherbakov (3): Set VF MAC

[libvirt PATCH v7 1/3] Set VF MAC and VLAN ID in two different operations

2021-12-02 Thread Dmitrii Shcherbakov
This has a benefit of being able to handle error codes for those operations separately which is useful when drivers allow setting a MAC address but do not allow setting a VLAN (which is the case with some SmartNIC DPUs). Signed-off-by: Dmitrii Shcherbakov --- src/libvirt_private.syms | 7

[libvirt PATCH v7 2/3] Allow VF vlanid to be passed as a pointer

2021-12-02 Thread Dmitrii Shcherbakov
There should be a way to show no intent in programming a VLAN at all (including clearing it). This allows handling error conditions differently when VLAN clearing is explicit (vlan id == 0) vs implicit (vlanid == NULL - try to clear it if possible). Signed-off-by: Dmitrii Shcherbakov --- src

[libvirt PATCH v6 3/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-11-18 Thread Dmitrii Shcherbakov
is used. Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 15 +++ src/util/virnetdev.c | 11 ++- tests/virnetdevtest.c | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index a71b84c363..f12f8deea1 100644

[libvirt PATCH v6 2/3] Allow VF vlanid to be passed as a pointer

2021-11-18 Thread Dmitrii Shcherbakov
There should be a way to show no intent in programming a VLAN at all (including clearing it). This allows handling error conditions differently when VLAN clearing is explicit (vlan id == 0) vs implicit (vlanid == NULL - try to clear it if possible). Signed-off-by: Dmitrii Shcherbakov --- src

Re: [libvirt PATCH v5 1/3] Set VF MAC and VLAN ID in two different operations

2021-11-18 Thread Dmitrii Shcherbakov
if ((rc = virNetDevSetVfVlan(ifname, vf, vlanid)) < 0) > return rc; > > Or alternatively compress them > > > if ((rc = virNetDevSetVfMac(ifname, vf, macaddr, allowRetry)) < 0 || > (rc = virNetDevSetVfVlan(ifname, vf, vlanid)) < 0) > return rc; > > > > > +return rc; > > +} > > + Best Regards, Dmitrii Shcherbakov LP/oftc: dmitriis

[libvirt PATCH v6 1/3] Set VF MAC and VLAN ID in two different operations

2021-11-18 Thread Dmitrii Shcherbakov
This has a benefit of being able to handle error codes for those operations separately which is useful when drivers allow setting a MAC address but do not allow setting a VLAN (which is the case with some SmartNIC DPUs). Signed-off-by: Dmitrii Shcherbakov --- src/libvirt_private.syms | 7

[libvirt PATCH v6 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-11-18 Thread Dmitrii Shcherbakov
sofOperation-SmartNICmode [2] https://github.com/torvalds/linux/blob/v5.15/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c#L427-L434 Dmitrii Shcherbakov (3): Set VF MAC and VLAN ID in two different operations Allow VF vlanid to be passed as a pointer Ignore EPERM on implicit clearing o

[libvirt PATCH v5 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-11-18 Thread Dmitrii Shcherbakov
esw/legacy.c#L427-L434 Dmitrii Shcherbakov (3): Set VF MAC and VLAN ID in two different operations Allow VF vlanid to be passed as a pointer Ignore EPERM on implicit clearing of VF VLAN ID NEWS.rst| 15 +++ src/hypervisor/virhostdev.c | 4 +- src/libvirt_private.s

[libvirt PATCH v5 2/3] Allow VF vlanid to be passed as a pointer

2021-11-18 Thread Dmitrii Shcherbakov
There should be a way to show no intent in programming a VLAN at all (including clearing it). This allows handling error conditions differently when VLAN clearing is explicit (vlan id == 0) vs implicit (vlanid == NULL - try to clear it if possible). Signed-off-by: Dmitrii Shcherbakov --- src

[libvirt PATCH v5 3/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-11-18 Thread Dmitrii Shcherbakov
is used. Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 15 +++ src/util/virnetdev.c | 11 ++- tests/virnetdevtest.c | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index a71b84c363..f12f8deea1 100644

[libvirt PATCH v5 1/3] Set VF MAC and VLAN ID in two different operations

2021-11-18 Thread Dmitrii Shcherbakov
This has a benefit of being able to handle error codes for those operations separately which is useful when drivers allow setting a MAC address but do not allow setting a VLAN (which is the case with some SmartNIC DPUs). Signed-off-by: Dmitrii Shcherbakov --- src/libvirt_private.syms | 7

[libvirt PATCH v4 2/3] Allow VF vlanid to be passed as a pointer

2021-11-17 Thread Dmitrii Shcherbakov
There should be a way to show no intent in programming a VLAN at all (including clearing it). This allows handling error conditions differently when VLAN clearing is explicit (vlan id == 0) vs implicit (vlanid == NULL - try to clear it if possible). Signed-off-by: Dmitrii Shcherbakov --- src

[libvirt PATCH v4 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-11-17 Thread Dmitrii Shcherbakov
mellanox.com/display/BlueFieldSWv35111601/Modes+of+Operation#ModesofOperation-SmartNICmode [2] https://github.com/torvalds/linux/blob/v5.15/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c#L427-L434 Dmitrii Shcherbakov (3): Set VF MAC and VLAN ID in two different operations Allow VF vlanid

[libvirt PATCH v4 3/3] Ignore EPERM on implicit clearing of VF VLAN ID

2021-11-17 Thread Dmitrii Shcherbakov
is used. Signed-off-by: Dmitrii Shcherbakov --- src/util/virnetdev.c | 10 +- tests/virnetdevtest.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 8a0d188413..5728932f9c 100644 --- a/src/util/virnetdev.c +++ b

[libvirt PATCH v4 1/3] Set VF MAC and VLAN ID in two different operations

2021-11-17 Thread Dmitrii Shcherbakov
This has a benefit of being able to handle error codes for those operations separately which is useful when drivers allow setting a MAC address but do not allow setting a VLAN (which is the case with some SmartNIC DPUs). Signed-off-by: Dmitrii Shcherbakov --- src/libvirt_private.syms | 7

Re: [libvirt PATCH v3 1/1] Ignore EPERM on attempts to clear VF VLAN ID

2021-11-17 Thread Dmitrii Shcherbakov
start with (1) for now but I am open to discussing other approaches further. I am certainly interested in having this tested on every build so that it doesn't break for everybody else down the road. Best Regards, Dmitrii Shcherbakov LP/oftc: dmitriis On Wed, Nov 17, 2021 at 3:43 AM Laine Stump

Re: [libvirt PATCH v3 1/1] Ignore EPERM on attempts to clear VF VLAN ID

2021-11-16 Thread Dmitrii Shcherbakov
As you say, with that we can preserve the VLAN clearing behavior when the VLAN pointer is NULL if it succeeds and ignore EPERM if it doesn't. And if clearing is explicit fail on EPERM and other errors. Best Regards, Dmitrii Shcherbakov LP/oftc: dmitriis

[libvirt PATCH v3 1/1] Ignore EPERM on attempts to clear VF VLAN ID

2021-11-15 Thread Dmitrii Shcherbakov
configuration so that Libvirt can act on this and avoid VLAN programming. Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 9 ++ src/libvirt_private.syms | 7 ++ src/util/virnetdev.c | 196 +- src/util/virnetdevpriv.h | 44 tests

[libvirt PATCH v3 0/1] Ignore EPERM on attempts to clear a VF VLAN ID

2021-11-15 Thread Dmitrii Shcherbakov
x/mlx5/core/esw/legacy.c#L427-L434 Dmitrii Shcherbakov (1): Ignore EPERM on attempts to clear VF VLAN ID NEWS.rst | 9 ++ src/libvirt_private.syms | 7 ++ src/util/virnetdev.c | 196 +- src/util/virnetdevpriv.h | 44 tests/virnetdev

[libvirt PATCH v2 0/1] Ignore EPERM on attempts to clear a VF VLAN ID

2021-11-10 Thread Dmitrii Shcherbakov
es/406528913 [1] https://docs.mellanox.com/display/BlueFieldSWv35111601/Modes+of+Operation#ModesofOperation-SmartNICmode [2] https://github.com/torvalds/linux/blob/v5.15/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c#L427-L434 Dmitrii Shcherbakov (1): Ignore EPERM on attempts to clear VF V

[libvirt PATCH v2 1/1] Ignore EPERM on attempts to clear VF VLAN ID

2021-11-10 Thread Dmitrii Shcherbakov
configuration so that Libvirt can act on this and avoid VLAN programming. Signed-off-by: Dmitrii Shcherbakov --- src/libvirt_private.syms | 7 ++ src/util/virnetdev.c | 199 ++- src/util/virnetdevpriv.h | 44 tests/virnetdevtest.c| 222

[libvirt PATCH v2 0/3] PCI VPD: Handle More Edge Cases

2021-10-29 Thread Dmitrii Shcherbakov
hat gitlab provides) Dmitrii Shcherbakov (3): PCI VPD: handle additional edge cases PCI VPD: Skip fields with invalid values PCI VPD: Fix a wrong return code in a test case src/util/virpcivpd.c | 63 +++--- tests/virpcivpdtest.c | 263 -- 2 files ch

[libvirt PATCH v2 2/3] PCI VPD: Skip fields with invalid values

2021-10-29 Thread Dmitrii Shcherbakov
aceholders. Ignoring the whole VPD because of that would be too strict. Signed-off-by: Dmitrii Shcherbakov --- src/util/virpcivpd.c | 22 +--- tests/virpcivpdtest.c | 125 ++ 2 files changed, 127 insertions(+), 20 deletions(-) diff --git a/src/ut

[libvirt PATCH v2 3/3] PCI VPD: Fix a wrong return code in a test case

2021-10-29 Thread Dmitrii Shcherbakov
The test case should return -1, not 0 in case a valid resource could not be parsed successfully but the ret value is initialized to 0. Signed-off-by: Dmitrii Shcherbakov --- tests/virpcivpdtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/virpcivpdtest.c b

[libvirt PATCH v2 1/3] PCI VPD: handle additional edge cases

2021-10-29 Thread Dmitrii Shcherbakov
field may be the last one in the resource, however, the boundary check is currently too strict to allow that. Signed-off-by: Dmitrii Shcherbakov --- src/util/virpcivpd.c | 41 ++--- tests/virpcivpdtest.c | 137 ++ 2 files changed, 169

Re: [libvirt PATCH 1/4] PCI VPD: handle additional edge cases

2021-10-27 Thread Dmitrii Shcherbakov
quot;). I tried to follow the spec relatively strictly but I agree that a balance between that and providing useful information is needed. I'll resend the series and restrict the character set to the set of printable ASCII code points and ignore the lack of RW at the end of the read-write section. Best Regards, Dmitrii Shcherbakov LP/oftc: dmitriis

Re: [libvirt PATCH 1/4] PCI VPD: handle additional edge cases

2021-10-26 Thread Dmitrii Shcherbakov
Hi Daniel, > Something is still not right with the logic here as this error report is triggering on my machines. If I comment out this check, then I can get data reported by libvirt The VPD example you shared previously has multiple violations of the VPD format: * Invalid field values ("N/A" in

[libvirt PATCH 0/1] [RFC] Ignore EPERM on attempts to clear a VF VLAN ID

2021-10-22 Thread Dmitrii Shcherbakov
in how the requests are formed. [1] https://docs.mellanox.com/display/BlueFieldSWv35111601/Modes+of+Operation#ModesofOperation-SmartNICmode Dmitrii Shcherbakov (1): Ignore EPERM on attempts to clear VF VLAN ID src/util/virnetdev.c | 144 +-- 1 file

[libvirt PATCH 1/1] Ignore EPERM on attempts to clear VF VLAN ID

2021-10-22 Thread Dmitrii Shcherbakov
(like Nova in the OpenStack case) would have to annotate every guest device with an attribute indicating whether a device is remotely managed or not based on operator provided configuration so that Libvirt can act on this and avoid VLAN programming. Signed-off-by: Dmitrii Shcherbakov --- src/util

[libvirt PATCH 4/4] PCI VPD: Fix a wrong return code in a test case

2021-10-22 Thread Dmitrii Shcherbakov
The test case should return -1, not 0 in case a valid resource could not be parsed successfully but the ret value is initialized to 0. Signed-off-by: Dmitrii Shcherbakov --- tests/virpcivpdtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/virpcivpdtest.c b

[libvirt PATCH 3/4] PCI VPD: Skip fields with invalid values

2021-10-22 Thread Dmitrii Shcherbakov
bytes are not valid values and were probably used by the vendor as placeholders. Ignoring the whole VPD because of that would be too strict. Signed-off-by: Dmitrii Shcherbakov --- src/util/virpcivpd.c | 9 ++-- tests/virpcivpdtest.c | 105 ++ 2 files cha

[libvirt PATCH 2/4] PCI VPD: Add a test case for the absence of RW

2021-10-22 Thread Dmitrii Shcherbakov
The code already handles a missing RW, however, there was no test case for that. It would be good to have it since a VPD like this was encountered on a real-world device. Signed-off-by: Dmitrii Shcherbakov --- tests/virpcivpdtest.c | 17 + 1 file changed, 17 insertions(+) diff

[libvirt PATCH 0/4] PCI VPD: Handle More Edge Cases

2021-10-22 Thread Dmitrii Shcherbakov
of halting further parsing completely. It turns out that some vendors use values like "N/A" if fields were not populated in VPD-R and 0xFF as placeholders in VPD-W. While this data is not valid, other data might be and it should be possible to retrieve it. Dmitrii Shcherbakov (4): PCI V

[libvirt PATCH 1/4] PCI VPD: handle additional edge cases

2021-10-22 Thread Dmitrii Shcherbakov
must have a valid length - the parser needs to check for invalid length values that violate boundary conditions of the resource. * A zero-length field may be the last one in the resource, however, the boundary check is currently too strict to allow that. Signed-off-by: Dmitrii Shcherbakov

Re: [libvirt PATCH v7 0/5] Add a PCI/PCIe device VPD Capability

2021-10-20 Thread Dmitrii Shcherbakov
Thanks a lot, much appreciated! Best Regards, Dmitrii Shcherbakov LP/oftc: dmitriis On Wed, Oct 20, 2021 at 7:21 PM Daniel P. Berrangé wrote: > > Since the issues i pointed out are minimal, I've just made them > myself and will push this once I see gitlab CI passing for it. >

[libvirt PATCH v7 2/5] Add PCI VPD-related helper functions to virpci

2021-10-20 Thread Dmitrii Shcherbakov
Add helper functions to virpci to provide means of checking for a VPD file presence and for VPD resource retrieval using the PCI VPD parser. The added test assesses the basic functionality of VPD retrieval while the full parser is tested by virpcivpdtest. Signed-off-by: Dmitrii Shcherbakov

[libvirt PATCH v7 0/5] Add a PCI/PCIe device VPD Capability

2021-10-20 Thread Dmitrii Shcherbakov
--leak-check=full build/tests/virpcivpdtest valgrind --leak-check=full build/tests/nodedevxml2xmltest valgrind --leak-check=full build/tests/virpcitest https://gist.github.com/dshcherb/b2c92f8d0eabab818ea1e2113d585ab4 Dmitrii Shcherbakov (5): Add a PCI/PCIe device VPD Parser Add PCI VPD-

[libvirt PATCH v7 1/5] Add a PCI/PCIe device VPD Parser

2021-10-20 Thread Dmitrii Shcherbakov
re binary compatible and PCIe 4.0 merely started incorporating what was already present in PCI specs. Linux kernel exposes a binary blob in the VPD format via sysfs since v2.6.26 (commit 94e6108803469a37ee1e3c92dafdd1d59298602f) which requires a parser to interpret. Signed-off-by: Dmitrii Shcherb

[libvirt PATCH v7 3/5] Add PCI VPD Capability Support

2021-10-20 Thread Dmitrii Shcherbakov
* XML serialization and deserialization of PCI VPD; * PCI VPD capability flags added and used in relevant places; * XML to XML tests for the added capability. Signed-off-by: Dmitrii Shcherbakov --- docs/schemas/nodedev.rng | 96 ++ include/libvirt/libvirt-nodedev.h

[libvirt PATCH v7 5/5] news: Add PCI VPD parser & capability notes

2021-10-20 Thread Dmitrii Shcherbakov
Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index f3b9e5f0cb..e7b7dfb4f0 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -40,6 +40,28 @@ v7.9.0 (unreleased) domain definition when the guest was first

[libvirt PATCH v7 4/5] Add PCI VPD Capability Documentation

2021-10-20 Thread Dmitrii Shcherbakov
Describes the format of the newly added VPD capability and gives and example for a real-world device. Signed-off-by: Dmitrii Shcherbakov --- docs/drvnodedev.html.in | 69 + docs/formatnode.html.in | 63 - 2 files

Re: [libvirt PATCH v6 1/5] Add a PCI/PCIe device VPD Parser

2021-10-19 Thread Dmitrii Shcherbakov
Hi Daniel, > runningvalgrind --leak-check=full virpcivpdtest reports some > errors. I pointed out most of them above I think, but might be some > more to catch. Thanks a lot for pointing all of those out! I'll work on a fix and send a v7 out. Best Regards, Dmitrii Shcherbako

Re: [libvirt PATCH v6 0/5] Add a PCI/PCIe device VPD Capability

2021-10-19 Thread Dmitrii Shcherbakov
Hi Daniel, > This new XML format looks good to me now > > I've done a high level review and only major issue i've seen is the > memory leaks mentioned on the first patch. Thanks a lot! I'll address those and send out a v7. Best Regards, Dmitrii Shcherbakov LP/oftc: dmitriis >

[libvirt PATCH v6 0/5] Add a PCI/PCIe device VPD Capability

2021-10-11 Thread Dmitrii Shcherbakov
gist.github.com/dshcherb/867d87a7419b91bb68388518ca5a9c32 Dmitrii Shcherbakov (5): Add a PCI/PCIe device VPD Parser Add PCI VPD-related helper functions to virpci Add PCI VPD Capability Support Add PCI VPD Capability Documentation news: Add PCI VPD parser & capability notes NEWS.rst

[libvirt PATCH v6 2/5] Add PCI VPD-related helper functions to virpci

2021-10-11 Thread Dmitrii Shcherbakov
Add helper functions to virpci to provide means of checking for a VPD file presence and for VPD resource retrieval using the PCI VPD parser. The added test assesses the basic functionality of VPD retrieval while the full parser is tested by virpcivpdtest. Signed-off-by: Dmitrii Shcherbakov

[libvirt PATCH v6 5/5] news: Add PCI VPD parser & capability notes

2021-10-11 Thread Dmitrii Shcherbakov
Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ae678bffc4..7d4244e938 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -40,6 +40,28 @@ v7.9.0 (unreleased) domain definition when the guest was first

[libvirt PATCH v6 3/5] Add PCI VPD Capability Support

2021-10-11 Thread Dmitrii Shcherbakov
* XML serialization and deserialization of PCI VPD; * PCI VPD capability flags added and used in relevant places; * XML to XML tests for the added capability. Signed-off-by: Dmitrii Shcherbakov --- docs/schemas/nodedev.rng | 96 ++ include/libvirt/libvirt-nodedev.h

[libvirt PATCH v6 4/5] Add PCI VPD Capability Documentation

2021-10-11 Thread Dmitrii Shcherbakov
Describes the format of the newly added VPD capability and gives and example for a real-world device. Signed-off-by: Dmitrii Shcherbakov --- docs/drvnodedev.html.in | 69 + docs/formatnode.html.in | 63 - 2 files

[libvirt PATCH v6 1/5] Add a PCI/PCIe device VPD Parser

2021-10-11 Thread Dmitrii Shcherbakov
re binary compatible and PCIe 4.0 merely started incorporating what was already present in PCI specs. Linux kernel exposes a binary blob in the VPD format via sysfs since v2.6.26 (commit 94e6108803469a37ee1e3c92dafdd1d59298602f) which requires a parser to interpret. Signed-off-by: Dmitrii Shcherb

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
On Fri, Oct 1, 2021 at 8:28 PM Daniel P. Berrangé wrote: > > On Fri, Oct 01, 2021 at 01:13:00PM -0400, Laine Stump wrote: > > On 10/1/21 5:57 AM, Daniel P. Berrangé wrote: > > > On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: > >

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
On Fri, Oct 1, 2021 at 7:49 PM Daniel P. Berrangé wrote: > > A GTree is used as a data structure in order to maintain key ordering > > which will be important in XML to XML tests later. > > Now, I've learnt a bit more about VPD and considering my comments on > the XML format in the last patch, I

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Dmitrii Shcherbakov
> > It's probably irrelevant since this will be mostly rewritten based on > Dan's suggestions, but the resFormatFunc() pointer seems like an > unnecessary complication - you could just move the if/else construct > down to here and call the appropriate function directly. > Ack, I was trying to

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Dmitrii Shcherbakov
> > > > I've got a general comment about what do any of these 2-letter > > keywords actually mean. I presume they are explaned in the > > PCI spec, but AFAICT the spec is not publically available for > > free. > > So at the very least we need to document each one's meaning > > in libvirt docs

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
> > +if (VIR_CLOSE(vpdFileFd) < 0) { > > +virReportSystemError(errno, _("Unable to close the VPD file, fd: > > %d"), vpdFileFd); > > +return NULL; > > +} > > This is closing an FD that is owned & passed in by the caller. I'd > consider that an undesirable pattern. Whomever

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
Thanks a lot for the review! Responses inline - ACKs to address in v6. On Fri, Oct 1, 2021 at 12:58 PM Daniel P. Berrangé wrote: > I don't know what the thread concurrency rules are of the callers of > this code, but regardless we generally aim to make any one-time > initializers thread safe

[libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-09-27 Thread Dmitrii Shcherbakov
a structure in order to maintain key ordering which will be important in XML to XML tests later. Signed-off-by: Dmitrii Shcherbakov --- build-aux/syntax-check.mk | 4 +- po/POTFILES.in| 1 + src/libvirt_private.syms | 15 + src/util/meson.build | 1 + src/util/vi

[libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-09-27 Thread Dmitrii Shcherbakov
* XML serialization and deserialization of PCI VPD resources; * PCI VPD capability flags added and used in relevant places; * XML to XML tests for the added capability. Signed-off-by: Dmitrii Shcherbakov --- docs/schemas/nodedev.rng | 40 +++ include/libvirt/libvirt

[libvirt PATCH v5 7/7] Add PCI VPD Capability Documentation

2021-09-27 Thread Dmitrii Shcherbakov
Describes the format of the newly added VPD capability and gives and example for a real-world device. Signed-off-by: Dmitrii Shcherbakov --- docs/drvnodedev.html.in | 46 + docs/formatnode.html.in | 24 - 2 files changed, 69 insertions

[libvirt PATCH v5 6/7] News: Add PCI VPD capability support

2021-09-27 Thread Dmitrii Shcherbakov
Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4617198f82..4db4e0e3e3 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -44,6 +44,13 @@ v7.8.0 (unreleased) to invoke the PCI VPD parser to get a list of resources

[libvirt PATCH v5 0/7] Add a PCI/PCIe device VPD Capability

2021-09-27 Thread Dmitrii Shcherbakov
in ci/manifest.yaml: ci/helper test --meson-args='-Dexpensive_tests=enabled' https://gist.github.com/dshcherb/225b5da9478275f08c220487814ffd1c Dmitrii Shcherbakov (7): Add a PCI/PCIe device VPD Parser News: Add a PCI VPD parser Add PCI VPD-related helper functions to virpci News: Ad

[libvirt PATCH v5 4/7] News: Add PCI VPD-related helper functions to virpci

2021-09-27 Thread Dmitrii Shcherbakov
Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index a4178e505c..4617198f82 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -37,6 +37,13 @@ v7.8.0 (unreleased) functionality got added for Linux only at this point

[libvirt PATCH v5 3/7] Add PCI VPD-related helper functions to virpci

2021-09-27 Thread Dmitrii Shcherbakov
Add helper functions to virpci to provide means of checking for a VPD file presence and for VPD resource retrieval using the PCI VPD parser. The added test assesses the basic functionality of VPD retrieval while the full parser is tested by virpcivpdtest. Signed-off-by: Dmitrii Shcherbakov

[libvirt PATCH v5 2/7] News: Add a PCI VPD parser

2021-09-27 Thread Dmitrii Shcherbakov
Signed-off-by: Dmitrii Shcherbakov --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index fd20e50d18..a4178e505c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -29,6 +29,14 @@ v7.8.0 (unreleased) active. This information can also be retrieved

Re: [libvirt PATCH v4 0/4] Add a PCI/PCIe device VPD Capability

2021-09-22 Thread Dmitrii Shcherbakov
Forgot to add `-s` when using `git publish` so "Signed-off-by" is missing - my apologies about that. Will add it in v5 if there will be a need for it. Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Wed, Sep 22, 2021 at 5:23 PM Dmitrii Shcherbakov < dmitrii.shcherba...@

[libvirt PATCH v4 3/4] Add PCI VPD Capability Support

2021-09-22 Thread Dmitrii Shcherbakov
* XML serialization and deserialization of PCI VPD resources; * PCI VPD capability flags added and used in relevant places; * XML to XML tests for the added capability. --- docs/schemas/nodedev.rng | 40 +++ include/libvirt/libvirt-nodedev.h | 1 +

[libvirt PATCH v4 4/4] Add PCI VPD Capability Documentation

2021-09-22 Thread Dmitrii Shcherbakov
Describes the format of the newly added VPD capability and gives and example for a real-world device. --- docs/drvnodedev.html.in | 46 + docs/formatnode.html.in | 24 - 2 files changed, 69 insertions(+), 1 deletion(-) diff --git

[libvirt PATCH v4 0/4] Add a PCI/PCIe device VPD Capability

2021-09-22 Thread Dmitrii Shcherbakov
gist.github.com/dshcherb/b2fc8bd3a349f6357a25da85c542dda3 Dmitrii Shcherbakov (4): Add a PCI/PCIe device VPD Parser Add PCI VPD-related helper functions to virpci Add PCI VPD Capability Support Add PCI VPD Capability Documentation build-aux/syntax-check.mk | 4 +-

[libvirt PATCH v4 1/4] Add a PCI/PCIe device VPD Parser

2021-09-22 Thread Dmitrii Shcherbakov
Add support for deserializing the binary PCI/PCIe VPD format and storing results in memory. The VPD format is specified in "I.3. VPD Definitions" in PCI specs (2.2+) and "6.28.1 VPD Format" PCIe 4.0. As section 6.28 in PCIe 4.0 notes, the PCI Local Bus and PCIe VPD formats are binary compatible

[libvirt PATCH v4 2/4] Add PCI VPD-related helper functions to virpci

2021-09-22 Thread Dmitrii Shcherbakov
Add helper functions to virpci to provide means of checking for a VPD file presence and for VPD resource retrieval using the PCI VPD parser. The added test assesses the basic functionality of VPD retrieval while the full parser is tested by virpcivpdtest. --- src/libvirt_private.syms | 2 ++

Re: [libvirt PATCH v3 1/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Dmitrii Shcherbakov
combinations going forward. Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Fri, Sep 17, 2021 at 2:10 PM Peter Krempa wrote: > On Fri, Sep 17, 2021 at 13:54:49 +0300, Dmitrii Shcherbakov wrote: > > Add support for deserializing the binary PCI/PCIe VPD format and > > expos

[libvirt PATCH v3 1/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Dmitrii Shcherbakov
602f) which requires a parser to interpret. Signed-off-by: Dmitrii Shcherbakov --- build-aux/syntax-check.mk | 4 +- docs/drvnodedev.html.in | 46 ++ docs/formatnode.html.in | 24 +- docs/schemas/nodedev.rng | 4

[libvirt PATCH v3 0/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Dmitrii Shcherbakov
but exhibit invalid behavior (I/O errors while reading a sysfs entry). Per the existing guidelines, the implementation relies heavily on glib for various purposes. https://libvirt.org/glib-adoption.html v3 of the patch is a rebase of v2 on top of the latest changes to the master branch. Dmitrii Sh

[libvirt PATCH v2 0/1] Add a PCI/PCIe device VPD Capability

2021-09-02 Thread Dmitrii Shcherbakov
but exhibit invalid behavior (I/O errors while reading a sysfs entry). Per the existing guidelines, the implementation relies heavily on glib for various purposes. https://libvirt.org/glib-adoption.html The v2 of the patch is rebased on top of Libvirt 7.7.0 and fixes a couple of minor typos. Dm

[libvirt PATCH v2 1/1] Add a PCI/PCIe device VPD Capability

2021-09-02 Thread Dmitrii Shcherbakov
602f) which requires a parser to interpret. Signed-off-by: Dmitrii Shcherbakov --- build-aux/syntax-check.mk | 4 +- docs/drvnodedev.html.in | 46 ++ docs/formatnode.html.in | 24 +- docs/schemas/nodedev.rng | 4

[libvirt PATCH 1/1] Add a PCI/PCIe device VPD Capability

2021-08-24 Thread Dmitrii Shcherbakov
602f) which requires a parser to interpret. Signed-off-by: Dmitrii Shcherbakov --- build-aux/syntax-check.mk | 4 +- docs/drvnodedev.html.in | 46 ++ docs/formatnode.html.in | 24 +- docs/schemas/nodedev.rng | 4

[libvirt PATCH 0/1] Add a PCI/PCIe device VPD Capability

2021-08-24 Thread Dmitrii Shcherbakov
but exhibit invalid behavior (I/O errors while reading a sysfs entry). Per the existing guidelines, the implementation relies heavily on glib for various purposes. https://libvirt.org/glib-adoption.html Dmitrii Shcherbakov (1): Add a PCI/PCIe device VPD Capability build-aux/syntax-check.mk

Re: Storing PCI(e) VPD Board Serial Numbers

2021-06-03 Thread Dmitrii Shcherbakov
r to just implement scenario (1) and add (2) later if there is a significant need for it. The generally available hardware I have seen has VPD exposed so I can just focus on (1) while we can decide on whether to do (2) or not. Best Regards, Dmitrii Shcherbakov LP: ~dmitriis On Tue, Jun 1, 2021

Storing PCI(e) VPD Board Serial Numbers

2021-05-28 Thread Dmitrii Shcherbakov
d=b5872cd0e823e4cb50b3a75cd9522167eeb676a2 [14] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=7332b188a6f8e5c5d67c9a03d1591a813a4c908c Best Regards, Dmitrii Shcherbakov LP: ~dmitriis