mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 23:25:24 +00:00
Rename high level macvlan creation APIs
Rename virNetDevMacVLanCreate to virNetDevMacVLanCreateWithVPortProfile and virNetDevMacVLanDelete to virNetDevMacVLanDeleteWithVPortProfile To make way for renaming the other macvlan creation APIs in interface.c * util/virnetdevmacvlan.c, util/virnetdevmacvlan.h, qemu/qemu_command.c, qemu/qemu_hotplug.c, qemu/qemu_process.c: Rename APIs
This commit is contained in:
parent
896104c9f0
commit
191090ae27
@ -149,7 +149,8 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
|
|||||||
net->model && STREQ(net->model, "virtio"))
|
net->model && STREQ(net->model, "virtio"))
|
||||||
vnet_hdr = 1;
|
vnet_hdr = 1;
|
||||||
|
|
||||||
rc = virNetDevMacVLanCreate(net->ifname, net->mac,
|
rc = virNetDevMacVLanCreateWithVPortProfile(
|
||||||
|
net->ifname, net->mac,
|
||||||
virDomainNetGetActualDirectDev(net),
|
virDomainNetGetActualDirectDev(net),
|
||||||
virDomainNetGetActualDirectMode(net),
|
virDomainNetGetActualDirectMode(net),
|
||||||
vnet_hdr, def->uuid,
|
vnet_hdr, def->uuid,
|
||||||
|
@ -1910,7 +1910,8 @@ int qemuDomainDetachNetDevice(struct qemud_driver *driver,
|
|||||||
virDomainConfNWFilterTeardown(detach);
|
virDomainConfNWFilterTeardown(detach);
|
||||||
|
|
||||||
if (virDomainNetGetActualType(detach) == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
if (virDomainNetGetActualType(detach) == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
||||||
ignore_value(virNetDevMacVLanDelete(detach->ifname, detach->mac,
|
ignore_value(virNetDevMacVLanDeleteWithVPortProfile(
|
||||||
|
detach->ifname, detach->mac,
|
||||||
virDomainNetGetActualDirectDev(detach),
|
virDomainNetGetActualDirectDev(detach),
|
||||||
virDomainNetGetActualDirectMode(detach),
|
virDomainNetGetActualDirectMode(detach),
|
||||||
virDomainNetGetActualDirectVirtPortProfile(detach),
|
virDomainNetGetActualDirectVirtPortProfile(detach),
|
||||||
|
@ -3411,7 +3411,8 @@ void qemuProcessStop(struct qemud_driver *driver,
|
|||||||
for (i = 0; i < def->nnets; i++) {
|
for (i = 0; i < def->nnets; i++) {
|
||||||
virDomainNetDefPtr net = def->nets[i];
|
virDomainNetDefPtr net = def->nets[i];
|
||||||
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
||||||
ignore_value(virNetDevMacVLanDelete(net->ifname, net->mac,
|
ignore_value(virNetDevMacVLanDeleteWithVPortProfile(
|
||||||
|
net->ifname, net->mac,
|
||||||
virDomainNetGetActualDirectDev(net),
|
virDomainNetGetActualDirectDev(net),
|
||||||
virDomainNetGetActualDirectMode(net),
|
virDomainNetGetActualDirectMode(net),
|
||||||
virDomainNetGetActualDirectVirtPortProfile(net),
|
virDomainNetGetActualDirectVirtPortProfile(net),
|
||||||
|
@ -215,7 +215,7 @@ static const uint32_t modeMap[VIR_NETDEV_MACVLAN_MODE_LAST] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virNetDevMacVLanCreate:
|
* virNetDevMacVLanCreateWithVPortProfile:
|
||||||
* Create an instance of a macvtap device and open its tap character
|
* Create an instance of a macvtap device and open its tap character
|
||||||
* device.
|
* device.
|
||||||
* @tgifname: Interface name that the macvtap is supposed to have. May
|
* @tgifname: Interface name that the macvtap is supposed to have. May
|
||||||
@ -234,7 +234,7 @@ static const uint32_t modeMap[VIR_NETDEV_MACVLAN_MODE_LAST] = {
|
|||||||
* negative value otherwise with error reported.
|
* negative value otherwise with error reported.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int virNetDevMacVLanCreate(const char *tgifname,
|
int virNetDevMacVLanCreateWithVPortProfile(const char *tgifname,
|
||||||
const unsigned char *macaddress,
|
const unsigned char *macaddress,
|
||||||
const char *linkdev,
|
const char *linkdev,
|
||||||
enum virNetDevMacVLanMode mode,
|
enum virNetDevMacVLanMode mode,
|
||||||
@ -357,7 +357,7 @@ link_del_exit:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* delMacvtap:
|
* virNetDevMacVLanDeleteWithVPortProfile:
|
||||||
* @ifname : The name of the macvtap interface
|
* @ifname : The name of the macvtap interface
|
||||||
* @linkdev: The interface name of the NIC to connect to the external bridge
|
* @linkdev: The interface name of the NIC to connect to the external bridge
|
||||||
* @virtPortProfile: pointer to object holding the virtual port profile data
|
* @virtPortProfile: pointer to object holding the virtual port profile data
|
||||||
@ -366,7 +366,7 @@ link_del_exit:
|
|||||||
* it with the switch if port profile parameters
|
* it with the switch if port profile parameters
|
||||||
* were provided.
|
* were provided.
|
||||||
*/
|
*/
|
||||||
int virNetDevMacVLanDelete(const char *ifname,
|
int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
|
||||||
const unsigned char *macaddr,
|
const unsigned char *macaddr,
|
||||||
const char *linkdev,
|
const char *linkdev,
|
||||||
int mode,
|
int mode,
|
||||||
@ -392,7 +392,7 @@ int virNetDevMacVLanDelete(const char *ifname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else /* ! WITH_MACVTAP */
|
#else /* ! WITH_MACVTAP */
|
||||||
int virNetDevMacVLanCreate(const char *ifname ATTRIBUTE_UNUSED,
|
int virNetDevMacVLanCreateWithVPortProfile(const char *ifname ATTRIBUTE_UNUSED,
|
||||||
const unsigned char *macaddress ATTRIBUTE_UNUSED,
|
const unsigned char *macaddress ATTRIBUTE_UNUSED,
|
||||||
const char *linkdev ATTRIBUTE_UNUSED,
|
const char *linkdev ATTRIBUTE_UNUSED,
|
||||||
enum virNetDevMacVLanMode mode ATTRIBUTE_UNUSED,
|
enum virNetDevMacVLanMode mode ATTRIBUTE_UNUSED,
|
||||||
@ -409,7 +409,7 @@ int virNetDevMacVLanCreate(const char *ifname ATTRIBUTE_UNUSED,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virNetDevMacVLanDelete(const char *ifname ATTRIBUTE_UNUSED,
|
int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname ATTRIBUTE_UNUSED,
|
||||||
const unsigned char *macaddress ATTRIBUTE_UNUSED,
|
const unsigned char *macaddress ATTRIBUTE_UNUSED,
|
||||||
const char *linkdev ATTRIBUTE_UNUSED,
|
const char *linkdev ATTRIBUTE_UNUSED,
|
||||||
int mode ATTRIBUTE_UNUSED,
|
int mode ATTRIBUTE_UNUSED,
|
||||||
|
@ -39,7 +39,7 @@ enum virNetDevMacVLanMode {
|
|||||||
};
|
};
|
||||||
VIR_ENUM_DECL(virNetDevMacVLanMode)
|
VIR_ENUM_DECL(virNetDevMacVLanMode)
|
||||||
|
|
||||||
int virNetDevMacVLanCreate(const char *ifname,
|
int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
|
||||||
const unsigned char *macaddress,
|
const unsigned char *macaddress,
|
||||||
const char *linkdev,
|
const char *linkdev,
|
||||||
enum virNetDevMacVLanMode mode,
|
enum virNetDevMacVLanMode mode,
|
||||||
@ -53,7 +53,7 @@ int virNetDevMacVLanCreate(const char *ifname,
|
|||||||
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
|
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
|
||||||
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int virNetDevMacVLanDelete(const char *ifname,
|
int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
|
||||||
const unsigned char *macaddress,
|
const unsigned char *macaddress,
|
||||||
const char *linkdev,
|
const char *linkdev,
|
||||||
int mode,
|
int mode,
|
||||||
|
Loading…
Reference in New Issue
Block a user