Bug 1721954 - [Mellanox mlx5_core] OVS offload doesn't work with action set_field to IPv6
Summary: [Mellanox mlx5_core] OVS offload doesn't work with action set_field to IPv6
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch
Version: FDP 19.C
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Marcelo Ricardo Leitner
QA Contact: qding
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-19 09:59 UTC by qding
Modified: 2019-06-27 18:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-27 18:38:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description qding 2019-06-19 09:59:50 UTC
Description of problem:

It seems that there is no actions for IPv6 like mod_nw_src/mod_nw_dst for IPv4, so set_field is used, but it's not hw offloaded

ovs-ofctl dump-flows ovsbr0
 cookie=0x0, duration=78.444s, table=0, n_packets=8, n_bytes=372, arp actions=NORMAL
 cookie=0x0, duration=78.439s, table=0, n_packets=7, n_bytes=602, icmp6,icmp_type=135,icmp_code=0 actions=NORMAL
 cookie=0x0, duration=78.434s, table=0, n_packets=3, n_bytes=250, icmp6,icmp_type=136,icmp_code=0 actions=NORMAL
 cookie=0x0, duration=78.429s, table=0, n_packets=12736855, n_bytes=18638715374, ip,in_port=vxlan123,nw_dst=10.1.1.1 actions=mod_dl_dst:00:de:ad:02:00:01,mod_nw_dst:192.168.123.10,output:eth0
 cookie=0x0, duration=78.425s, table=0, n_packets=320699, n_bytes=37213622, ip,in_port=eth0,nw_src=192.168.123.10 actions=mod_dl_dst:00:de:ad:01:00:01,mod_nw_src:10.1.1.1,output:vxlan123
 cookie=0x0, duration=78.420s, table=0, n_packets=14018771, n_bytes=20515750124, ipv6,in_port=vxlan123,ipv6_dst=2001:db8:10::1 actions=mod_dl_dst:00:de:ad:02:00:01,load:0x10->NXM_NX_IPV6_DST[0..63],load:0x20010db801920000->NXM_NX_IPV6_DST[64..127],output:eth0
 cookie=0x0, duration=78.416s, table=0, n_packets=298113, n_bytes=40537726, ipv6,in_port=eth0,ipv6_src=2001:db8:192::10 actions=mod_dl_dst:00:de:ad:01:00:01,load:0x1->NXM_NX_IPV6_SRC[0..63],load:0x20010db800100000->NXM_NX_IPV6_SRC[64..127],output:vxlan123

ovs-dpctl dump-flows
2019-06-19T09:50:06Z|00001|dpif_netlink|INFO|The kernel module does not support meters.
tunnel(tun_id=0x7b,src=192.168.1.1,dst=192.168.1.2,tp_dst=4789,flags(+key)),in_port(5),eth(dst=7e:ef:51:f6:00:cc),eth_type(0x0800),ipv4(dst=10.1.1.1,proto=1,frag=no), packets:371, bytes:36358, used:0.760s, actions:set(eth(dst=00:de:ad:02:00:01)),set(ipv4(dst=192.168.123.10)),2
in_port(2),eth(dst=76:80:98:a7:2f:28),eth_type(0x0800),ipv4(src=192.168.123.10,proto=1,tos=0/0x3,frag=no), packets:351, bytes:51948, used:0.760s, actions:set(tunnel(tun_id=0x7b,dst=192.168.1.1,ttl=64,tp_dst=4789,flags(key))),set(eth(dst=00:de:ad:01:00:01)),set(ipv4(src=10.1.1.1)),5
recirc_id(0),in_port(2),eth(src=00:de:ad:02:00:01,dst=33:33:ff:00:00:01),eth_type(0x86dd),ipv6(proto=58,tclass=0/0x3,frag=no),icmpv6(type=135,code=0), packets:0, bytes:0, used:never, actions:1,3,4,set(tunnel(tun_id=0x7b,dst=192.168.1.1,ttl=64,tp_dst=4789,flags(df|key))),5
recirc_id(0),in_port(3),eth(src=76:80:98:a7:2f:28,dst=00:de:ad:02:00:01),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136,code=0), packets:0, bytes:0, used:never, actions:2
recirc_id(0),tunnel(tun_id=0x7b,src=192.168.1.1,dst=192.168.1.2,flags(-df-csum+key)),in_port(5),eth(dst=72:70:15:84:2b:37),eth_type(0x86dd),ipv6(dst=2001:db8:10::1,proto=58,frag=no),icmpv6(type=128/0xfc), packets:344, bytes:40592, used:0.043s, actions:set(eth(dst=00:de:ad:02:00:01)),set(ipv6(dst=2001:db8:192::10)),2
recirc_id(0),in_port(2),eth(dst=76:80:98:a7:2f:28),eth_type(0x86dd),ipv6(src=2001:db8:192::10,proto=58,tclass=0/0x3,frag=no),icmpv6(type=128/0xfc), packets:344, bytes:40592, used:0.043s, actions:set(tunnel(tun_id=0x7b,dst=192.168.1.1,ttl=64,tp_dst=4789,flags(df|key))),set(eth(dst=00:de:ad:01:00:01)),set(ipv6(src=2001:db8:10::1)),5


