1758 Commits

Author SHA1 Message Date
Alexander Chernavin
da5ddd1714 flowprobe: fix tx flows generated for rewritten traffic
Currently, when IPFIX records generation is enabled for an interface in
the TX direction, some rewritten traffic is being sent from that
interface, and the Ethernet header's location has changed due to
rewriting, generated TX flows will contain fields with wrong and zero
values. For example, that can be observed when traffic is rewritten from
a subinterface to a hardware interface (i.e. when tags are removed). A
TX flow generated in this case will have wrong L2 fields because of an
incorrectly located Ethernet header. And zero L3/L4 fields because the
Ethernet type will match neither IP4 nor IP6.

The same code is executed to generate flows for both input and output
features. And the same mechanism is applied to identify the Ethernet
header in the buffer's data. However, such general code usually works
with the buffer's data conditionally based on the direction. For most
input features, the buffer's current_data will likely point to the IP
header. For most output features, the buffer's current_data will likely
point to the Ethernet header.

With this fix:
 - Keep relying on ethernet_buffer_get_header() to locate the Ethernet
   header for input features. And start using vlib_buffer_get_current()
   to locate the Ethernet header for output features. The function will
   account for the Ethernet header's position change in the buffer's
   data if there is rewriting.

 - After fixing Ethernet header determination in the buffer's data,
   L3/L4 fields will contain non-zero but still incorrect data. That is
   because IP header determination needs to be fixed too. It currently
   relies on the fact that the Ethernet header is always located at the
   beginning of the buffer's data and that l2_hdr_sz can be used as an
   IP header offset. However, this may not be the case after rewriting.
   So start calculating the actual offset of the IP header in the
   buffer's data.

 - Add a unit test to cover the case.

Type: fix
Change-Id: Icf3f9e6518912d06dff0d5aa48e103b3dc94edb7
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 64d6463d2eac0c0fe434f3a7aa56fe4d85c046d9)
2023-12-01 19:29:23 +00:00
Alexander Chernavin
bec4f4a7ab flowprobe: fix clearing interface state on feature disabling
As a result of recent fixes, all currently stored flows of an interface
are deleted when the feature is being disabled for the interface. This
includes stopping the timer and freeing the flow entries for further
reuse. The problem is that meta information is not cleared in the flow
entries being deleted. For example, packet delta count will keep its
value. The next flow that gets one of these pool entries will already
have a non-zero packet count. So the counting of packets will start from
a non-zero value. And incorrect packet delta count will be exported for
that flow.

With this fix, clear meta information too when clearing interface state.
Also, update the corresponding test to cover this case.

Type: fix
Change-Id: I9a73b3958adfd1676e66b0ed50f1478920671cca
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit dab1dfeea9fec04a9a90a82dc5d770fbff344540)
2023-12-01 19:29:08 +00:00
Alexander Chernavin
b8b02937b1 flowprobe: fix accumulation of tcp flags in flow entries
Currently, TCP flags of a flow entry don't get reset once the flow is
exported (unlike other meta information about a flow - packet delta
count and octet delta count). So TCP flags are accumulated as long as
the flow is active. When the flow expires, it is exported the last time,
and its pool entry is freed for further reuse. The next flow that gets
this pool entry will already have non-zero TCP flags. If it's a TCP
flow, the flags will keep being accumulated. This might look fine when
exported. If it's a non-TCP flow, that will definitely look erroneous.

With this fix, reset TCP flags once the flow is exported. Also, cover
the reuse case with tests.

Type: fix
Change-Id: I5f8560afffcfe107909117d3d063e8a69793437e
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 21922cec7339f48989f230248de36a98816c4b1b)
2023-12-01 19:28:52 +00:00
Matthew Smith
0d7d22cf67 fib: only update glean for interface if necessary
Type: improvement

If an interface address is added, the glean adjacency for it's covering
prefix is updated with that address. In the case of multiple addresses
within the same prefix being added, the most recently added one will end
up being used as the sender protocol address for ARP requests.

Similar behavior occurs when an interface address is deleted. The glean
adjacency is updated to some appropriate entry under it's covering
prefix. If there were multiple interface addresses configured, we may
update the address on the adjacency even though the address currently in
use is not the one being deleted.

Add a new value PROVIDES_GLEAN to fib_entry_src_flag_t. The flag
identifies whether a source interface entry is being used as the address
for the glean adjacency for the covering prefix.

Update logic so that the glean is only updated on adding an interface
address if there is not already a sibling entry in use which has the
flag set. Also, only update the glean on deleting an interface address
if the address being deleted has the flag set.

Also update unit test which validates expected behavior in the case
where multiple addresses within a prefix are configured on an interface.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I7d918b8dd703735b20ec76e0a60af6d7e571b766
(cherry picked from commit 9e5694b405e0200725a993f0c17d452fab508435)
2023-12-01 19:28:40 +00:00
Alexander Chernavin
6cc757eff7 flowprobe: fix sending L4 fields in L2 template and flows
Currently, when L2 and L4 recording is enabled on the L2 datapath, the
L2 template will contain L4 fields and L2 flows will be exported with
those fields always set to zero.

With this fix, when L4 recording is enabled, add L4 fields to templates
other than the L2 template (i.e. to the IP4, IP6, L2_IP4, and L2_IP6
templates). And export L2 flows without L4 fields. Also, cover that case
in the tests.

Type: fix
Change-Id: Id5ed8b99af5634fb9d5c6e695203344782fdac01
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 6b027cfdbcb750b8aa1b8ab9a3904c1b2dca6f15)
2023-12-01 19:28:14 +00:00
Alexander Chernavin
9dc9136ec4 flowprobe: fix corrupted packets sent after feature disabling
When IPFIX flow record generation is enabled on an interface and the
active timer is set, flows will be saved and then exported according to
the active and passive timers. If then disable the feature on the
interface, the flow entries currently saved will remain in the state
tables. They will gradually expire and be exported. The problem is that
the template for them has already been removed. And they will be sent
with zero template ID which will make them unreadable.

A similar problem will occur if feature settings are "changed" on the
interface - i.e. disable the feature and re-enable it with different
settings (e.g. set a different datapath). The remaining flows that
correspond to the previous feature settings will be eventually sent
either with zero template ID or with template ID that corresponds to the
current feature settings on the interface (and look like garbage data).

With this fix, flush the current buffers before template removal and
clear the remaining flows of the interface during feature disabling.

Type: fix
Change-Id: I1e57db06adfdd3a02fed1a6a89b5418f85a35e16
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit f68afe85a6e4d5e00fdad1af19a76eb40fdfa388)
2023-12-01 19:26:58 +00:00
Alexander Chernavin
74a7a5ae08 ethernet: run callbacks for subifs too when mac changes
When MAC address changes for an interface, address change callbacks are
executed for it. In turn adjacencies register a callback for MAC address
changes to be able to update their rewrite strings accordingly.

Subinterfaces inherit MAC address from the parent interface. When MAC
address of the parent interface changes, it also implies MAC address
change for its subinterfaces. The problem is that this is currently not
considered when address change callbacks are executed. After MAC address
change on the parent interface, packets sent from subinterfaces might
have wrong source MAC address as the result of stale adjacencies. For
example, ARP messages might be sent with the wrong (previous) MAC
address and address resolution will fail.

With this fix, when address change callbacks are executed for an
interface, they will be also executed for its subinterfaces. And
adjacencies will be able to update accordingly.

Type: fix
Change-Id: I87349698c10b9c3a31a28c0287e6dc711d9413a2
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 8a92b68bc8eaaec48d144fba62490a32f28eb422)
2023-12-01 19:26:17 +00:00
Alexander Chernavin
70591c147d flowprobe: fix sending L2 flows using L2_IP6 template
Currently, L2 flows are exported using L2_IP6 template if L3 or L4
recording is enabled on L2 datapath. That occurs because during feature
enable, L2 template is added and its ID is not saved immediately. Then
L2_IP4 and L2_IP6 templates are added overwriting "template_id" each
time. And in the end, the current value of "template_id" is saved for L2
template. The problem is that "template_id" at that point contains the
ID of L2_IP6 template.

With this fix, save the template ID immediately after adding a template
for all variants (datapaths). Also, cover the case with a test.

Type: fix
Change-Id: Id27288043b3b8f0e89e77f45ae9a01fa7439e20e
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 120095d3d33bfac64c1f3c870f8a332eeaf638f0)
2023-12-01 19:19:44 +00:00
Neale Ranns
6d83dddeb1 fib: Don't use an address from an attached prefix when sending ARP requests.
Change-Id: I4c3144794dd0bd7de6150929e53f6d305c496b17

Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I7b0c2c2dec5e867970599b8f2f2da17f2ff0b17c
(cherry picked from commit 39528796098973fe9a5411e0f6f94268c3324e94)
2023-11-30 16:24:53 +01:00
Naveen Joy
df17a1f068 tests: remove unsupported qemu feature
pretty=on|off has been removed from qemu and its presence
causes VM boot up issues.

Type: fix

Change-Id: I4a9f15dba5015e81fbd32278b1c74b2606c32c8f
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-09-20 01:55:47 +00:00
Vladislav Grishenko
5b3e04c74f nat: fix nat44_ed set_session_limit crash
Setting session limit should return error for unknown fib.
Optimize max_translations_per_fib expanding and drop unnecessary
trailing fib entry.

Type: fix
Change-Id: Ie7d2b363ade48f53598faa617a49cce7b2db6400
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
2023-09-13 16:56:19 +00:00
Florin Coras
e8a1dbf8da quic: fix quic sessions state updates
Session state cannot be updated after async notification event is
generated for app. Instead, make sure quic sessions that accept new
streams are switched to listening state only on accept.

Type: fix
Fixes: 0242d30

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9663ccadbea99d555ad49e871f7dff897239dc84
2023-09-13 16:35:51 +00:00
Vladislav Grishenko
579a6fb89b nat: improve nat44-ed outside address distribution
Use client address hash to pick the first outside address
instead of just address high octet, becasue it may denegerate
into stable 10/172/192, depending on nat address count.

Fix outside address distribution test to acually test the
distribution, not the algo, so previous distribution will
fail with 65 nat addresses and 100 clients:

FAIL: Outside address distribution based on source address
Traceback (most recent call last):
  File ".../test/test_nat44_ed.py", line 2048, in test_outside_address_distribution
    msg="Bad outside address distribution")
AssertionError: 156.25 not less than 0.33 : Bad outside address distribution

Type: improvement
Change-Id: I604b1294422f20d211db5614c47559557a78a193
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
2023-09-06 16:44:15 +00:00
Ole Troan
9587d39993 npt66: make plugin default disabled
Plugin is still in experimental state. No reason why it needs
to be default enabled.

Type: fix
Change-Id: Ibf1810215d4c8079a068bfc60aa7dd49306ee4e4
Signed-off-by: Ole Troan <otroan@employees.org>
2023-09-05 08:47:08 +02:00
Ole Troan
34850e0187 npt66: checksum applied to src address instead of dst address on rx
Applied the checksum delta to the source address instead of the destination address
in the RX direction.

Cleaned up tests a little.

Type: fix
Change-Id: I871f3448365587e5319dfbca6ea356935321ff9b
Signed-off-by: Ole Troan <otroan@employees.org>
2023-09-04 15:14:46 +00:00
Maxime Peim
77812045e7 tracenode: filtering feature
In order to be able to filter on encapsulated packet, a new node
has been added to the ip4/6-unicast arcs.

Type: feature
Change-Id: I1e8ee05bc6d0fce20cadd8319c81bab260c17d21
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-09-04 07:57:44 +00:00
Maxime Peim
23d13c071e map: test fix feature disabling
Upon test teardown, MAP features were not disabled, potentially
leading packets to be treated by the wrong node.

Type: test
Change-Id: I0c1c614318d1308f825c5cc0bf95688e92f6d00a
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-09-01 08:43:23 +00:00
Ole Troan
6ee3aa41c3 npt66: network prefix translation for ipv6
This is the initial commit of a NPTv6 (RFC6296) implementation for VPP.
It's restricted to a single internal to external binding and runs
as an output/input feature on the egress interface.

Type: feature
Change-Id: I0e3497af97f1ebd99377b84dbf599ecea935ca24
Signed-off-by: Ole Troan <otroan@employees.org>
2023-08-25 09:15:32 +02:00
Klement Sekera
c5fa5391ed tests: more descriptive error message
Type: improvement
Change-Id: Icf8a5dc711e1e11ec919b515d7af2f487a1c04c2
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-17 17:24:56 -04:00
Dave Wallace
7b8b465269 tests docs: update python3 venv packages
- Package update performed by
  1. updating pip, pip-tools, setuptools
  2. 'make test-refresh-deps' on ubuntu 22.04
  3. fixing 'make test' and 'make docs' issues
     on ubuntu 22.04
  4. 'make test-refresh-deps' on ubuntu 20.04
- Add dependency for 'make test-refresh-deps'
  to insure python venv is set up.
- Update of python formatter, black,
  caused reformating of 41 python code
  files.

Type: make

Change-Id: I7cafdf4b5189065ac57cb6b254937f6e0897a924
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-16 19:53:12 +00:00
Dave Wallace
ef68bb57db tests: filter coverage report output
- Remove test code & non-vpp code from coverage report
- Remove driver/hardware vpp code which cannot be tested
  in 'make test' from coverage report

Type: fix

Change-Id: I04b50c14bc3437b845f2afafae47297189e61e3f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-11 02:15:07 +00:00
Dave Wallace
878a9f5706 tests: fix setting gcov flag for test-cov target
Type: fix

Change-Id: I3c663babe4f32f5d2870265336b5d272cc029ce7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-08 21:22:54 +00:00
Benoît Ganne
84e6658486 ipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMAC
Type: improvement

Change-Id: I830f7a2ea3ac0aff5185698b9fa7a278c45116b0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-08-08 10:16:26 +00:00
Naveen Joy
ae916b3904 tests: Add checksum offload interface tests
Type: test

Change-Id: I6edc8858b802d3d32159d71c1e867a06cc1025d5
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-07-21 13:00:05 +00:00
Nobuhiro MIKI
95c2da7c25 lb: Fix src_ip_sticky evaluation bug in per-port-vip case.
Before this fix, the src_ip_sticky flag was passed as an argument to
the lb_node_get_hash function, which computes a hash value for a packet.
However, in per-port-vip case, the value of src_ip_sticky flag may be
different for each port number. As a result, the value is the same for
all port numbers, even though it is a per-port-vip case.

This commit fixes the src_ip_sticky evaluation by delaying it until the
packet is received, so that the correct value is obtained. Also, the
unit test case has been enhanced for this bug fix.

The steps to reproduce this bug are described below:
https://lists.fd.io/g/vpp-dev/message/23248

Type: fix
Fixes: 613e6dc0bf92 ("lb: add source ip based sticky load balancing")
Change-Id: I483492b214a1768e7a21fd86edd5151b3c46528b
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2023-07-13 08:10:26 +00:00
Alexander Chernavin
e1cc875360 ip-neighbor: add api for getting neighbor db config
There is an API call to change neighbor database configuration (i.e.
limit on peer number, aging, and recycling). With this change, make
getting current values of these settings available via the API.

Type: improvement

Change-Id: Ie9394e086b68cf9b28ad98dea162f203f8043cbb
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-06-29 05:11:10 +00:00
Maxime Peim
1271e3a2a1 ipsec: manually binding an SA to a worker
An SA is normally bound to the first thread using it. However, one
could want to manually bind an SA to a specific worker.

