Hi Ivan,

Thank you so much for reporting the issue. cxq_vring field is specific to 
virtio pci. It should not be accessed or set in tap driver.
Please find the proper fix here:

  1.  https://gerrit.fd.io/r/c/vpp/+/33798/1
  2.  https://gerrit.fd.io/r/c/vpp/+/33796/3

-br
Mohsin

From: <vpp-dev@lists.fd.io> on behalf of Ivan Shvedunov <ivan...@gmail.com>
Date: Wednesday, September 22, 2021 at 2:10 PM
To: vpp-dev <vpp-dev@lists.fd.io>
Subject: [vpp-dev] patch: fix cxq_vring field in virtio (affects taps)

  Hi,
  I've noticed that VPP returns bad host IPv6 addresses from 
sw_interface_tap_v2_dump() API call. As it turned out, the problem is due to 
this line:
https://github.com/FDio/vpp/blob/ef356f57b54b948d990b293514f062aebf86da72/src/vnet/devices/tap/tap.c#L743
with cxq_vring field belonging to the part of a union inside virtio_if_t that's 
only used for virtio_pci, but also coincides with host_ip6_addr in the other 
part of the union. As there are more code paths that use this field without 
checking virtio type, for example in virtio_show(), I thought it's probably 
safer to move it out of the union:
https://gerrit.fd.io/r/c/vpp/+/33791
This patch fixes the issue with TAP details.

--
Ivan Shvedunov <ivan...@gmail.com<mailto:ivan...@gmail.com>>
;; My GPG fingerprint is: 2E61 0748 8E12 BB1A 5AB9  F7D0 613E C0F8 0BC5 2807
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20187): https://lists.fd.io/g/vpp-dev/message/20187
Mute This Topic: https://lists.fd.io/mt/85789362/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to