• L
    util: properly save/restore original vlan tag for VFs · e979226b
    Laine Stump 提交于
    When a network device that is a VF of an SR-IOV card was assigned to a
    guest using <interface type='hostdev'>, only the MAC address was being
    saved/restored, but the VLAN tag was left untouched. Up to now we
    haven't actually used vlan tags on SR-IOV devices, so the guest would
    have used whatever was set, and left it the same at the end.
    
    The patch following this one will hook up the <vlan> element from the
    interface config, so save/restore of the device state needs to also
    include the vlan tag.
    
    MAC address is being saved as a simple ASCII string in a file named
    for the device under /var/run.  The VLAN tag is now just added at the
    end of that file, after a newline. It might be nicer if the file was
    XML (in case it ever gets more complicated) but at the moment there's
    nothing else on the horizon, and this makes backward compatibility
    easier.
    e979226b
virnetdev.c 43.6 KB