From af05a569bcbc9550de791116aed5782d2071ac9d Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Fri, 25 Oct 2024 14:47:12 +0200 Subject: [PATCH 1/3] vxlan: add gpe boolean attribute Signed-off-by: Paul Donald --- system-linux.c | 1 + system.c | 1 + system.h | 1 + 3 files changed, 3 insertions(+) diff --git a/system-linux.c b/system-linux.c index 4463a2a..eb5deaa 100644 --- a/system-linux.c +++ b/system-linux.c @@ -4359,6 +4359,7 @@ static int system_add_vxlan(const char *name, const unsigned int link, struct bl system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_L2MISS , VXLAN_DATA_ATTR_L2MISS, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_L3MISS , VXLAN_DATA_ATTR_L3MISS, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GBP , VXLAN_DATA_ATTR_GBP, false); + system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GPE , VXLAN_DATA_ATTR_GPE, false); if ((cur = tb_data[VXLAN_DATA_ATTR_AGEING])) { uint32_t ageing = blobmsg_get_u32(cur); diff --git a/system.c b/system.c index 32597c1..9744f33 100644 --- a/system.c +++ b/system.c @@ -46,6 +46,7 @@ static const struct blobmsg_policy vxlan_data_attrs[__VXLAN_DATA_ATTR_MAX] = { [VXLAN_DATA_ATTR_L2MISS] = { .name = "l2miss", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_L3MISS] = { .name = "l3miss", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_GBP] = { .name = "gbp", .type = BLOBMSG_TYPE_BOOL }, + [VXLAN_DATA_ATTR_GPE] = { .name = "gpe", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_AGEING] = { .name = "ageing", .type = BLOBMSG_TYPE_INT32 }, [VXLAN_DATA_ATTR_LIMIT] = { .name = "maxaddress", .type = BLOBMSG_TYPE_INT32 }, }; diff --git a/system.h b/system.h index 890966b..d4d0132 100644 --- a/system.h +++ b/system.h @@ -52,6 +52,7 @@ enum vxlan_data { VXLAN_DATA_ATTR_L2MISS, VXLAN_DATA_ATTR_L3MISS, VXLAN_DATA_ATTR_GBP, + VXLAN_DATA_ATTR_GPE, VXLAN_DATA_ATTR_AGEING, VXLAN_DATA_ATTR_LIMIT, __VXLAN_DATA_ATTR_MAX From 885cf9b2a0e15a4c10900e9a567e25ef326402c9 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Fri, 25 Oct 2024 14:54:23 +0200 Subject: [PATCH 2/3] vxlan: add ttlinherit boolean attribute Signed-off-by: Paul Donald --- system-linux.c | 1 + system.c | 1 + system.h | 1 + 3 files changed, 3 insertions(+) diff --git a/system-linux.c b/system-linux.c index eb5deaa..d4c5f74 100644 --- a/system-linux.c +++ b/system-linux.c @@ -4360,6 +4360,7 @@ static int system_add_vxlan(const char *name, const unsigned int link, struct bl system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_L3MISS , VXLAN_DATA_ATTR_L3MISS, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GBP , VXLAN_DATA_ATTR_GBP, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GPE , VXLAN_DATA_ATTR_GPE, false); + system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_TTL_INHERIT , VXLAN_DATA_ATTR_TTL_INHERIT, false); if ((cur = tb_data[VXLAN_DATA_ATTR_AGEING])) { uint32_t ageing = blobmsg_get_u32(cur); diff --git a/system.c b/system.c index 9744f33..af5d436 100644 --- a/system.c +++ b/system.c @@ -47,6 +47,7 @@ static const struct blobmsg_policy vxlan_data_attrs[__VXLAN_DATA_ATTR_MAX] = { [VXLAN_DATA_ATTR_L3MISS] = { .name = "l3miss", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_GBP] = { .name = "gbp", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_GPE] = { .name = "gpe", .type = BLOBMSG_TYPE_BOOL }, + [VXLAN_DATA_ATTR_TTL_INHERIT] = { .name = "ttlinherit", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_AGEING] = { .name = "ageing", .type = BLOBMSG_TYPE_INT32 }, [VXLAN_DATA_ATTR_LIMIT] = { .name = "maxaddress", .type = BLOBMSG_TYPE_INT32 }, }; diff --git a/system.h b/system.h index d4d0132..d3f803c 100644 --- a/system.h +++ b/system.h @@ -55,6 +55,7 @@ enum vxlan_data { VXLAN_DATA_ATTR_GPE, VXLAN_DATA_ATTR_AGEING, VXLAN_DATA_ATTR_LIMIT, + VXLAN_DATA_ATTR_TTL_INHERIT, __VXLAN_DATA_ATTR_MAX }; From 6b53bf264aa32eaa3d97a3953cbb4a80a7340d2c Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Fri, 25 Oct 2024 15:33:05 +0200 Subject: [PATCH 3/3] vxlan: collect metadata flags both flags are required to enable VNI filtering on the collect metadata device. Signed-off-by: Paul Donald --- system-linux.c | 2 ++ system.c | 2 ++ system.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/system-linux.c b/system-linux.c index d4c5f74..5a55bd9 100644 --- a/system-linux.c +++ b/system-linux.c @@ -4361,6 +4361,8 @@ static int system_add_vxlan(const char *name, const unsigned int link, struct bl system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GBP , VXLAN_DATA_ATTR_GBP, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_GPE , VXLAN_DATA_ATTR_GPE, false); system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_TTL_INHERIT , VXLAN_DATA_ATTR_TTL_INHERIT, false); + system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_COLLECT_METADATA , VXLAN_DATA_ATTR_COLLECT_METADATA, false); + system_vxlan_map_bool_attr(msg, tb_data, IFLA_VXLAN_VNIFILTER , VXLAN_DATA_ATTR_VNI_FILTER, false); if ((cur = tb_data[VXLAN_DATA_ATTR_AGEING])) { uint32_t ageing = blobmsg_get_u32(cur); diff --git a/system.c b/system.c index af5d436..8a16c52 100644 --- a/system.c +++ b/system.c @@ -50,6 +50,8 @@ static const struct blobmsg_policy vxlan_data_attrs[__VXLAN_DATA_ATTR_MAX] = { [VXLAN_DATA_ATTR_TTL_INHERIT] = { .name = "ttlinherit", .type = BLOBMSG_TYPE_BOOL }, [VXLAN_DATA_ATTR_AGEING] = { .name = "ageing", .type = BLOBMSG_TYPE_INT32 }, [VXLAN_DATA_ATTR_LIMIT] = { .name = "maxaddress", .type = BLOBMSG_TYPE_INT32 }, + [VXLAN_DATA_ATTR_COLLECT_METADATA] = { .name = "collectmetadata", .type = BLOBMSG_TYPE_BOOL }, + [VXLAN_DATA_ATTR_VNI_FILTER] = { .name = "vnifilter", .type = BLOBMSG_TYPE_BOOL }, }; const struct uci_blob_param_list vxlan_data_attr_list = { diff --git a/system.h b/system.h index d3f803c..43c32d2 100644 --- a/system.h +++ b/system.h @@ -56,6 +56,8 @@ enum vxlan_data { VXLAN_DATA_ATTR_AGEING, VXLAN_DATA_ATTR_LIMIT, VXLAN_DATA_ATTR_TTL_INHERIT, + VXLAN_DATA_ATTR_COLLECT_METADATA, + VXLAN_DATA_ATTR_VNI_FILTER, __VXLAN_DATA_ATTR_MAX };