aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-07-16ip6-nd: refactor neighbour advertisement codeMohsin Kazmi2-61/+104
Type: refactor Refactor neighbour advertisement code into inline function to be used solely in feature nodes. Change-Id: I1e84c54f9807b4e3d90c37526c78a7afcb0ba087 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-07-15dpdk: enable RX interrupts for the virtio driverRobert Shearman1-0/+8
Type: improvement Request use of RX interrupts for virtio if the system will support it, which is done by applying the same check as in the virtio driver, namely whether multiple interrupts are supported. This allows the use of RX adaptive/interrupt mode instead of just polling, which is useful in virtualised environments where functionality may be more important than performance and so using polling mode is wasteful. Signed-off-by: Robert Shearman <robertshearman@gmail.com> Change-Id: I29527b6f04b0b1d0c9f9424751b2bd252ed10505
2021-07-15ip-neighbor: GARP sent to bogus ip addressSteven Luong1-2/+2
The function ip4_neighbor_advertise may be called with NULL addr. In that case, it looks up addr from fib by calling fib_sas4_get which returns true or false to indicate whether there is an ip address associated with the interface or not. But the caller to fib_sas4_get does not check the return code and blindly assumes there is always an ip address associated with the interface. As a result, it ends up sending GARP to the bogus ip address if there is no ip address associated with the interface. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7aa0270766c3943ed8ca8f8a092cae34567fd30e
2021-07-15vppinfra: fix the vector funcs test for march variantsMohsin Kazmi1-1/+12
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I4208c2622817eb51a4b192cf420f9f1b5f193eef
2021-07-15acl: Fix the CLI to accept IPv6 prefixesNeale Ranns1-16/+5
Type: fix DBGvpp# set acl-plugin acl src 1::1/128 dst 2::/64 DBGvpp# sh acl-plugin acl acl-index 0 count 1 tag {cli} 0: ipv4 permit src 1.1.1.1/32 dst 1.1.1.2/32 proto 0 sport 0-65535 dport 0-65535 acl-index 1 count 1 tag {cli} 0: ipv6 permit src 1::1/128 dst 2::/64 proto 0 sport 0-65535 dport 0-65535 Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ibb8e20dd4ec2792f423a61eefe7398175e45a577
2021-07-15linux-cp: clear all db entries when deleting a pairSergio Gonzalez Monroy1-1/+2
Type: fix Change-Id: I5677cbb183b10c974a3a2e569d1a7a525a7eb45d Signed-off-by: Sergio Gonzalez Monroy <sgmonroy@gmail.com>
2021-07-15misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}Damjan Marion70-288/+282
Type: refactor Change-Id: Id10cbf52e8f2dd809080a228d8fa282308be84ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-15nat: nat44-ed sm fixFilip Varga1-15/+13
Fixing nat44-ed identity map in2out communication. TCP packets would get dropped because of the order of testing TCP state. Type: fix Change-Id: Ib11e7e75c66945224fecc0bb311733672e315c7d Signed-off-by: Filip Varga <fivarga@cisco.com>
2021-07-14vppinfra: remove old and unused vector macros and inlinesDamjan Marion3-257/+0
Type: refactor Change-Id: Ic504bcfca6e7fbd85e858c3bc7a4f5e72d931789 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-14api: fix memory error in multi-thread environmentXiaoming Jiang1-1/+7
When reading vm->pending_rpc_requests in main thread, the content may be changed by other workers. Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I27e9d357b5ecec0f97cd8b950019b35f72fc5f76
2021-07-14vcl:fix segfault when unshare NO_MQ sessionliuyacan1-1/+2
Session in LISTEN_NO_MQ state has no vpp_evt_q.This would cause a segfault when vcl try to send msg to vpp. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0d21831dbed148cd1b0ca7c083aeeef9e813ef2f
2021-07-14nat: refactoring NAT44ED cfg functionsFilip Varga4-344/+500
Refactored & fixed NAT44ED configuration functions used for handling interfaces and nodes. Type: refactor Signed-off-by: Filip Varga <fivarga@cisco.com> Change-Id: I6fbbb7f0fe35d572675997745d53290152987424
2021-07-14ip: fix check_adj_port_range_x1Damjan Marion1-2/+2
Type: fix Change-Id: I776bf797e07bb3cfd0510a4c09d8182edfa193bd Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-14classify: cheaper way to check if all elements are zeroDamjan Marion1-1/+1
Type: improvement Change-Id: I5f4517c65c37c5d73fcd608dc29dfb1d25d4cd8d Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-14ip: improve check_adj_port_range_x1Damjan Marion1-35/+5
Type: improvement Change-Id: I8337f81fdcd196fcb0e61f8129fec322e9a1e8f1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-13vppinfra: fix saturate add/sub NEON wrappersLijian.Zhang1-40/+60
Fix the saturate add/sub wrappers in vector_neon.h by using the correct intrinsics. Type: fix Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Tianyu Li <Tianyu.Li@arm.com> Change-Id: I38a85633948472d4bdb1c199a806633d3070013f
2021-07-13vppinfra: put each vector function into own fileDamjan Marion9-81/+94
Type: refactor Change-Id: I2dd9a18497992ac7e2686c14f5d17eccccda0cda Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-13misc: remove vnet_all_api_h and vnet_msg_enumFilip Tehlar11-135/+3
These file are no longer needed Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I34f8e0b7e17d9e8c06dcd6c5ffe51aa273cdec07
2021-07-13fib: Set the GLEAN flag on attached export routes so that the SAS worksNeale Ranns4-38/+63
correctly. Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I4bc2eb394a8f9d01c5a12de2ce963c22209d5439
2021-07-13tcp session: next node config on connectsFlorin Coras2-3/+9
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ief06b1509d31b55efc8d1436b6ff9e01c6037a32
2021-07-13mss_clamp: coverity test fixMiklos Tirpak1-3/+6
Silence the coverity test with setting the interface index in a variable before the boundary check. Type: fix Change-Id: I9bd6db08bfef93142581dada0b6a7d78b7de91e7 Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
2021-07-13misc: fix init order to avoid startup warningsBin Zhou (bzhou2)4-27/+14
Put plugin init order inside plugin instead of in vnet Type: improvement Signed-off-by: Bin Zhou (bzhou2) <bzhou2@cisco.com> Change-Id: Icbacdb3f1cb4ac9d74e3f78458e8bc333793b4d6
2021-07-13dpdk: add base-virtaddr config optionRobert Shearman1-1/+4
Type: improvement Allow the use of the base-virtaddr config option to be passed through to DPDK. This is useful to allow use of devices with an IOMMU in nested VMs without resorting to PA IOVA mode. Signed-off-by: Robert Shearman <robertshearman@gmail.com> Change-Id: I32b6513377e6d20bf155e12c45f902d51ea982c4
2021-07-13vppinfra: fix SIGSEGV in clib_mem_vm_unmapchenqijun1-4/+6
while one mprotect PROT_NONE on hdr->next or hdr->prev, the other one with the PROT_NONE is unmap at the same time, cause SIGSEGV. Type: fix Signed-off-by: arikachen <eaglesora@gmail.com> Change-Id: I21c0497da140c9654b566e47f767a90346715ed8
2021-07-12papi: remove shared memory transportOle Troan6-157/+6
This patch removes the papi transport shared memory plugin. It also removes any dependency on CFFI. Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ia81701c0dc506871e511495d837e41420e1fdf72 Signed-off-by: Ole Troan <ot@cisco.com>
2021-07-12session: api cleanupFilip Tehlar9-441/+117
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Iacc58d27ac51c8a1c571087f98297e046b3477c2
2021-07-08session: allow listen in any fib if default namespaceFlorin Coras3-3/+12
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If0712f01bdd6f2fc892bcbe4e2cee28affd02520
2021-07-08interface: unable to to assign tx queue to last worker threadSteven Luong1-4/+3
Using the cli "set interface tx-queue", it is not possible to assign tx queue to the last worker thread. The reason is that vdm->first_worker_thread_index is 1. Adding that to clib_bitmap_last_set (bitmap) exceeds vdm->last_worker_thread_index when the CLI specifies the last worker thread. Also make the threads argument optional to enable user to unbind a queue from any thread. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I796259c20f571289c8f5a97b9418caf452d0ab3d
2021-07-08tap: Set the MTU on the TUN deivceNeale Ranns1-0/+13
Type: fix For a TAP device the MTU is set via the ethernet_register for TUN we need to do it explicitly (like we do for other tunnel types). Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ie6a13c795acb35b53f8d99b05c70c3e73a7b428e
2021-07-06tcp: use tcp output for half open connectionsFlorin Coras1-39/+12
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I05be39671a9ed0688d4e006f0f9354aa6560a41b
2021-07-06tcp: use main thread pool for half-opensFlorin Coras5-146/+29
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4b3427b966f9ff1ba8895fed7db662d56650f3f5
2021-07-06l3xc: reset dpo on deleteBenoît Ganne1-0/+1
When removing a l3xc path we must release the corresponding dpo. Type: fix Change-Id: Ib6309797cb11374264c786e064f262ad13c6f0a1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-07-06vcl: fix packetdrill test errorwanghanlin1-1/+1
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: I36d9affa5ee7160e95ee0ed463595bef752bbe9a
2021-07-06vcl: print current app state for timeoutwanghanlin1-2/+2
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Id701b1a1bee4e41b76d324ea05beb07ca57f825c
2021-07-06vcl: fix return value check for ldp_fd_to_vlshwanghanlin1-3/+3
Type: fix Signed-off-by: wanghanlin <wanghanlin@corp.netease.com> Change-Id: Iaad4022e84f4979016bb46c2ff5cfc5d43d6ff50
2021-07-02ipsec: ADD/update IPSec documentationNeale Ranns1-0/+199
Type: docs Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ica576e13953a3c720a7c093af649d1dd380cc2c0
2021-07-02interface: api cleanupFilip Tehlar4-1439/+36
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I189bfcca2d5fa1f37d05a72c92d04bf260343043
2021-07-02sr: do not use vnet_all_api.hFilip Tehlar2-34/+33
.. as it is going to be removed. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Id3a4a4ea1e1b7361d43735bfa5470c28fc65209f
2021-07-02vlib: fix buffer pool alignment sizeTianyu Li1-1/+1
Alignment size should be CLIB_CACHE_LINE_BYTES(64) instead of CLIB_LOG2_CACHE_LINE_BYTES(6) Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: If2d5ae324093be64454377866297f5e76ccddc93
2021-07-02crypto: fix sw async crypto with chained buffersBenoît Ganne1-31/+30
When a buffer in the chain comes with a negative current_data offset, the conversion to sgl will skip it because of resetting offset to 0. Moreover, crypto_start_offset is relative to the 1st buffer data pointer so we should not check it against subsequent buffers anyway. Type: fix Change-Id: Id177a90bfda242a5372c7e8836cf6668e98c780e Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-07-02misc: Don't IPv[46] enable local0, it doesn't receive packets.Neale Ranns1-5/+0
Type: improvement local0 exists just to burn sw_if_index=0 so we catch common API errors. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I2901bb7d36d4c512e6698134a807bf9516ee05db
2021-07-01vmxnet3: support manual thread assignment to tx queueSteven Luong3-18/+26
Thread assignment to tx queue has always been automatic and there was no way to modify it. With this patch, it is now possible to use the cli "set interface tx-queue" to change the thread assignment to tx queue for vmxnet3 interface, thanks to the new tx infra. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I1544e3557f70251d4bd423cc3d9f28ee1d44db4a
2021-07-01ip: api cleanupFilip Tehlar5-1693/+88
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I4b6d881571c158b7a69a78b9680732d090c4f8b5
2021-06-30memif: fix tx desc length for chained buffers in copy modeBenoît Ganne1-0/+1
When enqueuing chained buffer, we must update the descriptor length for each fragment descriptor in addition to the last. Type: fix Change-Id: I9bc95fe557a049eeea4abd41c695153632d52a52 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-06-30rdma: fix chained buffer tx path in dv modeBenoît Ganne1-24/+20
When switching to the direct verb chain buffer tx path, we must account for all remaining packets, including the packets that would wrapped around. Previously we were using the 'n' counter but ignoring the 'n_wrap' counter: if some packets would have wrapped around in the default path, it would be ignored by the chained buffer tx path. Compute the correct number of remaining packets based on the old and current txq tail instead. Also simplify the chained tx function parameters. Type: fix Change-Id: If12b41a8f143fda80290342e2904792f7501c559 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-06-30memif: fix chain buffer length in zero-copy modeBenoît Ganne1-0/+1
The total_length_not_including_first_buffer field must be reset before being updated otherwise it will quicly grows as stale values are reused. Type: fix Change-Id: Ic48c0822660998b0dfc0b5fdeadae6071b2d03f7 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-06-30vcl: coverity fixesFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I290e4b0dff6afe7ce755074f3aaaf945dbbf3e09
2021-06-30ipsec: Derive the TUNNEL_V6 flag from the configured address typesNeale Ranns2-1/+8
Type: improvement There's no need for the user to set the TUNNEL_V6 flag, it can be derived from the tunnel's address type. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I073073dc970b8a3f2b2645bc697fc00db1adbb47
2021-06-29session: free ctrl event data on connect rpcFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48
2021-06-29ipsec: Fix setting the hi-sequence number for decryptNeale Ranns7-135/+229
Type: fix two problems; 1 - just because anti-reply is not enabled doesn't mean the high sequence number should not be used. - fix, there needs to be some means to detect a wrapped packet, so we use a window size of 2^30. 2 - The SA object was used as a scratch pad for the high-sequence number used during decryption. That means that once the batch has been processed the high-sequence number used is lost. This means it is not possible to distinguish this case: if (seq < IPSEC_SA_ANTI_REPLAY_WINDOW_LOWER_BOUND (tl)) { ... if (post_decrypt) { if (hi_seq_used == sa->seq_hi) /* the high sequence number used to succesfully decrypt this * packet is the same as the last-sequnence number of the SA. * that means this packet did not cause a wrap. * this packet is thus out of window and should be dropped */ return 1; else /* The packet decrypted with a different high sequence number * to the SA, that means it is the wrap packet and should be * accepted */ return 0; } - fix: don't use the SA as a scratch pad, use the 'packet_data' - the same place that is used as the scratch pad for the low sequence number. other consequences: - An SA doesn't have seq and last_seq, it has only seq; the sequence numnber of the last packet tx'd or rx'd. - there's 64bits of space available on the SA's first cache line. move the AES CTR mode IV there. - test the ESN/AR combinations to catch the bugs this fixes. This doubles the amount of tests, but without AR on they only run for 2 seconds. In the AR tests, the time taken to wait for packets that won't arrive is dropped from 1 to 0.2 seconds thus reducing the runtime of these tests from 10-15 to about 5 sceonds. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iaac78905289a272dc01930d70decd8109cf5e7a5