diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mrctl/mrctl.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 */ |
