[PATCH 0/2] Unify calculation of ovs and tc.

For other interface type, values in tc rules are calculated by multiply by 8*1000 instead of 8*1024. Related link: https://listman.redhat.com/archives/libvir-list/2021-October/msg01121.html zhangjl02 (2): virnetdevopenvswitch: unify calculation of ovs and tc. For other interface type, values in tc rules are calculated by multiply by 8*1000 instead of 8*1024. virnetdevopenvswitchtest: fix inbound value calculation src/util/virnetdevopenvswitch.c | 2 +- tests/virnetdevopenvswitchtest.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.30.2.windows.1

From: zhangjl02 <zhangjl02@inspur.com> Signed-off-by: zhangjl02 <zhangjl02@inspur.com> --- src/util/virnetdevopenvswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 8955f0fa66..250726a633 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -642,7 +642,7 @@ virNetDevOpenvswitchFindUUID(const char *table, * However other_config in ovs qos is in bit. * ingress_policing_rate in ovs interface is in kbit. */ -#define VIR_NETDEV_TX_TO_OVS 8192 +#define VIR_NETDEV_TX_TO_OVS 8000 #define VIR_NETDEV_RX_TO_OVS 8 /** -- 2.30.2.windows.1

On 11/1/21 8:39 AM, jx8zjs wrote:
From: zhangjl02 <zhangjl02@inspur.com>
Signed-off-by: zhangjl02 <zhangjl02@inspur.com> --- src/util/virnetdevopenvswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 8955f0fa66..250726a633 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -642,7 +642,7 @@ virNetDevOpenvswitchFindUUID(const char *table, * However other_config in ovs qos is in bit. * ingress_policing_rate in ovs interface is in kbit. */ -#define VIR_NETDEV_TX_TO_OVS 8192 +#define VIR_NETDEV_TX_TO_OVS 8000 #define VIR_NETDEV_RX_TO_OVS 8
/**
The other patch should have been merged into this one, because we don't allow broken tests between commits. I'm squashing it in, breaking the commit message into multiple lines and pushing. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal

From: zhangjl02 <zhangjl02@inspur.com> Signed-off-by: zhangjl02 <zhangjl02@inspur.com> --- tests/virnetdevopenvswitchtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/virnetdevopenvswitchtest.c b/tests/virnetdevopenvswitchtest.c index 2a20ba82d0..57860f4bc4 100644 --- a/tests/virnetdevopenvswitchtest.c +++ b/tests/virnetdevopenvswitchtest.c @@ -274,10 +274,10 @@ mymain(void) OVS_VSCTL " --timeout=5 set port tap-fake qos=@qos1" " 'external-ids:vm-id=\"66616b65-7575-6964-0000-000000000000\"'" " 'external-ids:ifname=\"tap-fake\"'" - " -- --id=@qos1 create qos type=linux-htb other_config:min-rate=163840000" + " -- --id=@qos1 create qos type=linux-htb other_config:min-rate=160000000" " queues:0=@queue0 'external-ids:vm-id=\"66616b65-7575-6964-0000-000000000000\"'" " 'external-ids:ifname=\"tap-fake\"'" - " -- --id=@queue0 create queue other_config:min-rate=163840000 " + " -- --id=@queue0 create queue other_config:min-rate=160000000 " "'external-ids:vm-id=\"66616b65-7575-6964-0000-000000000000\"'" " 'external-ids:ifname=\"tap-fake\"'\n" OVS_VSCTL " --timeout=5 set Interface tap-fake ingress_policing_rate=0 ingress_policing_burst=0\n")); -- 2.30.2.windows.1
participants (2)
-
jx8zjs
-
Michal Prívozník