DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev][PATCH] net/cnxk: add support for L2 ether ptype for cnxk
@ 2022-11-28  4:33 kirankumark
  2023-01-06  9:20 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: kirankumark @ 2022-11-28  4:33 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao; +Cc: dev

From: Kiran Kumar K <kirankumark@marvell.com>

Adding lookup support for RTE_PTYPE_L2_ETHER in cnxk driver.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/cnxk/cnxk_lookup.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_lookup.c b/drivers/net/cnxk/cnxk_lookup.c
index f36fb8f27a..5acf73fe17 100644
--- a/drivers/net/cnxk/cnxk_lookup.c
+++ b/drivers/net/cnxk/cnxk_lookup.c
@@ -15,6 +15,7 @@ cnxk_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
 	RTE_SET_USED(eth_dev);
 
 	static const uint32_t ptypes[] = {
+		RTE_PTYPE_L2_ETHER,	      /* LA */
 		RTE_PTYPE_L2_ETHER_QINQ,      /* LB */
 		RTE_PTYPE_L2_ETHER_VLAN,      /* LB */
 		RTE_PTYPE_L2_ETHER_TIMESYNC,  /* LB */
@@ -88,19 +89,25 @@ nix_create_non_tunnel_ptype_array(uint16_t *ptype)
 		case NPC_LT_LB_CTAG:
 			val |= RTE_PTYPE_L2_ETHER_VLAN;
 			break;
+		default:
+			val |= RTE_PTYPE_L2_ETHER;
 		}
 
 		switch (lc) {
 		case NPC_LT_LC_ARP:
+			val = (val & ~RTE_PTYPE_L2_MASK);
 			val |= RTE_PTYPE_L2_ETHER_ARP;
 			break;
 		case NPC_LT_LC_NSH:
+			val = (val & ~RTE_PTYPE_L2_MASK);
 			val |= RTE_PTYPE_L2_ETHER_NSH;
 			break;
 		case NPC_LT_LC_FCOE:
+			val = (val & ~RTE_PTYPE_L2_MASK);
 			val |= RTE_PTYPE_L2_ETHER_FCOE;
 			break;
 		case NPC_LT_LC_MPLS:
+			val = (val & ~RTE_PTYPE_L2_MASK);
 			val |= RTE_PTYPE_L2_ETHER_MPLS;
 			break;
 		case NPC_LT_LC_IP:
@@ -116,6 +123,7 @@ nix_create_non_tunnel_ptype_array(uint16_t *ptype)
 			val |= RTE_PTYPE_L3_IPV6_EXT;
 			break;
 		case NPC_LT_LC_PTP:
+			val = (val & ~RTE_PTYPE_L2_MASK);
 			val |= RTE_PTYPE_L2_ETHER_TIMESYNC;
 			break;
 		}
-- 
2.34.1


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

end of thread, other threads:[~2023-01-06  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28  4:33 [dpdk-dev][PATCH] net/cnxk: add support for L2 ether ptype for cnxk kirankumark
2023-01-06  9: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).