Commit Graph

110 Commits

Author SHA1 Message Date
915e3598ac Add a bunch more interface phy_add logging to help auto-create/delete LCP in a followup commit 2021-08-09 00:16:03 +02:00
d11c4fccbf Remove lcp_if_process()
Remove the functionality that allows for a configuration of pairs in the
startup.conf -- I am intending on creating interfaces for each/any phy
and sub and tunnel interfaceb that is created.

Instead of injecting events and having a process listening for them,
simply use the callback to create LCP interfaces. This change removes
the old code and sets a helpful logging entry on line 870, in which
future automatic creations and removals of LCP taps will occur.

This way, three desirable usability properties are obtained:
1) on startup, all physical interfaces will be copied into LCP
2) on sub-interface or tunnel creation (or phy insertion), new
   interfaces will be created.
3) Deletions and removals will allow for auto-cleanup of the LCP.
2021-08-08 23:08:43 +02:00
f408a55cde Add a note (a mental note, really, on why we won't do netlink VPP interface creations 2021-08-08 23:03:48 +02:00
69d7cb73cc Copy L3 VPP interface MTU if available
Still use a sensible default of 9216, but if the L3 packet size is set
on the VPP interface, copy it forward (just as we do in the 'host'
interface of the TAP itself, ie the interface created in the linux
namespace). Now they will all line up initially.
2021-08-08 21:53:04 +02:00
4b79f042bf Remove hardcoded 9216 with ETHERNET_MAX_PACKET_BYTES 2021-08-08 21:40:56 +02:00
8111d1e9a8 Force MTU 9216 on lcpng TAP interfaces
The TAP interface does copy forward the host MTU based on the VPP
interface's L3 MTU, but it should also ensure that the VPP tap
interface has an MTU that is greater-or-equal to those.  Considering
users can set the interfaces at runtime (set interface mtu packet ...)
ensure that the tap MTU is large enough.

Ideally, a callback updates the MTU to the same value as the L3 MTU of
the VPP interface, or the L3 MTU of the host interface, if either of
those change. For now, it's a safe bet to take jumbo 9216.
2021-08-08 21:35:13 +02:00
2f51a196fc cosmetic - rename 'lcp-itf-process' to 'lcpng-if-process' 2021-08-08 21:21:18 +02:00
ca273dc953 Remove ability to override netns
This gives a lot of operational problems later. It's definitely reasonable
to be able to create tap interfaces in other namespaces, and this is
still possible (see below for syntax).

However, changing the runtime netns makes the netlink listener much more
complicated because it will have to listen on not just one netns, but all
of them, for netlink updates.

So, for now, let's remove the ability to set the namespace in the API.
Still possible:
- set at startup.conf in lcpng { netns <x> }
- force creating in 'lcpng create ... netns <x>'

This will nudge folks to create one singular namespace (say,
'dataplane', in the startup.conf), and then handle all netlink messages
in that namespace only.
2021-08-08 20:54:43 +02:00
f3fa25d897 Rename CLI paths to lcpng 2021-08-08 20:37:39 +02:00
80934a5c46 Initial checkin - renamed the files to avoid clashing with 'lcp' and 'linux-cp' plugin 2021-08-08 19:50:25 +02:00