> -----Original Message----- > From: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru> > Sent: Monday, October 3, 2022 21:59 > To: Guo, Junfeng <junfeng....@intel.com>; Zhang, Qi Z > <qi.z.zh...@intel.com>; Wu, Jingjing <jingjing...@intel.com>; Xing, > Beilei <beilei.x...@intel.com> > Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.w...@intel.com>; Wu, > Wenjun1 <wenjun1...@intel.com> > Subject: Re: [PATCH v2 06/14] net/idpf: add support for packet type get > > 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.
You can verify the PTYPE via sending & receiving certain packets. After setting the cmd verbose, the corresponding PTYPE may show up in the testpmd. You can then check if the PTYPE is exactly what you just sent. The ptype_tbl will be filled when func idpf_get_pkt_type is called. And then the corresponding part will be filled in Rx burst phase. This part patch will also be improved to make it more clear. Thanks! > > > + > > + return ptypes; > > +} > > + > > static inline int > > check_rx_thresh(uint16_t nb_desc, uint16_t thresh) > > {