Type: improvement
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I05cbbf753e44a01d9964ee47812c964db9bbb488
2023-06-23 17:38:55 +00:00
Dave Wallace
1c95e12b0d tests docs: fix lcov code coverage report generation
- Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199

Type: test
Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-06-22 13:35:28 +00:00
Andrew Yourtchenko
9ba6dcf558 tests: do not run qemu interface tests if the environment does not allow it
cdf73b973181ff4c67147900408216e37bae897a has added the qemu tests as part of the default test run,
which results in "make test" failure in more restricted environments which do not allow the
namespace creation.

Add a config flag to skip those tests, and skip them if the namespace creation fails.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Ie631f7fb2a80864f77c79619eba4a43712e950e5
2023-06-21 17:20:03 +00:00
Dave Wallace
cdf73b9731 tests: Run interface tests as a regular test
Type: test

Change-Id: I5cf5a0e6437b274e565066f1012d7225c62b87a8
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-06-15 13:27:23 -07:00
Alexander Chernavin
f2b6edb149 wireguard: add support for chained buffers
Type: feature

With this change, packets that are larger than a single buffer can fit
will be able to be sent and received over a Wireguard tunnel. Also,
cover this with tests.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Ifaf7325676d728580097bc389b51a9be39e44d88
2023-06-02 14:41:53 +00:00
Xiaoming Jiang
9a9604b09f crypto: make crypto-dispatch node working in adaptive mode
This patch can make crypto dispatch node adaptively switching
between pooling and interrupt mode, and improve vpp overall
performance.

Type: improvement
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: I845ed1d29ba9f3c507ea95a337f6dca7f8d6e24e
2023-06-01 10:17:50 +00:00
Florin Coras
d921b89880 udp: fix local port reuse check
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I323946f7838507110c663f5a904399a74fc76691
2023-05-25 13:21:46 -07:00
Klement Sekera
47f3527108 tests: support for expected failures
- Add support for @unittest.expectedFailure decorator.

Type: improvement

Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I761751cda505e962225dc680b97c1fffa96f5176
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-05-20 02:34:14 +00:00
Klement Sekera
0157885517 tests: enhance counter comparison error message
- Make error message more human readable.

Type: improvement

Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Iefc276b3a85ff82b927028a72bb91ed87ebd04ba
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-05-20 02:33:57 +00:00
Klement Sekera
d3e0d104ad tests: refactor extra_vpp_punt_config
Rename extra_vpp_punt_config to a more generic name extra_vpp_config to
better fit its purpose. It's fit for general use and already used that
way by quic and vcl tests anyway.

Type: refactor
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ib0a5789b0dbb3a8c3cae654dea4e32ac5e56dd41
2023-05-19 21:29:39 +00:00
Benoît Ganne
83e73709c3 ip_session_redirect: add session redirect plugin
This feature enables the use of the classifier and ip-in-out-acl nodes
to redirect matching sessions via arbitrary fib paths instead of relying
on additional VRFs.

Type: feature

Change-Id: Ia59d35481c2555aec96c806b62bf29671abb295a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-05-16 13:29:04 +00:00
Nathan Skrzypczak
51f1b26e85 session: update due to clib_socket refactoring
After the clib_socket_init syntax changed, the behavior of VCL
socket creation was broken. This patch introduces app_namespace_add_del_v4
to address the behavioral change.

Type: refactor

Change-Id: Ice016bdb372233fd3317f166d45625e086e9b4df
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-04-28 03:00:59 +00:00
Klement Sekera
c7d50475ec tests: fix parallel runs skipping some tests
Fix corner case when a test would be skipped if it was not possible to
start it due to insufficient cpus available in the middle of the loop.

Type: fix
Change-Id: Ie4580685ff55688375d649d7009131d9fe1e4f33
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2023-04-25 15:46:42 +00:00
Klement Sekera
cffeca4f1e tests: fix test-help formatting
Type: improvement
Change-Id: Ib7703359b998456bff88caee88c2734c7724bc09
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2023-04-25 15:44:53 +00:00
Klement Sekera
08c50e3b7a tests: support multiple filter expressions
Support multiple comma-delimited filter expressions,
e.g. to run both bfd and ip4 tests, it's now possible to do:

