* [dpdk-dev] [PATCH] net/octeontx2: add gre key parsing support
@ 2019-07-26 9:03 kirankumark
2019-07-28 17:22 ` Jerin Jacob Kollanukkaran
0 siblings, 1 reply; 2+ messages in thread
From: kirankumark @ 2019-07-26 9:03 UTC (permalink / raw)
To: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, John McNamara,
Marko Kovacevic
Cc: dev
From: Kiran Kumar K <kirankumark@marvell.com>
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>
---
doc/guides/nics/octeontx2.rst | 96 +++++++++++++------------
drivers/net/octeontx2/otx2_flow_parse.c | 7 ++
2 files changed, 56 insertions(+), 47 deletions(-)
diff --git a/doc/guides/nics/octeontx2.rst b/doc/guides/nics/octeontx2.rst
index 5f511feb7..ce54de478 100644
--- a/doc/guides/nics/octeontx2.rst
+++ b/doc/guides/nics/octeontx2.rst
@@ -221,53 +221,55 @@ Patterns:
.. table:: Item types
- +----+--------------------------------+
- | # | Pattern Type |
- +====+================================+
- | 1 | RTE_FLOW_ITEM_TYPE_ETH |
- +----+--------------------------------+
- | 2 | RTE_FLOW_ITEM_TYPE_VLAN |
- +----+--------------------------------+
- | 3 | RTE_FLOW_ITEM_TYPE_E_TAG |
- +----+--------------------------------+
- | 4 | RTE_FLOW_ITEM_TYPE_IPV4 |
- +----+--------------------------------+
- | 5 | RTE_FLOW_ITEM_TYPE_IPV6 |
- +----+--------------------------------+
- | 6 | RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4|
- +----+--------------------------------+
- | 7 | RTE_FLOW_ITEM_TYPE_MPLS |
- +----+--------------------------------+
- | 8 | RTE_FLOW_ITEM_TYPE_ICMP |
- +----+--------------------------------+
- | 9 | RTE_FLOW_ITEM_TYPE_UDP |
- +----+--------------------------------+
- | 10 | RTE_FLOW_ITEM_TYPE_TCP |
- +----+--------------------------------+
- | 11 | RTE_FLOW_ITEM_TYPE_SCTP |
- +----+--------------------------------+
- | 12 | RTE_FLOW_ITEM_TYPE_ESP |
- +----+--------------------------------+
- | 13 | RTE_FLOW_ITEM_TYPE_GRE |
- +----+--------------------------------+
- | 14 | RTE_FLOW_ITEM_TYPE_NVGRE |
- +----+--------------------------------+
- | 15 | RTE_FLOW_ITEM_TYPE_VXLAN |
- +----+--------------------------------+
- | 16 | RTE_FLOW_ITEM_TYPE_GTPC |
- +----+--------------------------------+
- | 17 | RTE_FLOW_ITEM_TYPE_GTPU |
- +----+--------------------------------+
- | 18 | RTE_FLOW_ITEM_TYPE_GENEVE |
- +----+--------------------------------+
- | 19 | RTE_FLOW_ITEM_TYPE_VXLAN_GPE |
- +----+--------------------------------+
- | 20 | RTE_FLOW_ITEM_TYPE_IPV6_EXT |
- +----+--------------------------------+
- | 21 | RTE_FLOW_ITEM_TYPE_VOID |
- +----+--------------------------------+
- | 22 | RTE_FLOW_ITEM_TYPE_ANY |
- +----+--------------------------------+
+ +----+--------------------------------+-----------------------------------+
+ | # | Pattern Type | Comment |
+ +====+================================+===================================+
+ | 1 | RTE_FLOW_ITEM_TYPE_ETH | |
+ +----+--------------------------------+-----------------------------------+
+ | 2 | RTE_FLOW_ITEM_TYPE_VLAN | |
+ +----+--------------------------------+-----------------------------------+
+ | 3 | RTE_FLOW_ITEM_TYPE_E_TAG | |
+ +----+--------------------------------+-----------------------------------+
+ | 4 | RTE_FLOW_ITEM_TYPE_IPV4 | |
+ +----+--------------------------------+-----------------------------------+
+ | 5 | RTE_FLOW_ITEM_TYPE_IPV6 | |
+ +----+--------------------------------+-----------------------------------+
+ | 6 | RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4| |
+ +----+--------------------------------+-----------------------------------+
+ | 7 | RTE_FLOW_ITEM_TYPE_MPLS | |
+ +----+--------------------------------+-----------------------------------+
+ | 8 | RTE_FLOW_ITEM_TYPE_ICMP | |
+ +----+--------------------------------+-----------------------------------+
+ | 9 | RTE_FLOW_ITEM_TYPE_UDP | |
+ +----+--------------------------------+-----------------------------------+
+ | 10 | RTE_FLOW_ITEM_TYPE_TCP | |
+ +----+--------------------------------+-----------------------------------+
+ | 11 | RTE_FLOW_ITEM_TYPE_SCTP | |
+ +----+--------------------------------+-----------------------------------+
+ | 12 | RTE_FLOW_ITEM_TYPE_ESP | |
+ +----+--------------------------------+-----------------------------------+
+ | 13 | RTE_FLOW_ITEM_TYPE_GRE | |
+ +----+--------------------------------+-----------------------------------+
+ | 14 | RTE_FLOW_ITEM_TYPE_NVGRE | |
+ +----+--------------------------------+-----------------------------------+
+ | 15 | RTE_FLOW_ITEM_TYPE_VXLAN | |
+ +----+--------------------------------+-----------------------------------+
+ | 16 | RTE_FLOW_ITEM_TYPE_GTPC | |
+ +----+--------------------------------+-----------------------------------+
+ | 17 | RTE_FLOW_ITEM_TYPE_GTPU | |
+ +----+--------------------------------+-----------------------------------+
+ | 18 | RTE_FLOW_ITEM_TYPE_GENEVE | |
+ +----+--------------------------------+-----------------------------------+
+ | 19 | RTE_FLOW_ITEM_TYPE_VXLAN_GPE | |
+ +----+--------------------------------+-----------------------------------+
+ | 20 | RTE_FLOW_ITEM_TYPE_IPV6_EXT | |
+ +----+--------------------------------+-----------------------------------+
+ | 21 | RTE_FLOW_ITEM_TYPE_VOID | |
+ +----+--------------------------------+-----------------------------------+
+ | 22 | RTE_FLOW_ITEM_TYPE_ANY | |
+ +----+--------------------------------+-----------------------------------+
+ | 23 | RTE_FLOW_ITEM_TYPE_GRE_KEY | chksum & routing should be 0 |
+ +----+--------------------------------+-----------------------------------+
Actions:
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6e65db8e4..6670c1a70 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -389,6 +389,7 @@ int
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;
@@ -450,6 +451,12 @@ otx2_flow_parse_ld(struct otx2_parse_state *pst)
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;
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/octeontx2: add gre key parsing support
2019-07-26 9:03 [dpdk-dev] [PATCH] net/octeontx2: add gre key parsing support kirankumark
@ 2019-07-28 17:22 ` Jerin Jacob Kollanukkaran
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-07-28 17:22 UTC (permalink / raw)
To: Kiran Kumar Kokkilagadda, Nithin Kumar Dabilpuram,
Kiran Kumar Kokkilagadda, John McNamara, Marko Kovacevic
Cc: dev, Ferruh Yigit
> -----Original Message-----
> From: kirankumark@marvell.com <kirankumark@marvell.com>
> Sent: Friday, July 26, 2019 2:33 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>; John McNamara
> <john.mcnamara@intel.com>; Marko Kovacevic
> <marko.kovacevic@intel.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/octeontx2: add gre key parsing support
>
> From: Kiran Kumar K <kirankumark@marvell.com>
>
> 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>
Instead of introducing a new colum for RTE_FLOW_ITEM_TYPE_GRE_KEY comment,
add the comment as NOTE
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-28 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 9:03 [dpdk-dev] [PATCH] net/octeontx2: add gre key parsing support kirankumark
2019-07-28 17:22 ` Jerin Jacob Kollanukkaran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).