You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit introduces two NF-related logical actions, nf_learn_orig_inport()
and nf_lookup_orig_inport(), used to store and retrieve a packet's original
ingress port. These actions will be used by northd to identify and drop
post-NF loopback copies in logical pipeline stages.
- "nf_learn_orig_inport(ipv6 = true|false)" installs a learned flow in
a new OFTABLE_NF_ORIG_INPORT_LEARN table. The learned flow is keyed
on the logical datapath and the IP source and destination addresses
and matches future packets whose logical output port equals the
logical input port of the packet that created it, i.e. packets that
are about to be sent back out of the port they entered on. Matching
packets get MLF_POST_NF_LOOP_BACK set. The learned flow has a 60s idle
timeout.
- "R = nf_lookup_orig_inport()" resubmits to the learn table and stores
the result of the lookup (MLF_POST_NF_LOOP_BACK) into the 1-bit field R.
Acked-by: Aditya Mehakare <aditya.mehakare@nutanix.com>
CC: Sragdhara Datta Chaudhuri <sragdha.chaudhu@nutanix.com>
Assisted-by: Claude Opus 4.7, Cursor
Signed-off-by: Naveen Yerramneni <naveen.yerramneni@nutanix.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Cannot use numeric field ip4.src where string field is required.
2131
2131
2132
+
# nf_learn_orig_inport / nf_lookup_orig_inport
2133
+
nf_learn_orig_inport(ipv6 = false);
2134
+
encodes as learn(table=OFTABLE_NF_ORIG_INPORT_LEARN,idle_timeout=60,delete_learned,cookie=0xaaaaaaaa,OXM_OF_METADATA[[]],eth_type=0x800,NXM_OF_IP_SRC[[]],NXM_OF_IP_DST[[]],NXM_NX_REG15[[]]=NXM_NX_REG14[[0..-1]],load:0x1->NXM_NX_REG10[[26]])
2135
+
2136
+
nf_learn_orig_inport(ipv6 = true);
2137
+
encodes as learn(table=OFTABLE_NF_ORIG_INPORT_LEARN,idle_timeout=60,delete_learned,cookie=0xaaaaaaaa,OXM_OF_METADATA[[]],eth_type=0x86dd,NXM_NX_IPV6_SRC[[]],NXM_NX_IPV6_DST[[]],NXM_NX_REG15[[]]=NXM_NX_REG14[[0..-1]],load:0x1->NXM_NX_REG10[[26]])
2138
+
2139
+
nf_learn_orig_inport();
2140
+
Syntax error at `)' invalid parameter.
2141
+
2142
+
nf_learn_orig_inport(ipv6 = maybe);
2143
+
Syntax error at `maybe' expecting true or false.
2144
+
2145
+
reg0[[0]] = nf_lookup_orig_inport();
2146
+
encodes as set_field:0/0x4000000->reg10,resubmit(,OFTABLE_NF_ORIG_INPORT_LEARN),move:NXM_NX_REG10[[26]]->NXM_NX_XXREG0[[96]]
2147
+
2148
+
reg0 = nf_lookup_orig_inport();
2149
+
Cannot use 32-bit field reg0[[0..31]] where 1-bit field is required.
2150
+
2132
2151
# check_in_port_sec
2133
2152
reg0[[0]] = check_in_port_sec();
2134
2153
encodes as set_field:0/0x1000->reg10,resubmit(,OFTABLE_CHK_IN_PORT_SEC),move:NXM_NX_REG10[[12]]->NXM_NX_XXREG0[[96]]
0 commit comments