Re: [vpp-dev] JVPP API for adding MPLS local label
Hello VPP gurus, now i try to find JVPP equivalent to VPP CLI command >>>vppctl mpls local-label add non-eos 2003 mpls-lookup-in-table 0 If I do it via CLI I get from VPP (show mpls fib) following output [1] If I prepare MplsRouteAddDel object as follows: mplsRouteDTO.mrIsAdd = 1; mplsRouteDTO.mrLabel = 2003; and send it through JVPP method mplsRouteAddDel then output in VPP looks like[2]. I tried many other additional parameters for mplsRouteDTO but I am not able to find correct set of attributes to get the output [1]. [1] >>>>>>>>> 2003:neos/21 fib:0 index:17 locks:2 src:CLI refs:1 index:21 locks:2 flags:shared, uPRF-list:8 len:0 itfs:[] index:21 pl-index:21 MPLS weight=1 deag: oper-flags:resolved, [@0]: dst-address,unicast lookup in MPLS-VRF:0 forwarding: mpls-neos-chain [@0]: dpo-load-balance: [proto:mpls index:20 buckets:1 uRPF:8 to:[0:0]] [0] [@6]: dst-address,unicast lookup in MPLS-VRF:0 <<<<<<<<<< [2] >>>>>>> 2003:neos/21 fib:0 index:17 locks:2 src:API refs:1 flags:attached, index:21 locks:2 flags:shared, uPRF-list:8 len:1 itfs:[0, ] index:21 pl-index:21 MPLS weight=1 attached-nexthop: cfg-flags:attached, d307::300:0:0:0 local0 [@0]: mpls via 0.0.0.0 local0: forwarding: mpls-neos-chain [@0]: dpo-load-balance: [proto:mpls index:20 buckets:1 uRPF:8 to:[0:0]] [0] [@0]: dpo-drop mpls <<<<<<<<< Jozef Glončák Pantheon Technologies, s. r. o. From: Neale Ranns (nranns) <nra...@cisco.com> Sent: Tuesday, September 12, 2017 13:58 To: Jozef Glončák; vpp-dev@lists.fd.io Subject: Re: [vpp-dev] JVPP API for adding MPLS local label CLI: sh mpls fib API: mpls_fib_dump /neale From: Jozef Glončák <jozef.glon...@pantheon.tech> Date: Tuesday, 12 September 2017 at 11:16 To: "Neale Ranns (nranns)" <nra...@cisco.com>, "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] JVPP API for adding MPLS local label Thank you for response. And is there any >>show<< command in VPP through which I can see that local label was configured? Jozef Glončák Pantheon Technologies, s. r. o. ____________________ From: Neale Ranns (nranns) <nra...@cisco.com> Sent: Monday, September 11, 2017 19:21 To: Jozef Glončák; vpp-dev@lists.fd.io Subject: Re: [vpp-dev] JVPP API for adding MPLS local label Hi Jozef, It’s mpls_route_add_del Regards, neale From: <vpp-dev-boun...@lists.fd.io> on behalf of Jozef Glončák <jozef.glon...@pantheon.tech> Date: Monday, 11 September 2017 at 13:48 To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: [vpp-dev] JVPP API for adding MPLS local label Hello developers, I would like substitude this VPP CLI command mpls local-label add eos 101 ip4-lookup-in-table 1 with JVPP API call, but I am not able to find equivalent. Is it possible? Jozef Glončák Pantheon Technologies, s. r. o. ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] JVPP API for adding MPLS local label
CLI: sh mpls fib API: mpls_fib_dump /neale From: Jozef Glončák <jozef.glon...@pantheon.tech> Date: Tuesday, 12 September 2017 at 11:16 To: "Neale Ranns (nranns)" <nra...@cisco.com>, "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] JVPP API for adding MPLS local label Thank you for response. And is there any >>show<< command in VPP through which I can see that local label was configured? Jozef Glončák Pantheon Technologies, s. r. o. From: Neale Ranns (nranns) <nra...@cisco.com> Sent: Monday, September 11, 2017 19:21 To: Jozef Glončák; vpp-dev@lists.fd.io Subject: Re: [vpp-dev] JVPP API for adding MPLS local label Hi Jozef, It’s mpls_route_add_del Regards, neale From: <vpp-dev-boun...@lists.fd.io> on behalf of Jozef Glončák <jozef.glon...@pantheon.tech> Date: Monday, 11 September 2017 at 13:48 To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: [vpp-dev] JVPP API for adding MPLS local label Hello developers, I would like substitude this VPP CLI command mpls local-label add eos 101 ip4-lookup-in-table 1 with JVPP API call, but I am not able to find equivalent. Is it possible? Jozef Glončák Pantheon Technologies, s. r. o. ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] JVPP API for adding MPLS local label
Hi, java APIs are generated based on .api files, so even better question would be what is binary API equivalent of mpls local-label add CLI command. My guess it is the mpls_ip_bind_unbind from mpls.api: /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create a per-prefix label entry. @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in @param mb_label - The MPLS label value to bind @param mb_ip_table_id - The IP table-id of the IP prefix to bind to. @param mb_create_table_if_needed - Create either/both tables if required. @param mb_is_bind - Bind or unbind @param mb_is_ip4 - The prefix to bind to is IPv4 @param mb_address_length - Length of IP prefix @param mb_address[16] - IP prefix/ */ autoreply define mpls_ip_bind_unbind But not sure if it captures all options available in the CLI e.g eos/non-eos. I found python examples in the vpp_ip_route.py test. Java version should work in the same way. Regards, Marek From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Jozef Gloncák Sent: 11 września 2017 13:49 To: vpp-dev@lists.fd.io Subject: [vpp-dev] JVPP API for adding MPLS local label Hello developers, I would like substitude this VPP CLI command mpls local-label add eos 101 ip4-lookup-in-table 1 with JVPP API call, but I am not able to find equivalent. Is it possible? Jozef Glončák Pantheon Technologies, s. r. o. ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev
Re: [vpp-dev] JVPP API for adding MPLS local label
Hi Jozef, It’s mpls_route_add_del Regards, neale From: <vpp-dev-boun...@lists.fd.io> on behalf of Jozef Glončák <jozef.glon...@pantheon.tech> Date: Monday, 11 September 2017 at 13:48 To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> Subject: [vpp-dev] JVPP API for adding MPLS local label Hello developers, I would like substitude this VPP CLI command mpls local-label add eos 101 ip4-lookup-in-table 1 with JVPP API call, but I am not able to find equivalent. Is it possible? Jozef Glončák Pantheon Technologies, s. r. o. ___ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev