[dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction

Bruce Richardson bruce.richardson at intel.com
Mon Sep 28 18:21:30 CEST 2020


On Mon, Sep 28, 2020 at 05:17:24PM +0100, Wang, Haiyue wrote:
> + Bruce
> 
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit at intel.com>
> > Sent: Tuesday, September 29, 2020 00:00
> > To: Guo, Jia <jia.guo at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>; Zhang, Qi Z
> > <qi.z.zhang at intel.com>; Xing, Beilei <beilei.xing at intel.com>
> > Cc: dev at dpdk.org; Wang, Haiyue <haiyue.wang at intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction
> >
> > On 9/27/2020 3:08 AM, Jeff Guo wrote:
> > > Enable metadata extraction for flexible descriptors in AVF, that would
> > > allow network function directly get metadata without additional parsing
> > > which would reduce the CPU cost for VFs. The enabling metadata
> > > extractions involve the metadata of VLAN/IPv4/IPv6/IPv6-FLOW/TCP/MPLS
> > > flexible descriptors, and the VF could negotiate the capability of
> > > the flexible descriptor with PF and correspondingly configure the
> > > specific offload at receiving queues.
> > >
> > > Signed-off-by: Jeff Guo <jia.guo at intel.com>
> > > Acked-by: Haiyue Wang <haiyue.wang at intel.com>
> >
> > <...>
> >
> > > +/* Rx L3/L4 checksum */
> > > +static inline uint64_t
> > > +iavf_rxd_error_to_pkt_flags(uint16_t stat_err0)
> > > +{
> > > +uint64_t flags = 0;
> > > +
> > > +/* check if HW has decoded the packet and checksum */
> > > +if (unlikely(!(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_L3L4P_S))))
> > > +return 0;
> > > +
> > > +if (likely(!(stat_err0 & IAVF_RX_FLEX_ERR0_BITS))) {
> > > +flags |= (PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD);
> > > +return flags;
> > > +}
> > > +
> > > +if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_IPE_S)))
> > > +flags |= PKT_RX_IP_CKSUM_BAD;
> > > +else
> > > +flags |= PKT_RX_IP_CKSUM_GOOD;
> > > +
> > > +if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_L4E_S)))
> > > +flags |= PKT_RX_L4_CKSUM_BAD;
> > > +else
> > > +flags |= PKT_RX_L4_CKSUM_GOOD;
> > > +
> > > +if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_EIPE_S)))
> > > +flags |= PKT_RX_EIP_CKSUM_BAD;
> > > +
> > > +return flags;
> > > +}
> >
> > Is this static inline function used anywhere? If not can we delete it?
> >
> 
> The same function as iavf_flex_rxd_error_to_pkt_flags.
> 
> Looks like meson/gcc missed this [-Werror,-Wunused-function] capturing.
> http://mails.dpdk.org/archives/test-report/2020-September/154839.html
> 
AFAIK, unused static functions get a warning about being unused, static inline
functions don't. Unless you are defining a function in a header files, I'd
recommend omitting the "inline" part so you do get unused function errors.

/Bruce


More information about the dev mailing list