DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] common/cnxk: fix mbox region copy
@ 2023-12-21  6:38 Harman Kalra
  2023-12-21  6:38 ` [PATCH 2/2] common/cnxk: fix VLAN check for inner header Harman Kalra
  0 siblings, 1 reply; 3+ messages in thread
From: Harman Kalra @ 2023-12-21  6:38 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: dev, jerinj, Harman Kalra, stable

Using proper API to perform copy to mbox device memory region

Fixes: 02719901d50f ("common/cnxk: send link status event to VF")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_dev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index e7e89bf3d6..084343c3b4 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -198,9 +198,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
 			vf_msg = mbox_alloc_msg(&dev->mbox_vfpf_up, vf, sz);
 			if (vf_msg) {
 				mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg);
-				memcpy((uint8_t *)vf_msg +
-				       sizeof(struct mbox_msghdr), &linfo,
-				       sizeof(struct cgx_link_user_info));
+				mbox_memcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr), &linfo,
+					    sizeof(struct cgx_link_user_info));
 
 				vf_msg->rc = msg->rc;
 				vf_msg->pcifunc = msg->pcifunc;
-- 
2.18.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] common/cnxk: fix VLAN check for inner header
  2023-12-21  6:38 [PATCH 1/2] common/cnxk: fix mbox region copy Harman Kalra
@ 2023-12-21  6:38 ` Harman Kalra
  2024-01-03 10:12   ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: Harman Kalra @ 2023-12-21  6:38 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: dev, jerinj, Harman Kalra, stable

Adding the has vlan check in inner headers i.e in LF layer. If
has_vlan is 0 it should be masked out while installing flow rule.

Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index 9ceb707ebb..571d6b8e5d 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -1097,6 +1097,7 @@ npc_parse_lf(struct npc_parse_state *pst)
 {
 	const struct roc_npc_item_info *pattern, *last_pattern;
 	char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+	const struct roc_npc_flow_item_eth *eth_item;
 	struct npc_parse_item_info info;
 	int lid, lt, lflags;
 	int nr_vlans = 0;
@@ -1113,10 +1114,12 @@ npc_parse_lf(struct npc_parse_state *pst)
 	lt = NPC_LT_LF_TU_ETHER;
 	lflags = 0;
 
+	eth_item = pst->pattern->spec;
+
 	/* No match support for vlan tags */
 	info.def_mask = NULL;
 	info.hw_mask = NULL;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.spec = NULL;
 	info.mask = NULL;
 	info.hw_hdr_len = 0;
@@ -1147,12 +1150,15 @@ npc_parse_lf(struct npc_parse_state *pst)
 	}
 
 	info.hw_mask = &hw_mask;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.hw_hdr_len = 0;
 	npc_get_hw_supp_mask(pst, &info, lid, lt);
 	info.spec = NULL;
 	info.mask = NULL;
 
+	if (eth_item && eth_item->has_vlan)
+		pst->set_vlan_ltype_mask = true;
+
 	rc = npc_parse_item_basic(pst->pattern, &info);
 	if (rc != 0)
 		return rc;
-- 
2.18.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] common/cnxk: fix VLAN check for inner header
  2023-12-21  6:38 ` [PATCH 2/2] common/cnxk: fix VLAN check for inner header Harman Kalra
@ 2024-01-03 10:12   ` Jerin Jacob
  0 siblings, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2024-01-03 10:12 UTC (permalink / raw)
  To: Harman Kalra
  Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	dev, jerinj, stable

On Thu, Dec 21, 2023 at 12:09 PM Harman Kalra <hkalra@marvell.com> wrote:
>
> Adding the has vlan check in inner headers i.e in LF layer. If
> has_vlan is 0 it should be masked out while installing flow rule.
>
> Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")
> Cc: stable@dpdk.org
>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>


Series applied to dpdk-next-net-mrvl/for-main. Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-03 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21  6:38 [PATCH 1/2] common/cnxk: fix mbox region copy Harman Kalra
2023-12-21  6:38 ` [PATCH 2/2] common/cnxk: fix VLAN check for inner header Harman Kalra
2024-01-03 10:12   ` 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).