I set the memif0/2 as the arp proxy, with addr: 10.10.2.0/24.
It goes to "ip4-flow-classify" but becomes misses...
vpp# classify table mask hex 00000000000000ff0000ffffffffffffffffffff000000000000000000000000 buckets 16
vpp# classify session opaque-index 0 table-index 0 match hex 000000000000000600000a0a02010a0a0202300c000000000000000000000000 action set-ip4-fib-id 100
vpp# classify session opaque-index 1 table-index 0 match hex 000000000000000600000a0a02010a0a0202306f000000000000000000000000 action set-ip4-fib-id 200
**** Before test
vpp# show err
Count Node Reason
8 arp-proxy ARP replies sent
117 ethernet-input no error
**** After test
vpp# show err
Count Node Reason
9 arp-proxy ARP replies sent
6 ip4-glean ARP requests sent
6 ip4-flow-classify Flow classify misses
117 ethernet-input no error
vpp# show trace
------------------- Start of thread 0 vpp_main -------------------
Packet 1
00:26:33:904177: memif-input
memif: hw_if_index 2 next-index 4
slot: ring 0
00:26:33:904194: ethernet-input
IP4: b2:5f:84:5e:0b:43 -> 02:fe:5f:e8:9a:43
00:26:33:904204: ip4-input
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa35
fragment id 0x7870, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x712e
00:26:33:913725: ip4-flow-classify
FLOW_CLASSIFY: sw_if_index 2 next 1 table 0 offset -1
00:26:33:913764: ip4-lookup
fib 0 dpo-idx 3 flow hash: 0x00000000
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa35
fragment id 0x7870, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x712e
00:26:33:948054: ip4-glean
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa35
fragment id 0x7870, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x712e
00:26:33:948069: memif0/2-output
memif0/2
ARP: 02:fe:5f:e8:9a:43 -> ff:ff:ff:ff:ff:ff
request, type ethernet/IP4, address size 6/4
02:fe:5f:e8:9a:43/10.10.2.0 -> 00:00:00:00:00:00/10.10.2.2
00:26:33:948072: error-drop
rx:memif0/2
00:26:33:948076: drop
ip4-glean: ARP requests sent
Packet 2
00:26:34:893852: memif-input
memif: hw_if_index 2 next-index 4
slot: ring 0
00:26:34:893859: ethernet-input
IP4: b2:5f:84:5e:0b:43 -> 02:fe:5f:e8:9a:43
00:26:34:893863: ip4-input
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa34
fragment id 0x7871, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x6d44
00:26:34:893867: ip4-flow-classify
FLOW_CLASSIFY: sw_if_index 2 next 1 table 0 offset -1
00:26:34:893873: ip4-lookup
fib 0 dpo-idx 3 flow hash: 0x00000000
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa34
fragment id 0x7871, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x6d44
00:26:34:893876: ip4-glean
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa34
fragment id 0x7871, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x6d44
00:26:34:893879: memif0/2-output
memif0/2
ARP: 02:fe:5f:e8:9a:43 -> ff:ff:ff:ff:ff:ff
request, type ethernet/IP4, address size 6/4
02:fe:5f:e8:9a:43/10.10.2.0 -> 00:00:00:00:00:00/10.10.2.2
00:26:34:893880: error-drop
rx:memif0/2
00:26:34:893883: drop
ip4-glean: ARP requests sent
Packet 3
00:26:36:921068: memif-input
memif: hw_if_index 2 next-index 4
slot: ring 0
00:26:36:921077: ethernet-input
IP4: b2:5f:84:5e:0b:43 -> 02:fe:5f:e8:9a:43
00:26:36:921081: ip4-input
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa33
fragment id 0x7872, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x6564
00:26:36:921085: ip4-flow-classify
FLOW_CLASSIFY: sw_if_index 2 next 1 table 0 offset -1
00:26:36:921091: ip4-lookup
fib 0 dpo-idx 3 flow hash: 0x00000000
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa33
fragment id 0x7872, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x6564
00:26:36:921094: ip4-glean
TCP: 10.10.2.1 -> 10.10.2.2
tos 0x00, ttl 64, length 60, checksum 0xaa33
fragment id 0x7872, flags DONT_FRAGMENT
TCP: 12399 -> 12345
seq. 0xdb5ba86d ack 0x00000000
flags 0x02 SYN, tcp header: 40 bytes
window 29200, checksum 0x6564
00:26:36:921096: memif0/2-output
memif0/2
ARP: 02:fe:5f:e8:9a:43 -> ff:ff:ff:ff:ff:ff
request, type ethernet/IP4, address size 6/4
02:fe:5f:e8:9a:43/10.10.2.0 -> 00:00:00:00:00:00/10.10.2.2
00:26:36:921097: error-drop
rx:memif0/2
00:26:36:921100: drop
ip4-glean: ARP requests sent
Packet 4
00:26:38:864434: memif-input
memif: hw_if_index 2 next-index 4
slot: ring 0
00:26:38:904356: ethernet-input
ARP: b2:5f:84:5e:0b:43 -> 02:fe:5f:e8:9a:43
00:26:38:904369: arp-input
request, type ethernet/IP4, address size 6/4
b2:5f:84:5e:0b:43/10.10.2.1 -> 00:00:00:00:00:00/10.10.2.2
00:26:38:904372: arp-reply
request, type ethernet/IP4, address size 6/4
b2:5f:84:5e:0b:43/10.10.2.1 -> 00:00:00:00:00:00/10.10.2.2
00:26:38:904379: arp-proxy
request, type ethernet/IP4, address size 6/4
b2:5f:84:5e:0b:43/10.10.2.1 -> 00:00:00:00:00:00/10.10.2.2
00:26:38:904384: memif0/2-output
memif0/2 l2_hdr_offset_valid l3_hdr_offset_valid
ARP: 02:fe:5f:e8:9a:43 -> b2:5f:84:5e:0b:43
reply, type ethernet/IP4, address size 6/4
02:fe:5f:e8:9a:43/10.10.2.2 -> b2:5f:84:5e:0b:43/10.10.2.1
vpp# show classify table verbose
TableIdx Sessions NextTbl NextNode
0 9 -1 -1
Heap: total: 2.06M, used: 2.95K, free: 2.06M, trimmable: 2.06M
nbuckets 16, skip 0 match 2 flag 0 offset 0
mask 00000000000000ff0000ffffffffffffffffffff000000000000000000000000
linear-search buckets 0
[2]: heap offset 1392, elts 2, normal
0: [1392]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7874000000000000000000000000
hits 1, last_heard 1610.01
[6]: heap offset 1904, elts 2, normal
0: [1904]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7871000000000000000000000000
hits 1, last_heard 1595.74
[7]: heap offset 2096, elts 2, normal
0: [2096]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7872000000000000000000000000
hits 1, last_heard 1597.76
[9]: heap offset 1200, elts 2, normal
0: [1200]: next_index -1 advance 0 opaque 0 action 1 metadata 1
k: 000000000000000600000a0a02010a0a0202300c000000000000000000000000
hits 0, last_heard 0.00
[10]: heap offset 2864, elts 2, normal
0: [2864]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7876000000000000000000000000
hits 1, last_heard 1660.04
[13]: heap offset 2288, elts 4, normal
0: [2288]: next_index -1 advance 0 opaque 1 action 1 metadata 2
k: 000000000000000600000a0a02010a0a0202306f000000000000000000000000
hits 0, last_heard 0.00
1: [2352]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7870000000000000000000000000
hits 1, last_heard 1594.76
2: [2416]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7873000000000000000000000000
hits 1, last_heard 1601.79
[15]: heap offset 2672, elts 2, normal
0: [2672]: next_index -1 advance 0 opaque 0 action 0 metadata 0
k: 000000000000005f00000b4308004500003c7875000000000000000000000000
hits 1, last_heard 1626.06
9 active elements
2 free lists
0 linear-search buckets
Those HEX should be matched but still misses....
One more question, I don't quite understand about when I should use these ...
Option A: set flow classify interface memif0/2 ip4-table 0
Option B: set int input acl intfc memif0/2 ip4-table 0
Thanks so much for help.
Po