* [dpdk-dev] [PATCH 1/2] common/cnxk: add IPv6 routing ext flow type for cnxk
@ 2023-07-03 5:10 psatheesh
2023-07-03 5:10 ` [dpdk-dev] [PATCH 2/2] net/cnxk: adding " psatheesh
2023-08-08 13:52 ` [dpdk-dev] [PATCH 1/2] common/cnxk: add " Jerin Jacob
0 siblings, 2 replies; 3+ messages in thread
From: psatheesh @ 2023-07-03 5:10 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, Satheesh Paul, Jerin Jacob
From: Kiran Kumar K <kirankumark@marvell.com>
Adding support to parse IPV6 routing ext flow type for cnxk.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_npc.h | 17 +++++++++++++++++
drivers/common/cnxk/roc_npc_mcam_dump.c | 3 +++
drivers/common/cnxk/roc_npc_parse.c | 15 +++++++++++++--
3 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 07e6634aa7..2ada774934 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -40,6 +40,7 @@ enum roc_npc_item_type {
ROC_NPC_ITEM_TYPE_RAW,
ROC_NPC_ITEM_TYPE_MARK,
ROC_NPC_ITEM_TYPE_TX_QUEUE,
+ ROC_NPC_ITEM_TYPE_IPV6_ROUTING_EXT,
ROC_NPC_ITEM_TYPE_END,
};
@@ -131,6 +132,22 @@ struct roc_ipv6_fragment_ext {
uint32_t id; /**< Packet ID */
} __plt_packed;
+struct roc_ipv6_routing_ext {
+ uint8_t next_hdr; /**< Protocol, next header. */
+ uint8_t hdr_len; /**< Header length. */
+ uint8_t type; /**< Extension header type. */
+ uint8_t segments_left; /**< Valid segments number. */
+ union {
+ uint32_t flags; /**< Packet control data per type. */
+ struct {
+ uint8_t last_entry; /**< The last_entry field of SRH */
+ uint8_t flag; /**< Packet flag. */
+ uint16_t tag; /**< Packet tag. */
+ };
+ };
+ /* Next are 128-bit IPv6 address fields to describe segments. */
+} __plt_packed;
+
struct roc_flow_item_ipv6_ext {
uint8_t next_hdr; /**< Next header. */
};
diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c
index a88e166fbe..01c4212567 100644
--- a/drivers/common/cnxk/roc_npc_mcam_dump.c
+++ b/drivers/common/cnxk/roc_npc_mcam_dump.c
@@ -645,6 +645,7 @@ npc_flow_hw_mcam_entry_dump(FILE *file, struct npc *npc, struct roc_npc_flow *fl
struct nix_inl_dev *inl_dev = NULL;
struct idev_cfg *idev;
struct mbox *mbox;
+ uint8_t enabled;
int rc = 0, i;
idev = idev_get_cfg();
@@ -673,6 +674,7 @@ npc_flow_hw_mcam_entry_dump(FILE *file, struct npc *npc, struct roc_npc_flow *fl
mbox_memcpy(mcam_data, mcam_read_rsp->entry_data.kw, sizeof(mcam_data));
mbox_memcpy(mcam_mask, mcam_read_rsp->entry_data.kw_mask, sizeof(mcam_data));
+ enabled = mcam_read_rsp->enable;
fprintf(file, "HW MCAM Data :\n");
@@ -680,6 +682,7 @@ npc_flow_hw_mcam_entry_dump(FILE *file, struct npc *npc, struct roc_npc_flow *fl
fprintf(file, "\tDW%d :%016lX\n", i, mcam_data[i]);
fprintf(file, "\tDW%d_Mask:%016lX\n", i, mcam_mask[i]);
}
+ fprintf(file, "\tEnabled = 0x%x\n", enabled);
fprintf(file, "\n");
mbox_put(mbox);
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index acaebaed21..ecd1b3e13b 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -719,8 +719,8 @@ npc_handle_ipv6ext_attr(const struct roc_npc_flow_item_ipv6 *ipv6_spec,
static int
npc_process_ipv6_item(struct npc_parse_state *pst)
{
- uint8_t ipv6_hdr_mask[sizeof(struct roc_ipv6_hdr) + sizeof(struct roc_ipv6_fragment_ext)];
- uint8_t ipv6_hdr_buf[sizeof(struct roc_ipv6_hdr) + sizeof(struct roc_ipv6_fragment_ext)];
+ uint8_t ipv6_hdr_mask[2 * sizeof(struct roc_ipv6_hdr)];
+ uint8_t ipv6_hdr_buf[2 * sizeof(struct roc_ipv6_hdr)];
const struct roc_npc_flow_item_ipv6 *ipv6_spec, *ipv6_mask;
const struct roc_npc_item_info *pattern = pst->pattern;
int offset = 0, rc = 0, lid, item_count = 0;
@@ -804,6 +804,16 @@ npc_process_ipv6_item(struct npc_parse_state *pst)
sizeof(struct roc_ipv6_fragment_ext));
break;
+ } else if (pattern->type == ROC_NPC_ITEM_TYPE_IPV6_ROUTING_EXT) {
+ item_count++;
+ ltype = NPC_LT_LC_IP6_EXT;
+ parse_info.len = sizeof(struct roc_ipv6_hdr) + pattern->size;
+
+ if (pattern->spec)
+ memcpy(ipv6_hdr_buf + offset, pattern->spec, pattern->size);
+ if (pattern->mask)
+ memcpy(ipv6_hdr_mask + offset, pattern->mask, pattern->size);
+ break;
}
pattern++;
@@ -867,6 +877,7 @@ npc_parse_lc(struct npc_parse_state *pst)
case ROC_NPC_ITEM_TYPE_IPV6:
case ROC_NPC_ITEM_TYPE_IPV6_EXT:
case ROC_NPC_ITEM_TYPE_IPV6_FRAG_EXT:
+ case ROC_NPC_ITEM_TYPE_IPV6_ROUTING_EXT:
return npc_process_ipv6_item(pst);
case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4:
lt = NPC_LT_LC_ARP;
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/cnxk: adding IPv6 routing ext flow type for cnxk
2023-07-03 5:10 [dpdk-dev] [PATCH 1/2] common/cnxk: add IPv6 routing ext flow type for cnxk psatheesh
@ 2023-07-03 5:10 ` psatheesh
2023-08-08 13:52 ` [dpdk-dev] [PATCH 1/2] common/cnxk: add " Jerin Jacob
1 sibling, 0 replies; 3+ messages in thread
From: psatheesh @ 2023-07-03 5:10 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Adding support to parse RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT rte_flow
type for cnxk device.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
---
doc/guides/nics/features/cnxk.ini | 1 +
doc/guides/nics/features/cnxk_vf.ini | 1 +
drivers/net/cnxk/cnxk_flow.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini
index 838e781d6d..f5ff692c27 100644
--- a/doc/guides/nics/features/cnxk.ini
+++ b/doc/guides/nics/features/cnxk.ini
@@ -67,6 +67,7 @@ ipv4 = Y
ipv6 = Y
ipv6_ext = Y
ipv6_frag_ext = Y
+ipv6_routing_ext = Y
mark = Y
mpls = Y
nvgre = Y
diff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini
index 470c45ce59..5579007831 100644
--- a/doc/guides/nics/features/cnxk_vf.ini
+++ b/doc/guides/nics/features/cnxk_vf.ini
@@ -58,6 +58,7 @@ ipv4 = Y
ipv6 = Y
ipv6_ext = Y
ipv6_frag_ext = Y
+ipv6_routing_ext = Y
mark = Y
mpls = Y
nvgre = Y
diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index 3b8348ae9c..970daec035 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -59,6 +59,8 @@ const struct cnxk_rte_flow_term_info term[] = {
sizeof(struct rte_flow_item_raw)},
[RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,
sizeof(struct rte_flow_item_mark)},
+ [RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT] = {ROC_NPC_ITEM_TYPE_IPV6_ROUTING_EXT,
+ sizeof(struct rte_flow_item_ipv6_routing_ext)},
[RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,
sizeof(struct rte_flow_item_tx_queue)}};
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] common/cnxk: add IPv6 routing ext flow type for cnxk
2023-07-03 5:10 [dpdk-dev] [PATCH 1/2] common/cnxk: add IPv6 routing ext flow type for cnxk psatheesh
2023-07-03 5:10 ` [dpdk-dev] [PATCH 2/2] net/cnxk: adding " psatheesh
@ 2023-08-08 13:52 ` Jerin Jacob
1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2023-08-08 13:52 UTC (permalink / raw)
To: psatheesh
Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
dev, Jerin Jacob
On Mon, Jul 3, 2023 at 10:40 AM <psatheesh@marvell.com> wrote:
>
> From: Kiran Kumar K <kirankumark@marvell.com>
>
> Adding support to parse IPV6 routing ext flow type for cnxk.
>
> Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
> Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
> Tested-by: Jerin Jacob <jerinj@marvell.com>
Updated the git commit as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks
Author: Satheesh Paul <psatheesh@marvell.com>
Date: Mon Jul 3 10:40:26 2023 +0530
net/cnxk: support IPv6 routing ext flow type
Support to parse RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT rte_flow
type for cnxk device.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
commit 830d75fd19d9508237b69c66ffc0711671345f32
Author: Kiran Kumar K <kirankumark@marvell.com>
Date: Mon Jul 3 10:40:25 2023 +0530
common/cnxk: support IPv6 routing ext flow type
Support to parse IPV6 routing ext flow type.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-08 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 5:10 [dpdk-dev] [PATCH 1/2] common/cnxk: add IPv6 routing ext flow type for cnxk psatheesh
2023-07-03 5:10 ` [dpdk-dev] [PATCH 2/2] net/cnxk: adding " psatheesh
2023-08-08 13:52 ` [dpdk-dev] [PATCH 1/2] common/cnxk: add " Jerin Jacob
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).