* [PATCH] net/nfp: update the supported list of packet types
@ 2023-10-19 6:17 Chaoyong He
2023-10-27 11:43 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2023-10-19 6:17 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, Qin Ke, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
The NFP PMD supports reporting more packet types then previously
claimed, extend the list of supported types.
While at it add a check to only list supported packet types if the
firmware supports the feature.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
drivers/net/nfp/nfp_common.c | 39 +++++++++++++++++++++++++++++++-----
1 file changed, 34 insertions(+), 5 deletions(-)
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 2d4a7635ab..10a2941fc9 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -1357,18 +1357,47 @@ nfp_net_common_init(struct rte_pci_device *pci_dev,
const uint32_t *
nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)
{
+ struct nfp_net_hw *net_hw;
static const uint32_t ptypes[] = {
+ RTE_PTYPE_L2_ETHER,
+ RTE_PTYPE_L3_IPV4,
+ RTE_PTYPE_L3_IPV4_EXT,
+ RTE_PTYPE_L3_IPV6,
+ RTE_PTYPE_L3_IPV6_EXT,
+ RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+ RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
+ RTE_PTYPE_L4_TCP,
+ RTE_PTYPE_L4_UDP,
+ RTE_PTYPE_L4_FRAG,
+ RTE_PTYPE_L4_NONFRAG,
+ RTE_PTYPE_L4_ICMP,
+ RTE_PTYPE_L4_SCTP,
+ RTE_PTYPE_TUNNEL_VXLAN,
+ RTE_PTYPE_TUNNEL_NVGRE,
+ RTE_PTYPE_TUNNEL_GENEVE,
+ RTE_PTYPE_INNER_L2_ETHER,
RTE_PTYPE_INNER_L3_IPV4,
+ RTE_PTYPE_INNER_L3_IPV4_EXT,
RTE_PTYPE_INNER_L3_IPV6,
RTE_PTYPE_INNER_L3_IPV6_EXT,
- RTE_PTYPE_INNER_L4_MASK,
- RTE_PTYPE_UNKNOWN
+ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
+ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
+ RTE_PTYPE_INNER_L4_TCP,
+ RTE_PTYPE_INNER_L4_UDP,
+ RTE_PTYPE_INNER_L4_FRAG,
+ RTE_PTYPE_INNER_L4_NONFRAG,
+ RTE_PTYPE_INNER_L4_ICMP,
+ RTE_PTYPE_INNER_L4_SCTP,
};
- if (dev->rx_pkt_burst == nfp_net_recv_pkts)
- return ptypes;
+ if (dev->rx_pkt_burst != nfp_net_recv_pkts)
+ return NULL;
+
+ net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ if ((net_hw->cap_ext & NFP_NET_CFG_CTRL_PKT_TYPE) == 0)
+ return NULL;
- return NULL;
+ return ptypes;
}
int
--
2.39.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/nfp: update the supported list of packet types
2023-10-19 6:17 [PATCH] net/nfp: update the supported list of packet types Chaoyong He
@ 2023-10-27 11:43 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-10-27 11:43 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, Qin Ke
On 10/19/2023 7:17 AM, Chaoyong He wrote:
> From: Qin Ke <qin.ke@corigine.com>
>
> The NFP PMD supports reporting more packet types then previously
> claimed, extend the list of supported types.
>
> While at it add a check to only list supported packet types if the
> firmware supports the feature.
>
> Signed-off-by: Qin Ke <qin.ke@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-27 11:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 6:17 [PATCH] net/nfp: update the supported list of packet types Chaoyong He
2023-10-27 11:43 ` Ferruh Yigit
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).