From 947fdfdcaf8d6c748ba0e5ab3de251a8f774bef7 Mon Sep 17 00:00:00 2001 From: songyanchao Date: Mon, 11 Apr 2022 06:02:45 -0400 Subject: ✨ feat(TSG-10158): Service 支持Vxlan Item MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Offload Manage Service 支持Vxlan类型的Item --- tools/mrctl/mrctl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools') diff --git a/tools/mrctl/mrctl.c b/tools/mrctl/mrctl.c index de14a32..02f3c73 100644 --- a/tools/mrctl/mrctl.c +++ b/tools/mrctl/mrctl.c @@ -53,6 +53,7 @@ enum mr_cli_arg MR_CLI_ITEM_TCP_FLAGS, MR_CLI_ITEM_VXLAN, MR_CLI_ITEM_VXLAN_VNI, + MR_CLI_ITEM_VXLAN_VNI_MASK, MR_CLI_ACTION_COUNT, MR_CLI_ACTION_COUNT_SHARED, MR_CLI_ACTION_COUNT_ID, @@ -116,6 +117,7 @@ static struct option cli_options[] = {"tcp_flags", required_argument,NULL, MR_CLI_ITEM_TCP_FLAGS}, {"vxlan", no_argument,NULL, MR_CLI_ITEM_VXLAN}, {"vni", required_argument,NULL, MR_CLI_ITEM_VXLAN_VNI}, + {"vni_mask", required_argument,NULL, MR_CLI_ITEM_VXLAN_VNI}, {"count", no_argument,NULL, MR_CLI_ACTION_COUNT}, {"shared", no_argument,NULL, MR_CLI_ACTION_COUNT_SHARED}, {"countid", required_argument,NULL, MR_CLI_ACTION_COUNT_ID}, @@ -493,6 +495,11 @@ int send_request_msg(struct mrctl_instance * instance, struct mrctl_offload_rule { cJSON_AddNumberToObject(cjson_vxlan_item, MR_CJSON_KEY_VXLAN_VNI, vxlan_item->vni); } + + if(vxlan_item->arg_flg & MR_RULE_FLOW_VXLAN_ARG_VNI_MASK_ENABLE) + { + cJSON_AddNumberToObject(cjson_vxlan_item, MR_CJSON_KEY_VXLAN_VNI_MASK, vxlan_item->vni_mask); + } cJSON_AddItemToObject(cjson_item,MR_CJSON_KEY_VXLAN,cjson_vxlan_item); } @@ -938,6 +945,12 @@ int main(int argc, char * argv[]) vxlan_item->vni = (uint32_t)strtoull(optarg, &endptr, 0); break; } + case MR_CLI_ITEM_VXLAN_VNI_MASK: + { + vxlan_item->arg_flg |= MR_RULE_FLOW_VXLAN_ARG_VNI_MASK_ENABLE; + vxlan_item->vni_mask = (uint32_t)strtoull(optarg, &endptr, 0); + break; + } /* Action */ /* Count */ -- cgit v1.2.3