From: <kirankumark@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev][PATCH] net/cnxk: add support for L2 ether ptype for cnxk
Date: Mon, 28 Nov 2022 10:03:27 +0530 [thread overview]
Message-ID: <20221128043327.1472374-1-kirankumark@marvell.com> (raw)
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
next reply other threads:[~2022-11-28 4:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 4:33 kirankumark [this message]
2023-01-06 9:20 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221128043327.1472374-1-kirankumark@marvell.com \
--to=kirankumark@marvell.com \
--cc=dev@dpdk.org \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).