150 Commits

Author SHA1 Message Date
Pim van Pelt f9726dc5fb Remove unused includes 2026-02-10 23:00:46 +01:00
Pim van Pelt d8f47fdda2 Refactor tap into its own plugin (upstream commit cb19c526d) 2026-02-10 22:39:14 +01:00
Pim van Pelt 3db02d166c Move file_main to its own header 2025-06-07 17:07:51 +00:00
Pim van Pelt 6f5cde1aff Add lcp_itf_pair_get_v2(), as it is used by sFlow plugin 2024-11-02 13:52:13 +01:00
Pim van Pelt 61386a1c63 backport gerrit 40379 from upstream 2024-06-27 17:43:54 +02:00
Pim van Pelt 25b2999485 Backport https://gerrit.fd.io/r/c/vpp/+/40441 2024-04-01 23:07:56 +02:00
Pim van Pelt cb78074e46 Fix logline tag 2024-03-23 10:04:10 +01:00
Pim van Pelt 0d864a71fe Update README.md 2024-03-09 12:21:21 +01:00
Pim van Pelt e19f45e29c Update README.md 2024-03-08 23:53:51 +01:00
Pim van Pelt a960d64a87 Add the ability to skip address sync on unnumbered interfaces 2024-03-05 22:59:55 +01:00
Pim van Pelt c8dc522fe9 Avoid creating a duplicate LIP 2024-03-05 22:59:55 +01:00
Pim van Pelt 4b9c556f08 Update README.md
fix path.
closes #12
2024-03-03 00:52:03 +01:00
Pim van Pelt 7e482adb4f Update README.md
Add places to find help, considering issues in this repo will not be handled.
2024-02-20 01:25:31 +01:00
Pim van Pelt 3ecbb0199e Backport gerrit 40142 from upstream 2024-02-09 11:08:07 +01:00
Pim van Pelt becf8fa759 Fix crash - vec_free() instead of free() 2024-02-09 00:14:18 +01:00
Pim van Pelt c3f294333f Merge pull request #9 from caizhengxin/main
Fixed delete bond interface segment error.
2023-10-13 12:51:54 +02:00
jankincai ff3ce656c1 Fix delete segment error. 2023-08-11 14:31:25 +08:00
jankincai 6dbd2c1d7b Fixed the deletion segment error 2023-08-11 14:09:13 +08:00
Pim van Pelt 371715d08f Update README.md 2023-05-31 15:05:38 +02:00
Pim van Pelt 7b2a91f8dd Update README.md
Add some important notes on MPLS
2023-05-31 15:03:09 +02:00
Pim van Pelt 27595afc7e Merge pull request #7 from vifino/mpls
Basic MPLS support!

See the following references:
https://ipng.ch/s/articles/2023/05/07/vpp-mpls-1.html
https://ipng.ch/s/articles/2023/05/17/vpp-mpls-2.html
https://ipng.ch/s/articles/2023/05/21/vpp-mpls-3.html
https://ipng.ch/s/articles/2023/05/28/vpp-mpls-4.html

And contact vpp-dev@lists.fd.io for support.
2023-05-31 13:14:18 +02:00
Adrian Pistol 153628a3de Basic MPLS support.
1) Imports ENCAP_MPLS labels from IPv4/IPv6 routes.
Note that this requires libnl 3.6.0 or newer.

In previous patches, the fib_path_ext_t had a path ID of -1.
After a long investigation, it turned out to be caused by route weight
being set to 0. There is a comment explaining more details.

2) Handles MPLS routes.
MPLS routes were wrongly added as IPv4 routes before.

POP and SWAP are now both supported.
All the routes are installed as NON-EOS and EOS routes,
as the Linux kernel does not differentiate.

EOS POP used in PHP uses the next-hop address family
to determine the resulting address family.

This patch is sufficient for P setups.
PE setups with implicit null should also function okay, as long as a
seperate label gets programmed per address family.

PE setups with explicit null will also forward packets,
but punting is a bit odd and needs MPLS input enabled on the LCP host
device.

Make sure to enable MPLS in VPP first.

3) Propagate MPLS input state to LCP Pair and Linux.
Since the Linux kernel uses the MPLS routes itself,
the LCP pair tap needs MPLS enabled to allow host originated packets.

This also syncs the Linux `net.mpls.conf.<host_if>.input` sysctl to
allow punted packets to have MPLS labels, mostly explicit nulls.

For that to work, load the mpls kernel modules.

