libvirt/src/util
Laine Stump 46cf0cefa0 util: don't use netlink to save/set mac for macvtap+passthrough+802.1Qbh
Before libvirt sets the MAC address of the physdev (the physical
ethernet device) linked to a macvtap passthrough device, it always
saves the previous MAC address to restore when the guest is finished
(following a "leave nothing behind" policy). For a long time it
accomplished the save/restore with a combination of
ioctl(SIOCGIFHWADDR) and ioctl(SIOCSIFHWADDR), but in commit cbfe38c
(first in libvirt 1.2.15) this was changed to use netlink RTM_GETLINK
and RTM_SETLINK commands sent to the Physical Function (PF) of any
device that was detected to be a Virtual Function (VF).

We later found out that this caused problems with any devices using
the Cisco enic driver (e.g. vmfex cards) because the enic driver
hasn't implemented the function that is called to gather the
information in the IFLA_VFINFO_LIST attribute of RTM_GETLINK
(ndo_get_vf_config() for those keeping score), so we would never get
back a useful response.

In an ideal world, all drivers would implement all functions, but it
turns out that in this case we can work around this omission without
any bad side effects - since all macvtap passthrough <interface>
definitions pointing to a physdev that uses the enic driver *must*
have a <virtualport type='802.1Qbh'>, and since no other type of
ethernet devices use 802.1Qbh, libvirt can change its behavior in this
case to use the old-style.  ioctl(SIOC[GS]IFHWADDR).  That's what this
patch does.

