On 9/5/22 13:58, Junfeng Guo wrote:
Add dev ops dev_supported_ptypes_get.

Signed-off-by: Beilei Xing <beilei.x...@intel.com>
Signed-off-by: Wenjun Wu <wenjun1...@intel.com>
Signed-off-by: Junfeng Guo <junfeng....@intel.com>

[snip]

diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c
index fe044a80c9..1c5c4688cc 100644
--- a/drivers/net/idpf/idpf_rxtx.c
+++ b/drivers/net/idpf/idpf_rxtx.c
@@ -8,6 +8,25 @@
  #include "idpf_ethdev.h"
  #include "idpf_rxtx.h"
+const uint32_t *
+idpf_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+{
+       static const uint32_t ptypes[] = {
+               RTE_PTYPE_L2_ETHER,
+               RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+               RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
+               RTE_PTYPE_L4_FRAG,
+               RTE_PTYPE_L4_NONFRAG,
+               RTE_PTYPE_L4_UDP,
+               RTE_PTYPE_L4_TCP,
+               RTE_PTYPE_L4_SCTP,
+               RTE_PTYPE_L4_ICMP,
+               RTE_PTYPE_UNKNOWN
+       };

How am I supported to verify that these packet types are really
recognized by the driver? The patch should include the part
of Rx burst callback which does recognition and fill in
corresponding data in mbuf.

+
+       return ptypes;
+}
+
  static inline int
  check_rx_thresh(uint16_t nb_desc, uint16_t thresh)
  {

Reply via email to