From: Maor Dickman <[email protected]>

The cited commit reserved lower tc priorities for IP ethertypes in order
to give IP traffic higher priority than other management traffic.
In case of of vlan encap traffic, IP traffic will still get lower
priority.

Fix it by also reserving low priority tc prio for vlan.

Fixes: c230c7579c14 ("netdev-offload-tc: Reserve lower tc prios for ip 
ethertypes")
Signed-off-by: Maor Dickman <[email protected]>
Acked-by: Roi Dayan <[email protected]>
---
 lib/netdev-offload-tc.c | 2 ++
 lib/tc.h                | 1 +
 2 files changed, 3 insertions(+)

diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c
index 921d5231777e..3be1c08d24f6 100644
--- a/lib/netdev-offload-tc.c
+++ b/lib/netdev-offload-tc.c
@@ -400,6 +400,8 @@ get_next_available_prio(ovs_be16 protocol)
             return TC_RESERVED_PRIORITY_IPV4;
         } else if (protocol == htons(ETH_P_IPV6)) {
             return TC_RESERVED_PRIORITY_IPV6;
+        } else if (protocol == htons(ETH_P_8021Q)) {
+            return TC_RESERVED_PRIORITY_VLAN;
         }
     }
 
diff --git a/lib/tc.h b/lib/tc.h
index fdbcf4b7cb25..8442c8d8b8cf 100644
--- a/lib/tc.h
+++ b/lib/tc.h
@@ -51,6 +51,7 @@ enum tc_flower_reserved_prio {
     TC_RESERVED_PRIORITY_POLICE,
     TC_RESERVED_PRIORITY_IPV4,
     TC_RESERVED_PRIORITY_IPV6,
+    TC_RESERVED_PRIORITY_VLAN,
     __TC_RESERVED_PRIORITY_MAX
 };
 #define TC_RESERVED_PRIORITY_MAX (__TC_RESERVED_PRIORITY_MAX -1)
-- 
2.44.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to