X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fcmdline_flow.c;h=f7e0a622032d947f6b3c033ec012b613312a5caa;hb=6a42e7ef9dd86a554e060fcef0be03aa9ddd394c;hp=33ba1d7bb075bed32671a2f868584e539774f375;hpb=41b059a20215284e8aa618d2ce1e2a803e64c1d0;p=dpdk.git diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 33ba1d7bb0..f7e0a62203 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -215,6 +215,8 @@ enum index { ITEM_TAG_INDEX, ITEM_L2TPV3OIP, ITEM_L2TPV3OIP_SESSION_ID, + ITEM_ESP, + ITEM_ESP_SPI, /* Validate/create actions. */ ACTIONS, @@ -753,6 +755,7 @@ static const enum index next_item[] = { ITEM_HIGIG2, ITEM_TAG, ITEM_L2TPV3OIP, + ITEM_ESP, END_SET, ZERO, }; @@ -1024,6 +1027,12 @@ static const enum index item_higig2[] = { ZERO, }; +static const enum index item_esp[] = { + ITEM_ESP_SPI, + ITEM_NEXT, + ZERO, +}; + static const enum index next_set_raw[] = { SET_RAW_INDEX, ITEM_ETH, @@ -2635,7 +2644,20 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip, session_id)), }, - + [ITEM_ESP] = { + .name = "esp", + .help = "match ESP header", + .priv = PRIV_ITEM(ESP, sizeof(struct rte_flow_item_esp)), + .next = NEXT(item_esp), + .call = parse_vc, + }, + [ITEM_ESP_SPI] = { + .name = "spi", + .help = "security policy index", + .next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp, + hdr.spi)), + }, /* Validate/create actions. */ [ACTIONS] = { .name = "actions", @@ -6305,9 +6327,6 @@ flow_item_default_mask(const struct rte_flow_item *item) case RTE_FLOW_ITEM_TYPE_GTP: mask = &rte_flow_item_gtp_mask; break; - case RTE_FLOW_ITEM_TYPE_ESP: - mask = &rte_flow_item_esp_mask; - break; case RTE_FLOW_ITEM_TYPE_GTP_PSC: mask = &rte_flow_item_gtp_psc_mask; break; @@ -6320,6 +6339,9 @@ flow_item_default_mask(const struct rte_flow_item *item) case RTE_FLOW_ITEM_TYPE_L2TPV3OIP: mask = &rte_flow_item_l2tpv3oip_mask; break; + case RTE_FLOW_ITEM_TYPE_ESP: + mask = &rte_flow_item_esp_mask; + break; default: break; } @@ -6413,6 +6435,10 @@ cmd_set_raw_parsed(const struct buffer *in) size = sizeof(struct rte_flow_item_l2tpv3oip); proto = 0x73; break; + case RTE_FLOW_ITEM_TYPE_ESP: + size = sizeof(struct rte_flow_item_esp); + proto = 0x32; + break; default: printf("Error - Not supported item\n"); *total_size = 0;