This is the request I’m using: IpAddDelRoute{nextHopSwIfIndex=1, tableId=2, classifyTableIndex=0, nextHopTableId=0, createVrfIfNeeded=0, isAdd=1, isDrop=0, isUnreach=0, isProhibit=0, isIpv6=0, isLocal=0, isClassify=0, isMultipath=0, isResolveHost=0, isResolveAttached=0, notLast=0, nextHopWeight=0, dstAddressLength=32, dstAddress=[10, 10, 2, 3], nextHopAddress=[10, 10, 1, 2], nextHopNOutLabels=1, nextHopViaLabel=0, nextHopOutLabelStack=[2003]}
Andrej From: Neale Ranns (nranns) [mailto:nra...@cisco.com] Sent: Monday, August 21, 2017 10:23 AM To: Andrej Mak <andrej....@pantheon.tech>; Marek Gradzki -X (mgradzki - PANTHEON TECHNOLOGIES at Cisco) <mgrad...@cisco.com>; vpp-dev@lists.fd.io Subject: Re: Set up MPLS via jvpp Hi Andrej, Can you please show me exactly was data is passed across the API? Thanks, Neale From: Andrej Mak <andrej....@pantheon.tech<mailto:andrej....@pantheon.tech>> Date: Monday, 21 August 2017 at 07:05 To: "Neale Ranns (nranns)" <nra...@cisco.com<mailto:nra...@cisco.com>>, "Marek Gradzki -X (mgradzki - PANTHEON TECHNOLOGIES at Cisco)" <mgrad...@cisco.com<mailto:mgrad...@cisco.com>>, "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Subject: RE: Set up MPLS via jvpp Hi Neale, I’ve tested it without Honeycomb, I’ve just created simple jvpp app with IpAddDelRoute request as stated bellow. Here is the entry created via jvpp: vpp# sh ip fib index 2 10.10.2.3/32 detail ipv4-VRF:2, fib_index:2, flow hash:[src dst sport dport proto ] locks:1 10.10.2.3/32 fib:2 index:40 locks:2 src:API refs:1 index:42 locks:2 flags:shared, uPRF-list:44 len:1 itfs:[1, ] index:42 pl-index:42 MPLS weight=1 attached-nexthop: oper-flags:resolved, 10.10.1.2 host-veth11 [@0]: arp-mpls: via 10.10.1.2 host-veth11 Extensions: path:-1 labels:2003 forwarding: unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:44 buckets:1 uRPF:44 to:[0:0]] [0] [@3]: arp-ipv4: via 10.10.1.2 host-veth11 Delegates: Children: And here is the entry created via CLI: vpp# sh ip fib index 1 10.10.2.3/32 detail ipv4-VRF:1, fib_index:1, flow hash:[src dst sport dport proto ] locks:2 10.10.2.3/32 fib:1 index:24 locks:4 src:CLI refs:1 index:21 locks:4 flags:shared, uPRF-list:19 len:1 itfs:[1, ] index:21 pl-index:21 ipv4 weight=1 attached-nexthop: oper-flags:resolved, 10.10.1.2 host-veth11 [@0]: arp-ipv4: via 10.10.1.2 host-veth11 Extensions: path:21 labels:1003 src:recursive-resolution cover:-1 refs:1 forwarding: unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:19 to:[0:0]] [0] [@10]: mpls-label:[1]:[1003:255:0:eos] [@1]: arp-mpls: via 10.10.1.2 host-veth11 Delegates: mpls-neos-chain [@0]: dpo-load-balance: [proto:mpls index:32 buckets:1 uRPF:19 to:[0:0]] [0] [@7]: mpls-label:[2]:[1003:255:0:neos] [@1]: arp-mpls: via 10.10.1.2 host-veth11 Children:{path:31} Thanks Andrej From: Neale Ranns (nranns) [mailto:nra...@cisco.com] Sent: Friday, August 18, 2017 11:13 AM To: Marek Gradzki -X (mgradzki - PANTHEON TECHNOLOGIES at Cisco) <mgrad...@cisco.com<mailto:mgrad...@cisco.com>>; Andrej Mak <andrej....@pantheon.tech<mailto:andrej....@pantheon.tech>>; vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: Re: Set up MPLS via jvpp Hi Marek, I don’t see anything wrong with the construction of the request. Can you please show me the HC logs of the message sent and also sh ip fib index 2 10.10.2.3/32 detail this API is used a lot in the unit-tests so I have some confidence that works under normal circumstances regards, neale From: "Marek Gradzki -X (mgradzki - PANTHEON TECHNOLOGIES at Cisco)" <mgrad...@cisco.com<mailto:mgrad...@cisco.com>> Date: Friday, 18 August 2017 at 06:00 To: Andrej Mak <andrej....@pantheon.tech<mailto:andrej....@pantheon.tech>>, "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: "Neale Ranns (nranns)" <nra...@cisco.com<mailto:nra...@cisco.com>> Subject: RE: Set up MPLS via jvpp Hi, So I was wrong. I haven’t noticed next_hop_n_out_labels is u8… Neal: any idea why labels are not added? Regards, Marek From: Marek Gradzki -X (mgradzki - PANTHEON TECHNOLOGIES at Cisco) Sent: 17 sierpnia 2017 12:17 To: 'Andrej Mak' <andrej....@pantheon.tech<mailto:andrej....@pantheon.tech>>; vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Cc: Neale Ranns (nranns) <nra...@cisco.com<mailto:nra...@cisco.com>> Subject: RE: Set up MPLS via jvpp Hi, I think it is a bug in the C handler of the ip_add_del_route message. Byte order for next_hop_n_out_labels is not flipped. Please check if this fixes the issue: https://gerrit.fd.io/r/#/c/8080/ Regards, Marek From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> [mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Andrej Mak Sent: 17 sierpnia 2017 11:03 To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: [vpp-dev] Set up MPLS via jvpp Hi all, I would like to set mpls via java api, but I have some problems with it. I want to do java calls equal to this ip route add 10.10.2.3/32 table 1 via 10.10.1.2 host-veth out-label 1003 which creates this entry in show ip fib index 1 10.10.2.3/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:19 to:[0:0]] [0] [@10]: mpls-label:[1]:[1003:255:0:eos] [@1]: arp-mpls: via 10.10.1.2 host-veth11 so I create DTO, which sets fields matching parameters in CLI command: IpAddDelRoute addRoute = new IpAddDelRoute(); addRoute.isAdd = 1; addRoute.tableId = 2; final Ipv4Prefix prefix = new Ipv4Prefix((„10.10.2.3/32“); addRoute.dstAddress = Ipv4Translator.INSTANCE.ipv4AddressPrefixToArray(prefix); addRoute.dstAddressLength = Ipv4Translator.INSTANCE.extractPrefix(prefix); addRoute.nextHopAddress = Ipv4Translator.INSTANCE.ipv4AddressNoZoneToArray(„10.10.1.2“); addRoute.nextHopSwIfIndex = 1; int[] labels = new int[1]; labels[0] = 1003; addRoute.nextHopNOutLabels = (byte) labels.length; addRoute.nextHopOutLabelStack = labels; api.ipAddDelRoute(addRoute).toCompletableFuture().get() but show ip fib index 2 shows different result 10.10.2.3/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:44 buckets:1 uRPF:44 to:[0:0]] [0] [@3]: arp-ipv4: via 10.10.1.2 host-veth11 Is it a bug, or am I doing something wrong? Another question I’d like to ask is whether is it possible to create MPLS local-label via jvpp. I could’t find local label API in mpls.api file. Thanks Andrej Andrej Mak Software Developer PANTHEON technologies s.r.o. Janka Kráľa 9, 974 01 Banská Bystrica Slovakia Tel / +421 220 665 111 MAIL / andrej....@pantheon.tech<mailto:andrej....@pantheon.tech> WEB / https://pantheon.tech
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev