summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-09-22virtio: fix the type of argument in virtio_show()Mohsin Kazmi2-7/+8
Type: fix virtio have three different interfaces (tap, tun and native virtio). virtio_show() is used by CLI commands to show information about these interfaces. It uses interface type to print interface specific information. virtio_show() should use proper type for virtio interfaces (TAP, TUN, VIRTIO). Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I2043dc2cfe2e2f6c7c9348b8494aa4a27cab31f3
2021-09-22ping: set fib_index for lookup_nodeArtem Glazychev1-0/+1
lookup node uses this field later to set fib_index for buffer Type: fix Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I993cf80296e1713b4f13fc6ccdf49ebeaf295467
2021-09-22interface: allow an interface's index to be given in 'sh int'Neale Ranns1-0/+15
Type: improvement e.g.: DBGvpp# sh int 3 Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count loop2 3 down 9000/0/0/0 Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ie296167ab2b1b9576b46f6d4d9fb9546aef3a0da
2021-09-22hash: fix the initialization warning error on gcc-10Mohsin Kazmi1-4/+4
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ic7d99154def71cd06e8faa64180912e5b844424e
2021-09-22ip: add ip_table_allocate to apiAloys Augustin6-16/+113
Set tableID = ~0 for auto selection unused ID https://jira.fd.io/browse/VPP-1993 Type: improvement Change-Id: I4eec2cc1d18fc025196cb6ac4c9a4b374388eb56 Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-09-22classify: improve vnet_classify_hashDamjan Marion1-27/+23
Type: improvement Change-Id: I8b129b71f91b12ab2d8b05fe3891a7ab8926f072 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-22classify: simplify vnet_classify_find_entry_inlineDamjan Marion1-88/+72
Type: improvement Change-Id: I3de4450b95f6fa76705923d983cf93c21b02a635 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-22vppinfra: make default hugepage size configurableDamjan Marion4-37/+29
i.e. memory { default-hugepage-size 1G } Type: improvement Change-Id: I822afb51712ae92f4e4992b8ffa33dcb15ccaef1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-22interface: fix poll vector reallocMohammed Hawari2-4/+6
Change-Id: I60815b5827b4406228fd6b490f4ac1f874bac974 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2021-09-21pnat: fix the version of the PNAT plugin from the hardcoded 0.0.1Andrew Yourtchenko1-1/+2
Type: fix Change-Id: I35db6763f3c5bd73169a222a4a93a917e8f468e6 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-21vapi: compile vpp-api folder before the pluginsArthur de Kerhor1-2/+2
Allows to use vapi symbols in a plugin. Type: feature Change-Id: Ic4534f266964127af54651b7d19c3b611b277860 Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2021-09-21session: implement app_ns deletionNathan Skrzypczak12-50/+182
Type: feature Change-Id: If0edbb21a0283d66c648a9e190d238c8cfa56353 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-20classify: improve find entry performanceDamjan Marion1-10/+9
Type: improvement Change-Id: I5245fc3f35b7a70833916db2ebf33f7c87398915 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-20classify: avoid dependent read of classify maskDamjan Marion2-9/+9
Type: improvement Change-Id: I176f08c74eb58a78f7fbdb48fd4592e6ddf74d34 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-20session: use table_format in sh app nsNathan Skrzypczak1-10/+22
Type: refactor Change-Id: I99162d80280e0f45344671b18b1ea96db90d4282 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-20vppinfra: format table improvementsNathan Skrzypczak2-10/+32
This adds a way to define default fg, bg colors and alignement for cell tables. It also allows removing the table title by not setting it. It also removes the trailing newline, for usage inside a format("%U", format_table, ...) Type: improvement Change-Id: I27d7a04c4a919b34d0170b04e24a56831f581ea1 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-20hash: add support for hashing infraMohsin Kazmi8-0/+725
Type: feature Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3652ae275385d9b1eb1b11f418e3a7e5fef2f556
2021-09-17build: use GNUInstallDirs install destinationsNick Brown8-11/+12
So as to be compliant with distribution layouts, as recommend by: https://cmake.org/cmake/help/latest/command/install.html#installing-files Type: make Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-09-17dpdk: enable ENA tx offloadBenoît Ganne1-0/+7
Type: improvement Change-Id: Ic7c2ac4237ecd192def7c3530ae5f788c62cf9ad Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-17vppinfra: move format_table from perfmonNathan Skrzypczak5-17/+19
This code seems really usefull for reuse in other plugins, for pretty table formatting Type: feature Change-Id: Ib5784a0dfc81b7d5a5d1f5ccdd02072e460a50fb Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-17misc: put devtools plugins into separate component/packageDamjan Marion6-3/+18
Type: make Change-Id: I2958e9eddadee6434766ecd3cdb3b9cea742ed64 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-17memif: avoid double pool_put on a clib_fileSteven Luong1-1/+2
When memif CP processes the socket connection error, it may go through the following code paths which may eventually cause double pool_put on a clib_file memif_master_conn_fd_error:633 -> memif_disconnect -> memif_socket_close -> memif_file_del_by_index -> clib_file_del_by_index -> clib_file_del -> pool_put After memif_master_conn_fd_error:633, the code continues on memif_maser_conn_fd_error:651 -> memif_file_del -> clib_file_del -> pool_put The fix is to skip calling memif_file_del in memif_master_conn_fd_error:651 if uf->file_descriptor == ~0 to catch problem from all possible paths in memif_master_conn_fd_error Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0960998db1ff358a8ddd4a5e22188a244eccd270
2021-09-16dpdk: fix checksum offloadFlorin Coras1-2/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I89fb738903ee74ffcb7c77a041391f0388df6991
2021-09-16avf: fix RSS hash keyBenoît Ganne1-4/+11
Toeplitz hash key must respect certain properties, it cannot be purely random. Use the default one from i40e. Type: fix Change-Id: Ic8e67a0426de8adfecc1fcdaa99879e13ae38cc9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-16session: Add sock_name option to add_nsNathan Skrzypczak5-44/+183
This adds a new API call to add session namespaces It now takes a netns and a sock_name. (1) If no netns is passed, sock_name will be used as socket path. Defaulting to /run/vpp/app_ns_sockets/${ns_id} (2) If a netns is passed, the sock_name has to be abstract (i.e. start with '@'). It will default to `@vpp/session/${ns_id}` and will be created in the provided netns. Type: feature Change-Id: I90e9a8e5ecca2cabe7c05335663e33c8506dc9e7 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-16vxlan: improve to use the hardware offloadMohsin Kazmi3-84/+49
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ic0fa4f83048a280a7d1b04198c0f903798562d2d
2021-09-16dpdk: add support for outer udp and ipv4 checksumsMohsin Kazmi3-16/+66
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I10141033030342881298d70742fa5bdea402b4c9
2021-09-16ip6-nd: add ip6-nd proxyMohsin Kazmi6-2/+451
Type: feature Change-Id: I91f72f5802db195d1a15424d67c1b6e518168f9f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-09-15vlib: add option to plugin registration to prefer deep bindingDamjan Marion2-6/+7
Type: improvement Change-Id: I9ce7e1ee7e7afe8e9befe36ae8c59291beaaaf36 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-15tap: set device name on creation via TUNSETIFFDuncan Eastoe1-17/+8
Type: fix Currently when a new TAP/TUN device is created from tap_create_if() via the TUNSETIFF ioctl(), a name is allocated by the kernel (eg. tap0). If the caller supplied a name this is subsequently set via netlink, after the device has been created. Now we request the kernel to create the new device with the caller's requested name in the first instance, thus avoiding the need to rename the device, and therefore avoiding a window where the device exists with a different name. This can be beneficial, for example, when writing systemd-udevd link files [1]. Having the TAP/TUN devices created with the requested name ensures they can be correctly matched by the OriginalName option. Writing link files might be necessary, for example, to avoid VPP and systemd-udevd racing to set the MAC address on a newly created TAP interface. systemd-udevd can be configured to not manipulate the MAC addresses of matched interfaces. These changes also resolve an issue where the created device would not be renamed if the caller requested it be moved to a different network namespace, since vnet_netlink_set_link_name() was not called in that case. [1] https://www.freedesktop.org/software/systemd/man/systemd.link.html Signed-off-by: Duncan Eastoe <duncan@graphiant.com> Change-Id: I3d657632856d03979d6b914225c3c841c379e0a1
2021-09-14vlib: add graceful termination with statusPierre Pfister2-1/+12
This commit allows a non-VPP thread to request VPP to gracefully shutdown and return a specific process status value. Type: improvement Change-Id: I9bf52b789e7ee28eb272630eaea495fd94349f79 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2021-09-13interface: fix init fib_index_by_sw_if_indexNathan Skrzypczak13-69/+18
Type: fix The init of fib_index_by_sw_if_index wasn't setting default value to 0. Which we now need for setting interfaces unnumbered Change-Id: Ie5be9b5e5373ef055557a871ad4d1c45fbfc1dee Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-13snort: fix epoll_wait unsigned return valueTianyu Li1-3/+9
When epoll_wait return -1, access array epoll_events[i] out of bound and lead to segmentation fault. 1. Change return value to signed return value 2. Skip non fatal error e.g. EINTR Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I4ece118999402ec6054baf0efb52419151655def
2021-09-13tcp session: initialize sw_if_index at connect timeFlorin Coras5-12/+13
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id0e67a9ce9c5d8bca2cd7a30493f03a02a46dc46
2021-09-13dpdk: fix prefetch assert on ArmTianyu Li1-4/+4
CLIB_PREFETCH (cop[1], CLIB_CACHE_LINE_BYTES * 3, STORE); Note on 64 bytes cache line size arm machines, CLIB_CACHE_LINE_BYTES 128 CLIB_CACHE_PREFETCH_BYTES 6 above CLIB_PREFETCH () macro will be expand to ASSERT ((size) <= 4 * CLIB_CACHE_PREFETCH_BYTES); it will hit assert due to size (i.e. 3 * 128) > 4 * 64 Solution: Change to CLIB_PREFETCH (cop[1], sizeof(*cop[1]), STORE); Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Change-Id: Id0981fd5bd2b25ff71db4197b25578d0b7a9803e
2021-09-13ip: show ip table CLINathan Skrzypczak1-0/+77
Type: feature Thought this might be useful when using many VRF to get the list of allocated VRFs and corresponding names Change-Id: If9d2c6612d4215e7576315d66d1eb130fcecfa13 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-13ip-neighbor: Handle local MAC address change for incomplete adjacenciesNeale Ranns5-43/+57
Type: fix When the local MAC address of an interface changes the rewrite strings of all adjacency types need to be updated - this patch fixes the missing case of incomplete adjacencies. I moved the update of all adj types into the adj module, since if the complete adjs were done by the ip-neighbour module and incomplete ones by adj module, that would mean two walks of the adj DB, as it is not possible to walk only a specific type. UT is updated to include the missing case. Signed-off-by: Neale Ranns <neale@graphiant.com> Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: I36af94976c645bdd0d4d3bc0093b24d7d077e9d7
2021-09-10vcl: avoid duplicated events in epoll ltliuyacan1-4/+6
1. Filter event ACCEPTED for lt (same as event RX) 2. Do lt check before vppcom_epoll_wait_xxx to avoid delivering duplicated events. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: Ib41c880ceb5072d49e11ab42e31e54398703c0b5
2021-09-10vcl: fix free segments assertFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I837820fd1759cab55f42c54950e991a215234737
2021-09-09vlib: fix vlib_buffer_enqueue_to_next() overflowBenoît Ganne3-7/+32
vlib_buffer_enqueue_to_next() requires to allow overflow of up to 63 elements of 'buffer' and 'nexts' array. - add helper to compute the minimum size - fix occurences in session and async crypto Type: fix Change-Id: If8d7eebc5bf9beba71ba194aec0f79b8eb6d5843 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-09nat: Revert "nat: nat44-ed add session timing out indicator in api"Andrew Yourtchenko2-150/+1
This reverts commit f059a3452c285ec57a75c7b1ede5052244be4e5d, which broke the build. https://s3-logs.fd.io/logs/production/vex-yul-rot-jenkins-1/vpp-merge-master-debian10-x86_64/1344/console.log.gz Change-Id: I16fece8128fa9973495c587d105a8db57738e8f2 Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-09-09srtp: fix header len assertFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie7b04b11987caadde0942483f171a318ce852228
2021-09-09nat: nat44-ed add session timing out indicator in apiAlexander Chernavin2-1/+150
Type: improvement Currently, NAT44-ED users sessions details are returned for both active and timed out NAT sessions. It may confuse users that expect to see only active sessions in the response and make them think that timeouts for NAT sessions do not work. With this change, introduce an indicator of timing out for NAT sessions returned in NAT44-ED user session details. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: Ib81ed90369d4b495117538f521e5112e289cf7e6
2021-09-09stats: revert enable/disable segments pollsRay Kinsella3-29/+16
This reverts commit 034bd1067eddb700c6d2bc67974056fe00012310. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Icce6052d6cf9616f7eac3185b4c9aace234aa59f
2021-09-09session: fix non-NULL terminated stringBenoît Ganne1-18/+7
vlib_unix_recursive_mkdir () expects a NULL-terminated C-string. Type: fix Change-Id: I412b48443d0792307d611c466747c0aa5e423417 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-09linux-cp: fix non-NULL terminated stringBenoît Ganne1-1/+1
lip->lip_host_name is a non-NULL terminated vector. Type: fix Change-Id: Ic154ad7f57f0b507204e55f78995cc0e89132e57 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-09linux-cp: Complete interface creation logicPim van Pelt6-86/+268
Linux Control Plane interface creation logic is currently only able to create untagged interfaces, and dot1q VLAN sub-interfaces. This change makes it possible to create dot1ad VLAN sub-ints, and Q-in-AD as well as Q-in-Q sub-interfaces as well. It makes the plugin a bit more robust by catching a few common errors, such as creating an lcp on a sub-interface without its parent having one, and creating an lcp on a sub-interface that is not exact-match. This change has a bunch of smaller improvemnets as well. I documented my work in this post: https://ipng.ch/s/articles/2021/08/12/vpp-1.html It shows that after the change is merged, all VPP interface types now create and operate cleanly as LCP interfaces as well. Type: improvement Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I322669f7316d44c227090b83d6a574fb9c00e76a
2021-09-08linux-cp: fix crash on failed vlib_buffer_copyPim van Pelt1-12/+24
Type: fix Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I390282ecc63600728cf11413510c0169178e305c
2021-09-08vrrp: fix source address on advertisementsMatthew Smith1-2/+13
Type: fix Advertisements are dropped by anti spoofing check in some situations. When a VR has "accept mode" enabled, we must add the virtual IP addresses to the interface when the VR transitions to master state. When this happens, fib_sas4_get() starts selecting the newly added virtual IP address as the source address for packets sent on the interface, so advertisements are sent with that source address. When the virtual IP address is being used as a NAT pool address on a peer in the backup state, the peer sees the address as a local address and drops incoming advertisements with that source address. RFC 5798 section 5.1.1.1 says advertisements should use the primary IPv4 address of the interface they are being sent on as the source IP address. Since the virtual IP address is only temporarily added while the VR is in the master state, the virtual IP address should probably not be considered the primary address of the interface. The definition of Primary IP Address in section 1.6 says that selecting the first address is a valid selection algorithm. Do that instead of calling fib_sas4_get(). Change-Id: Id92f0e3237c7fd491dd8d695bb27307d494f8573 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-09-08interface: add custom interface name supportSteven Luong3-1/+100
add CLI "set interface name <current-int-name> <new-int-name> and the corresponding binary API to allow custom interface name setting for any interface. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I2b39da59879fd4526bcb5aa5854b6bd21e72ea73