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,
ITEM_ICMP6_ND_OPT_TLA_ETH,
ITEM_META,
ITEM_GRE_KEY,
+ ITEM_GTP_PSC,
END_SET,
ZERO,
};
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,
.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] = {
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;
}
- Default ``mask`` matches the specified metadata value.
+Item: ``GTP_PSC``
+^^^^^^^^^^^^^^^^^
+
+Matches a GTP PDU extension header with type 0x85.
+
+- ``pdu_type``: PDU type.
+- ``qfi``: QoS flow identifier.
+- Default ``mask`` matches QFI only.
+
.. _table_rte_flow_item_meta:
.. table:: META
- ``data {unsigned}``: metadata value.
+- ``gtp_psc``: match GTP PDU extension header with type 0x85.
+
+ - ``pdu_type {unsigned}``: PDU type.
+ - ``qfi {unsigned}``: QoS flow identifier.
+
Actions list
^^^^^^^^^^^^
MK_FLOW_ITEM(MARK, sizeof(struct rte_flow_item_mark)),
MK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)),
MK_FLOW_ITEM(GRE_KEY, sizeof(rte_be32_t)),
+ MK_FLOW_ITEM(GTP_PSC, sizeof(struct rte_flow_item_gtp_psc)),
};
/** Generate flow_action[] entry. */
* @code rte_be32_t * @endcode
*/
RTE_FLOW_ITEM_TYPE_GRE_KEY,
+
+ /**
+ * Matches a GTP extension header: PDU session container.
+ *
+ * Configure flow for GTP packets with extension header type 0x85.
+ *
+ * See struct rte_flow_item_gtp_psc.
+ */
+ RTE_FLOW_ITEM_TYPE_GTP_PSC,
};
/**
};
#endif
+/**
+ * RTE_FLOW_ITEM_TYPE_GTP_PSC.
+ *
+ * Matches a GTP PDU extension header with type 0x85.
+ */
+struct rte_flow_item_gtp_psc {
+ uint8_t pdu_type; /**< PDU type. */
+ uint8_t qfi; /**< QoS flow identifier. */
+};
+
+/** Default mask for RTE_FLOW_ITEM_TYPE_GTP_PSC. */
+#ifndef __cplusplus
+static const struct rte_flow_item_gtp_psc
+rte_flow_item_gtp_psc_mask = {
+ .qfi = 0x3f,
+};
+#endif
+
/**
* @warning
* @b EXPERIMENTAL: this structure may change without prior notice