4) Cross connect MPLS packets from Linux directly to interface-output

This is a port of https://gerrit.fd.io/r/c/vpp/+/38702
2023-05-30 22:14:35 +02:00
Adrian Pistol 8fc5631ef6 Run clang-format on all files. 2023-05-30 21:28:35 +02:00
Pim van Pelt 30a1fe2a3f Backport https://gerrit.fd.io/r/c/vpp/+/38633 2023-05-26 09:54:13 +02:00
Pim van Pelt 529a11bb78 Fix ADD/REPLACE semantic for IPv4 and IPv6 routes: if NLM_F_REPLACE is set, call fib_table_entry_update(); otherwise call fib_table_entry_path_add2() 2023-05-21 09:11:05 +02:00
Pim van Pelt bc429011e8 Fix logging for https://gerrit.fd.io/r/c/vpp/+/38602 2023-04-12 10:53:39 +02:00
Pim van Pelt bd3265b77f backport https://gerrit.fd.io/r/c/vpp/+/38602 2023-04-12 10:52:40 +02:00
Pim van Pelt 9017d1bd3c Move back to multiple rx queues; and copy in the upstream change to autoassign a tap index ID, as the hw_if_index one could ba already taken (by tap create) 2023-04-06 23:36:36 +02:00
Pim van Pelt 6fe37f6a8d Revert change in e035203162 -- set RX/TX queues to 1 -- while hunting down a race condition 2023-02-05 11:34:12 +00:00
Pim van Pelt ccea08b95d Ensure the string is 0-terminated 2023-02-05 11:32:48 +00:00
Pim van Pelt 5e9f9ef218 Reduce route add/del message from INFO to DBG 2023-01-14 16:52:57 +00:00
Pim van Pelt 815a6e0dce Run VPP's checkstyle to reformat the code 2023-01-11 16:21:40 +00:00
Pim van Pelt e53d4376ab cleanup: Clean logging, consistent capitalization, nouns, and macro names 2023-01-11 16:18:18 +00:00
Pim van Pelt 2a218983d6 Print the network namespace that the listener was created/removed for, not the interface that caused it 2023-01-11 15:51:11 +00:00
Pim van Pelt 50c1e0f0d4 Backport gerrit.fd.io/r/c/vpp/+/37426 2023-01-11 13:00:40 +00:00
Pim van Pelt 6faf206370 merge 2023-01-11 12:12:15 +00:00
Pim van Pelt 263ff9d02c Initialize var in case of error return, per upstream a01be735f2 2023-01-11 13:08:54 +01:00
Pim van Pelt b7fd36bda4 Add entry flags per upstream f0781829d 2023-01-11 13:08:03 +01:00
Pim van Pelt 43eb442624 Fix endianness bug in lcp_pair_add_v2() 2023-01-11 12:35:16 +01:00
Pim van Pelt efc385c17f Fix endianness per upstream c8cd079a0 2023-01-11 11:14:33 +01:00
Pim van Pelt e035203162 Fix memory leak on failed tap creation per upstream 37b5cccb; Also, sync the RX/TX queues to be the same as upstream linux-cp 2023-01-11 11:13:40 +01:00
Pim van Pelt 532858f8b7 Reduce message to DBG per upstream d3ccb0c 2023-01-11 11:12:39 +01:00
Pim van Pelt 60918e71e0 Merge branch 'main' of github.com:pimvanpelt/lcpng into main 2022-11-25 11:55:58 +00:00
Pim van Pelt 93d4bc29b0 Update README.md
h/t Jim Thompson
2022-11-17 17:49:05 +01:00
Pim van Pelt 7027bf6250 Backport https://gerrit.fd.io/r/c/vpp/+/36814 2022-10-04 13:16:30 +00:00
Pim van Pelt a4006ec5da Backport https://gerrit.fd.io/r/c/vpp/+/37026 2022-10-04 13:13:57 +00:00
Pim van Pelt 623973dc1f Backport https://gerrit.fd.io/r/c/vpp/+/36961 2022-10-04 13:11:53 +00:00
Pim van Pelt a0ad5cc5cf Merge Gerrit 36176 from upstream 2022-06-03 20:33:48 +00:00
Pim van Pelt 786530701d Backport https://gerrit.fd.io/r/c/vpp/+/35719 2022-03-31 23:23:36 +00:00
Pim van Pelt 0bc3e01c9b Backport https://gerrit.fd.io/r/c/vpp/+/35528 2022-03-08 14:45:35 +00:00