summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorYing A Wang <ying.a.wang@intel.com>2019-08-28 14:00:37 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:58 +0200
commit346553db5bd1e2d0c25d017d590cd5225a704b22 (patch)
treee03938c893d124feec3162c453ad83d3ab0872ec /app
parent23198c17afd76a6c30d0ca551bb1f3b35e405a3d (diff)
downloaddpdk-346553db5bd1e2d0c25d017d590cd5225a704b22.zip
dpdk-346553db5bd1e2d0c25d017d590cd5225a704b22.tar.gz
dpdk-346553db5bd1e2d0c25d017d590cd5225a704b22.tar.xz
ethdev: add GTP extension header to flow API
- RTE_FLOW_ITEM_TYPE_GTP_PSC: matches a GTP - RTE_FLOW_ITEM_TYPE_GTP_PSC: matches a GTP PDU extension header (PDU session container). Signed-off-by: Ying A Wang <ying.a.wang@intel.com> Acked-by: Ori Kam <orika@mellanox.com> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pmd/cmdline_flow.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 932bdb9..cdaabcc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -196,6 +196,9 @@ enum index {
ITEM_META_DATA,
ITEM_GRE_KEY,
ITEM_GRE_KEY_VALUE,
+ ITEM_GTP_PSC,
+ ITEM_GTP_PSC_QFI,
+ ITEM_GTP_PSC_PDU_T,
/* Validate/create actions. */
ACTIONS,
@@ -663,6 +666,7 @@ static const enum index next_item[] = {
ITEM_ICMP6_ND_OPT_TLA_ETH,
ITEM_META,
ITEM_GRE_KEY,
+ ITEM_GTP_PSC,
END_SET,
ZERO,
};
@@ -902,6 +906,13 @@ static const enum index item_meta[] = {
ZERO,
};
+static const enum index item_gtp_psc[] = {
+ ITEM_GTP_PSC_QFI,
+ ITEM_GTP_PSC_PDU_T,
+ ITEM_NEXT,
+ ZERO,
+};
+
static const enum index next_action[] = {
ACTION_END,
ACTION_VOID,
@@ -2331,6 +2342,28 @@ static const struct token token_list[] = {
.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
},
+ [ITEM_GTP_PSC] = {
+ .name = "gtp_psc",
+ .help = "match GTP extension header with type 0x85",
+ .priv = PRIV_ITEM(GTP_PSC,
+ sizeof(struct rte_flow_item_gtp_psc)),
+ .next = NEXT(item_gtp_psc),
+ .call = parse_vc,
+ },
+ [ITEM_GTP_PSC_QFI] = {
+ .name = "qfi",
+ .help = "QoS flow identifier",
+ .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
+ qfi)),
+ },
+ [ITEM_GTP_PSC_PDU_T] = {
+ .name = "pdu_t",
+ .help = "PDU type",
+ .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
+ pdu_type)),
+ },
/* Validate/create actions. */
[ACTIONS] = {
@@ -5760,6 +5793,9 @@ flow_item_default_mask(const struct rte_flow_item *item)
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;
default:
break;
}