summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2018-10-10L2-flood: no clone for 1 replicationNeale Ranns1-59/+69
Change-Id: If178dd38e7920f35588f5d821ff097168b078026 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-09vnet: ethernet-input incorrectly sets l3_hdr_offset in some casesAndrew Yourtchenko1-26/+26
The issue surfaced when developing the tap GSO code, with an iteration where output path is reliant on vnet_buffer (b0)->l3_hdr_offset being set correctly in the input path, during performance testing. Adding a workaround in the TX path shows that the issue surfaces only for relatively few packets during the test (about 100 out of 600000). Analysis shows the issue arises if the ethernet-input is handling two untagged packets with different sw_if_index values - then the accelerated path punts to slow path, before the setting of the l2.l2_len values is done, thus resulting in them being 0, and l3_hdr_offset being the same as l2_hdr_offset, wreaking havoc on TX path. The solution is to move the l2_hdr_offset calculation into a place where it is done for all the packets, and move the l3_hdr_offset calculation into the determine_next_node() function - as that function is also the one setting the special-case l2.l2_len value for tagged packets and moving the current_data for the L2 case. Change-Id: If728c7715e011930c1887691188c98055bddde67 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-08Adding Multipath support for exclusive DPO based fib path entries via rpathVijayabhaskar Katamreddy2-2/+16
Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-10-08replicate trace fixNeale Ranns1-2/+6
Change-Id: I785ecadbf30812a500629870aa717e64f4cf0cdd Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-06bond: active-backup mode is using the wrong load balance algoSteven1-2/+4
active-backup mode is using l2 load balance algo. It should be using active-backup. Also notice that the output is missing a character. vpp# create bond mode active-backup create bond mode active-backup vpp# sh bond sh bond interface name sw_if_index mode load balance active slaves slaves BondEthernet0 6 xor l34 2 2 BondEthernet1 9 xor l34 1 1 BondEthernet2 10 active-backu l2 0 0 vpp# Change-Id: If5ed0cc6c25f6c2ddabec15ff6188b34923d38e3 Signed-off-by: Steven <sluong@cisco.com>
2018-10-05bond: tx perf improvement, part troisDamjan Marion2-67/+166
Introduce bond_tx_inline which takes lb as a constant for gcc to do the optimization The number appears a tad better for 256 bytes frame. with the patch -------------- Thread 2 vpp_wk_1 (lcore 3) Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61 vector rates in 8.4836e6, out 1.6967e7, drop 0.0000e0, punt 0.0000e0 Name State Calls Vectors Suspends Clocks Vectors/Call BondEthernet0-output active 141054 36109824 0 2.51e1 256.00 BondEthernet0-tx active 141054 36109824 0 2.55e1 256.00 TenGigabitEthernet6/0/0-output active 141054 18055469 0 9.43e0 128.00 TenGigabitEthernet6/0/0-tx active 141054 18055469 0 6.97e1 128.00 TenGigabitEthernet6/0/1-output active 141054 18054355 0 9.54e0 127.99 TenGigabitEthernet6/0/1-tx active 141054 18054355 0 7.05e1 127.99 bond-input active 141054 36109824 0 1.76e1 256.00 dpdk-input polling 70527 36109824 0 5.03e1 512.00 ethernet-input active 141054 36109824 0 6.12e1 256.00 ip4-input active 141054 36109824 0 3.26e1 256.00 ip4-lookup active 141054 36109824 0 2.94e1 256.00 ip4-rewrite active 141054 36109824 0 3.27e1 256.00 without the patch ----------------- Thread 2 vpp_wk_1 (lcore 3) Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61 vector rates in 8.4443e6, out 1.6889e7, drop 0.0000e0, punt 0.0000e0 Name State Calls Vectors Suspends Clocks Vectors/Call BondEthernet0-output active 142744 36542464 0 2.51e1 256.00 BondEthernet0-tx active 142744 36542464 0 2.67e1 256.00 TenGigabitEthernet6/0/0-output active 142744 18270813 0 9.19e0 127.99 TenGigabitEthernet6/0/0-tx active 142744 18270813 0 6.98e1 127.99 TenGigabitEthernet6/0/1-output active 142744 18271651 0 9.43e0 128.00 TenGigabitEthernet6/0/1-tx active 142744 18271651 0 7.02e1 128.00 bond-input active 142744 36542464 0 1.76e1 256.00 dpdk-input polling 71372 36542464 0 5.08e1 512.00 ethernet-input active 142744 36542464 0 6.15e1 256.00 ip4-input active 142744 36542464 0 3.23e1 256.00 ip4-lookup active 142744 36542464 0 2.96e1 256.00 ip4-rewrite active 142744 36542464 0 3.28e1 256.00 Change-Id: I9fd43eda3c735cbff680ac6d2f01ecdae81f0eda Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05session: fix local session tagging and cleanupFlorin Coras3-7/+5
Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-05On interface deletion - make sure any vlan qinq table is clearedJohn Lo1-0/+2
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c Signed-off-by: John Lo <loj@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-05vxlan:ip4 decap:remove access to tunnel objectEyal Bari3-183/+190
store local/remote addresses + vrf + vni in hash key store complete decap info in hash value (sw_if_index + next_index + error) this removes the need to access the tunnel object when matching both unicast and mcast. however for mcast handling it requires 3 hash lookups: * one failed unicast lookup (by src+dst addrs) * lookup by mcast(dst) addr . * unicast lookup (tunnel local ip as dst + pkt's src addr) where previously it needed 2: * lookup by src to find unicast tunnel + compare dst to local addr (failing for mcast) * lookup by mcast to find the mcast tunnel Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb Signed-off-by: Eyal Bari <ebari@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-04udp_echo: fix cut-through server modeFlorin Coras2-19/+26
Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587 Signed-off-by: Florin Coras <fcoras@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-04VPP-1430: remove unnecessary paddingMarco Varlese1-2/+0
A copy/paste mistake caused to add padding to the buffer used to send data. Change-Id: I04d8dfec4ae195927be1675c5ce8b30230d5b376 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
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-10-03ipsec: add missing ipv6 ah code & ipv6 testsKlement Sekera4-27/+103
Change-Id: I89e90193ded1beb6cb0950c15737f9467efac1c3 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-10-03session: fix first segment manager cleanupFlorin Coras2-4/+5
Change-Id: I750db7617ff9fd36647743094e0fa855e7dada86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-03VPP-1426: CLI crash on 'set int feature'Paul Vinciguerra1-1/+1
Change-Id: Ib2221a43347c66940b6b5f71914a451ca4627d2f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-02Enabled untagged vs default functionalityMike Bly2-6/+5
Removed 0-tags attribute for default-sub-if config Moved default-sub-if check before untagged Change-Id: I68043445aa2f79846e0743567b9015257fd87f8d Signed-off-by: Mike Bly <mbly@ciena.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-02vhost-user: add support for vlib_log APIJerome Tollet4-177/+129
Change-Id: I0af68f6b41d0024aa64b93a8b18e2d179bf939b0 Signed-off-by: Jerome Tollet <jtollet@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-02BFD: add get echo source API (VPP-1367)Matus Fabian2-1/+87
Change-Id: I45f540128e038ddb17ba96ce30965e8f7c732067 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-02IPsec: add API for SPDs dump (VPP-1363)Matus Fabian2-1/+60
Change-Id: I36e6878712c394de629a9182d2af24c53a8f811d Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-02vhost-user: Interface state updatesJuraj Sloboda4-16/+29
Fix inconsistencies between admin and link interface states Admin down should imply link down: link_up = admin_up && link_ready Change-Id: I4d668d82d035b5d2ae508727f34f1722a0c3e677 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-02vhost_user: Fix setting MTU using uninitialized variableJuraj Sloboda1-2/+1
Change-Id: I0caa5fd584e3785f237d08f3d3be23e9bfee7605 Signed-off-by: Juraj Sloboda <jsloboda@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-02tls: fix disconnects for sessions with pending dataFlorin Coras6-17/+73
TLS can enqueue events to itself when app session queue cannot be entirely drained. If a pending disconnect is handled before any such event, session layer may try to dequeue data on deallocated sessions. Change-Id: I5bfc4d53ce95bc16b6a01e1b0e644aafa1ca311b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02tcp: fix close wait timeout with no finFlorin Coras1-0/+4
Change-Id: Icba9b0dc6dcb4b72288f966728201812d8d12144 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02tcp: accept fins if in recoveryFlorin Coras1-1/+3
Change-Id: I0c9c055fcc3d681c4032228a90cc81f484e200f0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-01Fix documentation about sw_interface_set_l2_bridgeYichen Wang1-1/+1
Change-Id: I53e0e7d2cf1e3c52794830b33fa93d1582b74769 Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-10-01Source VRF SelectNeale Ranns2-0/+34
match against a packet's source address to determine the VRF for the subsequent destination address lookup. Change-Id: I48ee0ef54dcb891f0ec7f879e4d3b925a0ed0081 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01Add adjacency counters to the stats segmentNeale Ranns5-8/+40
Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-01API / CLI event-log tracingDave Barach4-275/+1
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 Ranns6-26/+67
Change-Id: I798e4fb6470ae9e763f8de1c290ff0fc3c0b7f9e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01SCTP: fix overflow issue with timestampMarco Varlese5-23/+29
Change-Id: I03bb47a2baa4375b7bf9347d95c4cc8de37fe510 Signed-off-by: Marco Varlese <marco.varlese@suse.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-29session: lock msg queues while generating control eventsFlorin Coras2-13/+10
Change-Id: I229ce9c306a97956c87ccb8f7a1c5c9dac94ab31 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-28bond: tx performance enhancement part deuxSteven3-124/+106
- Reduce per packet cost by buffering the output packet buffer indexes in the queue and process the queue outside the packet processing loop. - Move unnecessary variable initialization outside of the while loop. - There is no need to save the old interface if tracing is not enabled. Test result for 256 bytes packet comparison. Other packet size shows similar improvement. With the patch -------------- BondEthernet0-output active 52836 13526016 0 1.71e1 256.00 BondEthernet0-tx active 52836 13526016 0 2.68e1 256.00 TenGigabitEthernet6/0/0-output active 52836 6762896 0 9.17e0 127.99 TenGigabitEthernet6/0/0-tx active 52836 6762896 0 6.97e1 127.99 TenGigabitEthernet6/0/1-output active 52836 6763120 0 9.40e0 128.00 TenGigabitEthernet6/0/1-tx active 52836 6763120 0 7.00e1 128.00 bond-input active 52836 13526016 0 1.76e1 256.00 Without the patch ----------------- BondEthernet0-output active 60858 15579648 0 1.73e1 256.00 BondEthernet0-tx active 60858 15579648 0 2.94e1 256.00 TenGigabitEthernet6/0/0-output active 60858 7789626 0 9.29e0 127.99 TenGigabitEthernet6/0/0-tx active 60858 7789626 0 7.01e1 127.99 TenGigabitEthernet6/0/1-output active 60858 7790022 0 9.31e0 128.00 TenGigabitEthernet6/0/1-tx active 60858 7790022 0 7.10e1 128.00 bond-input active 60858 15579648 0 1.77e1 256.00 Change-Id: Ib6d73a63ceeaa2f1397ceaf4c5391c57fd865b04 Signed-off-by: Steven <sluong@cisco.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-27tcp: use scaled window for new connectsFlorin Coras3-5/+12
Change-Id: Idf83fce8ca176e57b323e3741034e3223f1d195a Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-27SCTP: fix advanced debug outputMarco Varlese1-2/+2
Change-Id: Ied63ebaec8e19189f8b1ab2a7f6d7474c3f2ad6e Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-09-27IPIP and IPv6 fragmentationOle Troan8-287/+218
- 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-26vnet: show interface rx-placement may display garbage charactersSteven1-1/+1
Before ------ DBGvpp# sh int rx-mode sh int rx-mode Thread 1 (vpp_wk_0^@): node vmxnet3-input: vmxnet3-0/b/0/0 queue 0 (polling) Thread 2 (vpp_wk_1^@): node vmxnet3-input: vmxnet3-0/13/0/0 queue 0 (polling) DBGvpp# After ----- DBGvpp# sh int rx-placement sh int rx-placement Thread 1 (vpp_wk_0): node vmxnet3-input: vmxnet3-0/b/0/0 queue 0 (polling) Thread 2 (vpp_wk_1): node vmxnet3-input: vmxnet3-0/13/0/0 queue 0 (polling) DBGvpp# Change-Id: I5910d502757054c3942fac9d20c5104e95fc6b56 Signed-off-by: Steven <sluong@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-26forget to assign spd_index to configKingwel Xie1-0/+2
Change-Id: I35dcb987edf11097f34a633ac36d87cecd12088f Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.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-26Modify return values of L2 bridge API handlersAlexander Chernavin2-1/+23
Change-Id: Ie6a6dde1fdc0e4fa8560682072a69876867a88d3 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2018-09-26bond: tx perf improvementsDamjan Marion4-220/+173
Change-Id: I0c3f2add35ad9fc11308b7a2a2c69ffd8472dd2e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-26itf: dump interface rx-placementMohsin Kazmi2-1/+135
Change-Id: I7dd48c8a2c77f82a2c1aa8311b062f5f0bc4e3fd Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>