aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2018-06-13vxlan:offload RX floweyal bari5-1/+579
ip4 vxlan cli/api (using flow infra) to create flows and enable them on different hardware (currently tested with i40e) to offload a vxlan tunnel onto hw: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 to remove offload: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 del TODO:ipv6 handling Change-Id: I70e61f792ef8e3f007d03d7df70e97ea4725b101 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-12tcp: add close-wait state flagsFlorin Coras1-0/+1
Change-Id: I35508d5251633396393f52842d1b58bc1c1463f6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-11tcp: cleanup connection/session fixesFlorin Coras9-50/+73
- Cleanup session state after last ack and avoid using a cleanup timer. - Change session cleanup to free the session as opposed to waiting for delete notify. - When in close-wait, postpone sending the fin on close until all outstanding data has been sent. - Don't flush rx fifo unless in closed state Change-Id: Ic2a4f0d5568b65c83f4b55b6c469a7b24b947f39 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-11udp: fix for multiple workers and add testFlorin Coras5-7/+24
Since the main thread is not used for session polling anymore, when vpp is started with multiple wokers, allocate connections on the first. Also add a simple udp make test. Change-Id: Id869f5d89e0fced51048f0384fa86a5022258b7c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan27-126/+332
This patch separates setting of hardware interfaec and software interface MTU. Software MTU is L2 payload MTU (i.e. not including L2 header). Per-protocol MTU for IPv4, IPv6 and MPLS can also be set. Currently only IP4, IP6 are enabled in adjacency / rewrite code. Documentation in src/vnet/MTU.md Change-Id: Iee2fd6f0bbc8210748dd8e073ab9fab87d323690 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-10tcp: fix timer based recovery exit conditionFlorin Coras2-2/+2
Change-Id: I3f36e5760fd2935cc29d22601d4c0a1d2a22ba84 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-09session: cleanup queue node tracingFlorin Coras1-67/+67
Change-Id: Ib8e332174d96bf9cfa4bbaaa5b8d8bc9958424b1 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-08Add reaper functions to want events APIs (VPP-1304)Neale Ranns2-4/+135
Change-Id: Iaeb52d94cb6da63ee93af7c1cf2dade6046cba1d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-08Implement DHCPv6 PD client (VPP-718, VPP-1050)Juraj Sloboda12-42/+3059
Change-Id: I72a1ccdfdd5573335ef78fc01d5268934c73bd31 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-06-08http server: do not close connections after replyFlorin Coras1-22/+29
Change-Id: I7add46258fe44bc4d23d805ffc7eae75e37cab82 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-08export counters in a memfd segmentDave Barach1-0/+4
also export per-node error counters directory entries implement object types Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-08Gratuitous ARP packet handlingNeale Ranns1-8/+33
only learn from a GARP packet if it is an update to an existing entry. Change-Id: I4c1b59cfedb911466e5e4c9756cf53a6676e1909 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-08Adding pad for reasm vnet_buffer reasm struct sothat adj_index is retainedVijayabhaskar Katamreddy1-0/+1
Change-Id: Ib756c4f3e8caba1f77ef48b62a2a5d7283fe5016 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-06-07Fix IP scan neighbor API/CLI handling of interval and staleJohn Lo1-2/+2
Change-Id: I77264c4398e6fad461bb4dc10867a1f9c3accec0 Signed-off-by: John Lo <loj@cisco.com>
2018-06-07Revert "Allow arp-input node to learn IPv4 neighbors from GARP packets"John Lo1-5/+0
This reverts commit d018870d1b02109fc8b328446f15312fdd2fcd11. Change-Id: I700ade7a25ae5ed72cfed586e50b02492a4f11de Signed-off-by: John Lo <loj@cisco.com>
2018-06-07DHCP Client DumpNeale Ranns4-60/+231
- use types on the DHCP API so that the same data is sent in comfing messages and in dumps - add the DHCP client dump API - update VOM to refelct API changes - rename VOM class dhcp_config* dhcp_client* - the VOM dhcp_client class maintains the lease data (which it reads on a dump) for clients to read Change-Id: I2a43463937cbd80c01d45798e74b21288d8b8ead Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-07Allow arp-input node to learn IPv4 neighbors from GARP packetsJohn Lo1-0/+5
Change-Id: I86019f4ff9b0c8c633638fa23341d8ce49099ba6 Signed-off-by: John Lo <loj@cisco.com>
2018-06-05bond: send gratuitous arp when the active slave went down in active-backup modeSteven8-31/+107
- Modify the API send_ip6_na and send_ip4_garp to take sw_if_index instead of vnet_hw_interface_t and add call to build_ethernet_rewrite to support subinterface/vlan - Add code to bonding driver to send an event to bond_process when the first interface becomes active or when the active interface is down - Create a bond_process to walk the interface and the corresponding subinterfaces to send garp/ip6_na when an event is received. - Minor cleanup in bonding/node.c Note: dpdk bonding driver does not send garp/ip6_na for subinterfaces. There is no attempt to fix it here. But the infra is now done and should be easy to add the support. Change-Id: If3ecc4cd0fb3051330f7fa11ca0dab3e18557ce1 Signed-off-by: Steven <sluong@cisco.com>
2018-06-05VPP-1305: Add support for tagsJerome Tollet2-2/+18
Change-Id: I9e759037295fe675abe426e565a562b1ec1e7d33 Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2018-06-05BIER CLI show commands; no crash on non-existant objects (VPP-1303)Neale Ranns3-6/+27
DBGvpp# sh bier disp entry DBGvpp# sh bier disp entry 0 No such BIER disp entry: 0 DBGvpp# sh bier disp table DBGvpp# sh bier disp table 0 No such BIER disp table: 0 DBGvpp# sh bier disp table 11 No such BIER disp table: 11 DBGvpp# DBGvpp# sh bier bift no BIFT entries DBGvpp# sh bier bift set 0 no BIFT entries DBGvpp# sh bier bift set 0 sd 0 bsl 0 no BIFT entries DBGvpp# DBGvpp# sh bier fib No BIER tables DBGvpp# sh bier fib 0 DBGvpp# sh bier fib 0 4 DBGvpp# sh bier fmask DBGvpp# sh bier fmask 2 No BIER f-mask 2 DBGvpp# sh bier imp DBGvpp# sh bier imp 0 No such BIER imposition: 0 Change-Id: Ibadac3441dd8a6d1b96bd9ee4358e28498875b95 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-04ip4: optimize ip4_localFlorin Coras2-253/+319
"sh run" says the number of clocks for my tcp based throughput test dropped from ~43 to ~23 Change-Id: I719439ba7fc079ad36be1432c5d7cf74e3b70d73 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-04Remove unused GRE buffer meta-dataNeale Ranns1-6/+0
Change-Id: Ia8ef019742c13b1149916d51796cad6f50687162 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-04flow:add enabled hw format functionEyal Bari2-0/+25
Change-Id: Ide1f76e9207b6022d5258a119f8d59cca85651b5 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-04ip: save fib index for buffer in ip lookupFlorin Coras5-114/+65
Avoids recomputing the fib index in ip local for locally delivered packets and should incur no extra cost when forwarding packets. Change-Id: Id826ffa8206392087327f154337eabc8a801b4d7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-03Interface Tag: memset field in VOM, clear the tag in VPP on interface deleteNeale Ranns1-0/+1
Change-Id: Id97de732b5952d5d86202e7749c9e81cf8dbed87 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-01session: improve disconnect handlingFlorin Coras3-11/+37
If the caller is the session owning thread or the main thread with a worker barrier sync (cli/api) add an event to the pending disconnects vector in the session node and entirely avoid using the event queue. Useful for bursts of disconnects (like an app detach). If disconnects come from a processes, be willing to retry enqueueing the disconnect to the event queue multiple times. Change-Id: Ieece1f1091b713f94c41c703b6e805bc8498816a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-31Improve L2FIB delete entry handling and "show l2fib" CLI optionsJohn Lo4-54/+69
Improve deletion of L2FIB MAC entry using l2fib_add_del API. If sw_if_index param specified in th API is non-zero, check that its value match that of the MAC entry to proceed with deletion. Improve "show l2fib" CLI to allow display of all entries, learned entries only, or added ovia CLI/API entries only. For added entry, show "no" under the age column to indicate entry does not age. Change-Id: I0bd2582c2b6bac268e551e4f8ca6dab2be4400ad Signed-off-by: John Lo <loj@cisco.com>
2018-05-30IPv6 for-us/receive multicast routes fixNeale Ranns1-0/+4
Change-Id: I5e29e16b4d45411b1a7c177b8d7156c5baefe6a1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-05-30session: fix v6 unbinds that use uri apiFlorin Coras1-2/+6
This api only supports default tables but v6 and v4 default tables are different. Change-Id: I7fe39251af99082278e84d7411511bdeca34e609 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-30session: fix session table retrievalFlorin Coras1-2/+2
Change-Id: If37d644a26132c42a04927f612eec5e891066451 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-30bonding: fix packet trace in bond-inputDamjan Marion1-5/+1
Change-Id: I00fc4a4553dabed7ef099227b8253ed4916ea5e4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion3-72/+16
Change-Id: Ibab5e27277f618ceb2d543b9d6a1a5f191e7d1db Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-29af_packet: Add support for dump interfacesMohsin Kazmi4-1/+98
Change-Id: I8d8ecc80edb7665125ba625a3ce7b30d2dea88f0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-05-29ipsec: fix IKEv2 crash when rsa cert is used for authenticationRadu Nicolau1-0/+1
Cause: EVP_MD_CTX object used but not initialized. Change-Id: I390b2acf580f16415685563fa52e56717efc7be7 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-05-28af-packet: Add support for loggingMohsin Kazmi3-38/+52
Change-Id: I4cc6a20b69cce2aa52768a27c5d455eb098224c8 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-05-28itf: Fix admin up down for AF_PACKET and vhost-userMohsin Kazmi3-12/+50
Change-Id: I84327197d59c72d0d046dd2cb4071bf74af6fc28 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-05-28Fix IP neighbor/arp pool full and static entry handlingJohn Lo2-166/+169
Move handling of IP neighbor pool full into main thread on entry creation and make sure static entriesare not deleted for reuse. Fix IPv6 neighbor handling on interface down and up so that static entries are not deleted. Change-Id: I073794949a41a5b86201e519ebe479febfc506c8 Signed-off-by: John Lo <loj@cisco.com>
2018-05-27proxy_arp: remove unused is_addMarek Gradzki1-2/+1
Change-Id: I1773d962b373693a737d39c0c97e8c53eb91545a Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-05-27ip4-input node reworkDamjan Marion2-125/+336
Gain is around 6 clocks per packet (22 to 16). Change-Id: Ia6f4293ea9062368a9a6b235c650591dbc0707d0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-27bond-input performance optimizationDamjan Marion1-291/+261
Old code ~25 clocks/packet, new ~10. Change-Id: I202cd6cbafb1ab2296939634d674f7ffd28253fc Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-27VPP-1294: add missing feature arc constraintDave Barach5-51/+114
the ip4-dhcp-client-detect feature MUST run prior to nat44-out2in, or inbound dhcp broadcast packets will be dropped. Certain dhcp servers answer lease renewal dhcp-request packets with broadcast dhcp-acks, leading to unrecoverable lease loss. In detail, this constraint: VNET_FEATURE_INIT (ip4_snat_out2in, static) = { .arc_name = "ip4-unicast", .node_name = "nat44-out2in", .runs_after = VNET_FEATURES ("acl-plugin-in-ip4-fa"), }; doesn't get the job done: ip4-unicast: [17] nat44-out2in [23] ip4-dhcp-client-detect [26] ip4-not-enabled Add a proper constraint: VNET_FEATURE_INIT (ip4_snat_out2in, static) = { .arc_name = "ip4-unicast", .node_name = "nat44-out2in", .runs_after = VNET_FEATURES ("acl-plugin-in-ip4-fa", "ip4-dhcp-client-detect"), }; and the interface feature order is OK, at least in this regard: ip4-unicast: [17] ip4-dhcp-client-detect [18] nat44-out2in [26] ip4-not-enabled We need to carefully audit (especially) the ip4-unicast feature arc, which has [gasp] 37 features on it! Change-Id: I5e749ead7ab2a25d80839a331de6261e112977ad Signed-off-by: Dave Barach <dave@barachs.net>
2018-05-26Fix interface-rx-dpo-l2 node to setup l2_len in vnet bufferJohn Lo1-4/+16
Change-Id: Ic1fab1f3aba92bbdbfd281459562d1f9697ab465 Signed-off-by: John Lo <loj@cisco.com>
2018-05-26tcp: loss recovery improvements/fixesFlorin Coras8-146/+248
- fix newreno cwnd computation - reset snd_una_max on entering recovery - accept acks beyond snd_nxt but less than snd_congestion when in recovery - avoid entering fast recovery multiple times when using sacks - avoid as much as possible sending small segments when doing fast retransmit - more event logging Change-Id: I19dd151d7704e39d4eae06de3a26f5e124875366 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-25Add interface rx pcap tracingDave Barach1-15/+13
Should cost at most 1 clock per frame when not enabled. Add "pcap rx trace..." debug CLI, refactored "pcap tx trace" debug CLI to avoid duplicating code. Change-Id: I19ac75d1cf94a6a24c98facbf0753381d37963ea Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-05-25Fix possible null pointer dereferenceJuraj Sloboda1-3/+14
Replace clib_warning with vlib_log_warn Change-Id: I6d0b8d97048b75f4418609264af0c14e19fad79b Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-05-25tcp: handle acks in close waitFlorin Coras2-1/+2
Thanks to Ning Li <muziding001@163.com> for reporting. Change-Id: I758bc6760ec5a9ec688172bc162a1873f96ab4f3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-05-25bond: performance harvestingSteven4-133/+183
- hash is great. But it is a bit too slow for the DP. Use direct array indexing to quickly retrieve the slave interface. - the algorithm used by flow hash is great. But it is a bit too slow for the DP. Use l2_hash_hash() extracted from lb_hash.h which ECMP is using. It makes use of intrinsic crc32 instruction set. - shortcut modulo arithmetic when the operand is 2**x (where x up to 4) to avoid division instruction. - special case for link count == 1 in bond_tx_fn() - use clib_mem_unaligned to access data for the packet to avoid alignment error - Fix some typos for packet tracing. Change-Id: I8eae3ad497061c5473aa675ba894ee0211120d25 Signed-off-by: Steven <sluong@cisco.com>
2018-05-25ARP proxy dumpsNeale Ranns12-41/+279
Change-Id: I8335ebf266becf2f42bb3f28a17dfed8d9b08f97 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-05-25VPP-1277: IPIP - Copy TOS/TC from inner packet to outer.Ole Troan5-18/+109
Add support for either copying TOS/TC from inner packet to outer, or set to fixed value. Change-Id: I716a95f875349acec94317b266c8cf9f2f81a785 Signed-off-by: Ole Troan <ot@cisco.com>
2018-05-24Rewrite of l2-output nodeDamjan Marion1-332/+280
Change-Id: I8cbd1eac80ae4aeb173d02786e9ccf3b4877304d Signed-off-by: Damjan Marion <damarion@cisco.com>