summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorYing A Wang <ying.a.wang@intel.com>2019-08-28 14:00:38 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:58 +0200
commit226c6e60c35b3491f612de00a7438a2d8f75a0ad (patch)
tree2400b77a7d40071e2a59d3a7c342601691a0d8bb /app
parent346553db5bd1e2d0c25d017d590cd5225a704b22 (diff)
downloaddpdk-226c6e60c35b3491f612de00a7438a2d8f75a0ad.zip
dpdk-226c6e60c35b3491f612de00a7438a2d8f75a0ad.tar.gz
dpdk-226c6e60c35b3491f612de00a7438a2d8f75a0ad.tar.xz
ethdev: add PPPoE to flow API
- RTE_FLOW_ITEM_TYPE_PPPOES: matches a PPPoE session header. - RTE_FLOW_ITEM_TYPE_PPPOED: matches a PPPoE discovery header. - RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID: matches a PPPoE session protocol identifier. 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.c57
1 files changed, 56 insertions, 1 deletions
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index cdaabcc..ddb49bc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -199,6 +199,10 @@ enum index {
ITEM_GTP_PSC,
ITEM_GTP_PSC_QFI,
ITEM_GTP_PSC_PDU_T,
+ ITEM_PPPOES,
+ ITEM_PPPOED,
+ ITEM_PPPOE_SEID,
+ ITEM_PPPOE_PROTO_ID,
/* Validate/create actions. */
ACTIONS,
@@ -667,6 +671,9 @@ static const enum index next_item[] = {
ITEM_META,
ITEM_GRE_KEY,
ITEM_GTP_PSC,
+ ITEM_PPPOES,
+ ITEM_PPPOED,
+ ITEM_PPPOE_PROTO_ID,
END_SET,
ZERO,
};
@@ -913,6 +920,24 @@ static const enum index item_gtp_psc[] = {
ZERO,
};
+static const enum index item_pppoed[] = {
+ ITEM_PPPOE_SEID,
+ ITEM_NEXT,
+ ZERO,
+};
+
+static const enum index item_pppoes[] = {
+ ITEM_PPPOE_SEID,
+ ITEM_NEXT,
+ ZERO,
+};
+
+static const enum index item_pppoe_proto_id[] = {
+ ITEM_PPPOE_PROTO_ID,
+ ITEM_NEXT,
+ ZERO,
+};
+
static const enum index next_action[] = {
ACTION_END,
ACTION_VOID,
@@ -2364,7 +2389,35 @@ static const struct token token_list[] = {
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
pdu_type)),
},
-
+ [ITEM_PPPOES] = {
+ .name = "pppoes",
+ .help = "match PPPoE session header",
+ .priv = PRIV_ITEM(PPPOES, sizeof(struct rte_flow_item_pppoe)),
+ .next = NEXT(item_pppoes),
+ .call = parse_vc,
+ },
+ [ITEM_PPPOED] = {
+ .name = "pppoed",
+ .help = "match PPPoE discovery header",
+ .priv = PRIV_ITEM(PPPOED, sizeof(struct rte_flow_item_pppoe)),
+ .next = NEXT(item_pppoed),
+ .call = parse_vc,
+ },
+ [ITEM_PPPOE_SEID] = {
+ .name = "seid",
+ .help = "session identifier",
+ .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
+ session_id)),
+ },
+ [ITEM_PPPOE_PROTO_ID] = {
+ .name = "proto_id",
+ .help = "match PPPoE session protocol identifier",
+ .priv = PRIV_ITEM(PPPOE_PROTO_ID,
+ sizeof(struct rte_flow_item_pppoe_proto_id)),
+ .next = NEXT(item_pppoe_proto_id),
+ .call = parse_vc,
+ },
/* Validate/create actions. */
[ACTIONS] = {
.name = "actions",
@@ -5796,6 +5849,8 @@ flow_item_default_mask(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_GTP_PSC:
mask = &rte_flow_item_gtp_psc_mask;
break;
+ case RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID:
+ mask = &rte_flow_item_pppoe_proto_id_mask;
default:
break;
}