aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2019-07-31fib: Add some path-list flags to its keyNeale Ranns2-1/+11
Type: fix Ticket: 1729 The flags that are permanently set on a path-list should form part of its key in the path-list DB. Otherwise, if shared, they will not behave as expected. Change-Id: I0aa7c7c5d270c97b08014e4a47ddbdcee2358706 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 80d1ef96f92c15f4fd357af9845a0a3c602c2ffe)
2019-07-24api: binary api cleanupDave Barach14-26/+55
Multiple API message handlers call vnet_get_sup_hw_interface(...) without checking the inbound sw_if_index. This can cause a pool_elt_at_index ASSERT in a debug image, and major disorder in a production image. Given that a number of places are coded as follows, add an "api_visible_or_null" variant of vnet_get_sup_hw_interface, which returns NULL given an invalid sw_if_index, or a hidden sw interface: - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || memif_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a memif interface"); Rename two existing xxx_safe functions -> xxx_or_null to make it obvious what they return. Type: fix Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 3940de36728b768574a3e998389bb90d55f690d1)
2019-07-23devices: vhost handling VHOST_USER_SET_FEATURESSteven Luong1-0/+1
Some combinations of new qemu (2.11) and old dpdk (16.10) may send VHOST_USER_SET_FEATURES at the end of the protocol exchange which the vhost interface is already declared up and ready. Unfortunately, the process of VHOST_USER_SET_FEATURES will cause the interface to go down. Not sure if it is correct or needed. Because there is no additional messages thereafter, the hardware interface stays down. The fix is to check the interface again at the end of processing VHOST_USER_SET_FEATURES. If it is up and ready, we bring back the hardware interface. Type: fix Change-Id: I490cd03820deacbd8b44d8f2cb38c26349dbe3b2 Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 545866b5b3115b7de114bdb7883f5ece59b702d4)
2019-07-22gso: Fix the l3 packet gso segment sizeMohsin Kazmi1-1/+4
Type: fix Ticket: VPP-1721 Change-Id: I7a5d4f1440048ddc9f599ac11d06e5a7df20440e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 0f09a47f10e29cabeb98f571e5c4f0c18a54564d)
2019-07-11ip: Punt node does not free iovecsNeale Ranns2-9/+19
Type: fix Fixes: f7a55ad74c Change-Id: Ic3474e746887f880a8f6246bebc399715bac8e80 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11ipsec: Revert "IPSEC: remove byte swap operations in DP during SPD classify"Neale Ranns5-31/+35
Type: fix Fixes: 231c4696872cb344f28648949603840136c0795d This reverts commit 231c4696872cb344f28648949603840136c0795d. Change-Id: I136344555983dd10a31dbc000ee40e2de2c91291 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11ipsec: Revert "IPSEC: remove double byte swap of IP addresses"Neale Ranns1-10/+18
This reverts commit 9b208ced585d3b4620d6fde586cd047fe2027ecf. Type: fix Fixes: 9b208ced585d3b4620d6fde586cd047fe2027ecf Change-Id: I94a17039b4727bff0877423da5ba6cfceb188b17 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit d2029bc9c5947a8a676208bada9386e07ec16c97)
2019-07-02tcp: reject out-of-order finsFlorin Coras1-0/+4
Type:fix Change-Id: Iab2c308739f7733dbf70953e0ea87dcc404c60da Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit f73d4c2084c9cb6df4a1f8582acef523e4ba0cb2)
2019-06-28tcp: fix close-waiting check for outstanding tx dataFlorin Coras1-1/+2
Type: fix Change-Id: I9e0e1bb933c38b17ac9fb8bf11b81e2fed021bf8 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 182bbc1c5ab3d8607153dd19f0a24baaf5cbfc88)
2019-06-21interface: fix the incorrect sizes/offsets in the tso segmentationAndrew Yourtchenko1-2/+2
The copying of the first segment copied too small amount of data. The copying of the second and subsequent segments used the wrong data offset - for the case of GSO enabled it starts from 12 bytes earlier. Change-Id: I3adc532c175babc1ca1e121c7e12e6cafbdb9974 Type: fix Ticket: VPP-1700 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 4f740c8f0085c0cd576744c00bf50a9d9b111470)
2019-06-18acl vnet vlib: memory leaksSteven Luong1-0/+1
Fix memory leaks in acl, vnet, and vlib components. Type: fix Change-Id: I61c84ebbacbbf3215db0d4aaa7699e8d5f8df2da Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 4221c8de596f3f3f66b4cbb36ad2d0c23486030c)
2019-06-03tcp: handle disconnects in rcv-processv19.04.2-rc0Florin Coras1-0/+1
Change-Id: I005f96480e81f3e750c18261e78d0e401da7528e Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 79fdfd61245a112ff08f5c3bc3fb1afd5db55fb9)
2019-05-31VPP-1692: move NULL pointer checkv19.04.1Dave Barach1-5/+5
TBH, this looks like merge damage or some such. Perfectly fine NULL pointer check, about three lines after it was needed. Change-Id: I52831062e30533a59fb76b644ee5ae389676d2ae Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-25tcp: handle fin+rst in same frameFlorin Coras1-1/+8
Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-23tap: crash in multi-thread environmentSteven Luong3-5/+4
In tap tx routine, virtio_interface_tx_inline, there used to be an interface spinlock to ensure packets are processed in an orderly fashion clib_spinlock_lock_if_init (&vif->lockp); When virtio code was introduced in 19.04, that line is changed to clib_spinlock_lock_if_init (&vring->lockp); to accommodate multi-queues. Unfortunately, althrough the spinlock exists in the vring, it was never initialized for tap, only for virtio. As a result, many nasty things can happen when running tap interface in multi-thread environment. Crash is inevitable. The fix is to initialize vring->lockp for tap and remove vif->lockp as it is not used anymore. Change-Id: Ibc8f5c8192af550e3940597c06992dfdaccb4c49 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-05-23Tap: Fix the indirect buffers allocation VPP-1660Mohsin Kazmi4-48/+61
Indirect buffers are used to store indirect descriptors to xmit big packets. This patch moves the indirect buffer allocation from interface creation to device node. Now it allocates or deallocates buffers during tx for chained buffers. Change-Id: I55cec208a2a7432e12fe9254a7f8ef84a9302bd5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-05-09session: fix segment size rounding and size initFlorin Coras2-2/+4
Change-Id: Iceb2a46802ed13f319cb16f1df236b11dc3c00f6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-03mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,Steven Luong3-0/+9
BRIDGE_DOMAIN_DUMP, CONTROL_PING, CONTROL_PING_REPLY, and show interface CLI Change-Id: I2927573b66bb5dd134b37ffb72af0e6676750917 Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
2019-04-26tap: Fix the indirect buffer allocation VPP-1660Mohsin Kazmi1-1/+1
Change-Id: I73f76c25754f6fb14a49ae47b6404f3cbabbeeb5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-24IPSEC; dpdk backend for tunnel interface encryption (VPP-1662)v19.04.1-rc0Neale Ranns8-57/+94
Change-Id: Ide2a9df18db371c8428855d7f12f246006d7c04c Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-19DOCS-ONLY: Fix broken doxygen tag in BVIDave Wallace1-1/+1
Change-Id: Ia42e7c93ebe51a36470f1358827451bcb98da433 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> (cherry picked from commit 3b62e29c3adc8e4114cb10dc794f4b3f814015b0)
2019-04-19IPSEC: IPv6 ESP transport mode incorrect packet length and checksum (VPP-1654)Neale Ranns1-7/+14
Change-Id: Ia3474e5bfea5764eae9b2987bf78296535df6778 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-19IPSEC: ESP IPv6 transport mode payload length incorrect (VPP-1653)Neale Ranns1-1/+3
Change-Id: I8977100d7a22b50260858bd1ea9db419b53284ff Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-18FIB: recursion casues path reallocNeale Ranns1-1/+12
Change-Id: Ie9c2954eee90ca1a1fc1aa8280f93b2340b544c1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-18IPSEC: tunnel rekey fix and test (VPP-1652)Neale Ranns1-21/+24
Change-Id: I1c2b3e40c689bedcdcea7887792b6b6b6aeb48d5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-17Doxygen cleanup.Dave Wallace2-2/+2
- Add subpages definitions in appropriate section (User or Dev docs) for doc files (*.rst, *.md) that being listed at the top level of the generated doc page. - Generate and add API list to RELEASE doc. - Fix list_api_changes script to use HEAD as the endtag so it doesn't need to be changed every release. Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-17Revert "Revert "bond: problem switching from l2 to l3"" [VPP-1651]v19.04-rc2Steven Luong1-0/+11
This reverts commit 5d0d5494db58422eb528c0f8b39a86ea966505e9. The csit crash was actually due to the test image missing the patch https://gerrit.fd.io/r/#/c/17731/ It was a mistake to revert the original patch https://gerrit.fd.io/r/#/c/15577/ Change-Id: I7fc563981aa13d308d55b25194fee21475ebc57d Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit a1f9ee8ea6b7e22a45d7b0cbf631bea3f91864b4)
2019-04-17ADJ: crash in format/show (VPP-1648)Neale Ranns1-1/+1
Change-Id: I26279c19b879e59c68fda31426fe42dae62a858d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-17IPSEC: support GCM in ESPNeale Ranns13-13/+127
Change-Id: Id2ddb77b4ec3dd543d6e638bc882923f2bac011d Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 47feb1146ec3b0e1cf2ebd83cd5211e1df261194)
2019-04-16IPSEC: ESP with ESN tests and fixesNeale Ranns2-4/+4
Change-Id: Ie42b26e6d5cdb7b23f370ea2933c65079e8d1089 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 49e7ef60cb38d9f539d70d7a1e85cea5d350a203)
2019-04-16tap: fix the crash [VPP-1645]Mohsin Kazmi1-0/+3
Crash will happen when someone will try to setup a tap interface in host namespace without providing the host side of tap interface custom name. This patch fixes the problem by using the default name in this case. Change-Id: Ic1eaea5abd01bc6c766d0e0fcacae29ab7a7ec45 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 2a6861ff7bc90c1518b68459210830052774d429)
2019-04-15IPSEC: crypto overflowNeale Ranns1-1/+1
decrypting too many bytes. Change-Id: I4663e70271d9734eda7f9a127967b9224c0e5efc Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 0a0c7eef787dbf29c8b018420cb9d244cbe8d2dd)
2019-04-14session: drop lock on segment allocation error VPP-1644Florin Coras1-12/+9
Change-Id: Ib346570daa3e40f4f53100a05e9355ce60d533a4 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit bbf923fb52e8a9062ef4d740288cf5547c4dbde4)
2019-04-14IPSEC-MB: Use random & non-repeating IV (VPP-1642)Neale Ranns3-7/+6
hard code IV and key lengths based on cipher. Init IV from random data, use AES instruction to rotate. Change-Id: I13a6507d12267b823c528660a903787baeba47a0 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 21ada3bd7e9bc5cca7c2c8399adcbaa044bf8103)
2019-04-10crypto: Intel IPSEC-MB engineNeale Ranns2-2/+13
A plugin to use Intel IPSec MB library as a VPP crypto engine This changes uses concepts from: https://gerrit.fd.io/r/#/c/17301/ hence that author's work is acknowledge below Change-Id: I2bf3beeb10f3c9706fa5efbdc9bc023e310f5a92 Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-04-10ethernet: fix packet tracingBenoît Ganne1-1/+1
Node tracing condition was wrongly reversed by commit "5ecd5a5d15 Move pcap rx/tx trace code out of the dpdk plugin". This prevented packet tracing in ethernet-input node and also impacted performance in the no tracing case. Change-Id: I345a11191d027c6c4ec474a2901995338050680a Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-04-10IPSEC: for each engine and algorithm testsNeale Ranns1-1/+1
refactor the IPSEC tests a bit so we can parameterise the setup. Change-Id: I777e5eb8f29ca1dce3dd273ebd05dae5846790af Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-10session: binary api app names as vectorsFlorin Coras1-2/+2
Change-Id: Iae358365de8ccbc0441b14f21ba6b365cbfec09a Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-10API: Fix shared memory only action handlers.Ole Troan6-195/+86
Some API action handlers called vl_msg_ai_send_shmem() directly. That breaks Unix domain socket API transport. A couple (bond / vhost) also tried to send a sw_interface_event directly, but did not send the message to all that had registred interest. That scheme never worked correctly. Refactored and improved the interface event code. Change-Id: Idb90edfd8703c6ae593b36b4eeb4d3ed7da5c808 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-10IPSEC: remove double byte swap of IP addressesNeale Ranns1-18/+10
Change-Id: I8c03c4aa90fb0056e11e0f234999c25d7839d759 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-10Make tcp/udp/icmp compute checksum safer for buffer-chain caseJohn Lo2-2/+2
Change-Id: I046e481a67fbeffdaa8504c8d77d232b986a61ee Signed-off-by: John Lo <loj@cisco.com>
2019-04-09session: fix session flagsFlorin Coras2-5/+2
Change-Id: I681169b82c661b7f0bf19f09d07d76ac1d3ed173 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-08fixing typosJim Thompson32-45/+45
Change-Id: I215e1e0208a073db80ec6f87695d734cf40fabe3 Signed-off-by: Jim Thompson <jim@netgate.com>
2019-04-08virtio: Fix the coverity warningsMohsin Kazmi1-6/+11
Change-Id: I7c6e4bf2abf08193e54a736510c07eeacd6aebe7 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-08IPSEC TEST: various hash alogrithmsNeale Ranns1-1/+1
Change-Id: I925aa5bf9472e81f98072d63df499b19e6ddf43d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-08host stack: update stale copyrightFlorin Coras28-28/+28
Change-Id: I33cd6e44d126c73c1f4c16b2041ea607b4d7f39f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-08minor spelling errors (both in comments)Jim Thompson2-2/+2
Change-Id: I9282a838738d0ba54255bef347abf4735be29820 Signed-off-by: Jim Thompson <jim@netgate.com>
2019-04-07crypto: add support for AEAD and AES-GCMDamjan Marion12-150/+272
Change-Id: Iff6f81a49b9cff5522fbb4914d47472423eac5db Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-04-07http_server: add timer wheel for session cleanupFlorin Coras1-29/+141
Change-Id: I494a6a7f4818a224376ec9150cff3872a3aec659 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-07crypto: coverity issuesDamjan Marion1-1/+1
Change-Id: I9db1b74097c9df587b9265b14a969d347bcb731a Signed-off-by: Damjan Marion <damarion@cisco.com>