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

2021-11-17 Thread Dmitrii Shcherbakov
Hi Laine, This is less effective than mocking netlink messages, however, even with netlink messages responses would depend on providing the right argument to trigger the right mock. Even this testing was useful because I managed to make a mistake while reworking one of the if statements and

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

2021-11-16 Thread Laine Stump
On 11/15/21 1:59 PM, Dmitrii Shcherbakov wrote: [...] diff --git a/tests/virnetdevtest.c b/tests/virnetdevtest.c index aadbeb1ef4..bdaa94e83c 100644 --- a/tests/virnetdevtest.c +++ b/tests/virnetdevtest.c Maybe I'm just looking at it too superficially, but it seems like these test cases are

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

2021-11-16 Thread Dmitrii Shcherbakov
Hi Daniel, Thanks a lot for the review, I'll send a v4 with the requested changes included. On Tue, Nov 16, 2021 at 9:55 PM Daniel P. Berrangé wrote: > > +int > > +virNetDevSendVfSetLinkRequest(const char *ifname, int vfInfoType, > > + const void *payload, const

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

2021-11-16 Thread Daniel P . Berrangé
On Mon, Nov 15, 2021 at 09:59:23PM +0300, Dmitrii Shcherbakov wrote: > SmartNIC DPUs may not expose some privileged eswitch operations > to the hypervisor hosts. For example, this happens with Bluefield > devices running in the ECPF (default) mode for security reasons. While > VF MAC address

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

2021-11-15 Thread Dmitrii Shcherbakov
SmartNIC DPUs may not expose some privileged eswitch operations to the hypervisor hosts. For example, this happens with Bluefield devices running in the ECPF (default) mode for security reasons. While VF MAC address programming is possible via an RTM_SETLINK operation, trying to set a VLAN ID in