* virNetDevOpenvswitchInterfaceSetQos:
* @ifname: on which interface
* @bandwidth: rates to set (may be NULL)
+ * @vmuuid: the Domain UUID that has this interface
* @swapped: true if IN/OUT should be set contrariwise
*
* Update qos configuration of an OVS port.
int
virNetDevOpenvswitchInterfaceSetQos(const char *ifname,
const virNetDevBandwidth *bandwidth,
- const unsigned char *vmid,
+ const unsigned char *vmuuid,
bool swapped)
{
virNetDevBandwidthRate *rx = NULL; /* From domain POV */
}
if (!bandwidth->out && !bandwidth->in) {
- if (virNetDevOpenvswitchInterfaceClearQos(ifname, vmid) < 0) {
+ if (virNetDevOpenvswitchInterfaceClearQos(ifname, vmuuid) < 0) {
VIR_WARN("Clean qos for interface %s failed", ifname);
}
return 0;
/* find queue */
cmd = virNetDevOpenvswitchCreateCmd();
- virUUIDFormat(vmid, vmuuidstr);
+ virUUIDFormat(vmuuid, vmuuidstr);
vmid_ex_id = g_strdup_printf("external-ids:vm-id=\"%s\"", vmuuidstr);
ifname_ex_id = g_strdup_printf("external-ids:ifname=\"%s\"", ifname);
virCommandAddArgList(cmd, "--no-heading", "--columns=_uuid", "find", "queue",
int
virNetDevOpenvswitchInterfaceClearQos(const char *ifname,
- const unsigned char *vmid)
+ const unsigned char *vmuuid)
{
char vmuuidstr[VIR_UUID_STRING_BUFLEN];
g_autoptr(virCommand) cmd = NULL;
/* find qos */
cmd = virNetDevOpenvswitchCreateCmd();
- virUUIDFormat(vmid, vmuuidstr);
+ virUUIDFormat(vmuuid, vmuuidstr);
vmid_ex_id = g_strdup_printf("external-ids:vm-id=\"%s\"", vmuuidstr);
virCommandAddArgList(cmd, "--no-heading", "--columns=_uuid", "find", "qos", vmid_ex_id, NULL);
virCommandSetOutputBuffer(cmd, &qos_uuid);
int virNetDevOpenvswitchInterfaceSetQos(const char *ifname,
const virNetDevBandwidth *bandwidth,
- const unsigned char *vmid,
+ const unsigned char *vmuuid,
bool swapped)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceClearQos(const char *ifname,
- const unsigned char *vmid)
+ const unsigned char *vmuuid)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;