make test TEST=bfd,ip4

Same goes for wildcards, e.g.:

make test TEST=bfd,..test_longest_prefix_match,..test_icmp_error

Type: improvement
Change-Id: I0cceaa443cb612dca955f301c7407959f9a71a6e
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2023-04-25 15:44:13 +00:00
Andrew Yourtchenko
feb77422a3 ip: punt socket - take the tags in Ethernet header into consideration
The punt socket code rewinds the current_data pointer by sizeof (ethernet_header_t),
which is incorrect if the header is tagged - resulting in truncated destination MAC
address. Use ethernet_buffer_header_size() instead, which takes tags into account.

Also add the unittest that verifies the issue and the fix.

Type: fix
Change-Id: I6352a174df144ca1e4230390c126f4b698724ebc
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2023-04-12 15:26:23 +00:00
Takeru Hayasaka
b23c6f4f29 ip: support flow-hash gtpv1teid
support with  GTPv1 TEID added to the flow hash.
This can able to ECMP to PGW and parallelization.
Type: feature

Change-Id: I6f758579027caf6123831ef2db7afe17e424a6eb
Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
2023-03-31 06:04:42 +00:00
Arthur de Kerhor
ad95b06181 ipsec: add per-SA error counters
Error counters are added on a per-node basis. In Ipsec, it is
useful to also track the errors that occured per SA.

Type: feature
Change-Id: Iabcdcb439f67ad3c6c202b36ffc44ab39abac1bc
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2023-03-23 08:58:55 +00:00
Benoît Ganne
79cb1d53c1 stats: fix tests with multiple workers
Type: fix

Change-Id: Ic4b8478d390c7373bfb43a39ae6a70e978ae9321
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-03-06 17:55:48 +00:00
Vladislav Grishenko
a20afdc845 vppinfra: fix clib_bitmap_will_expand() result inversion
Pool's pool_put_will_expand() calls clib_bitmap_will_expand(),
so every put except ones that leads to free_bitmap reallocation
will get false positive results and vice versa.

Unfortunatelly there's no related test and existing bitmap
tests are failing silently with false positive result as well.

Fortunatelly neither clib_bitmap_will_expand() nor
pool_put_will_expand() are being used by current vpp codebase.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Id5bb900cf6a1b1002d37670f5c415c74165b5421
2023-03-06 14:31:47 +00:00
Dmitry Valter
71d02aa631 tests: support tmp-dir on different filesystem
Support running tests with `--tmp-dir` on a filesystem different from /tmp.
os.rename withs only within a single FS whereas shutil.move works accross
different filesystems.

Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: I5371f5d75386bd2b82a75b3e6c1f2c850bc62356
2023-02-14 01:26:01 +00:00
Takeru Hayasaka
c4c205b091 sr: support define src ipv6 per encap policy
Can to define src ip of outer IPv6 Hdr for each encap policy.
Along with that, I decided to develop it as API version V2.
This is useful in the SRv6 MUP case.
For example, it will be possible to handle multiple UPF destinations.

Type: feature
Change-Id: I44ff7b54e8868619069621ab53e194e2c7a17435
Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
2023-02-10 16:17:27 +00:00
Naveen Joy
0a192ea93d tests: use existing pip compiled req file for building the run.py venv
pip compiled requirements file named requirements-3.txt exists in the
test directory. No need to auto-generate it again

Type: improvement

Change-Id: Ib2b51c983af8d0e4b000e4544012b6cd94405519
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-02-10 02:15:26 +00:00
Naveen Joy
25b6e44424 tests: use iperf3 for running interface tests on the host
Type: improvement

Change-Id: I7123591932d51ce0c5b372893454945bbd3913b2
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-02-10 02:14:44 +00:00