From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Guo, Jia" <jia.guo@intel.com>,
"Wu, Jingjing" <jingjing.wu@intel.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction
Date: Mon, 28 Sep 2020 16:29:21 +0000 [thread overview]
Message-ID: <BN8PR11MB3795C5CC2229A7B3D31BC757F7350@BN8PR11MB3795.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200928162130.GF951@bricha3-MOBL.ger.corp.intel.com>
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Tuesday, September 29, 2020 00:22
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Guo, Jia <jia.guo@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction
>
> On Mon, Sep 28, 2020 at 05:17:24PM +0100, Wang, Haiyue wrote:
> > + Bruce
> >
> > > -----Original Message-----
> > > From: Ferruh Yigit <ferruh.yigit@intel.com>
> > > Sent: Tuesday, September 29, 2020 00:00
> > > To: Guo, Jia <jia.guo@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Qi Z
> > > <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > > Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@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@intel.com>
> > > > Acked-by: Haiyue Wang <haiyue.wang@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.
>
Thanks, Bruce
Yes, after removing the 'inline' keyword, got the warning message:
[1315/2332] Compiling C object 'drivers/drivers@@tmp_rte_pmd_iavf@sta/net_iavf_iavf_rxtx.c.o'.
../drivers/net/iavf/iavf_rxtx.c:916:1: warning: 'iavf_rxd_error_to_pkt_flags' defined but not used [-Wunused-function]
916 | iavf_rxd_error_to_pkt_flags(uint16_t stat_err0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Not sure how does clang handle 'static inline' as 'static'. Anyway, code review
needs to be enhanced.;-)
> /Bruce
next prev parent reply other threads:[~2020-09-28 16:29 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 2:54 [dpdk-dev] [PATCH v1] " Jeff Guo
2020-09-17 3:00 ` Wang, Haiyue
2020-09-18 2:41 ` Guo, Jia
2020-09-23 7:45 ` [dpdk-dev] [PATCH v2] " Jeff Guo
2020-09-23 7:52 ` [dpdk-dev] [PATCH v3] " Jeff Guo
2020-09-23 8:10 ` Wang, Haiyue
2020-09-23 8:22 ` Guo, Jia
2020-09-23 15:36 ` [dpdk-dev] [PATCH v4] " Jeff Guo
2020-09-25 6:23 ` [dpdk-dev] [PATCH v5] " Jeff Guo
2020-09-25 6:33 ` Wang, Haiyue
2020-09-27 2:08 ` [dpdk-dev] [PATCH v6] " Jeff Guo
2020-09-27 3:00 ` Zhang, Qi Z
2020-09-28 15:59 ` Ferruh Yigit
2020-09-28 16:17 ` Wang, Haiyue
2020-09-28 16:21 ` Bruce Richardson
2020-09-28 16:29 ` Wang, Haiyue [this message]
2020-09-29 2:27 ` Guo, Jia
2020-09-29 6:10 ` [dpdk-dev] [PATCH v7] " Jeff Guo
2020-09-29 6:12 ` Jeff Guo
2020-10-13 8:17 ` [dpdk-dev] [PATCH v8] " Jeff Guo
2020-10-13 10:10 ` Zhang, Qi Z
2020-10-14 12:31 ` Ferruh Yigit
2020-10-14 14:03 ` Bruce Richardson
2020-10-15 3:40 ` Guo, Jia
2020-10-15 5:26 ` Guo, Jia
2020-10-15 8:33 ` Ferruh Yigit
2020-10-26 9:37 ` Olivier Matz
2020-10-26 11:41 ` Wang, Haiyue
2020-10-15 3:41 ` [dpdk-dev] [PATCH v9] " Jeff Guo
2020-10-27 5:04 ` [dpdk-dev] [PATCH v10] " Jeff Guo
2020-10-27 5:21 ` Wang, Haiyue
2020-10-27 8:27 ` Guo, Jia
2020-10-27 11:55 ` Zhang, Qi Z
2020-10-30 2:54 ` [dpdk-dev] [PATCH v11] " Jeff Guo
2020-10-30 8:34 ` [dpdk-dev] [PATCH v12] " Jeff Guo
2020-10-30 8:40 ` Jeff Guo
2020-10-30 9:35 ` Zhang, Qi Z
2020-10-30 10:51 ` Ferruh Yigit
2020-10-30 11:14 ` Zhang, Qi Z
2020-10-30 16:03 ` Ferruh Yigit
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=BN8PR11MB3795C5CC2229A7B3D31BC757F7350@BN8PR11MB3795.namprd11.prod.outlook.com \
--to=haiyue.wang@intel.com \
--cc=beilei.xing@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jia.guo@intel.com \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.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).