Re: [vpp-dev] SR MPLS not effective

2017-11-28 Thread Pablo Camarillo (pcamaril)
Hi Xyxue,

Could you please explain what you want to achieve with this config? Where do 
you want to start your SR policy?
None of the configs that you described below for P will work.

In the case #1 you are creating a SR policy with BSID 33. Then for any packet 
with incoming label 33 you will push the SID list of the SR policy. However, 
you are also creating an mpls local-label for 33 as well which you do not need.
On top of that, you are configuring the SR policy with SID list < 60 >, but you 
have not set a local-label/route for 60. Hence packet will be dropped.

Thanks.

Cheers,
Pablo.

From:  on behalf of 薛欣颖 
Date: Tuesday, 28 November 2017 at 08:08
To: vpp-dev 
Subject: [vpp-dev] SR MPLS not effective


Hi guys,

I have tried every configuration I can guess. The sr mpls still not effective 
on my vpp.
Can you give me an effective configuration, or can you help figure out the 
error in my configuration?

PE1 - P - PE2

PE1 configuration:
  create host-interface name eth4 mac 00:0c:29:4d:af:b5
  create host-interface name eth2 mac 00:0c:29:4d:af:a1
  set interface state host-eth2 up
  set interface state host-eth4 up
  set interface ip table host-eth4 1
  set interface ip address host-eth2 14.1.1.1/24
  set interface ip address host-eth4 21.1.1.1/24
  create mpls tunnel out-label 33 out-label 53 via 14.1.1.2 host-eth2
  set interface state mpls-tunnel0 up
  mpls table add 0
  set interface mpls host-eth2 enable
  ip route add 23.1.1.1/24 via interface mpls-tunnel0 table 1
  mpls local-label add eos 1053 ip4-lookup-in-table 1
  mpls local-label add non-eos 1060 mpls-lookup-in-table 0

PE2 configuration:
  create host-interface name eth3 mac 00:0c:29:19:8e:76
  create host-interface name eth5 mac 00:0c:29:19:8e:8a
  set interface state host-eth3 up
  set interface state host-eth5 up
  set interface ip address host-eth3 12.1.1.2/24
  set interface ip table host-eth5 1
  set interface ip address host-eth5 23.1.1.1/24
  mpls table add 0
  mpls table add 1
  mpls local-label add non-eos 60 mpls-lookup-in-table 0
  mpls local-label add eos 53 ip4-lookup-in-table 1
  set interface mpls host-eth5 enable
  set interface mpls host-eth3 enable
  create mpls tunnel out-label 1023 out-label 1053 via 12.1.1.1 host-eth3
  set interface state mpls-tunnel0 up
  ip route add 21.1.1.0/24 via interface mpls-tunnel0 table 1

P configuration:
(only modify the configuration on P)
1. drop packet.(when decap outer label,can't encap outer label) the 
configuration and trace is following:
 create host-interface name eth2 mac 00:0c:29:0f:e2:a8
  create host-interface name eth3 mac 00:0c:29:0f:e2:b2
  set interface state host-eth2 up
  set interface state host-eth3 up
  set interface ip address host-eth3 12.1.1.1/24
  mpls table add 0
  mpls table add 1
  set interface mpls host-eth2 enable
  set interface mpls host-eth3 enable
  mpls local-label add non-eos 33 mpls-lookup-in-table 0
  set interface ip address host-eth2 14.1.1.2/24
  mpls local-label add eos 53 ip4-lookup-in-table 0
  mpls local-label add eos 1053 ip4-lookup-in-table 0
  mpls local-label add non-eos 1023 mpls-lookup-in-table 0
  sr mpls policy add bsid 33 next 60

  00:08:35:510564: af-packet-input
  af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
  status 0x2001 len 86 snaplen 86 mac 66 net 80
  sec 0x5a1cbe94 nsec 0x1ea50e69 vlan 0
00:08:35:510591: ethernet-input
  MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8
00:08:35:510650: mpls-input
  MPLS: next mpls-lookup[1]  label 33 ttl 255
00:08:35:510657: mpls-lookup
  MPLS: next [0], lookup fib index 0, LB index 26 hash 0 label 33 eos 0
00:08:35:510666: error-drop
  mpls-input: MPLS DROP DPO

2.replace 'sr mpls policy add bsid 33 next 60' with 'sr mpls policy add bsid 
4001 next 60'. the trace info is following:
00:15:38:655991: af-packet-input
  af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
  status 0x2001 len 86 snaplen 86 mac 66 net 80
  sec 0x5a1cc03b nsec 0x1225fbd8 vlan 0
00:15:38:656023: ethernet-input
  MPLS: 00:0c:29:4d:af:a1 -> 00:0c:29:0f:e2:a8
00:15:38:656089: mpls-input
  MPLS: next mpls-lookup[1]  label 33 ttl 255
00:15:38:656100: mpls-lookup
  MPLS: next [6], lookup fib index 0, LB index 26 hash 0 label 33 eos 0
00:15:38:656130: lookup-mpls-dst
 fib-index:0 hdr:[53:255:0:eos] load-balance:31
00:15:38:656137: ip4-mpls-label-disposition
  disp:0
00:15:38:656144: lookup-ip4-dst
 fib-index:0 addr:23.1.1.5 load-balance:1
00:15:38:656151: ip4-drop
ICMP: 21.1.1.5 -> 23.1.1.5
  tos 0x00, ttl 63, length 64, checksum 0x4db1
  fragment id 0x0001
ICMP echo_request checksum 0x5f5d
00:15:38:656160: error-drop
  ip4-mpls-label-disposition: valid ip4 packets

3.add the mpls tunnel configuration, remove static routing configuration, the 
configuration and trace is following:
create host-interface name eth2 mac 00:0c:29:0f:e2:a8
  create host-interface name eth3 mac 00:0c:29:0f:e2:b2
  set interface state host-eth2 up
  set interface state host-eth3 up

Re: [vpp-dev] problem in delete the 'sr mpls steer'

2017-12-20 Thread Pablo Camarillo (pcamaril)
Hi Xyxue,

I’m unable to reproduce the crash. What was your initial state before typing 
that CLI?

_____   _  ___
__/ __/ _ \  (_)__| | / / _ \/ _ \
_/ _// // / / / _ \   | |/ / ___/ ___/
/_/ /(_)_/\___/   |___/_/  /_/

DBGvpp#
DBGvpp#
DBGvpp#
DBGvpp# mpls table add 9
DBGvpp# mpls table add 0
DBGvpp# sr mpls policy add bsid 999 next 202 next 203 next 204
DBGvpp# sr mpls steer l3 23.1.1.1/24 via sr policy bsid 999
DBGvpp# sr mpls steer l3 23.1.1.1/24 via sr policy bsid 999 del
DBGvpp#
DBGvpp#

Thank you.

Cheers,
Pablo.

From:  on behalf of 薛欣颖 
Date: Wednesday, 20 December 2017 at 10:26
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] problem in delete the 'sr mpls steer'


Hi guys,

I'm testing sr mpls. When I del the 'sr mpls steer' ,there is a 'signal 
SIGABRT'. My configuration and more info is shown below:

configuration:
mpls table add 9
mpls table add 0
sr mpls policy add bsid 999 next 202 next 203 next 204
sr mpls steer l3 23.1.1.1/24 via sr policy bsid 999
sr mpls steer l3 23.1.1.1/24 via sr policy bsid 999 del

Program received signal SIGABRT, Aborted.
0x2b69d0d5bc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: 没有那个文件或目录.
(gdb) bt
#0 0x2b69d0d5bc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x2b69d0d5f028 in __GI_abort () at abort.c:89
#2 0x00405d2b in os_panic () at 
/home/VPP/build-data/../src/vpp/vnet/main.c:294
#3 0x2b69d0679b88 in debugger () at 
/home/VPP/build-data/../src/vppinfra/error.c:84
#4 0x2b69d0679f8f in _clib_error (how_to_die=2, function_name=0x0, 
line_number=0, fmt=0x2b69d0301438 "%s:%d (%s) assertion `%s' fails")
at /home/VPP/build-data/../src/vppinfra/error.c:143
#5 0x2b69d018ddfb in fib_table_get (index=1, proto=FIB_PROTOCOL_IP4) at 
/home/VPP/build-data/../src/vnet/fib/fib_table.c:33
#6 0x2b69d018e2df in fib_table_lookup_exact_match (fib_index=1, 
prefix=0x2b69d22d6980) at /home/VPP/build-data/../src/vnet/fib/fib_table.c:98
#7 0x2b69d018faf1 in fib_table_entry_delete (fib_index=1, 
prefix=0x2b69d22d6980, source=FIB_SOURCE_SR) at 
/home/VPP/build-data/../src/vnet/fib/fib_table.c:900
#8 0x2b69d0079392 in sr_mpls_steering_policy (is_del=1, bsid=999, 
sr_policy_index=4294967295, table_id=4294967295, prefix=0x2b69d22d6a70, 
mask_width=24,
traffic_type=4 '\004') at 
/home/VPP/build-data/../src/vnet/srmpls/sr_mpls_steering.c:112
#9 0x2b69d007aa5b in sr_mpls_steer_policy_command_fn (vm=0x2b69cfbea800 
, input=0x2b69d22d6ec0, cmd=0x2b69d223561c)
at /home/VPP/build-data/../src/vnet/srmpls/sr_mpls_steering.c:356


VPP# show mpls fib
MPLS-VRF:9, fib_index 0
ip4-explicit-null:neos/21 fib:0 index:10 locks:2

...

MPLS-VRF:0, fib_index -1
ip4-explicit-null:neos/21 fib:1 index:16 locks:2

...


Does the wrong fib_index have an impact on this problem?
What could I do to slove the problem?

Thanks,
Xyxue









___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] the mheap small cache release more than once

2017-12-21 Thread Pablo Camarillo (pcamaril)
Xyxue, Neale,

Thanks for the details. I’ve opened a jira ticket for it (VPP-1113) and will 
get it resolved as soon as possible. 

Thanks.

Cheers,
Pablo.

On 21/12/2017, 19:21, "vpp-dev-boun...@lists.fd.io on behalf of Neale Ranns 
(nranns)"  wrote:

Hi Xyxue,

Each call to fib_table_entry_path_add2 expects that it will own the label 
stack that is passed to it. This was done so there is no need to copy the 
stack. If an application (like SR) wants to use the same set of labels for more 
than one prefix, it should allocate/duplicate the label stack. Or if that 
application wants to keep a copy of the label stack, it must pass FIB a copy.

Regards,
neale


From:  on behalf of 薛欣颖 
Date: Thursday, 21 December 2017 at 13:15
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] the mheap small cache release more than once


Hi guys,

I'm testing the sr mpls, and there is a small cache release more than once. 
 How should we avoid this ? My debug info is shown below:

