Commit Graph

141 Commits

Author SHA1 Message Date
a960d64a87 Add the ability to skip address sync on unnumbered interfaces 2024-03-05 22:59:55 +01:00
c8dc522fe9 Avoid creating a duplicate LIP 2024-03-05 22:59:55 +01:00
4b9c556f08 Update README.md
fix path.
closes #12
2024-03-03 00:52:03 +01:00
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
3ecbb0199e Backport gerrit 40142 from upstream 2024-02-09 11:08:07 +01:00
becf8fa759 Fix crash - vec_free() instead of free() 2024-02-09 00:14:18 +01:00
c3f294333f Merge pull request #9 from caizhengxin/main
Fixed delete bond interface segment error.
2023-10-13 12:51:54 +02:00
ff3ce656c1 Fix delete segment error. 2023-08-11 14:31:25 +08:00
6dbd2c1d7b Fixed the deletion segment error 2023-08-11 14:09:13 +08:00
371715d08f Update README.md 2023-05-31 15:05:38 +02:00
7b2a91f8dd Update README.md
Add some important notes on MPLS
2023-05-31 15:03:09 +02:00
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
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
8fc5631ef6 Run clang-format on all files. 2023-05-30 21:28:35 +02:00
30a1fe2a3f Backport https://gerrit.fd.io/r/c/vpp/+/38633 2023-05-26 09:54:13 +02:00
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
bc429011e8 Fix logging for https://gerrit.fd.io/r/c/vpp/+/38602 2023-04-12 10:53:39 +02:00
bd3265b77f backport https://gerrit.fd.io/r/c/vpp/+/38602 2023-04-12 10:52:40 +02:00
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
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
ccea08b95d Ensure the string is 0-terminated 2023-02-05 11:32:48 +00:00
5e9f9ef218 Reduce route add/del message from INFO to DBG 2023-01-14 16:52:57 +00:00
815a6e0dce Run VPP's checkstyle to reformat the code 2023-01-11 16:21:40 +00:00
e53d4376ab cleanup: Clean logging, consistent capitalization, nouns, and macro names 2023-01-11 16:18:18 +00:00
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
50c1e0f0d4 Backport gerrit.fd.io/r/c/vpp/+/37426 2023-01-11 13:00:40 +00:00
6faf206370 merge 2023-01-11 12:12:15 +00:00
263ff9d02c Initialize var in case of error return, per upstream a01be735f2 2023-01-11 13:08:54 +01:00
b7fd36bda4 Add entry flags per upstream f0781829d 2023-01-11 13:08:03 +01:00
43eb442624 Fix endianness bug in lcp_pair_add_v2() 2023-01-11 12:35:16 +01:00
efc385c17f Fix endianness per upstream c8cd079a0 2023-01-11 11:14:33 +01:00
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
532858f8b7 Reduce message to DBG per upstream d3ccb0c 2023-01-11 11:12:39 +01:00
60918e71e0 Merge branch 'main' of github.com:pimvanpelt/lcpng into main 2022-11-25 11:55:58 +00:00
93d4bc29b0 Update README.md
h/t Jim Thompson
2022-11-17 17:49:05 +01:00
7027bf6250 Backport https://gerrit.fd.io/r/c/vpp/+/36814 2022-10-04 13:16:30 +00:00
a4006ec5da Backport https://gerrit.fd.io/r/c/vpp/+/37026 2022-10-04 13:13:57 +00:00
623973dc1f Backport https://gerrit.fd.io/r/c/vpp/+/36961 2022-10-04 13:11:53 +00:00
a0ad5cc5cf Merge Gerrit 36176 from upstream 2022-06-03 20:33:48 +00:00
786530701d Backport https://gerrit.fd.io/r/c/vpp/+/35719 2022-03-31 23:23:36 +00:00
0bc3e01c9b Backport https://gerrit.fd.io/r/c/vpp/+/35528 2022-03-08 14:45:35 +00:00
a68a6e89e5 Backport https://gerrit.fd.io/r/c/vpp/+/35519 2022-03-08 13:55:28 +00:00
e6e6c11c78 Only signal NL_EVENT_READ once per read cycle, not once per netlink message - from https://gerrit.fd.io/r/c/vpp/+/35525 2022-03-08 13:50:37 +00:00
a27fdb9911 Backport https://gerrit.fd.io/r/c/vpp/+/35523 2022-03-08 13:42:56 +00:00
554988ebf6 Fix API errors - convert int32 to host order and null terminate vectors in the response 2022-03-08 10:08:59 +00:00
f9441c5e03 bugfix - return in host order 2022-02-27 23:05:34 +00:00
8a1c031ea9 backport https://gerrit.fd.io/r/c/vpp/+/35411 2022-02-22 20:42:11 +00:00
5f3eb62be9 Reduce resource usage on virtio polling, also avoid potential (undiagnosed) dataplane lockup when running multiple threads: just poll with one RX queue per TAP 2022-02-20 19:19:58 +00:00
ccd4b393e9 Roll back carrier set
-- it works fine for phy's that are carrier-up, but crashes if they are
   carrier-down.

0: /home/pim/src/vpp/src/vnet/interface_funcs.h:46 (vnet_get_hw_interface) assertion `! pool_is_free (vnm->interface_main.hw_interfaces, _e)' fails

    at /home/pim/src/vpp/src/vppinfra/error.c:143
    ns=0x7fff98774e80 "dataplane", host_sw_if_indexp=0x0) at /home/pim/src/vpp/src/plugins/lcpng/lcpng_interface.c:998
    at /home/pim/src/vpp/src/plugins/lcpng/lcpng_if_cli.c:96
    parent_command_index=371) at /home/pim/src/vpp/src/vlib/cli.c:591
    parent_command_index=0) at /home/pim/src/vpp/src/vlib/cli.c:548
    at /home/pim/src/vpp/src/vlib/cli.c:694
2021-12-24 21:12:24 +00:00
ddd3ad372a Only set carrier up when hw is up 2021-12-24 21:04:15 +00:00