RUN_CMD: tc -s filter show dev eth0 ingress
filter protocol ipv6 pref 2 flower chain 0 
filter protocol arp pref 3 flower chain 0 
filter protocol ip pref 4 flower chain 0 
filter protocol ip pref 4 flower chain 0 handle 0x1 
  dst_mac 76:80:98:a7:2f:28
  eth_type ipv4
  ip_proto icmp
  ip_tos 0/3
  src_ip 192.168.123.10
  ip_flags nofrag
  in_hw
	action order 1: tunnel_key set
	src_ip 0.0.0.0
	dst_ip 192.168.1.1
	key_id 123
	dst_port 4789
	nocsum
	ttl 64 pipe
	index 4 ref 1 bind 1 installed 37 sec used 37 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 2:  pedit action pipe keys 3
 	 index 4 ref 1 bind 1 installed 37 sec used 37 sec
	 key #0  at ipv4+12: val 0a010101 mask 00000000
	 key #1  at eth+0: val 00dead01 mask 00000000
	 key #2  at eth+4: val 00010000 mask 0000ffff
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 3: csum (iph) action pipe
	index 4 ref 1 bind 1 installed 37 sec used 37 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 4: mirred (Egress Redirect to device vxlan_sys_4789) stolen
 	index 3 ref 1 bind 1 installed 37 sec used 0 sec
 	Action statistics:
	Sent 51948 bytes 351 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 
	cookie len 16 cec4763221462eb4 

RUN_CMD: tc -s filter show dev eth0 egress
filter protocol ipv6 pref 2 flower chain 0 
filter protocol arp pref 3 flower chain 0 
filter protocol ip pref 4 flower chain 0 
filter protocol ip pref 4 flower chain 0 handle 0x1 
  dst_mac 76:80:98:a7:2f:28
  eth_type ipv4
  ip_proto icmp
  ip_tos 0/3
  src_ip 192.168.123.10
  ip_flags nofrag
  in_hw
	action order 1: tunnel_key set
	src_ip 0.0.0.0
	dst_ip 192.168.1.1
	key_id 123
	dst_port 4789
	nocsum
	ttl 64 pipe
	index 4 ref 1 bind 1 installed 37 sec used 37 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 2:  pedit action pipe keys 3
 	 index 4 ref 1 bind 1 installed 37 sec used 37 sec
	 key #0  at ipv4+12: val 0a010101 mask 00000000
	 key #1  at eth+0: val 00dead01 mask 00000000
	 key #2  at eth+4: val 00010000 mask 0000ffff
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 3: csum (iph) action pipe
	index 4 ref 1 bind 1 installed 37 sec used 37 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 4: mirred (Egress Redirect to device vxlan_sys_4789) stolen
 	index 3 ref 1 bind 1 installed 37 sec used 0 sec
 	Action statistics:
	Sent 51948 bytes 351 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 
	cookie len 16 cec4763221462eb4 

RUN_CMD: tc -s filter show dev vxlan_sys_4789 ingress
filter protocol ipv6 pref 2 flower chain 0 
filter protocol arp pref 3 flower chain 0 
filter protocol ip pref 4 flower chain 0 
filter protocol ip pref 4 flower chain 0 handle 0x1 
  dst_mac 7e:ef:51:f6:00:cc
  eth_type ipv4
  ip_proto icmp
  dst_ip 10.1.1.1
  enc_dst_ip 192.168.1.2
  enc_src_ip 192.168.1.1
  enc_key_id 123
  enc_dst_port 4789
  enc_tos 0/ff
  ip_flags nofrag
  in_hw
	action order 1: tunnel_key unset pipe
	index 1 ref 1 bind 1 installed 37 sec used 37 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 2:  pedit action pipe keys 3
 	 index 3 ref 1 bind 1 installed 37 sec used 37 sec
	 key #0  at ipv4+16: val c0a87b0a mask 00000000
	 key #1  at eth+0: val 00dead02 mask 00000000
	 key #2  at eth+4: val 00010000 mask 0000ffff
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 3: csum (iph) action pipe
	index 3 ref 1 bind 1 installed 37 sec used 37 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 4: mirred (Egress Redirect to device eth0) stolen
 	index 1 ref 1 bind 1 installed 37 sec used 0 sec
 	Action statistics:
	Sent 36358 bytes 371 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 
	cookie len 16 660883f5974ece71 

