Hi, I got VPP crashed when trying to add more nsh map.

My case is this:

client -> router1 (vpp, 192.168.1.34) -> node1 (vpp, 192.168.1.37) -> ...
-> node2 (vpp, 192.168.1.40) -> ...

node1/2 work as nodes of a nfv cluster, ,and router1 has two vxlan-gpe tunnels 
with node1/2:

vpp# show vxlan-gpe
[0] lcl 192.168.1.34 rmt 192.168.1.37 vni 100 fib-idx 0 sw-if-idx 4 
decap-next-protocol nsh
[1] lcl 192.168.1.34 rmt 192.168.1.40 vni 101 fib-idx 0 sw-if-idx 11 
decap-next-protocol nsh
vpp#

And router1 works as SFF to redirect client's icmp request to node2, trace like:

Packet 6

00:04:13:626134: af-packet-input
af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
status 0x81 len 172 snaplen 172 mac 66 net 80
sec 0x5da8216b nsec 0x2708ea01 vlan 0 vlan_tpid 0
00:04:13:626138: ethernet-input
IP4: 02:fe:c0:a8:01:28 -> 02:fe:c0:a8:01:22
00:04:13:626141: ip4-input
UDP: 192.168.1.40 -> 192.168.1.34
tos 0x00, ttl 253, length 158, checksum 0x39b4
fragment id 0x0000
UDP: 4790 -> 4790
length 138, checksum 0x0000
00:04:13:626144: ip4-lookup
fib 0 dpo-idx 5 flow hash: 0x00000000
UDP: 192.168.1.40 -> 192.168.1.34
tos 0x00, ttl 253, length 158, checksum 0x39b4
fragment id 0x0000
UDP: 4790 -> 4790
length 138, checksum 0x0000
00:04:13:626146: ip4-local
UDP: 192.168.1.40 -> 192.168.1.34
tos 0x00, ttl 253, length 158, checksum 0x39b4
fragment id 0x0000
UDP: 4790 -> 4790
length 138, checksum 0x0000
00:04:13:626148: ip4-udp-lookup
UDP: src-port 4790 dst-port 4790
00:04:13:626149: vxlan4-gpe-input
VXLAN-GPE: tunnel 1 next 4 error 0
00:04:13:626151: nsh-input

nsh ver 0 ttl 3 len 6 (24 bytes) md_type 1 next_protocol 3
service path 14 service index 254
c1 1 c2 2 c3 3 c4 4

00:04:13:626156: error-drop
rx:vxlan_gpe_tunnel1
00:04:13:626157: drop
nsh-input: no mapping for nsh key

vpp#

Existing nsh rules are:

vpp# show nsh map
nsh entry nsp: 16 nsi: 255 maps to nsp: 16 nsi: 255  nsh_action push
encapped by VXLAN GPE intf: 4
nsh entry nsp: 16 nsi: 254 maps to nsp: 16 nsi: 254  nsh_action pop
encap-none
nsh entry nsp: 15 nsi: 255 maps to nsp: 15 nsi: 255  nsh_action push
encapped by VXLAN GPE intf: 4
nsh entry nsp: 15 nsi: 254 maps to nsp: 15 nsi: 254  nsh_action pop
encap-none
nsh entry nsp: 14 nsi: 255 maps to nsp: 14 nsi: 255  nsh_action push
encapped by VXLAN GPE intf: 11
vpp#

Since the packet trace complain that no expected nsp/nsi found, I add the 
missing nsp/nsi, using following cmd:

vpp# create nsh map nsp 14 nsi 254 mapped-nsp 14 mapped-nsi 254 nsh_action pop 
encap-none 0 0

And once the client sent icmp packet again, the VPP would crashed immediately, 
and restarted, with nothing left.

No other clues have been found currently, I'm guessing according to the packet 
trace,

#1 this packet is expected to be sent to `vxlan_gpe_tunnel1`, but 
`vxlan4-gpe-input` shows that next idx is 4, which refer to 
`vxlan_gpe_tunnel0`, do I misuse vxlan-gpe tunnel here or miss some other rules?
#2 if this CRASH is a known issue, what can I do to workaround this?

If anybody needs any more information, I'd be glad to provide.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14192): https://lists.fd.io/g/vpp-dev/message/14192
Mute This Topic: https://lists.fd.io/mt/34696238/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #nsh: https://lists.fd.io/mk?hashtag=nsh&subid=1480452
Mute #vxlan-gpe: https://lists.fd.io/mk?hashtag=vxlan-gpe&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to