summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2018-07-14Improve IP4 ARP and IP6 ND Events Notificationv18.10-rc0John Lo2-11/+32
For L2 ARP termination, use both brodcast ARP request and reply packets to provide MAC/IP binding events. For IP4/IP6 neighbor adress resolution, send resolution events if there is an address resolution attemp with a static neighbor entry where both IP and MAC matches. This allow probe of an IP neighbor with a static entry to confirm it is responding with a reply matching that of the static entry. Change-Id: Iffb923bb5aea3f9021436735d5ca06e7b24f966f Signed-off-by: John Lo <loj@cisco.com>
2018-07-13VPP-1338: fix ipsec api coverity warningsDave Barach1-4/+3
Remove useless unsigned comparisions: "(unsigned) value < 0", correct a couple of incorrect limit checks. Change-Id: I9606c4057df157f770d59535457cb9df1cfd1f35 Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-12srv6: fix pointers in quad loopsFrancois Clad1-6/+6
Change-Id: I51c4bcbd456d2e7ffbdeef9cc8c7703d1c88b52e Signed-off-by: Francois Clad <fclad@cisco.com>
2018-07-11session: push tx notifications only if neededFlorin Coras1-1/+6
VPP-1340 Change-Id: Ia3f2fc054dbfb2ba912a768c70466e7042024e32 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-11avoid using thread local storage for thread indexDamjan Marion36-58/+59
It is cheaper to get thread index from vlib_main_t if available... Change-Id: I4582e160d06d9d7fccdc54271912f0635da79b50 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-11bridge-domain:fix no_flood countEyal Bari1-0/+3
no_flood count was not updated on removal might couase a negative insertion index when adding new members Change-Id: I2caf2c453dfef1a9f16fb8fa2e5af42b4e653a69 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-10VPP-1337: Dangling reference be gone!Dave Barach3-0/+6
Freeing the prefix and address vectors after signalling them from dhcpv6_client_node_fn to either the pd or iana report processes is absolutely wrong. The code has appeared to work by luck. This took three full days' worth of expert effort to root cause - in the context of an unrelated patch - and about one minute to fix. Change-Id: Ie589ab1a70ae83441ab4e8b6618a6d405741f53f Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-10FIB path dump: fix next-hop-table ID for recursive routesNeale Ranns2-2/+3
Change-Id: I57b4ebca29c0b185770373e8878f89a9bd13b742 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-09IGMP improvementsNeale Ranns8-24/+236
- Enable/Disable an interface for IGMP - improve logging - refactor common code - no orphaned timers - IGMP state changes in main thread only - Large groups split over multiple state-change reports - SSM range configuration API. - more tests Change-Id: If5674f1044e7e97274a711f47807c9ba689d7b9a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-09vxlan:use bihash_16_8 for ipv4 lookupEyal Bari3-66/+76
Change-Id: I0d4630c88d6caacffcd073ebaa12766dfc893f70 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-09new pipe code does not use stdintsNeale Ranns1-2/+2
Change-Id: Idee565af852c7bb434b886fbf31c6e76315686c4 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-08Fix IPsec intf tx node setup at intf creationMatthew Smith1-2/+2
When using a DPDK cryptodev with IPsec, sending outbound packets results in a crash on division by zero if using an algorithm not supported by the OpenSSL ESP nodes. This includes AES-GCM and MD5. At IPsec intf creation time, the next node at slot IPSEC_OUTPUT_NEXT_ESP_ENCRYPT for ipsec_if_tx_node_fn is set to the node named esp-encrypt. This is the OpenSSL ESP encrypt function. If DPDK cryptodevs are configured, dpdk-esp-encrypt is the correct next node. Change to setting the next node according to the value in ipsec_main.esp_encrypt_node_index. That value is set to esp-encrypt by default. If DPDK cryptodevs are configured it gets set to dpdk-esp-encrypt. Change-Id: I83896c76b975d74aead247a162c85eccca9575a8 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-08session/svm: fix coverity warningsFlorin Coras1-1/+5
Change-Id: Ic5daed1f6c23d9561a04e235dcbf257f190d066a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-08vhost: Add multi-versioning supportMohsin Kazmi6-1534/+1667
It also refactors the vhost code which was in one big file vhost-user.c. Receive side code is in vhost_user_input.c and Transmit side code is in vhost_user_output.c Change-Id: I1b539b5008685889723e228265786a2a3e9f3a78 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-07-07PipesNeale Ranns11-7/+1199
A pipe resembles a unix pipe. Each end of the pipe is a full VPP interface. pipes can be used for e.g. packet recirculation, inter-BD, etc. Change-Id: I185bb9fb43dd233ff45da63ac1b85ae2e1ceca16 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-05vxlan:use bihash_24_8 for ipv6 lookupEyal Bari3-116/+167
* added the fib index into the key * conform coding style for vxlan.h * added "show vxlan tunnel raw" command to dump bihash Change-Id: Icc96e41abb648e96de5b4605b035f68f9e20f8a9 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-04fix VPP-1312 Invalid UDP packet length in ipsecKlement Sekera1-1/+2
Change-Id: Ibfd0a2e7010e6e74c32244c538f60e0713bea03f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-07-04IP FIB dump - incorrect table-ID for deag pathsNeale Ranns1-1/+1
Change-Id: I383cfb662b4d2bf4f814e3eb9a1ce4d6bff7066d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-04Remove unused members from ip4_fib_tNeale Ranns2-9/+3
Change-Id: I8b92652d512bad5d774c7862f9808c306bbeff18 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-04add 'src-lookup' keyword for FIB pathsNeale Ranns1-0/+4
Change-Id: I4554d1e94bd70ef5b3b0aaeb1a0fceaeb81c5f96 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-03tcp: update snd_una_max for retranmsitsFlorin Coras2-3/+8
Change-Id: I0573d0aff39581bba96e610228a10ae923a8ca06 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-02Fixing ip4-reassembly ip6-reassembly non feature node, next_node_index settingVijayabhaskar Katamreddy3-2/+2
Change-Id: Ib988d87e6758ffa31862096391f9f286b0797f2b Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-06-30tcp: fix single loop prefetchFlorin Coras2-3/+9
Also add single loop prefetch in session tx Change-Id: Ib2725a2552fcc1a65050d7a2eb10491a7b34db62 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-30session: send tx notification to appFlorin Coras3-188/+229
Does some session node cleanup as well Change-Id: Ifd52b07b28ba4dec1f6f729476decc76eb963837 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-29ipsec: fix VPP-1333 - crash in ipsec policy cliKlement Sekera1-0/+6
Change-Id: I843d094b6bbd1cefba82d6026174be005e66d510 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-29Removing the static keyword do_fragment routines, so that could be accessed ↵Vijayabhaskar Katamreddy2-3/+8
outside the ip_frag nodes Change-Id: I46d3d10fa763fcf7a579620ec7cf1b204a53bce8 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-06-29IP4 Router Alert option handling for IGMPNeale Ranns4-14/+156
and a new ip4-options node, inserted between ip4-input and ip4-punt, that checks for IP-router-alert option + IGMP combination and sends the packet to the ip4-local. This is required because some IGMP packets are sent to the group address and not the all-routers address. All IGMP packets are sent with the router alert option. Change-Id: I01f478d4d98ac9f806e0bcba0f6da6e4e7d26e2a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-28vcl: move binary api and cfg to separate filesFlorin Coras3-4/+0
Change-Id: Ib88d703bb7d4b170059960b0688352c90c5fcc39 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-28vcl: refactor vcl sessionFlorin Coras1-12/+17
Change-Id: Idcba72fd84128547718dd32858e8c728925a6b1d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-28reassembly: optimize bihash usageKlement Sekera2-45/+38
Change-Id: I19690db9996ecb8c5e86415d2fd3c7133ce698f8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-28ip: vectorized ip checksumDamjan Marion2-69/+119
Change-Id: Ida678e6f31daa8decb18189da712a350336326e2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-27gcc8 and Wstringop-truncationMarco Varlese1-2/+2
gcc8 introduced a new warning (Wstringop-truncation) which in our case is being treated as error. Disabling the warning globally might introduce bugs related to string truncation which are not desired by the developer (e.g. bug). Instead, this patch disables the warning only for those occurences which have been verified to be non-bugs but the desired behaviour as per developer will. Change-Id: I0f04ff6b4fad44061e80a65af633fd7e0148a0c5 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-06-26tcp/session: tx optimizationsFlorin Coras4-22/+53
- cache and reuse tcp options and rcv_wnd for session layer tx bursts - avoid reading/setting total_length_not_including_first_buffer. It's part of a buffer's second cache line so it comes at a "cost". Change-Id: Id18219c2f7e07cf4c63ee74f9cdd9e5918904036 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-26Fix assert issue in ip_csum_add_even()Hongjun Ni1-1/+2
ASSERT (ip_csum_with_carry (d, x) == c) will raise assert if d equals to zero while x not equals to zero. Change-Id: Ia9ccdbf801ae565eaadd49f04569d13bfc31cba8 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-06-26tcp: avoid doing work in tcp_rcv_sacks for no sacksFlorin Coras1-2/+3
Change-Id: I00a0d7f57dc144d338d5ad45b0a6e3720c32c400 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-26node functions cannot be always_inlineDamjan Marion7-18/+18
Thanks to gcc-8 for highlighting this... Change-Id: I53bfab631a40fd1b680c76a48b0307a33fa2b154 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-26tcp: cleanup functionsFlorin Coras4-263/+258
- sprinkle statics for functions - move some inlines from header files to corresponding .c files - replace some always_inlines with statics where inlining is not performance critical Change-Id: I371dbf63431ce7e27e4ebbbdd844a9546a1f1849 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-25Add checks for bad ARP request packets in arp-termination nodeJohn Lo1-12/+9
Check ARP request packet with bad requester MAC/IP address and drop these packets. Also removed useless VRRP check in the node. Change-Id: I2c8a774d291928eb623b3a515f1edf7e338fa760 Signed-off-by: John Lo <loj@cisco.com>
2018-06-25tw: add light weight timer update functionFlorin Coras1-7/+8
Because it avoids pool putting/getting the timer, this function is somewhat faster than stopping and restarting a timer. Change-Id: Id99ed9d356b0b1f7e12facfe8da193e1cd30b3ec Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-25MAP: Move MAP-E/T to a plugin.Ole Troan18-8526/+0
Only remaining traces of MAP in the src/vnet is now in buffer.h. Awaiting a new buffer opaque API (hint, hint). Change-Id: Ie165561484731f1d7ed6e0f604b43624e06db3f0 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-24Revert "Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums""Klement Sekera5-194/+180
This reverts commit e0d2bd6bd7fc59c0c6ac48195d7f825dc99bfd91. Change-Id: If491e16f9ea66b2493a6a7c7f3c684ed585f8f51 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-22Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums"Ole Troan5-180/+194
This reverts commit a98346f664aae148d26a8e158008b773d73db96f. Change-Id: Iee5b3a5ddff0e8fd3a30fe5973cee24de434fe12 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22session: improve session lookup speedsFlorin Coras1-57/+24
It would seem that this avoids using the stack for computing the subsequent crc32 by storing the 2 x u64 ip4 5-tuple key into two registers. Probably the cast to the "convenience" data structure "masks" the fact that the key is 16B. Probably ... :-) "sh run" on an ip4 tcp sender reports that the number of clocks spent in tcp_input, where a session lookup is performed, drops ~25% (from ~100 clocks/packet to ~75 clocks/packet) Change-Id: I50d647115ac72f8407bff7e3b73328ba42f0ddb5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-22Update tapv2 documentationIan Wells1-1/+1
The documentation in the API file says that 0xffff == 'no interface ID specified' but the code tests against ~(u32)0. Change-Id: I5cd83d876c3ad4f53a5b01463299d4fcb806ea98 Signed-off-by: Ian Wells <iawells@cisco.com>
2018-06-21ipsec: VPP-1316 calculate IP/TCP/UDP inner checksumsKlement Sekera5-194/+180
Calculate IP/TCP/UDP checksums in software before adding authentication. Change-Id: I3e121cb00aeba667764f39ade8d62170f18f8b6b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-21tcp: move tracing out of established loopFlorin Coras2-28/+60
Change-Id: I4a7e4f616ed4a4df82be3112ac4702f7e4e2025c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-21Implement DHCPv6 IA NA client (VPP-1094)Juraj Sloboda13-537/+2503
Change-Id: I682a47d6cf9975aca6136188d28ee93eaadf4fe3 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-06-21BIER neighbor statsNeale Ranns7-31/+126
Change-Id: I2f638f1932b4aeddf2408c06d1b8393551675b72 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-20tcp: add per worker ctx structureFlorin Coras3-54/+56
Change-Id: I28d3c31bdc4255a4ca223d80bcf44709fb39f4ed Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-20ipsec: VPP-1308 fix sorting of SPD entriesKlement Sekera2-10/+11
Change-Id: I761aced55b7cef51a9b47048283b2cb9430bcde2 Signed-off-by: Klement Sekera <ksekera@cisco.com>