On 12/22/25 10:26, jun.gu via discuss wrote:
On 12/22/25 06:07, Rukomoinikova Aleksandra via discuss wrote:
Hi! I tried to investigate this issue out of my own interest, and spent
quite a bit of time trying to reproduce this issue with hlimit==64, as
indicated in your real tracing.

I only got a match with nd_target in the megaflow when hoplimit=255,
which is strange since icmp_type == 128 normally shouldn't have hop
limit 255.

If it's not too much to ask, could you share openflow rules related to
IPv6 traffic that we have in openflow tables that are visible in the
trace, so that I can understand when such a situation could arise with
hop limit == 64 ? Thanks!

Thank you for your reply. The test case above may not be appropriate. I would like to provide more information. The following are the related OpenFlow tables: [root@node-4 bpf]# ovs-appctl ofproto/detrace ufid:3eef51b1-079a-4881-bf41-1dfad6cda5b0 cookie=0xc51dc48d, duration=1331s, n_packets=1471, n_bytes=168458, n_offload_packets=0, n_offload_bytes=0, priority=100,in_port=8,actions=set_field:0xd/0xffff->reg13,set_field:0xb->reg11,set_field:0xa->reg12,set_field:0x4->metadata,set_field:0x5->reg14,set_field:0/0xffff0000->reg13,resubmit(,8) cookie=0xa3a3a633, table_id=8, duration=1331s, n_packets=1483, n_bytes=170102, n_offload_packets=0, n_offload_bytes=0, priority=50,metadata=0x4,actions=set_field:0/0x1000->reg10,resubmit(,73),move:NXM_NX_REG10[12]->NXM_NX_XXREG0[111],resubmit(,9) cookie=0xc51dc48d, table_id=73, duration=1331s, n_packets=1364, n_bytes=159512, n_offload_packets=0, n_offload_bytes=0, priority=90,ipv6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=fd1f:9e62:3182:608c::a2,actions=resubmit(,74) table_id=254, duration=1331s, n_packets=14374, n_bytes=911972, n_offload_packets=0, n_offload_bytes=0, priority=0,reg0=0x2,actions=drop cookie=0x10b6d331, table_id=9, duration=1331s, n_packets=1475, n_bytes=168930, n_offload_packets=0, n_offload_bytes=0, priority=0,metadata=0x4,actions=resubmit(,10) cookie=0x85b2e9f1, table_id=10, duration=1331s, n_packets=1475, n_bytes=168930, n_offload_packets=0, n_offload_bytes=0, priority=0,metadata=0x4,actions=resubmit(,11) cookie=0x4dd51610, table_id=11, duration=1331s, n_packets=1475, n_bytes=168930, n_offload_packets=0, n_offload_bytes=0, priority=0,metadata=0x4,actions=resubmit(,12) cookie=0xb7e4af52, table_id=12, duration=1331s, n_packets=1328, n_bytes=156704, n_offload_packets=0, n_offload_bytes=0, priority=100,ipv6,metadata=0x4,actions=set_field:0x1000000000000000000000000/0x1000000000000000000000000->xxreg0,resubmit(,13) cookie=0x4ba8ec35, table_id=13, duration=1331s, n_packets=1328, n_bytes=156704, n_offload_packets=0, n_offload_bytes=0, priority=0,metadata=0x4,actions=resubmit(,14) cookie=0xa10f7aeb, table_id=14, duration=1331s, n_packets=1328, n_bytes=156704, n_offload_packets=0, n_offload_bytes=0, priority=100,ipv6,reg0=0x1/0x1,metadata=0x4,actions=ct(table=15,zone=NXM_NX_REG13[0..15])
[root@node-4 bpf]#
[root@node-4 bpf]# ovs-ofctl dump-flows br-int table=73
 cookie=0xc51dc48d, duration=1346.271s, table=73, n_packets=0, n_bytes=0, priority=95,arp,reg14=0x5,metadata=0x4 actions=resubmit(,74)  cookie=0x956323ac, duration=1346.266s, table=73, n_packets=0, n_bytes=0, priority=95,arp,reg14=0x4,metadata=0x4 actions=resubmit(,74)  cookie=0xc51dc48d, duration=1346.266s, table=73, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=::,ipv6_dst=ff02::/16,icmp_type=143,icmp_code=0 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1346.265s, table=73, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=::,ipv6_dst=ff02::/16,icmp_type=131,icmp_code=0 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1346.259s, table=73, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=::,ipv6_dst=ff02::/16,icmp_type=135,icmp_code=0 actions=resubmit(,74)  cookie=0xc51dc48d, duration=1346.266s, table=73, n_packets=1379, n_bytes=161282, priority=90,ipv6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=fd1f:9e62:3182:608c::a2 actions=resubmit(,74)  cookie=0xc51dc48d, duration=1346.261s, table=73, n_packets=108, n_bytes=9032, priority=90,ipv6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=fe80::f816:3eff:fece:bd06 actions=resubmit(,74)  cookie=0x956323ac, duration=1346.264s, table=73, n_packets=0, n_bytes=0, priority=90,ip,reg14=0x4,metadata=0x4,dl_src=fa:16:3e:14:72:eb,nw_src=192.168.11.90 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1346.261s, table=73, n_packets=0, n_bytes=0, priority=90,udp,reg14=0x4,metadata=0x4,dl_src=fa:16:3e:14:72:eb,nw_src=0.0.0.0,nw_dst=255.255.255.255,tp_src=68,tp_dst=67 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1346.266s, table=73, n_packets=0, n_bytes=0, priority=80,reg14=0x5,metadata=0x4 actions=load:0x1->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1346.264s, table=73, n_packets=12, n_bytes=1644, priority=80,reg14=0x4,metadata=0x4 actions=load:0x1->NXM_NX_REG10[12]
[root@node-4 bpf]#
[root@node-4 bpf]# ovs-ofctl dump-flows br-int table=74
 cookie=0xc51dc48d, duration=1348.770s, table=74, n_packets=76, n_bytes=6536, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.769s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.767s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=fa:16:3e:14:72:eb actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.756s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.769s, table=74, n_packets=36, n_bytes=2808, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.756s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.769s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.766s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_tll=fa:16:3e:14:72:eb actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.763s, table=74, n_packets=0, n_bytes=0, priority=90,arp,reg14=0x4,metadata=0x4,dl_src=fa:16:3e:14:72:eb,arp_spa=192.168.11.90,arp_sha=fa:16:3e:14:72:eb actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.759s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_target=fe80::f816:3eff:fece:bd06,nd_tll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.759s, table=74, n_packets=33, n_bytes=2574, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_target=fe80::f816:3eff:fece:bd06,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.768s, table=74, n_packets=0, n_bytes=0, priority=80,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=136 actions=load:0x1->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.766s, table=74, n_packets=0, n_bytes=0, priority=80,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=136 actions=load:0x1->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.762s, table=74, n_packets=0, n_bytes=0, priority=80,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=135 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.754s, table=74, n_packets=0, n_bytes=0, priority=80,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=135 actions=load:0->NXM_NX_REG10[12]  cookie=0x956323ac, duration=1348.766s, table=74, n_packets=0, n_bytes=0, priority=80,arp,reg14=0x4,metadata=0x4 actions=load:0x1->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.757s, table=74, n_packets=0, n_bytes=0, priority=80,arp,reg14=0x5,metadata=0x4 actions=load:0x1->NXM_NX_REG10[12]

After the classifier traverses table 74, the nd_target and nd_ttl fields will be set in the megaflow. I found that the following OpenFlow rule generates these two fields:  cookie=0xc51dc48d, duration=1348.769s, table=74, n_packets=36, n_bytes=2808, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]

Based on the above OpenFlow tables, I have constructed a more appropriate test case.
AT_SETUP([flow classifier - ipv6 ND dependency test])
OVS_VSWITCHD_START
add_of_ports br0 1 2
AT_DATA([flows.txt], [dnl
 table=0, in_port=1,priority=100 actions=load:0xd->NXM_NX_REG13[[0..15]],load:0xb->NXM_NX_REG11[[]],load:0xa->NXM_NX_REG12[[]],load:0x4->OXM_OF_METADATA[[]],load:0x5->NXM_NX_REG14[[]],load:0->NXM_NX_REG13[[16..31]],resubmit(,8)  table=8, priority=50,metadata=0x4 actions=load:0->NXM_NX_REG10[[12]],resubmit(,73),output(2)
 table=73, priority=95,arp,reg14=0x5,metadata=0x4 actions=resubmit(,74)
 table=73, priority=95,arp,reg14=0x4,metadata=0x4 actions=resubmit(,74)
 table=73, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=::,ipv6_dst=ff02::/16,icmp_type=143,icmp_code=0 actions=load:0->NXM_NX_REG10[[12]]  table=73, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=::,ipv6_dst=ff02::/16,icmp_type=131,icmp_code=0 actions=load:0->NXM_NX_REG10[[12]]  table=73, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=::,ipv6_dst=ff02::/16,icmp_type=135,icmp_code=0 actions=resubmit(,74)  table=73, priority=90,ipv6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=fd1f:9e62:3182:608c::a2 actions=resubmit(,74)  table=73, priority=90,ipv6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,ipv6_src=fe80::f816:3eff:fece:bd06 actions=resubmit(,74)  table=73, priority=90,ip,reg14=0x4,metadata=0x4,dl_src=fa:16:3e:14:72:eb,nw_src=192.168.11.90 actions=load:0->NXM_NX_REG10[[12]]  table=73, priority=90,udp,reg14=0x4,metadata=0x4,dl_src=fa:16:3e:14:72:eb,nw_src=0.0.0.0,nw_dst=255.255.255.255,tp_src=68,tp_dst=67 actions=load:0->NXM_NX_REG10[[12]]  table=73, priority=80,reg14=0x5,metadata=0x4 actions=load:0x1->NXM_NX_REG10[[12]]  table=73, priority=80,reg14=0x4,metadata=0x4 actions=load:0x1->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=fa:16:3e:14:72:eb actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=135,icmp_code=0,nd_sll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_tll=fa:16:3e:14:72:eb actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,arp,reg14=0x4,metadata=0x4,dl_src=fa:16:3e:14:72:eb,arp_spa=192.168.11.90,arp_sha=fa:16:3e:14:72:eb actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_target=fe80::f816:3eff:fece:bd06,nd_tll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=90,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=136,icmp_code=0,nd_target=fe80::f816:3eff:fece:bd06,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=80,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=136 actions=load:0x1->NXM_NX_REG10[[12]]  table=74, priority=80,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=136 actions=load:0x1->NXM_NX_REG10[[12]]  table=74, priority=80,icmp6,reg14=0x5,metadata=0x4,nw_ttl=255,icmp_type=135 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=80,icmp6,reg14=0x4,metadata=0x4,nw_ttl=255,icmp_type=135 actions=load:0->NXM_NX_REG10[[12]]  table=74, priority=80,arp,reg14=0x4,metadata=0x4 actions=load:0x1->NXM_NX_REG10[[12]]  table=74, priority=80,arp,reg14=0x5,metadata=0x4 actions=load:0x1->NXM_NX_REG10[[12]]
])
ovs-ofctl add-flows br0 flows.txt

AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,eth_src=fa:16:3e:ce:bd:06,eth_dst=fa:16:3e:88:32:5c,dl_type=0x86dd,ipv6_src=fd1f:9e62:3182:608c::a2,ipv6_dst=fd1f:9e62:3182:608c::24,nw_proto=58,icmpv6_type=128,icmpv6_code=0"], [0], [stdout])
AT_CHECK([tail -2 stdout], [0],
  [Megaflow: recirc_id=0,eth,icmp6,in_port=1,dl_src=fa:16:3e:ce:bd:06,ipv6_src=fd1f:9e62:3182:608c::a2,ipv6_dst=fd1f::/16,nw_ttl=0,nw_frag=no,icmp_type=0x80/0xf8,nd_target=::,nd_tll=00:00:00:00:00:00
Datapath actions: 2
])
OVS_VSWITCHD_STOP
AT_CLEANUP

When the nw_ttl field is added to the following OpenFlow rules, the nd_target and nd_tll fields will not be included in the megaflow.  cookie=0xc51dc48d, duration=1348.769s, table=74, n_packets=36, n_bytes=2808, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,*nw_ttl=255*,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=00:00:00:00:00:00 actions=load:0->NXM_NX_REG10[12]  cookie=0xc51dc48d, duration=1348.756s, table=74, n_packets=0, n_bytes=0, priority=90,icmp6,reg14=0x5,metadata=0x4,dl_src=fa:16:3e:ce:bd:06,*nw_ttl=255*,icmp_type=136,icmp_code=0,nd_target=fd1f:9e62:3182:608c::a2,nd_tll=fa:16:3e:ce:bd:06 actions=load:0->NXM_NX_REG10[12]

Although this approach can fix our issue, I'm not sure whether it has any other impacts.

If this approach is acceptable, I will submit a patch to the OVN community.

Thanks, Jun.

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

Reply via email to