1876 Commits

Author SHA1 Message Date
Benoît Ganne
8fadde6f01 pg: misc improvements and fixes
1) pg can typically injects packets in ethernet-input, ip4-input or
ip6-input. Make sure offload offsets are correctly set for ip4-input and
ip6-input.
2) add hw-addr support for ethernet mode (only available through cli)
3) refactor pg creation code to improve the readability by using
data structure pg_interface_args_t
4) fix the pg input and output traces to use headers according to
pg interface mode
5) introduce pg interface flags i.e. checksum, gso, gro

Type: improvement

Change-Id: Iffed502e9c6357d7ef8e8a72217867e8297236aa
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-12-12 14:45:14 +00:00
Hadi Rayan Al-Sandid
fb8f51697c bpf_trace_filter: allow pcap filtering without classifier
Type: improvement

Change-Id: I7ca860dbee0d0a24b7f00943142d8c878ed90e80
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-12-11 08:58:32 +00:00
Mohsin Kazmi
f0a126a1eb cnat: add support for icmp traceroute
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ief1e97d03b7a934547add35ac3ed1f93f2499a20
2024-12-09 09:21:42 +00:00
Steven Luong
2e67a3f377 session: add ip4-fib-id and ip6-fib-id to app ns CLI
Problem
The API app_namespace_add_del allows specifying ip4_fib_id and
ip6_fib_id. But the CLI does not. It only allows interface.
Interface binding may change after the application namespace
is created and there is no registration for the callback
when the interface binding changes.

Fix
Add ip4-fib-id and ip6-fib-id to app ns CLI. When both
interface and fib-id's are specified, interface takes
precedence. When interface is not specified, either ip4-fib-id
or ip6-fib-id or both ip4 and ip6 fib-id's may be specified.
If only ip4-fib-id is specified, ip6 is disable for this
particular app namespace. If only ip6-fib-id is specified,
ip4 is disable for this namespace.

When the interface binding changes to different vrf and the
application namespace was created via interface option, we
delete the application namespace and recreate the application
namespace with the new interface binding. Notice when the
application namespace is removed, all session rules and
sdl rules previously created for the deleted application
namespace will be deleted. However, if the fib table/session
table  was shared by another namespace, the other namespace
will still contain the session rules and sdl rules.

Type: improvement

Change-Id: I76eb30da1ed8a39d06694c1e66d0675bf03516bf
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-12-08 23:39:24 +00:00
Ivan Ivanets
19e2c7ac01 tests: remove decorator tag_fixme_ubuntu2204
Type: test

There is no need to use the tag_fixme_ubuntu2204 decorator.
All tests that previously used it are now stable. The neighbor test
has been moved to the extended suite because it is not related to the
type of operating system.

Change-Id: Ifa0a30cbeeeaabb2bbe4d213fa61e6fbde8789ca
Signed-off-by: Ivan Ivanets <iivanets@cisco.com>
2024-12-04 16:26:21 +00:00
Hadi Rayan Al-Sandid
7d469364c5 api: fix bug in pcap capture api
pcap api cleanup can cause crash in certain scenarios
e.g.missing/invalid 'filename' parameter.

Type: fix

Change-Id: I92417765960de84e30ed7cb945d40c50d722fb6c
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-11-27 08:20:17 +00:00
Dave Wallace
1beb88ed3b tests: remove use of python 2.7 compatibility module 'six'
- python 2.7 is no longer supported, clean up technical
  debt with use of 'six' module in test code

Type: test

Change-Id: I70e737920a6048c5e9caa20fece5ee21b91bb353
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-11-27 07:42:00 +00:00
Dave Wallace
75c67ac5db tests: use v3 version of session sdl dump api in ip6 test
- session_sdl_v2_dump api command is deprecated

Type: fix

Change-Id: I4f7a140e7e39fae8076caa54fd8bfb0c755c6767
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-11-27 04:48:01 +00:00
Mohsin Kazmi
c990aae85a pg: fix the buffer deletion
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I8f0a67706399dad1e5296aafd1cfa92958b2fe82
2024-11-22 08:49:35 +00:00
Ivan Ivanets
9765e27635 tests: vpp_qemu_utils with concurrency handling
Type: test

Enhance vpp_qemu_utils functions with mutex locking, handle namespace
and
host interface existence, unique namespace/interface name, error
handling and retries, check error code explicitly.

Change-Id: I1ea66eeefbc1fee9b58e8b9886f4dd6fd8d33444
Signed-off-by: Ivan Ivanets <iivanets@cisco.com>
2024-11-19 16:52:48 +00:00
Matus Fabian
a4597a74aa http_static: api add keepalive-timeout
Type: improvement

Change-Id: Ia1e0dcf562fd1538794542207ac2cad97d168c6c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-11-13 18:09:19 +00:00
Ahmed Abdelsalam
c68c970838 sr : enable SRv6 uSID in the SRv6 API
Type: improvement

Change-Id: I026b1a8fd1df0e6ac1dba8df78b12cde95aae419
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
2024-11-12 17:14:50 +00:00
Steven Luong
e38d947074 session: validate appns index in vnet_session_rule_add_del
vnet_session_rule_add_del may be called with a bogus appns index
from the API. Validate the appns index is indeed valid.

Type: fix

Change-Id: Ife1b5b9ab0b180ececa74008d2ef92045a9e8b58
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-11-08 17:26:46 +00:00
Steven Luong
e0c4e6e32d session: session table holding free appns index
session table may be shared among multiple appns's.
  app ns add id blue secret 1 if tap0
  app ns add id red secret 1 if tap0

session table holds the last added app_ns's appns_index.
If the last app_ns is deleted, session table is not free
since there is still an appns which uses the same session
table. In that case, session table is holding the free
app_ns's appns_index and it can cause problem.

The fix is to modify appns_index in session table to hold
a vector of appns_index's instead of just the appns_index
that was last added. When the app ns is deleted, remove the
deleted appns_index from the session table's vector of
appns_index's.

Type: fix

Change-Id: Ied8bc97f185071dc89b9b56656e18efbd2995131
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-11-06 18:13:01 +00:00
Steven Luong
bfad6b7a8f session: sesssion_rule_add_del API parsing port in wrong order
The convention in the binary API is that fields encoded in network order.
For some reason, port was parsed in host order.

Type: fix

Change-Id: I31ea313937097e2547226566b7869be4e28251b8
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-10-30 23:59:35 +00:00
Artem Glazychev
768c8d4ece dhcp: fix buffer length after adding new option
The size of dhcp option should be o.length + 2 additional bytes of the header.
Incorrect offset results in an extra byte at the end of the packet:
...
0120  04 00 00 00 04 05 04 AC 10 04 01 FF 00
...
RFC2131 says the last should be the 'end' option (ff)

Type: fix

Change-Id: I056d755d29465aab8c1c55a0b930f65ece6fafce
Signed-off-by: Artem Glazychev <glazychev@mts.ru>
2024-10-23 13:44:09 +00:00
Dave Wallace
66fcfb845b build: fix gcov failure on ubuntu 24.04
Type: make

Change-Id: Ieee6562de4b9f68d701c27a3c3018431b28eb3b0
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-10-23 09:38:11 +00:00
Ivan Ivanets
2e8a406aaf tests: remove tag_fixme_ubuntu2204
Type: test

Activate tests that works successfully on ubuntu 22.04 but were
problematic on later version and were excluded by
@tag_fixme_ubuntu2204

Change-Id: I93c4626a120ce8b475e9c5ca933a5544d6337933
Signed-off-by: Ivan Ivanets <iivanets@cisco.com>
2024-10-21 20:20:42 +00:00
Abdel Baig
17a918133b bfd: add support for multihop
Type: feature

Change-Id: If23f9cc9317e7528f3c8d66303457206843a12c5
Signed-off-by: Abdel Baig <abdbaig@cisco.com>
2024-10-15 15:46:01 -04:00
Mohsin Kazmi
0b1bd9df33 pg: add support to delete pg interface
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3102fded415c644673fb79a0fdb7a7448ce20f26
2024-10-07 08:39:23 +00:00
Ivan Ivanets
b2b87e4819 tests: fix wireguard test case failures
Type: test

There are random failures in the wireguard test cases that are not related to concurrency issues.
The root cause is a retry of the handshake initiation after (REKEY_TIMEOUT + JITTER) ms, where JITTER is a random value between 0 and 333 ms.

Solution: Add a filter parameter for the `send_and_expect` method of the vpptestcase.
This filter allows for excluding unexpected handshake initiation packets when the responder sends two packets (with `message_type = 1` and `message_type = 2`),while only a single packet (with `message_type = 2`) is expected.

Change-Id: I62816931fc1b85e2202f3d36eb6c2a23714644d5
Signed-off-by: Ivan Ivanets <iivanets@cisco.com>
2024-10-01 16:57:44 +00:00
Steven Luong
6f173171b1 session: fix SDL to use remote instead local
The language is
local == VPP local interface
remote == sender prefix to VPP node
SDL acts on remote prefix.

Type: fix

Change-Id: I82917c6ef801fc67430dfdd15c5630cb7a6347e0
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-28 01:51:31 +00:00
Alexander Skorichenko
e3ad5aa68a snort: API functions for plugin
Also, made disconnect-instance and delete-instance functions
available via cli.

Type: feature

Change-Id: I7939d27867959cb871b1cc7205b94410b53906fd
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2024-09-27 12:30:16 +00:00
Aritra Basu
70d2a08e7e vcl: add http support to vcl_test_protos
Type: improvement

Change-Id: Ibb493f1d7713d0e10b8bd1d5ff17b89967b53b8a
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-09-17 15:59:00 +00:00
Andrew Yourtchenko
0acb398d6d pvti: Packet Vector Tunnel Interface
This plugin implements a PoC of UDP-based tunnel substrate whose aim is
to specifically provide higher MTU to the upper layers by chunking
the payload PDUs into smaller packets with full 5-tuple.

At the same time, if there are multiple small packets to
the same destination during the vector processing, they
are packed into "carrier" packets up to underlay MTU size.

It does assume a trustworthy underlying medium, thus for the
operation over Internet it requires the use of encryption layer
underneath.

Type: feature
Change-Id: I323958fa8de62584f6ed15643ea689568a9a62bc
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-09-17 12:10:19 +00:00
Steven Luong
c4b5d10115 session: add Source Deny List
With this feature, session enable is now modified to have 3 modes of operation
session enable -- only enable session
session enable rt-backend sdl -- enable session with sdl
session enable rt-backend rule-table -- enable session with rule-table

session rule tables are now created on demand, upon adding first rule
to the rule table.

refactor session table to remove depenency from sesssion rules table. Now
session rules table APIs take srtg_handle and transport
proto instead of srt pointer.

Type: feature

Change-Id: Idde6a9b2f46b29bb931f9039636562575572aa14
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-06 18:26:56 +00:00
Dave Wallace
85ce93160f tests: fix make test python issues on ubuntu 24.04
- add patch to scapy to use latest six module instead
  of the old scapy specific six module which fails to
  import moves sub-module on python 3.12
- fix warning for deprecated legacy editable install of vpp_papi
- skip failing testcases on ubuntu-24.04

Type: test

Change-Id: Idc1a008c6e45ba69caa50c2e245012eb05effed7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-08-22 07:35:40 +00:00
Adrian Villin
86fa943725 http_static: make max-age configurable
Type: improvement

Change-Id: I629add6e3f4219d56610c3785013f69dbe847844
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20 18:19:12 +00:00
Benoît Ganne
0ce93ae744 tests: fix scapy 2.4.5 IPsec patch for AH + ESN
Type: fix

Change-Id: Ifac0e2aca83fa2a79b65d8d1a40add02051287d2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-08-08 10:22:01 +02:00
Benoît Ganne
d13b61171b tests: fix ipv6 fragmented esp w/ scapy 2.4.5
Since scapy 2.4.4, scapy will not decode the next layer if the fragment
offset is not 0 - IOW it will decode only for the 1st fragment.
See f1c26e77c5

Type: fix

Change-Id: If738734f90b15b24c0d98fec4bce4ff48c6d5fea
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-08-07 13:18:47 +00:00
Stanislav Zaikin
0f2c6cd1ab ikev2: handoff packets
current approach saves state in per-thread data structure. in
multi-worker + nat-t cases udp/500 and udp/4500 might be dispatched on
different workers. this patch adds hands off packet to 1 explicit thread
- 1st worker (or main thread in case there're no workers) or to thread
  that was explicitly set by user via configuration

Type: improvement

Change-Id: Ib5cd9a4b8612dfaa63b276035709524f7a492d4f
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-08-07 12:07:13 +00:00
Stanislav Zaikin
fa7b7a41e7 ikev2: fix BN_bn2bin re-allocation
the former code was re-allocating the vector when padding takes place.
it's not necessary since we have the correct size. also, it caused
issues since upper layer doesn't know about re-allocation and it caused
crash. with this patch many test-cases are enabled again.

Type: fix

Change-Id: Idf0b320101670ec64d62e9aac6399cc7c54c996f
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-08-07 10:12:22 +00:00
Dave Wallace
cf9356d642 tests: update scapy to version 2.4.5
- Required for Ubuntu 24.04 LTS jobs
- temporarily disable TestIpsecEsp1 and
  TestIpsecAhAll tests until a patch can
  be added to fix them

Type: test

Change-Id: I1ae7b170117182c3252629bbbb770775e2c496c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-08-07 09:15:17 +00:00
Matus Fabian
519983b44d misc: remove deprecated builtinurl plugin
Plugin code is incorporated in http_static plugin for longer time.

Type: refactor
Change-Id: Ib74adb2a79d3ee715bbc994d77bc7718faf7184f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-01 16:02:14 +02:00
Matus Fabian
f95c4d81fc prom: test_prom fix
Type: test
Change-Id: I022a3435429976590b8e8e2e1abe924188d1c3f9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-24 21:14:55 +00:00
Steven Luong
5682ca8ef6 session: delete and add application namespace do not create the global session table
When an application namespace is added, we call session_table_is_alloced
to see if we need to allocate a new session table. That check returns true
even if we removed the session table.
The fix is when we delete an application's global session table,
we need to invalidate fib_index_to_table_index.

Fixed test_vcl test script to run two tests back to back.
The 1st test deletes the application namespace at the end.
The 2nd test adds the application namespace in the beginning.

Type: fix
Fixes: 67bae20b05cb46e5f6d19afeaf1f7a52a5309d59

Change-Id: I67f5cc1b726a07659597a9479df011717db08d0a
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-24 04:20:08 +00:00
Dave Wallace
0da0883453 tests: output raw packet data when decoding pcap files
Type: test

Change-Id: I4e945b2bd067466afdaa58a6f07a1ab2c567bc2b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-07-18 14:45:49 +00:00
Steven Luong
67bae20b05 session: application namespace may reference a deleted vrf table
lock the vrf table when adding an application namespace and
unlock the vrf table when deleting an application namespace.

Free the session table when no more application namespace
uses it anymore to avoid memory leaks.

Type: fix

Change-Id: I10422c9a3b549bd4403962c925e29dd61a058eb0
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-15 20:57:35 +00:00
Klement Sekera
ca2f2e1ec9 tests: more options for decoding pcaps
Introduce "none", "all" and "failed" options for --decode-pcaps
parameter. Keep "failed" as default to be consistent with current
behaviour. Add missing documentation to test/Makefile and passthrough to
Makefile.

Rationale: running tshark binary takes about 100-150ms and if there are
thousands of pcap files, it takes minutes to decode them. This might not
be desirable if rerunning the tests repeatedly during development.

Type: improvement
Change-Id: Ie033521d51d18b9d499b9bc40fe6eff21c94622d
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-07-15 18:58:07 +00:00
Dmitry Valter
34fa0ce8f7 tests: skip more excluded plugin tests
Check and skip VPP_EXCLUDED_PLUGINS tests for most of plugins.

Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I23fd3666729251c639aa8da72a676058e3f5bb4e
2024-07-12 15:43:24 +00:00
Benoît Ganne
ff570d3d07 fib: make mfib optional
In some cases we do not need multicast support. Making it optional helps
scaling to high number of VRFs, by reducing the control plane operations
and memory consumption.

Type: improvement

Change-Id: Ib34ed3fe2806e2f4624981da4e4a3c49c69f70be
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-07-12 03:09:22 +00:00
Andrew Yourtchenko
9987d470a6 tests: disable failing tests on Ubuntu 22.04
Also rework the logic so the skipping of marked Ubuntu 22.04 occurs at framework level

Leave debian11 special cases as-is.

Type: fix
Change-Id: I481eb32cd1a0860935482e9f930ced409da653c9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-07-03 12:43:57 +02:00
Dmitry Valter
e95687b0d6 fib: fix ip drop path crashes
Do not mark drop paths as imported to avoid crashes on invalid table lookup.

```
vpp[8478]: /build/Vpp2310/source/src/vnet/fib/fib_table.c:35 (fib_table_get) assertion `! pool_is_free (ip4_main.fibs, _e)' fails
 #9  0x00007ff21785da1d in _clib_error () from /lib/x86_64-linux-gnu/libvppinfra.so.23.10
 #10 0x00007ff218087698 in fib_table_get (index=4294967295, proto=FIB_PROTOCOL_IP4) at /build/Vpp2310/source/src/vnet/fib/fib_table.c:35
 #11 0x00007ff218087a37 in fib_table_lookup_exact_match (fib_index=4294967295, prefix=0x7ff0eae0d354) at /build/Vpp2310/source/src/vnet/fib/fib_table.c:100
 #12 0x00007ff2180bc938 in fib_attached_export_import (fib_entry=0x7ff0eceac3e0, export_fib=4294967295) at /build/Vpp2310/source/src/vnet/fib/fib_attached_export.c:264
 #13 0x00007ff218098ade in fib_entry_post_flag_update_actions (fib_entry=0x7ff0eceac3e0, old_flags=FIB_ENTRY_FLAG_NONE, new_fib_index=4294967295) at /build/Vpp2310/source/src/vnet/fib/fib_entry.c:624
 #14 0x00007ff218098b90 in fib_entry_post_install_actions (fib_entry=0x7ff0eceac3e0, source=FIB_SOURCE_API, old_flags=FIB_ENTRY_FLAG_NONE) at /build/Vpp2310/source/src/vnet/fib/fib_entry.c:674
 #15 0x00007ff218098cce in fib_entry_create (fib_index=1, prefix=0x7ff0d3244d80, source=FIB_SOURCE_API, flags=FIB_ENTRY_FLAG_NONE, paths=0x7ff0eac15ab8) at /build/Vpp2310/source/src/vnet/fib/fib_entry.c:712
 #16 0x00007ff218088db4 in fib_table_entry_update (fib_index=1, prefix=0x7ff0d3244d80, source=FIB_SOURCE_API, flags=FIB_ENTRY_FLAG_NONE, paths=0x7ff0eac15ab8) at /build/Vpp2310/source/src/vnet/fib/fib_table.c:799
 #17 0x00007ff2180c026c in fib_api_route_add_del (is_add=1 '\001', is_multipath=0 '\000', fib_index=1, prefix=0x7ff0d3244d80, src=FIB_SOURCE_API, entry_flags=FIB_ENTRY_FLAG_NONE, rpaths=0x7ff0eac15ab8) at /build/Vpp2310/source/src/vnet/fib/fib_api.c:485
 #18 0x00007ff217d4b6dd in ip_route_add_del_t_handler (mp=0x7ff0eb08b998, stats_index=0x7ff0d3244dc8) at /build/Vpp2310/source/src/vnet/ip/ip_api.c:718
 #19 0x00007ff217d4b986 in vl_api_ip_route_add_del_t_handler (mp=0x7ff0eb08b998) at /build/Vpp2310/source/src/vnet/ip/ip_api.c:789
```

Type: fix
Fixes: 4b08632748727486e7ebfdcf4d992743595bc500
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I647899533771c35f44c9ecde517a30f111b36ad9
2024-06-19 00:50:49 +00:00
Dave Wallace
8a284cc611 tests: organize test coverage report generation
- Remove code from test report that is effectively
  untested and categorize based on reason for lack
  of testing.

Type: test

Change-Id: I6ca5444055b3a81a4880945b6845afc867556277
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-06-05 16:30:17 +00:00
Fan Zhang
e7901e8830 ipsec: fix missing udp port check
Type: fix

This patch fixes the missing UDP port check in IPsec NAT-T
case. As of RFC3948 UDP encapped ESP traffic should have
destination port ID of 4500, which was missing.

The related tests are updated with this port ID, too.

Change-Id: I73ecc6a93de8d0f4b642313b0f4d9c2f214a7790
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2024-06-04 12:44:53 +00:00
Mohsin Kazmi
5f694322a9 fib: set the value of the sw_if_index for DROP route
Type: fix

fib_api_path_decode() is utilized by the IP route API call
to translate the path from the API to the fib_route_path_t
structure. The ip_route_add_del_handler_t function initializes
the fib_route_path_t structure to zeros, consequently setting
the sw_if_index value to 0, which is a valid value in VPP.
Typically, the default VRF (Virtual Routing and Forwarding)
has a local interface at index 0, leading to normal functionality.
However, a custom VRF table without any interface will result
in a crash.

The issue arises because the DROP route in fib_api_path_decode()
does not override the sw_if_index value with the one provided
in vl_api_fib_path_t. Subsequently, when this sw_if_index is
attempted to be resolved in the VRF table where the interface
does not exist, it leads to a crash.

This patch addresses the problem by setting the sw_if_index of
fib_route_path_t to the sw_if_index value of the API path.

To reproduce the issue, please remove the fix and run the following command:
make test-debug TEST=test_ip4.TestIPv4RouteLookup.test_exact_match

Change-Id: I5d72e91e5c701e749a92873941bee7b7b5eabd41
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-06-03 12:22:10 +00:00
adrianvillin
8512145d7c hs-test: added targets to makefiles to get coverage from HS tests
Type: make

Change-Id: Iae7998692890264dfeea98c165617d0efa024d42
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-05-30 15:59:07 +00:00
Steven Luong
e4238aa34f ethernet: check destination mac for L3 in ethernet-input node
When the NIC does not support mac filter, we rely on ethernet-input
node to do the destination mac check, ie, when the interface is in L3,
the mac address for the packet must be the mac address of the
interface where the packet arrives. This works fine in ethernet-input
node when all packets in the frame might have different interfaces, ie,
ETH_INPUT_FRAME_F_SINGLE_SW_IF_ID is not set in the frame. However,
when all packets are having the same interface,
ETH_INPUT_FRAME_F_SINGLE_SW_IF_ID is set, ethernet-input node goes
through the optimized routine eth_input_single_int -> eth_input_process_frame.
That is where dmac check has a bug when all packets in the frame are
either, ip4, ip6, or mpls without vlan tags. Because without vlan tags,
the code handles all packets in fast path and ignores dmac check.
With vlan tags, the code goes to slow path where dmac check is handled
properly.

The fix is to check if we have a bad dmac in the fast path and force the
code to go to slow path which will handle dmac check properly.

Also do a wholesale correction on all the testcases which do not use
the proper dmac when sending L3 packets.

Type: fix

Change-Id: I73153a805cecdc24c4eefcc781676de04737ae2c
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-05-08 09:42:23 +00:00
Hadi Rayan Al-Sandid
4aecd4869c vlib: revert automatic core pinning changes
This reverts commit 71c32a898941e32b5d4f865b50fbe775560c582d.

Type: fix

Reason for revert: vnet pinning is not considered in this patch.
This causes keywords 'workers' and 'skip-cores' to be broken,
as well as keyword 'main-core auto' introduced in this patch.
If this patch is ever reconsidered, it must account for vnet
pinning fix in commit https://gerrit.fd.io/r/c/vpp/+/40711.

Change-Id: I1f3154a6c7e830b100f824375aa00e95b192f7f3
Signed-off-by: hsandid <halsandi@cisco.com>
2024-05-06 11:52:35 +00:00
Mohsin Kazmi
7b3339efff gso: use the header offsets from buffer metadata
Type: improvement

Change-Id: I955fbef0e0238cb69307e96cd1c677061737e5f3
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-05-02 14:51:59 +00:00