* [dpdk-dev] [PATCH 1/2] common/cnxk: support Tx queue flow pattern in ROC API
@ 2023-05-19 3:42 psatheesh
2023-05-19 3:42 ` [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: psatheesh @ 2023-05-19 3:42 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Added ROC API changes to support Tx queue flow
pattern item.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
Depends-on: series-28056 ("ethdev: add Tx queue flow matching item")
drivers/common/cnxk/roc_npc.c | 16 +++++---
drivers/common/cnxk/roc_npc.h | 1 +
drivers/common/cnxk/roc_npc_mcam.c | 61 +++++++++++++++++++++++------
drivers/common/cnxk/roc_npc_parse.c | 52 ++++++++++++++++++++++++
drivers/common/cnxk/roc_npc_priv.h | 2 +
5 files changed, 115 insertions(+), 17 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index ba75207955..4b5be65b72 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -779,11 +779,10 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
struct roc_npc_flow *flow, struct npc_parse_state *pst)
{
npc_parse_stage_func_t parse_stage_funcs[] = {
- npc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2,
- npc_parse_cpt_hdr, npc_parse_higig2_hdr, npc_parse_la,
- npc_parse_lb, npc_parse_lc, npc_parse_ld,
- npc_parse_le, npc_parse_lf, npc_parse_lg,
- npc_parse_lh,
+ npc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2, npc_parse_cpt_hdr,
+ npc_parse_higig2_hdr, npc_parse_tx_queue, npc_parse_la, npc_parse_lb,
+ npc_parse_lc, npc_parse_ld, npc_parse_le, npc_parse_lf,
+ npc_parse_lg, npc_parse_lh,
};
uint8_t layer = 0;
int key_offset;
@@ -792,9 +791,9 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
if (pattern == NULL)
return NPC_ERR_PARAM;
- memset(pst, 0, sizeof(*pst));
pst->npc = npc;
pst->flow = flow;
+ pst->nix_intf = flow->nix_intf;
/* Use integral byte offset */
key_offset = pst->npc->keyx_len[flow->nix_intf];
@@ -864,8 +863,12 @@ npc_parse_rule(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
struct npc_parse_state *pst)
{
struct npc *npc = roc_npc_to_npc_priv(roc_npc);
+ struct roc_nix *roc_nix = roc_npc->roc_nix;
+ struct nix *nix = roc_nix_to_nix_priv(roc_nix);
int err;
+ pst->nb_tx_queues = nix->nb_tx_queues;
+
/* Check attr */
err = npc_parse_attr(npc, attr, flow);
if (err)
@@ -1425,6 +1428,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
return NULL;
}
memset(flow, 0, sizeof(*flow));
+ memset(&parse_state, 0, sizeof(parse_state));
rc = npc_parse_rule(roc_npc, attr, pattern, actions, flow,
&parse_state);
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 26a43c12cb..5984da1c1a 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -39,6 +39,7 @@ enum roc_npc_item_type {
ROC_NPC_ITEM_TYPE_QINQ,
ROC_NPC_ITEM_TYPE_RAW,
ROC_NPC_ITEM_TYPE_MARK,
+ ROC_NPC_ITEM_TYPE_TX_QUEUE,
ROC_NPC_ITEM_TYPE_END,
};
diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c
index 72892be300..e0019818c7 100644
--- a/drivers/common/cnxk/roc_npc_mcam.c
+++ b/drivers/common/cnxk/roc_npc_mcam.c
@@ -587,9 +587,47 @@ npc_mcam_set_channel(struct roc_npc_flow *flow,
flow->mcam_mask[0] |= (uint64_t)mask;
}
+static int
+npc_mcam_set_pf_func(struct npc *npc, struct roc_npc_flow *flow, uint16_t pf_func)
+{
+#define NPC_PF_FUNC_WIDTH 2
+#define NPC_KEX_PF_FUNC_MASK 0xFFFF
+ uint16_t nr_bytes, hdr_offset, key_offset, pf_func_offset;
+ uint8_t *flow_mcam_data, *flow_mcam_mask;
+ struct npc_lid_lt_xtract_info *xinfo;
+ bool pffunc_found = false;
+ uint16_t mask = 0xFFFF;
+ int i;
+
+ flow_mcam_data = (uint8_t *)flow->mcam_data;
+ flow_mcam_mask = (uint8_t *)flow->mcam_mask;
+
+ xinfo = &npc->prx_dxcfg[NIX_INTF_TX][NPC_LID_LA][NPC_LT_LA_IH_NIX_ETHER];
+
+ for (i = 0; i < NPC_MAX_LD; i++) {
+ nr_bytes = xinfo->xtract[i].len;
+ hdr_offset = xinfo->xtract[i].hdr_off;
+ key_offset = xinfo->xtract[i].key_off;
+
+ if (hdr_offset > 0 || nr_bytes < NPC_PF_FUNC_WIDTH)
+ continue;
+ else
+ pffunc_found = true;
+
+ pf_func_offset = key_offset + nr_bytes - NPC_PF_FUNC_WIDTH;
+ memcpy((void *)&flow_mcam_data[pf_func_offset], (uint8_t *)&pf_func,
+ NPC_PF_FUNC_WIDTH);
+ memcpy((void *)&flow_mcam_mask[pf_func_offset], (uint8_t *)&mask,
+ NPC_PF_FUNC_WIDTH);
+ }
+ if (!pffunc_found)
+ return -EINVAL;
+
+ return 0;
+}
+
int
-npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
- struct npc_parse_state *pst)
+npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow, struct npc_parse_state *pst)
{
struct npc_mcam_write_entry_req *req;
struct nix_inl_dev *inl_dev = NULL;
@@ -668,6 +706,16 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
*/
req->entry_data.vtag_action = flow->vtag_action;
+ if (flow->nix_intf == NIX_INTF_TX) {
+ uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
+
+ pf_func = plt_cpu_to_be_16(pf_func);
+
+ rc = npc_mcam_set_pf_func(npc, flow, pf_func);
+ if (rc)
+ return rc;
+ }
+
for (idx = 0; idx < ROC_NPC_MAX_MCAM_WIDTH_DWORDS; idx++) {
req->entry_data.kw[idx] = flow->mcam_data[idx];
req->entry_data.kw_mask[idx] = flow->mcam_mask[idx];
@@ -718,15 +766,6 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
flow->mcam_mask[0] |= (0x7ULL << la_offset);
}
}
- } else {
- uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
-
- pf_func = plt_cpu_to_be_16(pf_func);
- req->entry_data.kw[0] |= ((uint64_t)pf_func << 32);
- req->entry_data.kw_mask[0] |= ((uint64_t)0xffff << 32);
-
- flow->mcam_data[0] |= ((uint64_t)pf_func << 32);
- flow->mcam_mask[0] |= ((uint64_t)0xffff << 32);
}
rc = mbox_process_msg(mbox, (void *)&rsp);
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index f746b9cb6d..126bbd5358 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -180,6 +180,58 @@ npc_parse_higig2_hdr(struct npc_parse_state *pst)
return npc_update_parse_state(pst, &info, lid, lt, 0);
}
+int
+npc_parse_tx_queue(struct npc_parse_state *pst)
+{
+ struct nix_inst_hdr_s nix_inst_hdr, nix_inst_hdr_mask;
+ uint8_t hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+ struct npc_parse_item_info parse_info;
+ const uint16_t *send_queue;
+ int lid, lt, rc = 0;
+
+ memset(&nix_inst_hdr, 0, sizeof(nix_inst_hdr));
+ memset(&nix_inst_hdr_mask, 0, sizeof(nix_inst_hdr_mask));
+ memset(&parse_info, 0, sizeof(parse_info));
+
+ if (pst->pattern->type != ROC_NPC_ITEM_TYPE_TX_QUEUE)
+ return 0;
+
+ if (pst->flow->nix_intf != NIX_INTF_TX)
+ return NPC_ERR_INVALID_SPEC;
+
+ lid = NPC_LID_LA;
+ lt = NPC_LT_LA_IH_NIX_ETHER;
+ send_queue = (const uint16_t *)pst->pattern->spec;
+
+ if (*send_queue >= pst->nb_tx_queues)
+ return NPC_ERR_INVALID_SPEC;
+
+ nix_inst_hdr.sq = *send_queue;
+ nix_inst_hdr_mask.sq = 0xFFFF;
+
+ parse_info.def_mask = NULL;
+ parse_info.spec = &nix_inst_hdr;
+ parse_info.mask = &nix_inst_hdr_mask;
+ parse_info.len = sizeof(nix_inst_hdr);
+ parse_info.def_mask = NULL;
+ parse_info.hw_hdr_len = 0;
+
+ memset(hw_mask, 0, sizeof(hw_mask));
+
+ parse_info.hw_mask = &hw_mask;
+ npc_get_hw_supp_mask(pst, &parse_info, lid, lt);
+
+ rc = npc_mask_is_supported(parse_info.mask, parse_info.hw_mask, parse_info.len);
+ if (!rc)
+ return NPC_ERR_INVALID_MASK;
+
+ rc = npc_update_parse_state(pst, &parse_info, lid, lt, 0);
+ if (rc)
+ return rc;
+
+ return 0;
+}
+
int
npc_parse_la(struct npc_parse_state *pst)
{
diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h
index 714dcb09c9..6f41df18bb 100644
--- a/drivers/common/cnxk/roc_npc_priv.h
+++ b/drivers/common/cnxk/roc_npc_priv.h
@@ -200,6 +200,7 @@ struct npc_parse_state {
bool set_ipv6ext_ltype_mask;
bool is_second_pass_rule;
bool has_eth_type;
+ uint16_t nb_tx_queues;
};
enum npc_kpu_parser_flag {
@@ -448,6 +449,7 @@ int npc_parse_mark_item(struct npc_parse_state *pst);
int npc_parse_pre_l2(struct npc_parse_state *pst);
int npc_parse_higig2_hdr(struct npc_parse_state *pst);
int npc_parse_cpt_hdr(struct npc_parse_state *pst);
+int npc_parse_tx_queue(struct npc_parse_state *pst);
int npc_parse_la(struct npc_parse_state *pst);
int npc_parse_lb(struct npc_parse_state *pst);
int npc_parse_lc(struct npc_parse_state *pst);
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item
2023-05-19 3:42 [dpdk-dev] [PATCH 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
@ 2023-05-19 3:42 ` psatheesh
2023-05-22 13:22 ` Jerin Jacob
2023-05-23 6:04 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2 siblings, 1 reply; 8+ messages in thread
From: psatheesh @ 2023-05-19 3:42 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Added support for Tx queue flow pattern item.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
drivers/net/cnxk/cnxk_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index f13d8e5582..9595fe9386 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -58,7 +58,9 @@ const struct cnxk_rte_flow_term_info term[] = {
[RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW,
sizeof(struct rte_flow_item_raw)},
[RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,
- sizeof(struct rte_flow_item_mark)}};
+ sizeof(struct rte_flow_item_mark)},
+ [RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,
+ sizeof(struct rte_flow_item_tx_queue)}};
static int
npc_rss_action_validate(struct rte_eth_dev *eth_dev,
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item
2023-05-19 3:42 ` [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
@ 2023-05-22 13:22 ` Jerin Jacob
0 siblings, 0 replies; 8+ messages in thread
From: Jerin Jacob @ 2023-05-22 13:22 UTC (permalink / raw)
To: psatheesh
Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao, dev
On Fri, May 19, 2023 at 9:12 AM <psatheesh@marvell.com> wrote:
>
> From: Satheesh Paul <psatheesh@marvell.com>
>
> Added support for Tx queue flow pattern item.
>
> Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
Update to doc/guides/nics/features/cnxk_*.ini is missing.
Please check generated documentation too,.
> ---
> drivers/net/cnxk/cnxk_flow.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
> index f13d8e5582..9595fe9386 100644
> --- a/drivers/net/cnxk/cnxk_flow.c
> +++ b/drivers/net/cnxk/cnxk_flow.c
> @@ -58,7 +58,9 @@ const struct cnxk_rte_flow_term_info term[] = {
> [RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW,
> sizeof(struct rte_flow_item_raw)},
> [RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,
> - sizeof(struct rte_flow_item_mark)}};
> + sizeof(struct rte_flow_item_mark)},
> + [RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,
> + sizeof(struct rte_flow_item_tx_queue)}};
>
> static int
> npc_rss_action_validate(struct rte_eth_dev *eth_dev,
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API
2023-05-19 3:42 [dpdk-dev] [PATCH 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2023-05-19 3:42 ` [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
@ 2023-05-23 6:04 ` psatheesh
2023-05-23 6:04 ` [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2 siblings, 1 reply; 8+ messages in thread
From: psatheesh @ 2023-05-23 6:04 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Added ROC API changes to support Tx queue flow
pattern item.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
v2:
* Updated documentation for Tx queue pattern item and
verified generated documents as well.
drivers/common/cnxk/roc_npc.c | 16 +++++---
drivers/common/cnxk/roc_npc.h | 1 +
drivers/common/cnxk/roc_npc_mcam.c | 61 +++++++++++++++++++++++------
drivers/common/cnxk/roc_npc_parse.c | 52 ++++++++++++++++++++++++
drivers/common/cnxk/roc_npc_priv.h | 2 +
5 files changed, 115 insertions(+), 17 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index d556b4c3a5..1baa71fc45 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -779,11 +779,10 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
struct roc_npc_flow *flow, struct npc_parse_state *pst)
{
npc_parse_stage_func_t parse_stage_funcs[] = {
- npc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2,
- npc_parse_cpt_hdr, npc_parse_higig2_hdr, npc_parse_la,
- npc_parse_lb, npc_parse_lc, npc_parse_ld,
- npc_parse_le, npc_parse_lf, npc_parse_lg,
- npc_parse_lh,
+ npc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2, npc_parse_cpt_hdr,
+ npc_parse_higig2_hdr, npc_parse_tx_queue, npc_parse_la, npc_parse_lb,
+ npc_parse_lc, npc_parse_ld, npc_parse_le, npc_parse_lf,
+ npc_parse_lg, npc_parse_lh,
};
uint8_t layer = 0;
int key_offset;
@@ -792,9 +791,9 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
if (pattern == NULL)
return NPC_ERR_PARAM;
- memset(pst, 0, sizeof(*pst));
pst->npc = npc;
pst->flow = flow;
+ pst->nix_intf = flow->nix_intf;
/* Use integral byte offset */
key_offset = pst->npc->keyx_len[flow->nix_intf];
@@ -864,8 +863,12 @@ npc_parse_rule(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
struct npc_parse_state *pst)
{
struct npc *npc = roc_npc_to_npc_priv(roc_npc);
+ struct roc_nix *roc_nix = roc_npc->roc_nix;
+ struct nix *nix = roc_nix_to_nix_priv(roc_nix);
int err;
+ pst->nb_tx_queues = nix->nb_tx_queues;
+
/* Check attr */
err = npc_parse_attr(npc, attr, flow);
if (err)
@@ -1445,6 +1448,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
return NULL;
}
memset(flow, 0, sizeof(*flow));
+ memset(&parse_state, 0, sizeof(parse_state));
rc = npc_parse_rule(roc_npc, attr, pattern, actions, flow,
&parse_state);
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 26a43c12cb..5984da1c1a 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -39,6 +39,7 @@ enum roc_npc_item_type {
ROC_NPC_ITEM_TYPE_QINQ,
ROC_NPC_ITEM_TYPE_RAW,
ROC_NPC_ITEM_TYPE_MARK,
+ ROC_NPC_ITEM_TYPE_TX_QUEUE,
ROC_NPC_ITEM_TYPE_END,
};
diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c
index 72892be300..e0019818c7 100644
--- a/drivers/common/cnxk/roc_npc_mcam.c
+++ b/drivers/common/cnxk/roc_npc_mcam.c
@@ -587,9 +587,47 @@ npc_mcam_set_channel(struct roc_npc_flow *flow,
flow->mcam_mask[0] |= (uint64_t)mask;
}
+static int
+npc_mcam_set_pf_func(struct npc *npc, struct roc_npc_flow *flow, uint16_t pf_func)
+{
+#define NPC_PF_FUNC_WIDTH 2
+#define NPC_KEX_PF_FUNC_MASK 0xFFFF
+ uint16_t nr_bytes, hdr_offset, key_offset, pf_func_offset;
+ uint8_t *flow_mcam_data, *flow_mcam_mask;
+ struct npc_lid_lt_xtract_info *xinfo;
+ bool pffunc_found = false;
+ uint16_t mask = 0xFFFF;
+ int i;
+
+ flow_mcam_data = (uint8_t *)flow->mcam_data;
+ flow_mcam_mask = (uint8_t *)flow->mcam_mask;
+
+ xinfo = &npc->prx_dxcfg[NIX_INTF_TX][NPC_LID_LA][NPC_LT_LA_IH_NIX_ETHER];
+
+ for (i = 0; i < NPC_MAX_LD; i++) {
+ nr_bytes = xinfo->xtract[i].len;
+ hdr_offset = xinfo->xtract[i].hdr_off;
+ key_offset = xinfo->xtract[i].key_off;
+
+ if (hdr_offset > 0 || nr_bytes < NPC_PF_FUNC_WIDTH)
+ continue;
+ else
+ pffunc_found = true;
+
+ pf_func_offset = key_offset + nr_bytes - NPC_PF_FUNC_WIDTH;
+ memcpy((void *)&flow_mcam_data[pf_func_offset], (uint8_t *)&pf_func,
+ NPC_PF_FUNC_WIDTH);
+ memcpy((void *)&flow_mcam_mask[pf_func_offset], (uint8_t *)&mask,
+ NPC_PF_FUNC_WIDTH);
+ }
+ if (!pffunc_found)
+ return -EINVAL;
+
+ return 0;
+}
+
int
-npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
- struct npc_parse_state *pst)
+npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow, struct npc_parse_state *pst)
{
struct npc_mcam_write_entry_req *req;
struct nix_inl_dev *inl_dev = NULL;
@@ -668,6 +706,16 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
*/
req->entry_data.vtag_action = flow->vtag_action;
+ if (flow->nix_intf == NIX_INTF_TX) {
+ uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
+
+ pf_func = plt_cpu_to_be_16(pf_func);
+
+ rc = npc_mcam_set_pf_func(npc, flow, pf_func);
+ if (rc)
+ return rc;
+ }
+
for (idx = 0; idx < ROC_NPC_MAX_MCAM_WIDTH_DWORDS; idx++) {
req->entry_data.kw[idx] = flow->mcam_data[idx];
req->entry_data.kw_mask[idx] = flow->mcam_mask[idx];
@@ -718,15 +766,6 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
flow->mcam_mask[0] |= (0x7ULL << la_offset);
}
}
- } else {
- uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
-
- pf_func = plt_cpu_to_be_16(pf_func);
- req->entry_data.kw[0] |= ((uint64_t)pf_func << 32);
- req->entry_data.kw_mask[0] |= ((uint64_t)0xffff << 32);
-
- flow->mcam_data[0] |= ((uint64_t)pf_func << 32);
- flow->mcam_mask[0] |= ((uint64_t)0xffff << 32);
}
rc = mbox_process_msg(mbox, (void *)&rsp);
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index 571fdb36fc..acaebaed21 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -181,6 +181,58 @@ npc_parse_higig2_hdr(struct npc_parse_state *pst)
return npc_update_parse_state(pst, &info, lid, lt, 0);
}
+int
+npc_parse_tx_queue(struct npc_parse_state *pst)
+{
+ struct nix_inst_hdr_s nix_inst_hdr, nix_inst_hdr_mask;
+ uint8_t hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+ struct npc_parse_item_info parse_info;
+ const uint16_t *send_queue;
+ int lid, lt, rc = 0;
+
+ memset(&nix_inst_hdr, 0, sizeof(nix_inst_hdr));
+ memset(&nix_inst_hdr_mask, 0, sizeof(nix_inst_hdr_mask));
+ memset(&parse_info, 0, sizeof(parse_info));
+
+ if (pst->pattern->type != ROC_NPC_ITEM_TYPE_TX_QUEUE)
+ return 0;
+
+ if (pst->flow->nix_intf != NIX_INTF_TX)
+ return NPC_ERR_INVALID_SPEC;
+
+ lid = NPC_LID_LA;
+ lt = NPC_LT_LA_IH_NIX_ETHER;
+ send_queue = (const uint16_t *)pst->pattern->spec;
+
+ if (*send_queue >= pst->nb_tx_queues)
+ return NPC_ERR_INVALID_SPEC;
+
+ nix_inst_hdr.sq = *send_queue;
+ nix_inst_hdr_mask.sq = 0xFFFF;
+
+ parse_info.def_mask = NULL;
+ parse_info.spec = &nix_inst_hdr;
+ parse_info.mask = &nix_inst_hdr_mask;
+ parse_info.len = sizeof(nix_inst_hdr);
+ parse_info.def_mask = NULL;
+ parse_info.hw_hdr_len = 0;
+
+ memset(hw_mask, 0, sizeof(hw_mask));
+
+ parse_info.hw_mask = &hw_mask;
+ npc_get_hw_supp_mask(pst, &parse_info, lid, lt);
+
+ rc = npc_mask_is_supported(parse_info.mask, parse_info.hw_mask, parse_info.len);
+ if (!rc)
+ return NPC_ERR_INVALID_MASK;
+
+ rc = npc_update_parse_state(pst, &parse_info, lid, lt, 0);
+ if (rc)
+ return rc;
+
+ return 0;
+}
+
int
npc_parse_la(struct npc_parse_state *pst)
{
diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h
index 714dcb09c9..6f41df18bb 100644
--- a/drivers/common/cnxk/roc_npc_priv.h
+++ b/drivers/common/cnxk/roc_npc_priv.h
@@ -200,6 +200,7 @@ struct npc_parse_state {
bool set_ipv6ext_ltype_mask;
bool is_second_pass_rule;
bool has_eth_type;
+ uint16_t nb_tx_queues;
};
enum npc_kpu_parser_flag {
@@ -448,6 +449,7 @@ int npc_parse_mark_item(struct npc_parse_state *pst);
int npc_parse_pre_l2(struct npc_parse_state *pst);
int npc_parse_higig2_hdr(struct npc_parse_state *pst);
int npc_parse_cpt_hdr(struct npc_parse_state *pst);
+int npc_parse_tx_queue(struct npc_parse_state *pst);
int npc_parse_la(struct npc_parse_state *pst);
int npc_parse_lb(struct npc_parse_state *pst);
int npc_parse_lc(struct npc_parse_state *pst);
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item
2023-05-23 6:04 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
@ 2023-05-23 6:04 ` psatheesh
0 siblings, 0 replies; 8+ messages in thread
From: psatheesh @ 2023-05-23 6:04 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Ferruh Yigit
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Added support for Tx queue flow pattern item.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
doc/guides/nics/features/cnxk.ini | 1 +
doc/guides/nics/features/cnxk_vec.ini | 1 +
doc/guides/nics/features/cnxk_vf.ini | 1 +
doc/guides/nics/features/default.ini | 1 +
drivers/net/cnxk/cnxk_flow.c | 4 +++-
5 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini
index 7947c044bb..838e781d6d 100644
--- a/doc/guides/nics/features/cnxk.ini
+++ b/doc/guides/nics/features/cnxk.ini
@@ -73,6 +73,7 @@ nvgre = Y
raw = Y
sctp = Y
tcp = Y
+tx_queue = Y
udp = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/cnxk_vec.ini b/doc/guides/nics/features/cnxk_vec.ini
index 5d0976e6ce..e2cac64e4b 100644
--- a/doc/guides/nics/features/cnxk_vec.ini
+++ b/doc/guides/nics/features/cnxk_vec.ini
@@ -68,6 +68,7 @@ nvgre = Y
raw = Y
sctp = Y
tcp = Y
+tx_queue = Y
udp = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini
index 873e1dcc0a..470c45ce59 100644
--- a/doc/guides/nics/features/cnxk_vf.ini
+++ b/doc/guides/nics/features/cnxk_vf.ini
@@ -64,6 +64,7 @@ nvgre = Y
raw = Y
sctp = Y
tcp = Y
+tx_queue = Y
udp = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 1a5087abad..52a57d0805 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -142,6 +142,7 @@ represented_port =
sctp =
tag =
tcp =
+tx_queue =
udp =
vlan =
vxlan =
diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index f13d8e5582..9595fe9386 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -58,7 +58,9 @@ const struct cnxk_rte_flow_term_info term[] = {
[RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW,
sizeof(struct rte_flow_item_raw)},
[RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,
- sizeof(struct rte_flow_item_mark)}};
+ sizeof(struct rte_flow_item_mark)},
+ [RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,
+ sizeof(struct rte_flow_item_tx_queue)}};
static int
npc_rss_action_validate(struct rte_eth_dev *eth_dev,
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API
2023-05-19 3:42 [dpdk-dev] [PATCH 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2023-05-19 3:42 ` [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
2023-05-23 6:04 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
@ 2023-05-24 4:53 ` psatheesh
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
2 siblings, 1 reply; 8+ messages in thread
From: psatheesh @ 2023-05-24 4:53 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Added ROC API changes to support Tx queue flow
pattern item.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
v2:
* Updated documentation for Tx queue pattern item and
verified generated documents as well.
drivers/common/cnxk/roc_npc.c | 16 +++++---
drivers/common/cnxk/roc_npc.h | 1 +
drivers/common/cnxk/roc_npc_mcam.c | 61 +++++++++++++++++++++++------
drivers/common/cnxk/roc_npc_parse.c | 52 ++++++++++++++++++++++++
drivers/common/cnxk/roc_npc_priv.h | 2 +
5 files changed, 115 insertions(+), 17 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index d556b4c3a5..1baa71fc45 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -779,11 +779,10 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
struct roc_npc_flow *flow, struct npc_parse_state *pst)
{
npc_parse_stage_func_t parse_stage_funcs[] = {
- npc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2,
- npc_parse_cpt_hdr, npc_parse_higig2_hdr, npc_parse_la,
- npc_parse_lb, npc_parse_lc, npc_parse_ld,
- npc_parse_le, npc_parse_lf, npc_parse_lg,
- npc_parse_lh,
+ npc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2, npc_parse_cpt_hdr,
+ npc_parse_higig2_hdr, npc_parse_tx_queue, npc_parse_la, npc_parse_lb,
+ npc_parse_lc, npc_parse_ld, npc_parse_le, npc_parse_lf,
+ npc_parse_lg, npc_parse_lh,
};
uint8_t layer = 0;
int key_offset;
@@ -792,9 +791,9 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
if (pattern == NULL)
return NPC_ERR_PARAM;
- memset(pst, 0, sizeof(*pst));
pst->npc = npc;
pst->flow = flow;
+ pst->nix_intf = flow->nix_intf;
/* Use integral byte offset */
key_offset = pst->npc->keyx_len[flow->nix_intf];
@@ -864,8 +863,12 @@ npc_parse_rule(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
struct npc_parse_state *pst)
{
struct npc *npc = roc_npc_to_npc_priv(roc_npc);
+ struct roc_nix *roc_nix = roc_npc->roc_nix;
+ struct nix *nix = roc_nix_to_nix_priv(roc_nix);
int err;
+ pst->nb_tx_queues = nix->nb_tx_queues;
+
/* Check attr */
err = npc_parse_attr(npc, attr, flow);
if (err)
@@ -1445,6 +1448,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
return NULL;
}
memset(flow, 0, sizeof(*flow));
+ memset(&parse_state, 0, sizeof(parse_state));
rc = npc_parse_rule(roc_npc, attr, pattern, actions, flow,
&parse_state);
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 26a43c12cb..5984da1c1a 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -39,6 +39,7 @@ enum roc_npc_item_type {
ROC_NPC_ITEM_TYPE_QINQ,
ROC_NPC_ITEM_TYPE_RAW,
ROC_NPC_ITEM_TYPE_MARK,
+ ROC_NPC_ITEM_TYPE_TX_QUEUE,
ROC_NPC_ITEM_TYPE_END,
};
diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c
index 72892be300..e0019818c7 100644
--- a/drivers/common/cnxk/roc_npc_mcam.c
+++ b/drivers/common/cnxk/roc_npc_mcam.c
@@ -587,9 +587,47 @@ npc_mcam_set_channel(struct roc_npc_flow *flow,
flow->mcam_mask[0] |= (uint64_t)mask;
}
+static int
+npc_mcam_set_pf_func(struct npc *npc, struct roc_npc_flow *flow, uint16_t pf_func)
+{
+#define NPC_PF_FUNC_WIDTH 2
+#define NPC_KEX_PF_FUNC_MASK 0xFFFF
+ uint16_t nr_bytes, hdr_offset, key_offset, pf_func_offset;
+ uint8_t *flow_mcam_data, *flow_mcam_mask;
+ struct npc_lid_lt_xtract_info *xinfo;
+ bool pffunc_found = false;
+ uint16_t mask = 0xFFFF;
+ int i;
+
+ flow_mcam_data = (uint8_t *)flow->mcam_data;
+ flow_mcam_mask = (uint8_t *)flow->mcam_mask;
+
+ xinfo = &npc->prx_dxcfg[NIX_INTF_TX][NPC_LID_LA][NPC_LT_LA_IH_NIX_ETHER];
+
+ for (i = 0; i < NPC_MAX_LD; i++) {
+ nr_bytes = xinfo->xtract[i].len;
+ hdr_offset = xinfo->xtract[i].hdr_off;
+ key_offset = xinfo->xtract[i].key_off;
+
+ if (hdr_offset > 0 || nr_bytes < NPC_PF_FUNC_WIDTH)
+ continue;
+ else
+ pffunc_found = true;
+
+ pf_func_offset = key_offset + nr_bytes - NPC_PF_FUNC_WIDTH;
+ memcpy((void *)&flow_mcam_data[pf_func_offset], (uint8_t *)&pf_func,
+ NPC_PF_FUNC_WIDTH);
+ memcpy((void *)&flow_mcam_mask[pf_func_offset], (uint8_t *)&mask,
+ NPC_PF_FUNC_WIDTH);
+ }
+ if (!pffunc_found)
+ return -EINVAL;
+
+ return 0;
+}
+
int
-npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
- struct npc_parse_state *pst)
+npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow, struct npc_parse_state *pst)
{
struct npc_mcam_write_entry_req *req;
struct nix_inl_dev *inl_dev = NULL;
@@ -668,6 +706,16 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
*/
req->entry_data.vtag_action = flow->vtag_action;
+ if (flow->nix_intf == NIX_INTF_TX) {
+ uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
+
+ pf_func = plt_cpu_to_be_16(pf_func);
+
+ rc = npc_mcam_set_pf_func(npc, flow, pf_func);
+ if (rc)
+ return rc;
+ }
+
for (idx = 0; idx < ROC_NPC_MAX_MCAM_WIDTH_DWORDS; idx++) {
req->entry_data.kw[idx] = flow->mcam_data[idx];
req->entry_data.kw_mask[idx] = flow->mcam_mask[idx];
@@ -718,15 +766,6 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
flow->mcam_mask[0] |= (0x7ULL << la_offset);
}
}
- } else {
- uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
-
- pf_func = plt_cpu_to_be_16(pf_func);
- req->entry_data.kw[0] |= ((uint64_t)pf_func << 32);
- req->entry_data.kw_mask[0] |= ((uint64_t)0xffff << 32);
-
- flow->mcam_data[0] |= ((uint64_t)pf_func << 32);
- flow->mcam_mask[0] |= ((uint64_t)0xffff << 32);
}
rc = mbox_process_msg(mbox, (void *)&rsp);
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index 571fdb36fc..acaebaed21 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -181,6 +181,58 @@ npc_parse_higig2_hdr(struct npc_parse_state *pst)
return npc_update_parse_state(pst, &info, lid, lt, 0);
}
+int
+npc_parse_tx_queue(struct npc_parse_state *pst)
+{
+ struct nix_inst_hdr_s nix_inst_hdr, nix_inst_hdr_mask;
+ uint8_t hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+ struct npc_parse_item_info parse_info;
+ const uint16_t *send_queue;
+ int lid, lt, rc = 0;
+
+ memset(&nix_inst_hdr, 0, sizeof(nix_inst_hdr));
+ memset(&nix_inst_hdr_mask, 0, sizeof(nix_inst_hdr_mask));
+ memset(&parse_info, 0, sizeof(parse_info));
+
+ if (pst->pattern->type != ROC_NPC_ITEM_TYPE_TX_QUEUE)
+ return 0;
+
+ if (pst->flow->nix_intf != NIX_INTF_TX)
+ return NPC_ERR_INVALID_SPEC;
+
+ lid = NPC_LID_LA;
+ lt = NPC_LT_LA_IH_NIX_ETHER;
+ send_queue = (const uint16_t *)pst->pattern->spec;
+
+ if (*send_queue >= pst->nb_tx_queues)
+ return NPC_ERR_INVALID_SPEC;
+
+ nix_inst_hdr.sq = *send_queue;
+ nix_inst_hdr_mask.sq = 0xFFFF;
+
+ parse_info.def_mask = NULL;
+ parse_info.spec = &nix_inst_hdr;
+ parse_info.mask = &nix_inst_hdr_mask;
+ parse_info.len = sizeof(nix_inst_hdr);
+ parse_info.def_mask = NULL;
+ parse_info.hw_hdr_len = 0;
+
+ memset(hw_mask, 0, sizeof(hw_mask));
+
+ parse_info.hw_mask = &hw_mask;
+ npc_get_hw_supp_mask(pst, &parse_info, lid, lt);
+
+ rc = npc_mask_is_supported(parse_info.mask, parse_info.hw_mask, parse_info.len);
+ if (!rc)
+ return NPC_ERR_INVALID_MASK;
+
+ rc = npc_update_parse_state(pst, &parse_info, lid, lt, 0);
+ if (rc)
+ return rc;
+
+ return 0;
+}
+
int
npc_parse_la(struct npc_parse_state *pst)
{
diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h
index 714dcb09c9..6f41df18bb 100644
--- a/drivers/common/cnxk/roc_npc_priv.h
+++ b/drivers/common/cnxk/roc_npc_priv.h
@@ -200,6 +200,7 @@ struct npc_parse_state {
bool set_ipv6ext_ltype_mask;
bool is_second_pass_rule;
bool has_eth_type;
+ uint16_t nb_tx_queues;
};
enum npc_kpu_parser_flag {
@@ -448,6 +449,7 @@ int npc_parse_mark_item(struct npc_parse_state *pst);
int npc_parse_pre_l2(struct npc_parse_state *pst);
int npc_parse_higig2_hdr(struct npc_parse_state *pst);
int npc_parse_cpt_hdr(struct npc_parse_state *pst);
+int npc_parse_tx_queue(struct npc_parse_state *pst);
int npc_parse_la(struct npc_parse_state *pst);
int npc_parse_lb(struct npc_parse_state *pst);
int npc_parse_lc(struct npc_parse_state *pst);
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
@ 2023-05-24 4:53 ` psatheesh
2023-05-24 14:20 ` Jerin Jacob
0 siblings, 1 reply; 8+ messages in thread
From: psatheesh @ 2023-05-24 4:53 UTC (permalink / raw)
To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Ferruh Yigit
Cc: dev, Satheesh Paul
From: Satheesh Paul <psatheesh@marvell.com>
Added support for Tx queue flow pattern item.
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
doc/guides/nics/features/cnxk.ini | 1 +
doc/guides/nics/features/cnxk_vec.ini | 1 +
doc/guides/nics/features/cnxk_vf.ini | 1 +
doc/guides/nics/features/default.ini | 1 +
drivers/net/cnxk/cnxk_flow.c | 4 +++-
5 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini
index 7947c044bb..838e781d6d 100644
--- a/doc/guides/nics/features/cnxk.ini
+++ b/doc/guides/nics/features/cnxk.ini
@@ -73,6 +73,7 @@ nvgre = Y
raw = Y
sctp = Y
tcp = Y
+tx_queue = Y
udp = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/cnxk_vec.ini b/doc/guides/nics/features/cnxk_vec.ini
index 5d0976e6ce..e2cac64e4b 100644
--- a/doc/guides/nics/features/cnxk_vec.ini
+++ b/doc/guides/nics/features/cnxk_vec.ini
@@ -68,6 +68,7 @@ nvgre = Y
raw = Y
sctp = Y
tcp = Y
+tx_queue = Y
udp = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini
index 873e1dcc0a..470c45ce59 100644
--- a/doc/guides/nics/features/cnxk_vf.ini
+++ b/doc/guides/nics/features/cnxk_vf.ini
@@ -64,6 +64,7 @@ nvgre = Y
raw = Y
sctp = Y
tcp = Y
+tx_queue = Y
udp = Y
vlan = Y
vxlan = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 1a5087abad..52a57d0805 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -142,6 +142,7 @@ represented_port =
sctp =
tag =
tcp =
+tx_queue =
udp =
vlan =
vxlan =
diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index f13d8e5582..9595fe9386 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -58,7 +58,9 @@ const struct cnxk_rte_flow_term_info term[] = {
[RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW,
sizeof(struct rte_flow_item_raw)},
[RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,
- sizeof(struct rte_flow_item_mark)}};
+ sizeof(struct rte_flow_item_mark)},
+ [RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,
+ sizeof(struct rte_flow_item_tx_queue)}};
static int
npc_rss_action_validate(struct rte_eth_dev *eth_dev,
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
@ 2023-05-24 14:20 ` Jerin Jacob
0 siblings, 0 replies; 8+ messages in thread
From: Jerin Jacob @ 2023-05-24 14:20 UTC (permalink / raw)
To: psatheesh
Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
Ferruh Yigit, dev
On Wed, May 24, 2023 at 10:24 AM <psatheesh@marvell.com> wrote:
>
> From: Satheesh Paul <psatheesh@marvell.com>
>
> Added support for Tx queue flow pattern item.
>
> Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
> Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
Series applied to dpdk-next-net-mrvl/for-next-net. Thanks
> ---
> doc/guides/nics/features/cnxk.ini | 1 +
> doc/guides/nics/features/cnxk_vec.ini | 1 +
> doc/guides/nics/features/cnxk_vf.ini | 1 +
> doc/guides/nics/features/default.ini | 1 +
> drivers/net/cnxk/cnxk_flow.c | 4 +++-
> 5 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini
> index 7947c044bb..838e781d6d 100644
> --- a/doc/guides/nics/features/cnxk.ini
> +++ b/doc/guides/nics/features/cnxk.ini
> @@ -73,6 +73,7 @@ nvgre = Y
> raw = Y
> sctp = Y
> tcp = Y
> +tx_queue = Y
> udp = Y
> vlan = Y
> vxlan = Y
> diff --git a/doc/guides/nics/features/cnxk_vec.ini b/doc/guides/nics/features/cnxk_vec.ini
> index 5d0976e6ce..e2cac64e4b 100644
> --- a/doc/guides/nics/features/cnxk_vec.ini
> +++ b/doc/guides/nics/features/cnxk_vec.ini
> @@ -68,6 +68,7 @@ nvgre = Y
> raw = Y
> sctp = Y
> tcp = Y
> +tx_queue = Y
> udp = Y
> vlan = Y
> vxlan = Y
> diff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini
> index 873e1dcc0a..470c45ce59 100644
> --- a/doc/guides/nics/features/cnxk_vf.ini
> +++ b/doc/guides/nics/features/cnxk_vf.ini
> @@ -64,6 +64,7 @@ nvgre = Y
> raw = Y
> sctp = Y
> tcp = Y
> +tx_queue = Y
> udp = Y
> vlan = Y
> vxlan = Y
> diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
> index 1a5087abad..52a57d0805 100644
> --- a/doc/guides/nics/features/default.ini
> +++ b/doc/guides/nics/features/default.ini
> @@ -142,6 +142,7 @@ represented_port =
> sctp =
> tag =
> tcp =
> +tx_queue =
> udp =
> vlan =
> vxlan =
> diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
> index f13d8e5582..9595fe9386 100644
> --- a/drivers/net/cnxk/cnxk_flow.c
> +++ b/drivers/net/cnxk/cnxk_flow.c
> @@ -58,7 +58,9 @@ const struct cnxk_rte_flow_term_info term[] = {
> [RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW,
> sizeof(struct rte_flow_item_raw)},
> [RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,
> - sizeof(struct rte_flow_item_mark)}};
> + sizeof(struct rte_flow_item_mark)},
> + [RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,
> + sizeof(struct rte_flow_item_tx_queue)}};
>
> static int
> npc_rss_action_validate(struct rte_eth_dev *eth_dev,
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-05-24 14:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 3:42 [dpdk-dev] [PATCH 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2023-05-19 3:42 ` [dpdk-dev] [PATCH 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
2023-05-22 13:22 ` Jerin Jacob
2023-05-23 6:04 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2023-05-23 6:04 ` [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 1/2] common/cnxk: support Tx queue flow pattern in ROC API psatheesh
2023-05-24 4:53 ` [dpdk-dev] [PATCH v2 2/2] net/cnxk: support Tx queue flow pattern item psatheesh
2023-05-24 14:20 ` 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).