diff options
author | 2025-01-09 12:01:13 -0500 | |
---|---|---|
committer | 2025-02-26 15:39:58 +0000 | |
commit | 9543e29708524accce591eab3aa23270ab44ae1a (patch) | |
tree | f56465c95800058c98b210a5653db23b6c385fae /src/plugins/linux-cp/lcp_interface.h | |
parent | 1cdebd8ca18bdf38af95047b1e9daf520e03030c (diff) |
linux-cp: Add support for LACP packets
This patch adds support to mirror LACP packets between host and phy.
It is needed for the Sonic-VPP project to support LAG and allow Sonic
to run LACP in the control plane.
The change has 3 parts:
(1) Converted lip_punt_node to lip_punt_xc_inline, which now supports
the creation of two distinct nodes: lip_punt_node and lip_punt_xc_node.
lip_punt_node retains its original punt functionality.
lip_punt_xc_node supports both punt and x-connect between host & phy.
(2) Add 2 new API (and corresponding CLI) to the linux-cp plugin:
(A) lcp_ethertype_enable ("lcp ethertype enable <ethertype>")
(B) lcp_ethertype_get ("show lcp ethertype")
(3) Add UT to test the new functionality and API/CLI for LACP and LLDP.
Type: improvement
Change-Id: Iab66e3b29351dcf2c471babd4f1ef4bdd19da46e
Signed-off-by: Akeel Ali <akeelapi@gmail.com>
Diffstat (limited to 'src/plugins/linux-cp/lcp_interface.h')
-rw-r--r-- | src/plugins/linux-cp/lcp_interface.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/linux-cp/lcp_interface.h b/src/plugins/linux-cp/lcp_interface.h index cfcd3925a15..8cf6d3f4da1 100644 --- a/src/plugins/linux-cp/lcp_interface.h +++ b/src/plugins/linux-cp/lcp_interface.h @@ -18,6 +18,7 @@ #include <vnet/dpo/dpo.h> #include <vnet/adj/adj.h> #include <vnet/ip/ip_types.h> +#include <vnet/ethernet/ethernet.h> #include <plugins/linux-cp/lcp.h> @@ -198,6 +199,18 @@ void lcp_itf_pair_sync_state (lcp_itf_pair_t *lip); void lcp_itf_pair_sync_state_hw (vnet_hw_interface_t *hi); void lcp_itf_pair_sync_state_all (); +/** + * Enable linux-cp-punt-xc for a given ethertype. + * @param ethertype - ethertype to enable + */ +int lcp_ethertype_enable (ethernet_type_t ethertype); + +/** + * Get the list of ethertypes enabled for linux-cp-punt-xc. + * @param ethertypes_vec - pointer to a vector to store the list of ethertypes + */ +int lcp_ethertype_get_enabled (ethernet_type_t **ethertypes_vec); + /* * fd.io coding-style-patch-verification: ON * |