diff options
author | Paolo Valerio <pvalerio@redhat.com> | 2021-04-07 13:43:06 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2021-06-30 23:17:34 +0200 |
commit | df5519617c5c09a04921d6a92e2aff5150b04fa5 (patch) | |
tree | 33dcae1ba650ebaceb1a10a913c18b83e93680c7 | |
parent | bf8b96db4314db4d2772af1ff457bc07f7ab7eb1 (diff) | |
download | openvswitch-df5519617c5c09a04921d6a92e2aff5150b04fa5.tar.gz |
netdev-offload-tc: Use nl_msg_put_flag for OVS_TUNNEL_KEY_ATTR_CSUM.
When a tunnel port gets added to the bridge setting the checksum option
to true:
ovs-vsctl add-port br0 geneve0 \
-- set interface geneve0 type=geneve \
options:remote_ip=<remote_ip> options:key=<key> options:csum=true
the flow dump for the outgoing traffic will include a
"bad key length 1 ..." message:
ovs-appctl dpctl/dump-flows --names -m
ufid:<>, ..., dp:tc,
actions:set(tunnel(tun_id=<>,dst=<>,ttl=64,tp_dst=6081,
key6(bad key length 1, expected 0)(01)flags(key)))
,genev_sys_6081
This is due to a mismatch present between the expected length (zero
for OVS_TUNNEL_KEY_ATTR_CSUM in ovs_tun_key_attr_lens) and the
current one.
With this patch the same flow dump becomes:
ovs-appctl dpctl/dump-flows --names -m
ufid:<>, ..., dp:tc,
actions:set(tunnel(tun_id=<>,dst=<>,ttl=64,tp_dst=6081,
flags(csum|key))),genev_sys_6081
Fixes: d9677a1f0eaf ("netdev-tc-offloads: TC csum option is not matched with tunnel configuration")
Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r-- | lib/netdev-offload-tc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c index b8fd1d82f..68c4c7ebd 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -689,8 +689,7 @@ parse_tc_flower_to_match(struct tc_flower *flower, action->encap.tp_dst); } if (!action->encap.no_csum) { - nl_msg_put_u8(buf, OVS_TUNNEL_KEY_ATTR_CSUM, - !action->encap.no_csum); + nl_msg_put_flag(buf, OVS_TUNNEL_KEY_ATTR_CSUM); } parse_tc_flower_geneve_opts(action, buf); |