RUN_CMD: tc -s filter show dev vxlan_sys_4789 egress
filter protocol ipv6 pref 2 flower chain 0 
filter protocol arp pref 3 flower chain 0 
filter protocol ip pref 4 flower chain 0 
filter protocol ip pref 4 flower chain 0 handle 0x1 
  dst_mac 7e:ef:51:f6:00:cc
  eth_type ipv4
  ip_proto icmp
  dst_ip 10.1.1.1
  enc_dst_ip 192.168.1.2
  enc_src_ip 192.168.1.1
  enc_key_id 123
  enc_dst_port 4789
  enc_tos 0/ff
  ip_flags nofrag
  in_hw
	action order 1: tunnel_key unset pipe
	index 1 ref 1 bind 1 installed 37 sec used 37 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 2:  pedit action pipe keys 3
 	 index 3 ref 1 bind 1 installed 37 sec used 37 sec
	 key #0  at ipv4+16: val c0a87b0a mask 00000000
	 key #1  at eth+0: val 00dead02 mask 00000000
	 key #2  at eth+4: val 00010000 mask 0000ffff
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 3: csum (iph) action pipe
	index 3 ref 1 bind 1 installed 37 sec used 37 sec
	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

	action order 4: mirred (Egress Redirect to device eth0) stolen
 	index 1 ref 1 bind 1 installed 37 sec used 0 sec
 	Action statistics:
	Sent 36358 bytes 371 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 
	cookie len 16 660883f5974ece71 

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
05:49:55.746012 00:de:ad:01:00:01 > 00:de:ad:02:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:192::10: [icmp6 sum ok] ICMP6, echo request, seq 236
05:49:55.746073 00:de:ad:02:00:01 > 76:80:98:a7:2f:28, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:192::10 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 236
05:49:55.846000 00:de:ad:01:00:01 > 00:de:ad:02:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:192::10: [icmp6 sum ok] ICMP6, echo request, seq 237
05:49:55.846048 00:de:ad:02:00:01 > 76:80:98:a7:2f:28, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:192::10 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 237
05:49:55.946030 00:de:ad:01:00:01 > 00:de:ad:02:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:192::10: [icmp6 sum ok] ICMP6, echo request, seq 238
05:49:55.946087 00:de:ad:02:00:01 > 76:80:98:a7:2f:28, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:192::10 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 238
05:49:56.046112 00:de:ad:01:00:01 > 00:de:ad:02:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:192::10: [icmp6 sum ok] ICMP6, echo request, seq 239
05:49:56.046163 00:de:ad:02:00:01 > 76:80:98:a7:2f:28, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:192::10 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 239
05:49:56.146064 00:de:ad:01:00:01 > 00:de:ad:02:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:192::10: [icmp6 sum ok] ICMP6, echo request, seq 240
05:49:56.146121 00:de:ad:02:00:01 > 76:80:98:a7:2f:28, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:192::10 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 240
10 packets captured
10 packets received by filter
0 packets dropped by kernel
'ovs_test_tc_offload_floating_ip':8616: FAIL: packets should not be captured after offload.
tcpdump: listening on vxlan_sys_4789, link-type EN10MB (Ethernet), capture size 262144 bytes
05:50:06.247138 00:de:ad:01:00:01 > 72:70:15:84:2b:37, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:10::1: [icmp6 sum ok] ICMP6, echo request, seq 341
05:50:06.247269 00:de:ad:02:00:01 > 00:de:ad:01:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::1 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 341
05:50:06.347097 00:de:ad:01:00:01 > 72:70:15:84:2b:37, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:10::1: [icmp6 sum ok] ICMP6, echo request, seq 342
05:50:06.347271 00:de:ad:02:00:01 > 00:de:ad:01:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::1 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 342
05:50:06.447142 00:de:ad:01:00:01 > 72:70:15:84:2b:37, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:10::1: [icmp6 sum ok] ICMP6, echo request, seq 343
05:50:06.447269 00:de:ad:02:00:01 > 00:de:ad:01:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::1 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 343
05:50:06.547096 00:de:ad:01:00:01 > 72:70:15:84:2b:37, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:10::1: [icmp6 sum ok] ICMP6, echo request, seq 344
05:50:06.547270 00:de:ad:02:00:01 > 00:de:ad:01:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::1 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 344
05:50:06.647109 00:de:ad:01:00:01 > 72:70:15:84:2b:37, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::10 > 2001:db8:10::1: [icmp6 sum ok] ICMP6, echo request, seq 345
05:50:06.647253 00:de:ad:02:00:01 > 00:de:ad:01:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 64, next-header ICMPv6 (58) payload length: 64) 2001:db8:10::1 > 2001:db8:10::10: [icmp6 sum ok] ICMP6, echo reply, seq 345
10 packets captured
10 packets received by filter
0 packets dropped by kernel
'ovs_test_tc_offload_floating_ip':8624: FAIL: packets should not be captured after offload.


Version-Release number of selected component (if applicable):

[root@dell-per730-04 tc_offload]# uname -r
3.10.0-1055.el7.x86_64
[root@dell-per730-04 tc_offload]# rpm -q openvswitch2.11
openvswitch2.11-2.11.0-12.el7fdp.x86_64
[root@dell-per730-04 tc_offload]# 


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alaa Hleihel (NVIDIA Mellanox) 2019-06-27 14:14:33 UTC
This is not supported for ICMPv6.
(UDP/TCP over IPv6 are supported)

Comment 2 Alaa Hleihel (NVIDIA Mellanox) 2019-06-27 18:38:50 UTC
this is not supported due to HW limitation.
closing the BZ.


Note You need to log in before you can comment on or make changes to this bug.