Adding support to parse GRE KEY for octeontx2 Flow.
Matching on GRE Key will only work, if checksum and routing
bits in the GRE header are equal to 0.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
+----+--------------------------------+
| 22 | RTE_FLOW_ITEM_TYPE_ANY |
+----+--------------------------------+
+ | 23 | RTE_FLOW_ITEM_TYPE_GRE_KEY |
+ +----+--------------------------------+
+
+.. note::
+
+ ``RTE_FLOW_ITEM_TYPE_GRE_KEY`` works only when checksum and routing
+ bits in the GRE header are equal to 0.
Actions:
otx2_flow_parse_ld(struct otx2_parse_state *pst)
{
char hw_mask[NPC_MAX_EXTRACT_DATA_LEN];
+ uint32_t gre_key_mask = 0xffffffff;
struct otx2_flow_item_info info;
int lid, lt, lflags;
int rc;
info.def_mask = &rte_flow_item_gre_mask;
info.len = sizeof(struct rte_flow_item_gre);
break;
+ case RTE_FLOW_ITEM_TYPE_GRE_KEY:
+ lt = NPC_LT_LD_GRE;
+ info.def_mask = &gre_key_mask;
+ info.len = sizeof(gre_key_mask);
+ info.hw_hdr_len = 4;
+ break;
case RTE_FLOW_ITEM_TYPE_NVGRE:
lt = NPC_LT_LD_GRE;
lflags = NPC_F_GRE_NVGRE;