create_sl (mpls_sr_policy_t * sr_policy, mpls_label_t * sl, u32 weight)
{
  mpls_sr_main_t *sm = &sr_mpls_main;
  mpls_sr_sl_t *segment_list;

  pool_get (sm->sid_lists, segment_list);
  memset (segment_list, 0, sizeof (*segment_list));

  vec_add1 (sr_policy->segments_lists, segment_list - sm->sid_lists);

  /* Fill in segment list */
  segment_list->weight =
(weight != (u32) ~ 0 ? weight : SR_SEGMENT_LIST_WEIGHT_DEFAULT);
  segment_list->segments = vec_dup (sl);

  fib_route_path_t path = {
.frp_proto = DPO_PROTO_MPLS,
.frp_sw_if_index = ~0,
.frp_fib_index = 0,
.frp_weight = segment_list->weight,
.frp_flags = FIB_ROUTE_PATH_FLAG_NONE,
.frp_label_stack = NULL,
.frp_local_label = sl[0],
  };

  vec_add (path.frp_label_stack, sl + 1, vec_len (sl) - 1);

  fib_route_path_t *paths = NULL;
  vec_add1 (paths, path);

  mpls_eos_bit_t eos;
  FOR_EACH_MPLS_EOS_BIT (eos)
  {
/* *INDENT-OFF* */
fib_prefix_t
pfx = {
.fp_len = 21,
.fp_proto = FIB_PROTOCOL_MPLS,
.fp_label = sr_policy->bsid,
.fp_eos = eos,
.fp_payload_proto = DPO_PROTO_MPLS,
};
/* *INDENT-ON* */

fib_table_entry_path_add2 (0,
   &pfx,
   FIB_SOURCE_SR,
   (sr_policy->type == SR_POLICY_TYPE_DEFAULT ?
FIB_ENTRY_FLAG_NONE :
FIB_ENTRY_FLAG_MULTICAST), paths);
  }

  vec_free (paths);

  return segment_list;
}


In this function,path.frp_label_stack alloc only one memory, but be used 
many times with 'fib_table_entry_path_add2 '. When we delete 
,'fib_path_ext_list_remove ' would bw call many times, then  repeated memory 
release,and can't be detected.

void
fib_path_ext_list_remove (fib_path_ext_list_t *list,
  fib_path_ext_type_t ext_type,
  const fib_route_path_t *rpath)
{
fib_path_ext_t *path_ext;

path_ext = fib_path_ext_list_find(list, ext_type, rpath);

if (NULL != path_ext)
{
/*
 * delete the element moving the remaining elements down 1 position.
 * this preserves the sorted order.
 */
vec_free(path_ext->fpe_label_stack);
vec_delete(list->fpel_exts, 1, (path_ext - list->fpel_exts));
}
}
Actual operation situation:
DBGvpp# sr mpls policy add bsid 999 next 202 next 203 next 204 

Thread 1 "vpp_main" hit Breakpoint 2, create_sl (sr_policy=0x7fffb5e47264, 
sl=0x7fffb5589064, weight=4294967295)
at 
/home/git_pull_vpp/vpp/build-data/../src/vnet/srmpls/sr_mpls_policy.c:64
64  {
(gdb) n
65mpls_sr_main_t *sm = &sr_mpls_main;
(gdb) 
68pool_get (sm->sid_lists, segment_list);
(gdb) 
69memset (segment_list, 0, sizeof (*segment_list));
(gdb) 
71vec_add1 (sr_policy->segments_lists, segment_list - 
sm->sid_lists);
(gdb) 
75  (weight != (u32) ~ 0 ? weight : SR_SEGMENT_LIST_WEIGHT_DEFAULT);
(gdb) 
74segment_list->weight =
(gdb) 
76segment_list->segments = vec_dup (sl);
(gdb) 
78fib_route_path_t path = {
(gdb) 
85  .frp_local_label = sl[0],
(gdb) 
78fib_route_path_t path = {
(gdb) 
82  .frp_weight = segment_list->weight,
(gdb) 
78fib_route_path_t path = {
(gdb) 
88vec_add (path.frp_label_stack, sl + 1, vec_len (sl) - 1);
(gdb) 
90fib_route_path_t *paths = NULL;
(gdb) set pr pr
(gdb) p paths
$1 = (fib_route_path_t *) 0x0
(gdb) n
91vec_add1 (paths, path);
(gdb) n
94FOR_EACH_MPLS_EOS_BIT (eos)
(gdb) p *paths
$2 = {
  frp_proto = DPO_PROTO_MPLS, 
  {
{
   

Re: [vpp-dev] problem in SRV6

2018-01-11 Thread Pablo Camarillo (pcamaril)
Hi Xyxue,

What is your entire config at VPP2?  Looks like a misconfiguration in VPP2.

Thanks,
Pablo.


From:  on behalf of 薛欣颖 
Date: Friday, 12 January 2018 at 02:04
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] problem in SRV6


Hi guys,

I'm testing SRV6 ,there is a problem: the packet was dropped  in the vpp2. More 
info and the configuration is shown below:

TC1-VPP1-VPP2-VPP3-TC2

VPP1:
the host-eth1、host-eth2 ipv6 address 1::1 、 2::2, create a loop int 3::3 , add 
the static routing.
  set sr encaps source addr 1::1
  sr policy add bsid 1::1:999 next 2::2 next 3::3
  sr steer l3 2003::1/64 via sr policy bsid 1::1:999

VPP# show sr policies
SR policies:
[0].- BSID: 1::1:999
Behavior: Encapsulation
Type: Default
FIB table: 0
Segment Lists:
[0].- < 2::2, 3::3 > weight: 1

The packet DIP = 2003::5 could match the sr, the trace info is correct.

VPP2:
sr localsid address 2::2 behavior end

trace info:
00:08:01:715943: af-packet-input
af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
status 0x2001 len 178 snaplen 178 mac 66 net 80
sec 0x5a571fb9 nsec 0x2c338c0a vlan 0
00:08:01:715969: ethernet-input
IP6: 00:0c:29:4d:af:8d -> 00:0c:29:19:8e:58
00:08:01:716017: ip6-input
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716022: ip6-lookup
fib 0 dpo-idx 13 flow hash: 0x
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716030: ip6-local
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716037: ip6-punt
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716044: error-punt
ip6-input: unknown ip protocol

Is there any problem in my configuration?

Thanks,
Xyxue

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] problem in SRV6

2018-01-12 Thread Pablo Camarillo (pcamaril)
Hi Xyxue,

The SRv6 SID is not an interface address. Hence creating the loopback 
interfaces and adding the SID address on the loopback is not necessary.
Find below some corrected configs. (you were also missing the config on VPP3).

Thanks.

Cheers,
Pablo.

From: 薛欣颖 
Date: Friday, 12 January 2018 at 09:19
To: "Pablo Camarillo (pcamaril)" , vpp-dev 

Subject: Re: Re: [vpp-dev] problem in SRV6

Hi Pablo,
My configuration and the trace info is shown below:
VPP1:
create host-interface name eth0 mac 00:0c:29:4d:af:8d
  create host-interface name eth4 mac 00:0c:29:4d:af:b5
  set interface state host-eth0 up
  set interface state host-eth4 up
  enable ip6 interface host-eth0
  set interface ip address host-eth0 a::1/64
  enable ip6 interface host-eth4
  set interface ip address host-eth4 2001::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 1::1/128
  ip route add 2::2/128 via ip6-address a::2  host-eth0
  ip route add 3::3/128 via ip6-address a::2  host-eth0
  ip route add b::1/64 via ip6-address a::2  host-eth0
  set sr encaps source addr 1::1
  sr policy add bsid 1::1:999 next 2::2 next 3::3
  sr steer l3 2003::1/64 via sr policy bsid 1::1:999

trace:
02:01:10:720008: af-packet-input
  af_packet: hw_if_index 3 next-index 4
tpacket2_hdr:
  status 0x2001 len 98 snaplen 98 mac 66 net 80
  sec 0x5a571037 nsec 0x28091fb7 vlan 0
02:01:10:720040: ethernet-input
  IP6: 00:22:12:66:00:33 -> 00:0c:29:4d:af:b5
02:01:10:720068: ip6-input
  ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720075: ip6-lookup
  fib 0 dpo-idx 35 flow hash: 0x
  ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720085: ip6-load-balance
  fib 0 dpo-idx 35 flow hash: 0x
  ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720089: sr-pl-rewrite-encaps
  SR-policy-rewrite: src 1::1 dst 2::2
02:01:10:720096: ip6-lookup
  fib 0 dpo-idx 9 flow hash: 0x
  IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 64, payload length 140
02:01:10:720097: ip6-rewrite
  tx_sw_if_index 1 adj-idx 9 : ipv6 via a::2 host-eth0: 
000c29198e58000c294daf8d86dd flow hash: 0x
  : 000c29198e58000c294daf8d86dd608c2b3f0001
  0020: 0001000200022906040202002003
  0040: 0005000300030002
  0060: 0002602c3a3f2001
02:01:10:720103: host-eth0-output
  host-eth0
  IP6: 00:0c:29:4d:af:8d -> 00:0c:29:19:8e:58
  IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 140



VPP2:
  create host-interface name eth0 mac 00:0c:29:19:8e:58
  create host-interface name eth2 mac 00:0c:29:19:8e:6c
  set interface state host-eth0 up
  set interface state host-eth2 up
  enable ip6 interface host-eth0
  enable ip6 interface host-eth2
  set interface ip address host-eth0 a::2/64
  set interface ip address host-eth2 b::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 2::2/128
  ip route add 1::1/128 via ip6-address a::1  host-eth0
  ip route add 3::3/128 via ip6-address b::2  host-eth2
  sr localsid address 2::2 behavior end


trace:
00:08:01:715943: af-packet-input
af_packet: hw_if_index 1 next-index 4
tpacket2_hdr:
status 0x2001 len 178 snaplen 178 mac 66 net 80
sec 0x5a571fb9 nsec 0x2c338c0a vlan 0
00:08:01:715969: ethernet-input
IP6: 00:0c:29:4d:af:8d -> 00:0c:29:19:8e:58
00:08:01:716017: ip6-input
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716022: ip6-lookup
fib 0 dpo-idx 13 flow hash: 0x
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716030: ip6-local
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716037: ip6-punt
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 63, payload length 124
00:08:01:716044: error-punt
ip6-input: unknown ip protocol

VPP3:
create host-interface name eth2 mac 00:0c:29:a6:67:7c
  create host-interface name eth5 mac 00:0c:29:a6:67:9a
  set interface state host-eth2 up
  set interface state host-eth5 up
  enable ip6 interface host-eth2
  enable ip6 interface host-eth5
  set interface ip address host-eth2 b::2/64
  set interface ip address host-eth5 2003::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 3::3/128
  ip route add 2::2/128 via ip6-address b::1  host-eth2
  ip route add 1::1/128 via ip6-address b::1  host-eth2
  ip route add a::1/64 via ip6-address b::1  host-eth2
  sr localsid 

Re: [vpp-dev] problem in SRV6

2018-01-14 Thread Pablo Camarillo (pcamaril)
Xyxue,

You need the corresponding FIB entry at R1 for  VPP2 2::2. Typically you would 
route an entire VPP2 locator prefix for SRv6 SIDs, and then you would 
instantiate within that prefix as many functions as desired on VPP2.
Notice that in the config below you do have the ip route command, so I guess 
that you didn’t type it this time.

Thanks.

Cheers,
Pablo.

From: 薛欣颖 
Date: Saturday, 13 January 2018 at 07:46
To: "Pablo Camarillo (pcamaril)" , vpp-dev 

Subject: Re: Re: [vpp-dev] problem in SRV6

Hi Pablo,
According to the following configs, since the SRv6 SID is not an interface 
address, VPP1:  sr policy add bsid 1::1:999 next 2::2 next 3::3 , how to find 
VPP2 2::2? The packets could not find the next-hop and out-if.

trace in VPP1:

00:20:47:954483: af-packet-input
af_packet: hw_if_index 2 next-index 4
tpacket2_hdr:
status 0x2001 len 98 snaplen 98 mac 66 net 80
sec 0x5a59a8b5 nsec 0x287052ff vlan 0
00:20:47:954525: ethernet-input
IP6: 00:22:12:66:00:33 -> 00:0c:29:4d:af:b5
00:20:47:954649: ip6-input
ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
ICMP echo_request checksum 0xa6e8
00:20:47:954664: ip6-lookup
fib 0 dpo-idx 20 flow hash: 0x
ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
ICMP echo_request checksum 0xa6e8
00:20:47:954687: ip6-load-balance
fib 0 dpo-idx 20 flow hash: 0x
ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
ICMP echo_request checksum 0xa6e8
00:20:47:954695: sr-pl-rewrite-encaps
SR-policy-rewrite: src 1::1 dst 2::2
00:20:47:954709: ip6-lookup
fib 0 dpo-idx 1 flow hash: 0x
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 64, payload length 124
00:20:47:954714: ip6-drop
IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 64, payload length 124
00:20:47:954729: error-drop
ethernet-input: no error

Thanks,
Xyxue
________

From: Pablo Camarillo (pcamaril)<mailto:pcama...@cisco.com>
Date: 2018-01-12 18:53
To: 薛欣颖<mailto:xy...@fiberhome.com>; vpp-dev<mailto:vpp-dev@lists.fd.io>
Subject: Re: [vpp-dev] problem in SRV6
Hi Xyxue,

The SRv6 SID is not an interface address. Hence creating the loopback 
interfaces and adding the SID address on the loopback is not necessary.
Find below some corrected configs. (you were also missing the config on VPP3).

Thanks.

Cheers,
Pablo.

From: 薛欣颖 
Date: Friday, 12 January 2018 at 09:19
To: "Pablo Camarillo (pcamaril)" , vpp-dev 

Subject: Re: Re: [vpp-dev] problem in SRV6

Hi Pablo,
My configuration and the trace info is shown below:
VPP1:
create host-interface name eth0 mac 00:0c:29:4d:af:8d
  create host-interface name eth4 mac 00:0c:29:4d:af:b5
  set interface state host-eth0 up
  set interface state host-eth4 up
  enable ip6 interface host-eth0
  set interface ip address host-eth0 a::1/64
  enable ip6 interface host-eth4
  set interface ip address host-eth4 2001::1/64
  create loopback interface instance 0
  set interface state loop0 up
  set interface ip address loop0 1::1/128
  ip route add 2::2/128 via ip6-address a::2  host-eth0
  ip route add 3::3/128 via ip6-address a::2  host-eth0
  ip route add b::1/64 via ip6-address a::2  host-eth0
  set sr encaps source addr 1::1
  sr policy add bsid 1::1:999 next 2::2 next 3::3
  sr steer l3 2003::1/64 via sr policy bsid 1::1:999

trace:
02:01:10:720008: af-packet-input
  af_packet: hw_if_index 3 next-index 4
tpacket2_hdr:
  status 0x2001 len 98 snaplen 98 mac 66 net 80
  sec 0x5a571037 nsec 0x28091fb7 vlan 0
02:01:10:720040: ethernet-input
  IP6: 00:22:12:66:00:33 -> 00:0c:29:4d:af:b5
02:01:10:720068: ip6-input
  ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720075: ip6-lookup
  fib 0 dpo-idx 35 flow hash: 0x
  ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720085: ip6-load-balance
  fib 0 dpo-idx 35 flow hash: 0x
  ICMP6: 2001::5 -> 2003::5
tos 0x00, flow label 0x0, hop limit 64, payload length 44
  ICMP echo_request checksum 0xa6e8
02:01:10:720089: sr-pl-rewrite-encaps
  SR-policy-rewrite: src 1::1 dst 2::2
02:01:10:720096: ip6-lookup
  fib 0 dpo-idx 9 flow hash: 0x
  IPV6_ROUTE: 1::1 -> 2::2
tos 0x00, flow label 0x0, hop limit 64, payload length 140
02:01:10:720097: ip6-rewrite
  tx_sw_if_index 1 adj-idx 9 : ipv6 via a::2 host-eth0: 
000c29198e58000c294daf8d86dd flow hash: 0x
  : 000c29198e58000c294daf8d86dd608c2b3f0001
  0020: 0001000200022906040202002003
  0040: 0005000300030002
  0060: 0002602c3a3f2001
02:01:10:720103: host-eth0-output
  host-eth0