diff mbox series

[ovs-dev,v3,3/5] netdev-offload-tc: Use masks instead of keys while parsing tunnel attributes.

Message ID 20220814144603.2058894-4-i.maximets@ovn.org
State Accepted
Commit 7a26634678a3c7bd109e99ddad057a1133764da4
Headers show
Series tc: Fixes for tunnel offloading. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Ilya Maximets Aug. 14, 2022, 2:46 p.m. UTC
If the key is zero, it doesn't mean we don't need to match on it.
Masks should be checked instead.

Fixes: 49a7961fca65 ("lib/tc: Avoid matching on tunnel ttl or tos if not needed")
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 lib/netdev-offload-tc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c
index 74aefef68..1ab12ecfe 100644
--- a/lib/netdev-offload-tc.c
+++ b/lib/netdev-offload-tc.c
@@ -1117,15 +1117,15 @@  parse_tc_flower_to_match(struct tc_flower *flower,
                                           &flower->key.tunnel.ipv6.ipv6_src,
                                           &flower->mask.tunnel.ipv6.ipv6_src);
         }
-        if (flower->key.tunnel.tos) {
+        if (flower->mask.tunnel.tos) {
             match_set_tun_tos_masked(match, flower->key.tunnel.tos,
                                      flower->mask.tunnel.tos);
         }
-        if (flower->key.tunnel.ttl) {
+        if (flower->mask.tunnel.ttl) {
             match_set_tun_ttl_masked(match, flower->key.tunnel.ttl,
                                      flower->mask.tunnel.ttl);
         }
-        if (flower->key.tunnel.tp_dst) {
+        if (flower->mask.tunnel.tp_dst) {
             match_set_tun_tp_dst_masked(match, flower->key.tunnel.tp_dst,
                                         flower->mask.tunnel.tp_dst);
         }