aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-04-27A bit of buffer metadata reshuffling to accommodate flow_idDamjan Marion10-44/+37
Change-Id: I2794384557c6272fe217269b14a9db09eda19220 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-27VAT for qos_record_enable_disable APIIgor Mikhailov (imichail)2-3/+90
Change-Id: I2b418b9aefe298e4e6190cbe2e220a657f688cda Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-04-26vlib: set log tap level <level> does not work for some keywordsSteven1-2/+2
While some levels such as debug and emerg work, others don't. See below. DBGvpp# set log class tap level warn set log class tap level warn set logging class: unknown input `level warn' DBGvpp# set log class tap level debug set log class tap level debug DBGvpp# set log class tap level info set log class tap level info set logging class: unknown input `level info' DBGvpp# set log class tap level err set log class tap level err DBGvpp# set log class tap level crit set log class tap level crit set logging class: unknown input `level crit' DBGvpp# set log class tap level emerg set log class tap level emerg DBGvpp# Cause: The reason for the failure for the shorter keywords is level_str is unformatted with %v which is not null terminated. For example, the character after "info" could be anything in level_str. The memcmp with size of the macro keyword __##uc which includes the null character or 5 in this case and thus the comparison fails. Fix: Use %s which insure level_str is null terminated. Use strcmp to rule out false positve match like "debugxxx" against keyword "debug". Change-Id: I7a2d97a0f7f618df105da7eca791618dce04d21e Signed-off-by: Steven <sluong@cisco.com>
2018-04-26NAT44: disable nat44-hairpinning feature for in-out interface (VPP-1255)Matus Fabian1-10/+20
Change-Id: Icd42abf4e35db550df496592cffce655f1987d68 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-04-25igmp: disable debug messagesDamjan Marion1-1/+1
Be gentle with people who run VPP in the noisy envirement where not-for-us IGMP messages are flying around... Change-Id: I07e74e29bc12ecdcc83faead9182d861c7ea1add Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-25Carry recorded QOS bits in the outer VXLAN IP headerIgor Mikhailov (imichail)1-0/+35
Currently for VXLAN IPv4. Change-Id: Id4b8bc0d9f6ab043810e4d1b9f28e01c27ce0660 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-04-25span: crash in span_mirror [VPP-1254]Steven1-2/+7
It is possible for span-input to get call with sw_if_index which is greater than sm->interfaces and crashes in span_mirror () in the following line span_interface_t *si0 = vec_elt_at_index (sm->interfaces, sw_if_index0); For example, span-input mirrors a main interface as source, it may actually get call for traffic coming in from the subinterface and crashes. The fix is simply to check if sw_if_index >= vec_len (sm->interfaces) and punt if it is. Change-Id: I8312eb321d638518e14ba2326fffd1a7919646ca Signed-off-by: Steven <sluong@cisco.com> (cherry picked from commit 516d63ff2c6671f3b0dc641511a50017a9804179)
2018-04-25dpdk: complete rework of the dpdk-input nodeDamjan Marion12-470/+707
Change-Id: If174d189de40e6f9ffae99997bba93a2519d9fda Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-25GBPv6: NAT66 actions for GBPNeale Ranns5-134/+185
Change-Id: I379150a88f2d53d6281be41e8bad6fc4f4e88a71 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-04-25vxlan:remove single bucket load-balance dpo'sEyal Bari1-9/+23
from encap path Change-Id: I62a8d13495355ad5e687f13b86c2a5d360bb2b7f Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-04-25ABF: remove the inclusion of version.h from abf_policy so it does not ↵Neale Ranns2-8/+6
recompile each time Change-Id: I97ef0ef5f694062e5867e11d434e3b521a57f649 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-25Fix some build warnings about "Old Style VLA"Juraj Sloboda3-7/+12
Change-Id: I69fee1dcf07a4d2eed69a59f0a36e63e3741ed4e Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-04-25Adjacency walk more scalableNeale Ranns2-50/+30
When walking all adjacencies for a given {next-hop,interface} instead of walking all the adjacencies on that interface and matching the next-hop (which is O(n) in the number of adjacencies on that link, find all instances of an adjacency with any link-type and wtih that {next-hop,interfacE} pair: this is O(1). Change-Id: Ic80399fc9e93c8df111379c039e592d8cafbab18 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-25STN: use the punt feature arcsNeale Ranns1-79/+28
Fixes: - the parsing of the packet falsely assume an ethernet header at offset 0 - it causes a frame leak Change-Id: Ib9ac9535173ed216de613baaa06d0e1dea3640ca Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-25ipsec: make crypto_worker_main_t a full cache line in sizeFlorin Coras1-0/+1
Change-Id: I927c9358915e03187cf7d3098c00b85b5ea2f92d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-25igmp: data structure refactoringJakub Grajciar5-350/+820
Improve igmp membership report performance, introduce group and source specific timers. (side effect compatible with Group-specific query). Change-Id: Ie3dd2c0dabe5f7138c2f8029e6bbbbfcb5e4904f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-04-25Fix sample-plugin build with newer clang versionsDamjan Marion1-0/+20
Change-Id: Id90e6fb1211b7789e6e3df0b6579c4757e7fdfa6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-24lacp: deleting the bond subinterface may cause lacp to lose the partner ↵Steven5-38/+10
[VPP-1251] Problem: When the bond subinterface is removed, it was observed that we lost the lacp partner. Show hardware shows rx counter goes up, but show interface does not for the slave interfaces. Cause: We reset the interface promiscuous mode when the bond subinterface is deleted. This causes dpdk not to accept any packet. Leave the interface in promiscuous mode fixes the problem. Other fixes: There are few places we use hw_if_index as if they are sw_if_index. But they don't necessarily have the same value. As soon as a subinterface is created, they start to diverge. The fix is to use the correct API for the hw_if_index and sw_if_index. Change-Id: I1e6b8bca0a4aae396d217a141271cbf968500c91 Signed-off-by: Steven <sluong@cisco.com> (cherry picked from commit 42c6599bf3057a7e8f4f00f5b6a9dd72af48d283)
2018-04-24memory leakKingwel Xie1-0/+3
obvious leak of parent_indices Change-Id: I572b33de1756c8062a87c754117d990622fe12fe Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-04-24NAT44: one-armed NAT and identity mapping (VPP-1212)Matus Fabian1-3/+10
Change-Id: I228728bacfca6056dc409a96de1bffb9cadcd3e6 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-04-24mem-leak in stats handling (VPP-1250)Neale Ranns1-4/+18
Change-Id: I55f978c84a56bc089e5657c528195b6c84409364 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit df53f5fda277a035984f1de4474f0b58ae15b114)
2018-04-24Support QOS_SOURCE_IP recording from L2 input node.Igor Mikhailov (imichail)2-5/+77
Some scenarios not involving ip[4,6]-input paths might benefit from IP header QOS fields recorded and applied. An example: L2 (overlay) traffic being encapsulated by VPP in VXLAN and transmitted on another (underlay) interface might want the QOS information carried over in the outer IP header. Change-Id: I4d9462c47ae6ba97680edb1e53340b17cfd7845b Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-04-23MPLS VPLS CLI fixNeale Ranns1-0/+1
set the IS_RX flag based on CLI 'l2-input-on' Change-Id: I53d9129a7c09f605c1eb55753426f392b1b480bc Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-04-23lacp: partner may time us out if fast-rate is configured [VPP-1247]Steven5-8/+14
We should be sending LACP PDU every second if the partner has LACP_TIMEOUT flag set which means it will time us out in 3 seconds. Add interface name for lacp trace Change-Id: If7d816c062d03e80cc0dd7d10dba0b76ace0664a Signed-off-by: Steven <sluong@cisco.com>
2018-04-20tcp: make newreno byte instead of acks dependentFlorin Coras4-3/+28
Should be more resilient to ack losses Change-Id: Icec3b93c1d290dec437fcc4e6fe5171906c9ba8a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-20tcp: improve statsFlorin Coras3-128/+177
Change-Id: I9ab11ba9f958c679112eb22c8db39cb269a29dc7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-19Allow an IPsec tunnel interface to be renumberedMatthew Smith6-30/+54
When creating an IPsec tunnel interface, allow a numeric identifier to be set for use in the interface's name in place of the dev instance. Default to using the dev instance if no value is explicitly set. When an IPsec tunnel is deleted, the interface is deleted now instead of being kept in a pool of available hw interfaces. Otherwise there was the possibility of conflicting tx node names between deleted tunnels and newly created ones. Change-Id: Ic525466622a0dec38a845fa5871c084f6d9da380 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-04-19Add special Twice-NAT feature (VPP-1221)Juraj Sloboda7-30/+94
When enabled then Twice-NAT is applied only when source IP equals destination IP after DNAT Change-Id: I58a9d1d222b2a10c83eafffb2107f32c1b4aa3a8 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-04-19Minor optimzation/cleanup to ethernet-input nodeJohn Lo1-5/+5
Change-Id: Ibf3ef82950f50b746394a731cd2e7cba1cd16ec4 Signed-off-by: John Lo <loj@cisco.com>
2018-04-18dpdk: improve loggingDamjan Marion4-35/+187
- use of vlib_log for non-dataplane logging - redirect of dpdk logs trough unix pipe into vlib_log - "show dpdk physmem" cli Change-Id: I5da70f9c130273072a8cc80d169df31fc216b2c2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-18vlib: logging improvementsDamjan Marion2-32/+74
Change-Id: I1c72d9ddefdc83c7d5ab2564f89d83ffd3fa6110 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-18typo fix: UNKOWN -> UNKNOWNAndrey "Zed" Zaikin7-14/+14
Change-Id: I008a4d7ad7160d1f07e7ceef712a5318a9368308 Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-04-18Mcast rewrite optimisationsNeale Ranns8-45/+59
hard code the address mask offsets. This are protocol specific and only used on ethernet when used at all. Change-Id: Ib1f6f33682f53254ffbb5a241a1583e65420e0c7 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-18session: coverity warningsFlorin Coras2-3/+3
Change-Id: I53bb1e289ba16ee6d9aed7285b18437c996077a4 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-18NAT44: recycle old sessions for forwarding bypass (VPP-1240)Matus Fabian4-17/+98
Change-Id: I7e6b0e7e91cc032b1685f35de5d84363a85158a5 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-04-18vppinfra: make set_mempolicy failure non-critical unless NUMA_FORCE is setDamjan Marion1-1/+2
Change-Id: I6c1c855cf5fc2ee06f1c7ddd6576ca16cd556fdd Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-18SCTP: coverity warningsMarco Varlese1-5/+2
This patch addresses the warning 182994 Change-Id: I071f3cbdf9965c7b57d444f79430ee75c66c856e Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-04-18udp/session: refactor to support dgram modeFlorin Coras21-447/+1105
- adds session layer support for datagram based protocols - updates udp to work in pure connectionless and datagram mode. The existing connected mode is now 'accessible' for apps as a dummy UDPC, as in, connected udp, protocol. - updates udp_echo, echo client, echo server code to work in datagram mode. Change-Id: I2960c0d2d246cb166005f545794ec31fe0d546dd Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-18dpdk: resurrect removed code [VPP-1245]Steven1-0/+4
https://gerrit.fd.io/r/#/c/7701/ accidentally removed 3 lines of code in dpdk/device/init.c which were added by https://gerrit.fd.io/r/#/c/7826/ case VNET_DPDK_PMD_VHOST_ETHER: xd->port_type = VNET_DPDK_PORT_TYPE_VHOST_ETHER; break; Those lines were needed to recognize vhost-user interface which is created via vdev command in dpdk and display VhostEthernet. Without them, UnknownEthernet is displayed. Change-Id: I6d7ee6aecc6a415fbb7308595d515649475bcd5f Signed-off-by: Steven <sluong@cisco.com>
2018-04-18Fix the ip header offset counting in vnet/ipsecSzymon Sliwa1-5/+4
IP header is set as data + sizeof(ethernet_header_t), what does not need to be true. The solution is to use l3_hdr_offset. Change-Id: I5d9f41599ba8d8eb14ce2d9d523f82ea6e0fd10d Signed-off-by: Szymon Sliwa <szs@semihalf.com>
2018-04-17Add logging supportDamjan Marion9-52/+875
Change-Id: Ieac9cf50156dbbb4962411e900d59256441915ef Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-04-17IP mcast: allow unicast address as a next-hopNeale Ranns8-41/+306
Change-Id: I5e679f2601e37688f2768620479dc2efb7d19ca3 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-17dpdk: add additional fields to rte_mbuf trace printDamjan Marion1-2/+5
Change-Id: I3792c524323ce9e300648abe85454cff5d19aba7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-17dpdk: print device flags in the 'show hardware' outputDamjan Marion2-11/+37
Change-Id: I0d10f13a56420b119fdfad97dcc135b245c269e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-17ACL based forwardingAndrew Yourtchenko13-1/+1999
A poor man's flow switching or policy based rounting. An ACL is used to match packets and is associated with a [set of] forwarding paths that determine how to forward matched packets - collectively this association is a 'policy'. Policies are then 'attached', in a priority order, to an interface when thaey are encountered as an input feature. If a packet matches no policies it is forwarded normally in the IP FIB. This commit is used to test the "ACL-as-a-service" functionality, which currently compiles, and the existing traffic ACL tests pass in both hash and linear modes. Change-Id: I0b274ec9f2e645352fa898b43eb54c457e195964 Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Signed-off-by: Ole Troan <ot@cisco.com>
2018-04-17VPP-1243: fix reassembly CLIKlement Sekera1-5/+6
Change-Id: Ie20aaf0eb1a5a338a54f0de4d6da661431be5163 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-04-17vhost: show vhost-user <interface> may crash [VPP-1242]Steven1-0/+7
show vhost-user <interface> may cause a crash if interface is semi-bogus. Semi-bogus means it is a known vpp interface which has a hw_if_index, but it is bogus because it is not a vhost-user interface. The fix is to add a check to reject non vhost-user interface for the command. Change-Id: I63f1e8bfbf46f5ec4c30f9fb3546982b63cd7cc5 Signed-off-by: Steven <sluong@cisco.com>
2018-04-17SCTP: coverity scan warningsMarco Varlese3-30/+39
This patch addresses 182346, 182347, 182353. Change-Id: I59c3d74bd3a2122b836c93e22ddb632fa032f7fe Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-04-17vxlan:remove counters writeback cacheEyal Bari2-519/+242
+refactor decap loop to remove repetitions and goto's slightly improves performance in scale (3k-4k tunnels) tests (7-9 clocks) slightly deteriorates performance in single tunnel tests (3-4 clocks) Change-Id: I1a64ed0279c00481b61a162296c5a30f58bf29c4 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-04-17acl-plugin: VPP-1241: fix the "show acl-plugin tables applied" outputAndrew Yourtchenko2-45/+20
It is a relatively rarely used low level command for code that didn't change, but due to infra changes it did not survive. Having it working may be very useful for corner-case debugging. So, fix it for working with the acl-as-a-service infra. Change-Id: I11b60e0c78591cc340b043ec240f0311ea1eb2f9 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 18bde8a579960aa46f43ffbe5c2905774bd81a35)