summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
AgeCommit message (Collapse)AuthorFilesLines
2018-10-19vppinfra: add atomic macros for __sync builtinsSirshak Das1-9/+9
This is first part of addition of atomic macros with only macros for __sync builtins. - Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/) Additionally - clib_atomic_release macro added and used in the absence of any memory barrier. - clib_atomic_bool_cmp_and_swap added Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b Original-patch-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com>
2018-10-18Ping; remove unused arraysNeale Ranns1-3/+0
Change-Id: I104f2b4e0b1c354d3671962be3f6002f2721388d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-17IP Route add/del API is MP safeNeale Ranns1-0/+6
Change-Id: I0bfa4c9a3bb22155d7862cc13019cb172e77407c Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-17VPP-1459:Ip4 lookup fail when exist prefix cover.mu.duojiao1-3/+1
Change-Id: I4ba0aeb65219596475345e42b8cd34019f5594c6 Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
2018-10-16Ping; report failures to the terminalNeale Ranns2-14/+39
Change-Id: Icd48de31302f62c59961c573699a1dd0474b8acb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-15VPP-1448: Fix error when recurse on down the trie.mu.duojiao1-21/+19
Change-Id: Idfed8243643780d3f52dfe6e6ec621c440daa6ae Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
2018-10-12ip: add container proxy dump API (VPP-1364)Matus Fabian4-0/+121
Change-Id: I3cb89dbfb7174b9913a8c4ad9b3b1dc9f6ed6326 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-10reassembly: get number of workers instead of threads (VPP-1435)Juraj Sloboda2-6/+6
Change-Id: If3abeab2b304e2df41139707a4c8d045fab6ef99 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-05Improve ip_mroute_add_del documentationIan Wells1-4/+24
Change-Id: Ieb882cc67c37bf591b6c737234263c7c35416e6d Signed-Off-By: Ian Wells <iawells@cisco.com>
2018-10-04Support reassembly for fragments coming to ip4-local nodeJuraj Sloboda3-0/+9
Change-Id: I3aa4708c1c3cdda344f282d56b617677080eaaa1 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-04MFIB-API: when programming an (S,G) fix the grp-lenNeale Ranns1-0/+4
Change-Id: I97052d29080501de53fe95499c860faf0765e81d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-02ip4-local: classify protos that skip csum and src checkFlorin Coras1-13/+38
Makes it easy to add protocols that skip L4 checks. Change-Id: I80ff95685bfa17e29c5800d9c96153cdc7739be2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02Update code to compute checksum for buffer chainsJuraj Sloboda1-1/+1
Compute ICMP checksum for buffer chains Fix checksum function for buffer chains Change-Id: I39b845b94a63c3ab5fc9f6f9ab36cadbc67c104f Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-01Add adjacency counters to the stats segmentNeale Ranns4-6/+34
Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-01API / CLI event-log tracingDave Barach1-1/+0
Add an "elog trace [api][cli][barrier]" debug CLI command. Removed the barrier elog test command. Remove unused reliable multicast code. Change-Id: Ib3ecde901b7c49fe92b313d0087cd7e776adcdce Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-01mroute routers in the stats segmentNeale Ranns2-23/+48
Change-Id: I798e4fb6470ae9e763f8de1c290ff0fc3c0b7f9e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01Support dynamic dual/quad loop selection on aarch64Lijian Zhang1-0/+140
Currently, there are three variants available on aarch64, qdf24xx, thunderx2t99, and cortex-a72. -DCLIB_N_PREFETCHES is passed to source code to select dual/quad implementation. Besides, different compiler options are applied on these critical functions. gcc-7.3.0 reports ICE(internal compiler error) with -mtune=thunderx2t99, so -mtune=thunderx2t99 is enabled only when gcc version is greater than 7.3.0 Cavium ThunderX2, Impermenter 0x43, Part 0x0af -march=armv8-a+crc+crypto -mtune=thunderx2t99 Qualcomm Centriq 2400, Impermenter 0x51, Part 0xc00 -march=armv8.1-a+crc+crypto -mtune=qdf24xx Cortex-A72, Impermenter 0x41, Part 0xd08 -march=armv8-a+crc+crypto -mtune=cortex-a72 Change-Id: Id5649c6325c1e642d0fd42535e3908793b13e02a Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2018-09-28IP ttl check in ip4-input missing for single packet path.Ole Troan1-0/+3
Change-Id: Idc17b2f8794d37cd3242a97395ab56bd633ca575 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-28stats: Split stat_segment and stats code in preparation for deprecation.Ole Troan1-1/+0
Split the stat_segment.c code from stats.c. Rename stats.[ch] to prepare for removing (19.01?) In addition stats.api can be removed. Since the stats aggregation for the stat segment does not use the API, that part is now done on the main thread. (Old stats aggregator is also left in place). Change-Id: I9867429f4fc547b1a7ab7f88bc4f3625428d681b Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-27IPIP and IPv6 fragmentationOle Troan5-286/+206
- Error where ICMPv6 error code doesn't reset VLIB_TX = -1 Leading to crash for ICMP generated on tunnelled packets - Missed setting VNET_BUFFER_F_LOCALLY_ORIGINATED, so IP in IPv6 packets never got fragmented. - Add support for fragmentation of buffer chains. - Remove support for inner fragmentation in frag code itself. Change-Id: If9a97301b7e35ca97ffa5c0fada2b9e7e7dbfb27 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-26mismatch bi0 and b0 when finalizing ip reassembly.Kingwel Xie2-0/+2
bi0 always points to the first buffer in chain but b0 could be any fragment in a ip packet. It causes a vnet_feature_next function call to the wrong buffer and crashes sometime when there is >1 feature nodes under ip-unicast. The fix is simple, makes b0 and bi0 both pointed to the first buffer Change-Id: I7de36e68fb42b050fa63201abd98aeb6ba2e0cd3 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-09-20Route counters in the stats segmentNeale Ranns2-50/+82
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-14vlib: introduce user flags in vlib_frame_tDamjan Marion2-3/+3
Those flags have local significance and they can be used for sending hints to the next node. Change-Id: Ic2596ee81c64cd16f96344365370e8fcdc465354 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-13IP-neighbor: add and delete internal APINeale Ranns6-58/+118
Change-Id: I4d1ab5ff0c8f0756e91bf63e045f88513bb7d039 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-11indent off in ip_lookup_set_buffer_fib_indexNeale Ranns1-4/+5
when the name of the structure crosses a line boundary it's painful to parse... Change-Id: I5d0606900802fb8d64a065f31f3e2a53bd8a5f40 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-11GBP Endpoint UpdatesNeale Ranns1-0/+7
- common types on the API - endpoints keyed in various ways for DP lookup - conparison functions for VPP IP address types Change-Id: If7ec0bbc5cea71fd0983fe78987d147ec1bd7ec8 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns1-0/+1
also some moving of l2 headers to reduce dependencies Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-07IP route update fix when multipath and drop setNeale Ranns1-20/+14
Change-Id: I9cec7486cb6e3c5261d74d2b15a4d19469285a30 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-31IPx address query functions take a const pointerNeale Ranns2-34/+33
Change-Id: I45b0c48e89cb1ea556c795f6163a8346f2e2e0da Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-31Introduce a mac_address_t on the API and in VPPNeale Ranns1-0/+1
Change-Id: I05d6c2cb5d34de469eb050e4ee10dc6b954c986d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-30Refactor the ARP throttle into a common type so it can be reusedNeale Ranns3-33/+8
Change-Id: Ic7f7af983d5b6d756748023aa0c650f53e9285cf Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-29Consolidate table->index conversion in fib-path CLI processingNeale Ranns1-16/+0
Change-Id: I221cebddc45efbfdec428b7df2af96e2aedff2dd Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-23ip4: rework rewrite node to use vlib_buffer_enqueue_to_next()Damjan Marion1-355/+270
- perf improvement is around 3 clock per packet - it properly prefetches ip header and rewrite area Credits to zhiyong.yang@intel.com for spotting that in some cases rewrite area is not prefetched. Change-Id: Ie02913de7bd7f42b7df2617fb5fa87c74ab53c23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-17VPP-1392: VXLAN fails with IP fragmentationOle Troan4-2/+6
Not only is it wasteful to send all fragments back through ip4-lookup, but it doesn't work with tunnel mechanisms that don't have IP enabled on their payload side. Change-Id: Ic92d95982dddaa70969a2a6ea2f98edec7614425 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-15Remove client_index field from replies in APIOndrej Fabry1-5/+0
- replies should not need to contain client_index since it is used to identify sender of requests to VPP Change-Id: Iece3853b3f020054ee1652b149d0cf8d9580db4e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-08-14Fix context field position in API definitionOndrej Fabry1-1/+1
- context should be first field for reply messages, just like it is for all other 545 replies Change-Id: Ib291036d3389dbc26c8e9194966d01cab81534aa Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-08-14neighbor advertisement must with target_link optionahdj0071-0/+2
Change-Id: Ic20eea8f2fd19dd3c1728a1f7c622ef0c9728f81 Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
2018-08-13Multiarch for ip4 forwarding nodesDamjan Marion1-59/+49
Change-Id: I68b55fc641da9dacc3343628b3e0cf77d3533313 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13Multiarch handling in different constructor macrosDamjan Marion1-4/+2
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-10IP fragmentation buffer chains, part 2.Ole Troan1-19/+21
Change-Id: I8d1072cf9ff9f502302fd906c5590e0f3698dc60 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-10IP fragmentation to handle buffer chains.Ole Troan1-79/+106
Change-Id: Iff557f566ebc9ab170d75da1233997d83b8c8a66 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-10VPP-1382: Fix ip6 address cann't display completely when show ip6 neighborsshubing guo1-2/+2
Change-Id: Iadfbe3c0d0c6dcec2b4ccf1695bd234358f6969a Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-10Use IP address types on UDP encap APINeale Ranns5-39/+142
Change-Id: I3c714c519b6d0009329b50947ce250c18ee2a85a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-09Thread-safe ARP / ND throttlingDave Barach6-75/+103
Change-Id: I810d834c407bd404d5f0544cdec0674f0bb92d31 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-08-03Documentation fix on "set interface ip[6] table"Yichen Wang1-2/+2
Change-Id: I8dc6230b65e57ddc07f974bf6726393d8dbfd4a2 Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-07-30FIB: return entry prefix by const reference to avoid the copyNeale Ranns1-10/+10
Change-Id: I09b8406168df4b6b28df3ede24ee839681be0195 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-30Reverse the logic of flagging malformed packet in fragmentation code to ↵Rajesh Saluja1-1/+1
allow padding Change-Id: I051c137ae18fd436a798a12a56a9d12f8eaa2e08 Signed-off-by: Rajesh Saluja <rajsaluj@cisco.com>
2018-07-27Fix memory leak in processing of ICMPv6 RA event (VPP-1360)Juraj Sloboda1-1/+2
Change-Id: I7c3e5e91391b1c9b36e8ea8bacee9a107da1ae96 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-07-23fix vector index range checksEyal Bari1-1/+1
Change-Id: I63c36644c9d93f2c3ec6606ca0205b407499de4e Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-21fix IP directed broadcast node declarationsMatthew Smith2-2/+2
The dev build ('make build') was failing because ip4_rewrite_bcast() and ip6_rewrite_bcast() are declared static and were not referenced. The node functions that were set for directed broadcast rewrite: ip4_rewrite_bcast_node - ip4_rewrite() ip6_rewrite_bcast_node - ip6_rewrite() Changed to: ip4_rewrite_bcast_node - ip4_rewrite_bcast() ip6_rewrite_bcast_node - ip6_rewrite_bcast() The release build ('make build-release') succeeds because there is a VLIB_NODE_FUNCTION_MULTIARCH() call referencing the function. That macro is empty for dev builds. Change-Id: I2a05f00ca43d0eae8ff2e3026991e69917003fe1 Signed-off-by: Matthew Smith <mgsmith@netgate.com>