• L
    util: use new virNetDev*NetConfig() functions for macvtap setup/teardown · b91a3363
    Laine Stump 提交于
    This patch modifies the macvtap passthrough setup to use
    virNetDevSaveNetConfig()+virNetDevSetConfig() instead of
    virNetDevReplaceNetConfig() or virNetDevReplaceMacAddress(), and the
    teardown to use virNetDevReadNetConfig()+virNetDevSetConfig() instead
    of virNetDevRestoreNetConfig() or virNetDevRestoreMacAddress().
    
    Since the older functions only saved/restored the admin MAC and vlan
    tag (which is incorrect) and the new functions save/restore the VF's
    own MAC address and vlan tag (correct), this actually fixes a bug
    (which was introduced by commit cb3fe38c, which was itself supposed
    to be a fix for https://bugzilla.redhat.com/1113474 ).
    
    The downside to this patch is that it causes an *apparent* regression
    in that bug (because there will once again be an error reported if the
    interface had previously been used for VFIO device assignment), but in
    reality, the code hasn't been working for *any* case before this
    current patch (at least not with any recent kernel). Anyway, that
    "regression" will be fixed with an upcoming patch that fixes it the
    *right* way.
    b91a3363
virnetdevmacvlan.c 45.3 KB