Resolves:  https://bugzilla.redhat.com/show_bug.cgi?id=1257004
2015-09-03 11:38:17 -04:00
..
iohelper.c Indent top-level labels by one space in src/util/ 2014-03-25 14:58:40 +01:00
keymaps.csv
viralloc.c maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
viralloc.h util: forbid freeing const pointers 2014-07-16 06:48:53 -06:00
virarch.c Add virLogSource variables to all source files 2014-03-18 14:29:22 +00:00
virarch.h Cpu: Add support for Power LE Architecture. 2014-11-07 09:16:37 +01:00
viratomic.c Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
viratomic.h
viraudit.c audit: use bool for audit log choice 2014-10-29 09:55:09 -06:00
viraudit.h audit: use bool for audit log choice 2014-10-29 09:55:09 -06:00
virauth.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virauth.h virAuth: Don't require virConnectPtr to retrieve authentication creds 2013-07-12 09:22:38 +02:00
virauthconfig.c Indent top-level labels by one space in src/util/ 2014-03-25 14:58:40 +01:00
virauthconfig.h
virbitmap.c util: bitmap: Don't alloc overly large binary bitmaps 2015-07-08 11:01:33 +02:00
virbitmap.h util: bitmap: Add virBitmapToDataBuf that does not allocate the buffer 2015-06-03 09:42:07 +02:00
virbuffer.c virbuffer: fix build on rhel-6 2015-04-16 18:35:41 +02:00
virbuffer.h util: buffer: Add support for adding text blocks with indentation 2015-03-25 15:42:52 +01:00
vircgroup.c util: fix build without cgroup 2015-08-20 09:42:56 +03:00
vircgroup.h util: Add getters for cgroup block device I/O throttling 2015-08-18 16:25:16 -07:00
vircgrouppriv.h tests: Add tests for virCgroupDetectMounts 2015-03-18 09:53:24 +01:00
virclosecallbacks.c util: fix removal of callbacks in virCloseCallbacksRun 2015-04-08 09:45:48 +02:00
virclosecallbacks.h lxc: switch to virCloseCallbacks API 2013-07-18 14:16:54 +02:00
vircommand.c vircommand: fix polling in virCommandProcessIO 2015-04-22 17:56:53 +03:00
vircommand.h utils: Implement virCommandPassFDGetFDIndex 2015-03-05 18:57:06 -05:00
vircommandpriv.h Add ability to register callback for virCommand dry run 2014-03-19 10:47:58 +00:00
virconf.c virconf: correct code formatting 2015-08-20 01:41:28 +02:00
virconf.h virconf: correct code formatting 2015-08-20 01:41:28 +02:00
vircrypto.c vircrypto: fix Invalid write in virCryptoHashString() 2014-03-12 16:01:30 -06:00
vircrypto.h Add helper APIs for generating cryptographic hashes 2014-03-10 16:39:18 +00:00
virdbus.c systemd: avoid string comparisons on dbus error messages 2015-01-26 09:14:04 +00:00
virdbus.h systemd: avoid string comparisons on dbus error messages 2015-01-26 09:14:04 +00:00
virdbuspriv.h build: fix build when not using dbus 2014-11-20 08:48:19 -07:00
virdnsmasq.c network: escape quotes for dsmasq conf contents 2015-06-09 13:56:00 -04:00
virdnsmasq.h
virebtables.c Convert ebtables code over to use firewall APIs 2014-04-25 15:44:09 +01:00
virebtables.h Remove unused ebtablesRemoveForwardPolicyReject method 2014-03-11 11:01:52 +00:00
virendian.h
virerror.c qemu: Don't report false error from MigrateFinish 2015-07-10 11:47:13 +02:00
virerror.h Introduce virErrorCopyNew 2015-07-10 11:47:13 +02:00
virevent.c maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
virevent.h
vireventpoll.c util: make it more robust to calculate timeout value 2015-05-27 16:59:18 +02:00
vireventpoll.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
virfile.c virfile: Introduce virFileUnlink 2015-09-02 08:59:53 -04:00
virfile.h virfile: Introduce virFileUnlink 2015-09-02 08:59:53 -04:00
virfirewall.c util: better error message after failure to initialize firewall backend 2015-05-22 10:15:05 -04:00
virfirewall.h test: fix nwfilter tests following changes in virfirewall.c 2014-12-22 16:57:21 -05:00
virfirewallpriv.h Introduce an object for managing firewall rulesets 2014-04-25 15:44:09 +01:00
virhash.c virHashAddEntry: Report error on duplicate key 2015-08-17 23:34:08 +02:00
virhash.h Introduce virHashAtomic 2015-07-10 11:47:13 +02:00
virhashcode.c
virhashcode.h
virhook.c virhook: Resolve Coverity NULL_RETURNS 2014-12-01 11:07:31 -05:00
virhook.h qemu: hook: Provide hook when restoring a domain save image 2014-09-22 17:11:56 +02:00
virhostdev.c hostdev: skip ACS check when using VFIO for device assignment 2015-08-26 14:07:01 -04:00
virhostdev.h virhostdev.h: remove ATTRIBUTE_NONNULL from oldStateDir 2014-03-19 10:05:31 +01:00
viridentity.c util: identity: Harden virIdentitySetCurrent() 2015-03-25 13:37:41 +01:00
viridentity.h Add typesafe APIs for virIdentity attributes 2014-09-24 15:29:22 +01:00
virinitctl.c Add support for /run/initctl 2014-10-22 13:09:49 +01:00
virinitctl.h util: use typedefs for enums in "src/util/" directory 2014-05-05 14:30:01 -06:00
viriptables.c Re-add use of locking with iptables/ip6tables/ebtables 2014-11-14 15:15:16 +00:00
viriptables.h Convert bridge driver over to use new firewall APIs 2014-04-25 15:44:09 +01:00
viriscsi.c viriscsi: Need to sendtargets on Initiator IQN 2014-12-10 06:58:37 -05:00
viriscsi.h util: Sanitize ATTRIBUTE_NONNULL use in viriscsi.h 2014-03-25 08:26:39 +01:00
virjson.c json: enhance parser test 2015-06-25 09:11:15 +02:00
virjson.h json: make it easier to type-check when getting from object 2015-06-22 10:38:21 -06:00
virkeycode-mapgen.py virkeycode: Allow ANSI_A 2013-12-24 17:36:47 +01:00
virkeycode.c virkeycode: Allow ANSI_A 2013-12-24 17:36:47 +01:00
virkeycode.h
virkeyfile.c hash: add common utility functions 2014-04-07 06:14:45 -06:00
virkeyfile.h
virkmod.c Typos: Get rid of dependan(t|cies) 2015-04-02 16:05:32 +02:00
virkmod.h utils: Introduce functions for kernel module manipulation 2014-02-04 08:52:27 -05:00
virlockspace.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virlockspace.h
virlog.c qemu: include libvirt & QEMU versions in QEMU log files 2015-02-06 10:22:07 +00:00
virlog.h qemu: include libvirt & QEMU versions in QEMU log files 2015-02-06 10:22:07 +00:00
virmacaddr.c util: Functions to update host network device's multicast filter 2014-10-28 14:14:25 -04:00
virmacaddr.h util: Functions to update host network device's multicast filter 2014-10-28 14:14:25 -04:00
virnetdev.c util: make virNetDev(Replace|Restore)MacAddress public functions 2015-09-03 11:38:09 -04:00
virnetdev.h util: make virNetDev(Replace|Restore)MacAddress public functions 2015-09-03 11:38:09 -04:00
virnetdevbandwidth.c virNetDevBandwidthUpdateRate: turn class_id into integer 2015-08-11 16:10:32 +02:00
virnetdevbandwidth.h virNetDevBandwidthUpdateRate: turn class_id into integer 2015-08-11 16:10:32 +02:00
virnetdevbridge.c util: fallback to ioctl(SIOCBRDELBR) if netlink RTM_DELLINK fails 2015-08-28 16:39:30 -04:00
virnetdevbridge.h util: functions to manage bridge fdb (forwarding database) 2014-12-08 14:39:12 -05:00
virnetdevmacvlan.c util: don't use netlink to save/set mac for macvtap+passthrough+802.1Qbh 2015-09-03 11:38:17 -04:00
virnetdevmacvlan.h network: Bring netdevs online later 2014-12-10 15:09:01 -05:00
virnetdevmidonet.c util: functions to support binding/unbinding midonet virtualports 2015-03-17 12:56:37 -04:00
virnetdevmidonet.h util: functions to support binding/unbinding midonet virtualports 2015-03-17 12:56:37 -04:00
virnetdevopenvswitch.c util: don't fail if no PortData is found while getting migrateData 2015-03-13 22:43:08 -04:00
virnetdevopenvswitch.h maint: avoid 'const fooPtr' in virnet files 2013-10-14 13:05:34 -06:00
virnetdevtap.c network: Add midonet virtual port type support to qemu 2015-03-17 13:10:17 -04:00
virnetdevtap.h Change int to size_t in size var for tap/vhost FDs 2015-01-15 11:07:13 +00:00
virnetdevveth.c Cleanup "/sys/class/net" usage 2015-04-15 16:43:28 +02:00
virnetdevveth.h
virnetdevvlan.c maint: avoid 'const fooPtr' in virnet files 2013-10-14 13:05:34 -06:00
virnetdevvlan.h maint: avoid 'const fooPtr' in virnet files 2013-10-14 13:05:34 -06:00
virnetdevvportprofile.c docs: schema and docs for the midonet virtualport type 2015-03-17 13:09:05 -04:00
virnetdevvportprofile.h util: functions to support binding/unbinding midonet virtualports 2015-03-17 12:56:37 -04:00
virnetlink.c util: fallback to ioctl(SIOCBRDELBR) if netlink RTM_DELLINK fails 2015-08-28 16:39:30 -04:00
virnetlink.h util: fallback to ioctl(SIOCBRDELBR) if netlink RTM_DELLINK fails 2015-08-28 16:39:30 -04:00
virnodesuspend.c build: Don't use code with dbus_message_unref when built without dbus 2014-04-14 18:19:36 +02:00
virnodesuspend.h
virnuma.c virNumaSetPagePoolSize: Produce friendlier error message 2015-06-10 17:27:16 +02:00
virnuma.h util: Add virNumaGetHostNodeset 2014-12-16 11:15:27 +01:00
virobject.c util: Make the virDomainListFree helper more universal 2015-05-11 08:28:53 +02:00
virobject.h util: Make the virDomainListFree helper more universal 2015-05-11 08:28:53 +02:00
virpci.c util: Resolve Coverity FORWARD_NULL 2015-07-01 12:15:16 -04:00
virpci.h virpci: Implement virPCIDeviceGetAddress function 2015-01-14 18:01:06 +01:00
virpidfile.c network: escape quotes for dsmasq conf contents 2015-06-09 13:56:00 -04:00
virpidfile.h util: Introduce virPidFileForceCleanupPath 2014-11-03 16:43:23 +01:00
virpolkit.c virdbus: don't force users to pass int for bool values 2014-11-19 08:20:39 -07:00
virpolkit.h Add common API for doing polkit authentication 2014-09-24 15:29:22 +01:00
virportallocator.c Introduce virBitmapIsBitSet 2015-03-13 15:31:33 +01:00
virportallocator.h util: Allow port allocator to skip bind() check 2014-09-11 15:40:14 -06:00
virprobe.h Log dtrace/systemd probes at INFO level instead of DEBUG 2015-01-15 11:07:13 +00:00
virprocess.c util: Allow virProcessSetNamespaces() to have sparse FD list 2015-08-27 15:05:51 +02:00
virprocess.h Add virProcessGetPids to get all tasks of a process 2015-06-16 12:38:03 +02:00
virrandom.c build: include correct header for time() 2015-04-14 13:24:51 -06:00
virrandom.h
virscsi.c Convert SCSI logical unit from unsigned int to unsigned long long 2015-06-22 16:03:33 -04:00
virscsi.h Convert SCSI logical unit from unsigned int to unsigned long long 2015-06-22 16:03:33 -04:00
virseclabel.c virseclabel: Resolve Coverity FORWARD_NULL issue 2014-07-14 05:44:20 -04:00
virseclabel.h virSecurityDeviceLabelDef: substitute 'norelabel' with 'relabel' 2014-07-11 10:36:02 +02:00
virsexpr.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virsexpr.h
virsocketaddr.c network: validate network NAT range 2015-08-10 13:06:56 -04:00
virsocketaddr.h network: validate DHCP ranges are completely within defined network 2015-06-02 12:40:07 -04:00
virstats.c maint: clean up _virDomainInterfaceStats 2014-09-17 11:28:48 -06:00
virstats.h maint: clean up _virDomainInterfaceStats 2014-09-17 11:28:48 -06:00
virstorageencryption.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virstorageencryption.h storage: encryption: Add deep copy function for storage encryption 2014-06-20 09:14:46 +02:00
virstoragefile.c qemu: Fix reporting of physical capacity for block devices 2015-08-07 13:28:50 +02:00
virstoragefile.h qemu: Fix reporting of physical capacity for block devices 2015-08-07 13:28:50 +02:00
virstring.c util: Add virStringGetFirstWithPrefix 2015-08-18 16:16:37 -07:00
virstring.h util: Add virStringGetFirstWithPrefix 2015-08-18 16:16:37 -07:00
virsysinfo.c virSysinfo: Introduce SMBIOS type 2 support 2015-06-18 10:10:26 +02:00
virsysinfo.h virSysinfo: Introduce SMBIOS type 2 support 2015-06-18 10:10:26 +02:00
virsystemd.c cgroup: Drop resource partition from virSystemdMakeScopeName 2015-07-22 07:12:56 +02:00
virsystemd.h cgroup: Drop resource partition from virSystemdMakeScopeName 2015-07-22 07:12:56 +02:00
virthread.c virCondWaitUntil: calculate timespec correctly 2015-04-16 15:39:22 +02:00
virthread.h virThread: Set thread job 2015-03-25 10:00:53 +01:00
virthreadjob.c Add support for tracking thread jobs 2015-03-25 10:00:53 +01:00
virthreadjob.h Add support for tracking thread jobs 2015-03-25 10:00:53 +01:00
virthreadpool.c threadpool: Switch to detached threads 2015-05-21 14:35:02 +02:00
virthreadpool.h virThreadPool: Set thread worker name 2015-03-25 10:00:53 +01:00
virtime.c Renamed internal __mon_yday into mon_yday to avoid conflicts 2014-10-28 14:44:18 -06:00
virtime.h util: virTimeFieldsThenRaw never returns negative 2014-07-25 12:06:07 +02:00
virtpm.c Indent top-level labels by one space in src/util/ 2014-03-25 14:58:40 +01:00
virtpm.h
virtypedparam.c util: Avoid Coverity FORWARD_NULL 2015-07-02 06:30:27 -04:00
virtypedparam.h util: virTypedParams{Filter,GetStringList} 2015-06-18 16:46:09 +02:00
viruri.c Introduce virStringStripIPv6Brackets 2014-10-15 09:25:33 +02:00
viruri.h
virusb.c usb: Remove redundant comment 2014-07-03 10:41:15 +02:00
virusb.h add 'driver' info to used_by 2014-03-04 12:24:13 +00:00
virutil.c util: Properly return error from virGetUserID and virGetGroupID stubs 2015-06-08 09:32:24 +02:00
virutil.h util: Add macro to overflow check integer assignments 2015-06-03 09:42:08 +02:00
viruuid.c Use K&R style for curly braces in src/util/ 2014-03-20 17:16:18 +01:00
viruuid.h maint: improve debug of libvirt-{qemu,lxc} apis 2014-01-02 22:17:11 -07:00
virxml.c Add virXMLValidateAgainstSchema helper method 2015-01-15 14:02:50 +00:00
virxml.h Add virXMLValidateAgainstSchema helper method 2015-01-15 14:02:50 +00:00