summaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
AgeCommit message (Collapse)AuthorFilesLines
2020-10-28misc: Break the big IP header files to improve compile timeNeale Ranns1-0/+2
Type: refactor Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: Id1801519638a9b97175847d7ed58824fb83433d6
2020-10-14mpls: no per-MPLS-tunnel tx nodeNeale Ranns3-98/+161
Type: improvement do not add a per-MPLS tunnel tx node. per-tunnl nodes limit the number of tunnels that can be created to the number o fnodes that can be created (64k). improve the tx node. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I6016f05e809c6c64a0b098a101b28c9dd47824b3
2020-10-07misc: Purge unused pg includesNeale Ranns4-4/+0
Type: style Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I26a19e42076e031ec5399d5ca05cb49fd6fbe1cd
2020-09-01mpls: fix adjacencies walk in case of restackBenoît Ganne1-1/+1
Adjacencies are only defined for IPv4 and IPv6. Type: fix Fixes: 20aec3db441074ee5a861a40d6e02fad2f3dcb37 Change-Id: I19b2b7f6958da49f41c6eabc9f248840769acbbb Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-05-27ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)John Lo1-0/+7
Fix and optimize DMAC check in ethernet-input node to utilize NIC or driver which support L3 DMAC-filtering mode so that DMAC check can be bypassed safely for interfaces/sub-interfaces in L3 mode. Checking of interface in L3-DMAC-filtering state to avoid DMAC check require the following: a) Fix interface driver init sequence for devices which supports L3 DMAC-filtering to indicate its capability and initialize interface to L3 DMAC-filtering state. b) Fix ethernet_set_flags() function and its associated callback flags_change() functions registered by various drivers in interface infra to provide proper L3 DMAC filtering status. Maintain interface/sub-interface L3 config count so DMAC checks can be bypassed if L3 forwarding is not setup on any main/sub-interfaces. Type: fix Ticket: VPP-1868 Signed-off-by: John Lo <loj@cisco.com> Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
2020-05-06docs: clean up make docs jobPaul Vinciguerra1-1/+1
Type: docs Change-Id: I9b5e5137eb4c1e89f6e8d7a278cd11a0fd496471 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-28tests: move defaults from defaultmapping to .api filesPaul Vinciguerra1-3/+3
facilitates use of papi beyond the tests. Type: improvement Change-Id: I3d502d9130b81a7fb65ee69bb06fe55802b28a27 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-09mpls: fix typo in error pathDave Barach1-10/+9
if ip4_frag_do_fragment(...) returns an error due to buffer allocation failure, we end up trying to increment a nonexistent counter, which causes an ASSERT failure. The second argument to vlib_error_count is a node index, not a next index... Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib0733b0d35bcb9d3ca6bd789e0c5ddc1561ce724
2020-03-10mpls: add user defined name tag to mpls tunnelsIJsbrand Wijnands4-4/+19
This allows a user creating MPLS tunnel through the bin_api to add a name tag. This is useful to correlate the Tunnel with its use-case. Also useful if the user needs to recover the MPLS Tunnel after a restart (mark-sweep). Type: feature Change-Id: Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Change-Id: Idc080a63810a176ab090a2678a73d2cf9f7b523f
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-1/+1
Type: docs Signed-off-by: John DeNisco <jdenisco@cisco.com> Change-Id: I7280e5c5ad10a66c0787a5282291a2ef000bff5f
2020-01-07mpls: Add FEATURE.yamlNeale Ranns1-0/+10
Type: docs Change-Id: Ic76a4bbfe2e2e45b7ea44556bc974c243970e9bf Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-01-03mpls: api cleanupJakub Grajciar1-18/+18
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I44633df6d189da707657fbf9f9ba49c5f3879e9f
2019-12-10api: multiple connections per processDave Barach1-1/+1
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-12-03fib: constify the adjacency in the rewrite nodesNeale Ranns1-1/+1
Type: refactor Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I3aad20b35d89fc541fdf185096d71ca12b09a6e2
2019-11-26fib: Table ReplaceNeale Ranns2-9/+0
Type: feature from the API doc, a table replace is: " The use-case is that, for some unspecified reason, the control plane has a very different set of entries it wants in the table than VPP currently has. The CP would thus like to 'replace' VPP's current table only by specifying what the new set of entries shall be, i.e. it is not going to delete anything that already eixts. the CP delcartes the start of this procedure with this begin_replace API Call, and when it has populated all the entries it wants, it calls the below end_replace API. From this point on it is of coursce free to add and delete entries as usual. The underlying mechanism by which VPP implements this replace is purposefully left unspecified. " In the FIB, the algorithm is implemented using mark and sweep. Algorithm goes: 1) replace_begin: this marks all the entries in that table as 'stale' 2) download all the entries that should be in this table - this clears the stale flag on those entries 3) signal the table converged: ip_table_replace_end - this removes all entries that are still stale this procedure can be used when an agent first connects to VPP, as an alternative to dump and diff state reconciliation. Change-Id: I168edec10cf7670866076b129ebfe6149ea8222e Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-11-11ip: functional interface to ip fragmentationOle Troan1-37/+181
This provides a functional interface to IP fragmentation. Allowing external features to fragment. Supports arbitrary encap size, for e.g. MPLS or inner fragmentation of tunnels. This also removed dual loop in MAP that was fundamentally broken. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ia89ecec8ee3cbe2416edbe87630fdb714898c2a8 Signed-off-by: Ole Troan <ot@cisco.com>
2019-11-04mpls: number of mpls tunnel paths returns zeroIJsbrand Wijnands1-1/+1
The number of paths on the mpls tunnel returned through the bapi is always zero. Doing a ntohl on a uint32 and poking it into a uint8 causes the problem. Type: fix Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Change-Id: I4135ad43a891e7818ca673c8067ef1f11cb34530
2019-10-09mpls: support fragmentation of mpls output packetRajesh Goel2-14/+57
Type: fix Signed-off-by: Rajesh Goel <rajegoel@cisco.com> Change-Id: Ie4372c5cf58ab215cdec5ce56f8a994daaba2844
2019-09-19api: split vl_api_prefix into twoOle Troan1-2/+1
One type for address with prefix and one type for prefix. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-3/+3
vppapigen has remapped legacy to typedefs behind the scenes for some time now. - update .api files to use new style typedefs. - issue error on 'typeonly define' in .api files - remove unneeded macros redefining vl_noop_handler Type: refactor Change-Id: I7a8c4a6dafacee6a131f95cd0e9b03a8c60dea8b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-26dhcp ip: DSCP settings for transmitted DHCP packetsNeale Ranns1-4/+6
Type: feature - Define the ip_dscp_t and use in the IP headers - Add DSCP setting to the DHCP client for use with packet TX Change-Id: If220dde0017ea78793747d65f53e11daf23a28fa Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-03fib: allow route delete with no paths and multipath=0 to remove theNeale Ranns1-7/+7
whole route Type: fix Fixes: 097fa66b Change-Id: I017ab5797670eb278c27c6e306cd8cadaacddf9d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-19mpls: fix header offset overflowBenoît Ganne1-3/+6
rw_len (MPLS rewrite string length) is declared as unsigned but is used as -rw_len with vlib_buffer_advance(), resulting in a wrong, huge offset. Type: fix Fixes: 734d430f37251bc7e71d507983ee640ae1625fbe Ticket: VPP-1705 Change-Id: I7357249f7e50b7d30fd61f5be4858a26e43df85d Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-18fib: fib api updatesNeale Ranns3-275/+220
Enhance the route add/del APIs to take a set of paths rather than just one. Most unicast routing protocols calcualte all the available paths in one run of the algorithm so updating all the paths at once is beneficial for the client. two knobs control the behaviour: is_multipath - if set the the set of paths passed will be added to those that already exist, otherwise the set will replace them. is_add - add or remove the set is_add=0, is_multipath=1 and an empty set, results in deleting the route. It is also considerably faster to add multiple paths at once, than one at a time: vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11 100000 routes in .572240 secs, 174751.80 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12 100000 routes in .528383 secs, 189256.54 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13 100000 routes in .757131 secs, 132077.52 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14 100000 routes in .878317 secs, 113854.12 routes/sec vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14 100000 routes in .900212 secs, 111084.93 routes/sec Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-30mpls: leverage vlib_buffer_advanceZhiyong Yang1-7/+4
Change-Id: I363a4444f4d296f04371acd65c702b1a1ce70913 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-05-22stats: support multiple works for error countersOle Troan1-7/+0
The current code only allowed access to the main thread error counters. That is not so useful for a multi worker instance. No return a vector indexed by thread of counter_t values. Type: fix Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7 Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-16init / exit function orderingDave Barach1-11/+10
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-08fixing typosJim Thompson1-1/+1
Change-Id: I215e1e0208a073db80ec6f87695d734cf40fabe3 Signed-off-by: Jim Thompson <jim@netgate.com>
2019-04-08minor spelling errors (both in comments)Jim Thompson1-1/+1
Change-Id: I9282a838738d0ba54255bef347abf4735be29820 Signed-off-by: Jim Thompson <jim@netgate.com>
2019-03-07BIER: trace then drop. MPLS: trace the dropsNeale Ranns1-0/+43
Change-Id: I952e6aec6487270a79c4d92cfe828cc55d42d536 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-05mpls: migrate old MULTIARCH macros to VLIB_NODE_FNFilip Tehlar5-55/+24
Change-Id: I8c5f7cda655e3343d50a96d714796ea4255588b6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-02-28MPLS: tunnel delete crashNeale Ranns1-0/+6
Change-Id: I4adf713f4a1d596b9c8a78b79b5df2c7eb0c56f0 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-02-14Add -fno-common compile optionBenoît Ganne1-1/+1
-fno-common makes sure we do not have multiple declarations of the same global symbol across compilation units. It helps debug nasty linkage bugs by guaranteeing that all reference to a global symbol use the same underlying object. It also helps avoiding benign mistakes such as declaring enum as global objects instead of types in headers (hence the minor fixes scattered across the source). Change-Id: I55c16406dc54ff8a6860238b90ca990fa6b179f1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-01-30MPLS tunnel; fix crash when deleting non-existant pathNeale Ranns1-0/+3
in the case the tunnel is the only user of the shared path list then removing its dependency removes the path list. hence lock the list Change-Id: I18318441698ceac16715b1826266a7d19dcd76e1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-25MPLS-tunnel: show output to display the tunnel name correctlyNeale Ranns1-1/+1
Change-Id: I1554d9a4d6e4a4007cda9d0f83b03feb8fdbe853 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-20FIB: encode the label stack in the FIB path during table dumpNeale Ranns1-1/+2
Change-Id: I28e8a99b980ad343a4209e673201791b91ceab4e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-04MPLS: buffer over-run with incorrectly init'd vector. fix VAT dumpNeale Ranns1-1/+1
Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-26Add a feature arc consistency checkDave Barach1-0/+2
Verify that last node in the computed feature order matches reality. This check doesn't make sense in all cases, so we skip it if the newly-added vnet_feature_arc_registration_t ".last_in_arc" datum is a NULL pointer. Change-Id: Ia99c3e2b2da2e4780a7d5bc71670c5742a66fef2 Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-23c11 safe string handling supportDave Barach3-7/+7
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-04Fix handling of mpls_tunnel_add_del APIJohn Lo1-2/+16
Handles next_hop_weight, next_hop_preference and next_hop_table_id properly in vl_api_mpls_tunnel_add_del_t_handler(). Also updated vpp_api_test and custom_dump handling of related APIs. Change-Id: I89e211bfa3b9d8ead396b24b3c46b7c7f6511f44 Signed-off-by: John Lo <loj@cisco.com>
2018-09-26MPLS tunnel dump: use sw_if_index not tunnel_indexNeale Ranns4-16/+33
Change-Id: I6c0d5aec6ee96a0d40358f0e09a0901b22265063 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-25MPLS tunnel dump fixNeale Ranns3-4/+8
Change-Id: I9d3d5243841d5b888f079e3ea5dc1e2e8befd1dc Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-1/+1
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-20Route counters in the stats segmentNeale Ranns2-30/+47
route ADD API changed to return the stats segment index to use to read the counters Change-Id: I2ef41e01eaa2f9cfaa49d9c88968897793825925 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-14BIER API and load-balancing fixesNeale Ranns1-0/+5
Change-Id: Ibda19d786070c942c75016ab568c8361de2f24af Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-30SR-MPLS: fixes and testsNeale Ranns2-0/+10
- the FIB path takes a vector of type fib_mpls_label_t not u32 so the untype safe vec_add did not work - write som eSR-MPLS tests - allow an MPLS tunnel to resolve through a SR BSID Change-Id: I2a18b9a9bf43584100ac269c4ebc286c9e3b3ea5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-29Consolidate table->index conversion in fib-path CLI processingNeale Ranns1-19/+0
Change-Id: I221cebddc45efbfdec428b7df2af96e2aedff2dd Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-27MPLS: allow 16 as a valid output labelNeale Ranns1-1/+1
Change-Id: I7e6045514d58010258889cadd220b7efcef7c1b9 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-24MPLS tunnel: don't reuse hw-indicesNeale Ranns1-27/+15
this is the same behaviour as other tunnel types Change-Id: I6439f692bc2bc18f12eea599e0e06b9eaa5eb128 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-03loop counter to prevent infiinte number of look ups per-packetNeale Ranns2-1/+9
Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab Signed-off-by: Neale Ranns <neale.ranns@cisco.com>