Hi,

I was doing a PoC to simulate label swap operation on Service Provider 
Router(non PE Routers) by creating a mpls tunnel interface and using that 
tunnel interface as a target in mpls route entry.

Reference:https://wiki.fd.io/view/VPP/MPLS_FIB

Please find below the set of configs that I tried and the corresponding 
observation with VPP 21.01

*Config 1:* Configured MPLS FIB entry without eos bit set.

mpls table add 0

set interface mpls GigabitEthernet0/6/0 enable--------------->Incoming 
Interface is GigabitEthernet0/6/0

set interface mpls GigabitEthernet0/7/0 enable--------------->Outgoing 
Interface is GigabitEthernet0/7/0

mpls tunnel add via 10.10.10.10 GigabitEthernet0/7/0 out-labels 44

set interface state *mpls-tunnel0* up

*mpls local-label add 33 via mpls-tunnel0*

*Expectation:-* On receiving an MPLS encapsulated label with in-label as 33 and 
without "eos" bit set, it should swap the label 33 with label 44 and send to 
it's neighbor i.e. 10.10.10.10 via GigabitEthernet0/7/0 interface.

*Observation:-* I am seeing the forwarding action as dpo-drop in mpls fib 
table. Please find the output of mplf-fib tables below

33:neos/21 fib:0 index:18 locks:2

CLI refs:1 entry-flags:attached, src-flags:added,contributing,active,

path-list:[25] locks:2 flags:shared, uPRF-list:21 len:1 itfs:[96, ]

path:[27] pl-index:25 mpls weight=1 pref=0 attached-nexthop:  
oper-flags:resolved, cfg-flags:attached,

2100::200:0:0:0 mpls-tunnel0 (p2p)

[@0]: mpls via 0.0.0.0 mpls-tunnel0: mtu:9000 next:2

stacked-on:

[@2]: dpo-load-balance: [proto:mpls index:20 buckets:1 uRPF:-1 to:[0:0]]

[0] [@6]: mpls-label[@0]:[44:64:0:neos]

[@1]: arp-mpls: via 10.10.10.10 GigabitEthernet0/7/0

forwarding:   mpls-neos-chain

[@0]: dpo-load-balance: [proto:mpls index:21 buckets:1 uRPF:21 to:[0:0]]

[0] [@0]: dpo-drop mpls

On receiving an MPLS packet, it is getting dropped in mpls-lookup node. Please 
find the vpp trace output below.

00:13:33:711978: *dpdk-input*

GigabitEthernet0/6/0 rx queue 0

buffer 0x5e3cc: current data 0, length 60, buffer-pool 0, ref-count 1, 
totlen-nifb 0, trace handle 0x1000000

ext-hdr-valid

l4-cksum-computed l4-cksum-correct

PKT MBUF: port 0, nb_segs 1, pkt_len 60

buf_len 2176, data_len 60, ol_flags 0x0, data_off 128, phys_addr 0xbd8f380

packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0

rss 0x0 fdir.hi 0x0 fdir.lo 0x0

MPLS: 52:54:00:06:61:da -> 52:54:00:00:00:1a

label 33 exp 0, s 0, ttl 64

00:13:33:712035: *ethernet-input*

frame: flags 0x1, hw-if-index 1, sw-if-index 1

MPLS: 52:54:00:06:61:da -> 52:54:00:00:00:1a

00:13:33:712089: *mpls-input*

MPLS: next mpls-lookup[1]  label 33 ttl 64 exp 0

00:13:33:712100: *mpls-lookup*

MPLS: next [0], lookup fib index 0, LB index 21 hash 0 label 33 eos 0

00:13:33:712103: *mpls-drop*

drop

00:13:33:712105: *error-drop*

rx:GigabitEthernet0/6/0

00:13:33:712106: drop

mpls-input: MPLS DROP DPO

*Config 2:-* Configured MPLS FIB entry with eos bit set.

mpls table add 0

set interface mpls GigabitEthernet0/6/0 enable--------------->Incoming 
Interface is GigabitEthernet0/6/0

set interface mpls GigabitEthernet0/7/0 enable--------------->Outgoing 
Interface is GigabitEthernet0/7/0

mpls tunnel add via 10.10.10.10 GigabitEthernet0/7/0 out-labels 44

set interface state mpls-tunnel0 up

mpls local-label add 33 *eos* via mpls-tunnel0

*Expectation:-* On receiving an MPLS encapsulated label with in-label as 33 and 
with "eos" bit set, it should swap the label 33 with label 44 and send to it's 
neighbor i.e. 10.10.10.10 via GigabitEthernet0/7/0 interface.

*Observation:* - Observing a crash in vpp on issuing the CLI "mpls local-label 
add 33 eos via mpls-tunnel0". Is this some known issue?

The following is the stack trace

#0  __GI_raise (sig=sig@entry=6) at 
/usr/src/debug/glibc/2.31+gitAUTOINC+f84949f1c4-r0/git/sysdeps/unix/sysv/linux/raise.c:50

#1  0x00000038bb625528 in __GI_abort () at 
/usr/src/debug/glibc/2.31+gitAUTOINC+f84949f1c4-r0/git/stdlib/abort.c:79

#2  0x000000000040857a in os_exit () at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vpp/vnet/main.c:433

#3  0x00007f05d7fa6540 in unix_signal_handler (signum=11, si=<optimized out>, 
uc=<optimized out>)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vlib/unix/main.c:187

#4  <signal handler called>

#5  0x00007f05d8e813f0 in dpo_get_next_node 
(parent_dpo=parent_dpo@entry=0x7f05952468e8, child_proto=<optimized out>, 
child_proto@entry=16,

child_type=<optimized out>, child_type@entry=DPO_IP_NULL) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/dpo/dpo.c:441

#6  dpo_stack (child_type=child_type@entry=DPO_MPLS_DISPOSITION_PIPE, 
child_proto=child_proto@entry=DPO_PROTO_MPLS, dpo=dpo@entry=0x7f059861dbc0,

parent=parent@entry=0x7f05952468e8) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/dpo/dpo.c:526

#7  0x00007f05d8ea0019 in mpls_disp_dpo_create 
(payload_proto=payload_proto@entry=DPO_PROTO_MPLS, 
rpf_id=rpf_id@entry=4294967295,

mode=mode@entry=FIB_MPLS_LSP_MODE_PIPE, parent=parent@entry=0x7f05952468e8, 
dpo=dpo@entry=0x7f059861d540)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/dpo/mpls_disposition.c:68

#8  0x00007f05d8e67f0e in fib_path_stack_mpls_disp (path_index=<optimized out>, 
payload_proto=<optimized out>, mode=<optimized out>, dpo=0x7f059861d540)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_path.c:2364

#9  0x00007f05d8e5d665 in fib_entry_src_collect_forwarding (pl_index=<optimized 
out>, path_index=28, arg=0x7f05952469a0)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_entry_src.c:483

#10 0x00007f05d8e658a6 in fib_path_list_walk (path_list_index=26, 
func=func@entry=0x7f05d8e5d530 <fib_entry_src_collect_forwarding>,

ctx=ctx@entry=0x7f05952469a0) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_path_list.c:1398

#11 0x00007f05d8e5dd94 in fib_entry_src_mk_lb 
(fib_entry=fib_entry@entry=0x7f059dbde7b0, esrc=esrc@entry=0x7f059861cc70, 
fct=<optimized out>,

dpo_lb=dpo_lb@entry=0x7f059dbde7d8) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_entry_src.c:575

#12 0x00007f05d8e5e0f0 in fib_entry_src_action_install 
(fib_entry=fib_entry@entry=0x7f059dbde7b0, source=source@entry=FIB_SOURCE_CLI)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_entry_src.c:705

#13 0x00007f05d8e5e3dc in fib_entry_src_action_activate 
(fib_entry=fib_entry@entry=0x7f059dbde7b0, source=source@entry=FIB_SOURCE_CLI)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_entry_src.c:1078

#14 0x00007f05d8e5b917 in fib_entry_create (fib_index=fib_index@entry=0, 
prefix=prefix@entry=0x7f0595246b40, source=source@entry=FIB_SOURCE_CLI,

flags=<optimized out>, paths=paths@entry=0x7f059861cc00) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_entry.c:746

#15 0x00007f05d8e51eda in fib_table_entry_path_add2 (fib_index=0, 
prefix=prefix@entry=0x7f0595246b40, source=source@entry=FIB_SOURCE_CLI,

flags=<optimized out>, flags@entry=FIB_ENTRY_FLAG_NONE, 
rpaths=rpaths@entry=0x7f059861cc00)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/fib/fib_table.c:625

---Type <return> to continue, or q <return> to quit---

#16 0x00007f05d8c7273f in vnet_mpls_local_label (vm=<optimized out>, 
input=<optimized out>, cmd=<optimized out>)

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vnet/mpls/mpls.c:347

#17 0x00007f05d7f41521 in vlib_cli_dispatch_sub_commands 
(vm=vm@entry=0x7f05d7fc4680 <vlib_global_main>,

cm=cm@entry=0x7f05d7fc48e0 <vlib_global_main+608>, 
input=input@entry=0x7f0595246db0, parent_command_index=<optimized out>)

at /usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vlib/cli.c:572

#18 0x00007f05d7f4165b in vlib_cli_dispatch_sub_commands 
(vm=vm@entry=0x7f05d7fc4680 <vlib_global_main>,

cm=cm@entry=0x7f05d7fc48e0 <vlib_global_main+608>, 
input=input@entry=0x7f0595246db0, 
parent_command_index=parent_command_index@entry=0)

at /usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vlib/cli.c:529

#19 0x00007f05d7f41a51 in vlib_cli_input () at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vlib/cli.c:674

#20 0x0000000000410aad in vl_api_cli_inband_t_handler (mp=0x1300b90c8) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vpp/api/api.c:227

#21 0x00007f05d9060bf9 in vl_msg_api_handler_with_vm_node 
(am=am@entry=0x7f05d9073f60 <api_global_main>, 
vlib_rp=vlib_rp@entry=0x13002b000,

the_msg=<optimized out>, vm=vm@entry=0x7f05d7fc4680 <vlib_global_main>, 
node=node@entry=0x7f0598209100, is_private=is_private@entry=0 '\000')

at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vlibapi/api_shared.c:635

#22 0x00007f05d9047591 in void_mem_api_handle_msg_i (is_private=0 '\000', 
node=0x7f0598209100, vm=0x7f05d7fc4680 <vlib_global_main>,

vlib_rp=0x13002b000, am=0x7f05d9073f60 <api_global_main>) at 
/usr/src/debug/vpp/21.01+gitAUTOINC+18aaa0b698-r0/git/src/vlibmemory/memory_api.c:696

The only difference between config 1 and config 2 was that of "eos" bit i.e. 
bit was set in the latter.

*Config 3:-* Also, I tried configuring PE Router by creating tunnel interface 
and used that interface as a target in IP Route.

Following is the config used.

mpls table add 0

set interface mpls GigabitEthernet0/6/0 enable--------------->Incoming 
Interface is GigabitEthernet0/6/0

set interface mpls GigabitEthernet0/7/0 enable--------------->Outgoing 
Interface is GigabitEthernet0/7/0

mpls tunnel add via 20.20.20.20 GigabitEthernet0/7/0 out-labels 44

set interface state mpls-tunnel0 up

ip route add 10.10.10.10/32 via mpls-tunnel0------------------>It seems to be 
working as expected

*Expectation:-* On receiving IP packet, it should be able to encapsulate an 
MPLS header with label 44 and send the packet out via GigabitEthernet0/7/0

*Observation:-* It was able to encapsulate an MPLS header with label 44 and 
sent the packet out via GigabitEthernet0/7/0.

The stats corresponding to mpls-tunnel0 interface were also incremented in vpp 
“show int“ CLI command

Based on the above observations, I have the following set of queries around vpp 
tunnel interface usage:-

- Are mpls tunnel interface creation meant only for PE(Provider Edge Routers)?

- Can we create and use tunnel interface as a target in mpls routes on Provider 
Routers for achieving label swap operation i.e. label pop followed by label 
push i.e. something like this “mpls local-label add 33 [ *eos]* via 
mpls-tunnel0”?

- Usage of mpls tunnel interface? Any documentation?

Regards
Amit
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20715): https://lists.fd.io/g/vpp-dev/message/20715
Mute This Topic: https://lists.fd.io/mt/88418846/21656
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