From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Neil Horman <nhorman@tuxdriver.com>,
John McNamara <john.mcnamara@intel.com>,
Marko Kovacevic <marko.kovacevic@intel.com>,
"John W. Linville" <linville@tuxdriver.com>,
Allain Legacy <allain.legacy@windriver.com>,
Matt Peters <matt.peters@windriver.com>,
Ravi Kumar <ravi1.kumar@amd.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Xiao Wang <xiao.w.wang@intel.com>,
Beilei Xing <beilei.xing@intel.com>,
Konstantin Ananyev <konstantin.ananyev@intel.com>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Nelio Laranjeiro <nelio.laranjeiro@6wind.com>,
Yongseok Koh <yskoh@mellanox.com>,
Tomasz Duszynski <tdu@semihalf.com>,
Dmitri Epshtein <dima@marvell.com>,
Natalie Samsonov <nsamsono@marvell.com>,
Jianbo Liu <jianbo.liu@arm.com>,
Alejandro Lucero <alejandro.lucero@netronome.com>,
Tetsuya Mukawa <mtetsuyah@gmail.com>,
Santosh Shukla <santosh.shukla@caviumnetworks.com>,
Jerin Jacob <jerin.jacob@caviumnetworks.com>,
Rasesh Mody <rasesh.mody@cavium.com>,
Harish Patil <harish.patil@cavium.com>,
Shahed Shaikh <shahed.shaikh@cavium.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Andrew Rybchenko <arybchenko@solarflare.com>,
Jasvinder Singh <jasvinder.singh@intel.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
Matej Vido <vido@cesnet.cz>,
Maciej Czekaj <maciej.czekaj@caviumnetworks.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>,
Yong Wang <yongwang@vmware.com>
Subject: Re: [dpdk-dev] [PATCH v2] ethdev: add new offload flag to keep CRC
Date: Fri, 29 Jun 2018 01:46:52 +0200 [thread overview]
Message-ID: <2254507.T9honQIVyD@xps> (raw)
In-Reply-To: <20180621131500.22460-1-ferruh.yigit@intel.com>
21/06/2018 15:14, Ferruh Yigit:
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -939,6 +939,11 @@ struct rte_eth_conf {
> #define DEV_RX_OFFLOAD_SCATTER 0x00002000
> #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000
> #define DEV_RX_OFFLOAD_SECURITY 0x00008000
> +
> +/* Invalid to set both DEV_RX_OFFLOAD_CRC_STRIP and DEV_RX_OFFLOAD_KEEP_CRC
> + * No DEV_RX_OFFLOAD_CRC_STRIP flag means keep CRC
> + */
> +#define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000
Can we convert this comment into a doxygen one?
> --- a/lib/librte_ethdev/rte_ethdev_driver.h
> +++ b/lib/librte_ethdev/rte_ethdev_driver.h
> +/**
> + * PMD helper function to check if keeping CRC is requested
> + *
> + * @param rx_offloads
> + * offloads variable
Maybe more precise: "offload bits to be applied"
> + *
> + * @return
> + * Return positive if keeping CRC is requested,
> + * zero if stripping CRC is requested
> + */
> +static inline int
> +rte_eth_dev_is_keep_crc(uint64_t rx_offloads)
I suggest a different name: rte_eth_dev_must_keep_crc
> +{
> + if (rx_offloads & DEV_RX_OFFLOAD_CRC_STRIP)
> + return 0;
> +
> + /* no KEEP_CRC or CRC_STRIP offload flags means keep CRC */
> + return 1;
> +}
Maybe add a comment to explain how the function must be replaced
by a check of bit KEEP_CRC in every drivers for 18.11?
next prev parent reply other threads:[~2018-06-28 23:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 22:57 [dpdk-dev] [RFC] " Ferruh Yigit
2018-06-09 10:11 ` Andrew Rybchenko
2018-06-11 9:18 ` Ferruh Yigit
2018-06-11 15:25 ` Stephen Hemminger
2018-06-19 12:54 ` Ferruh Yigit
2018-06-19 18:02 ` [dpdk-dev] [PATCH] " Ferruh Yigit
2018-06-20 7:42 ` Andrew Rybchenko
2018-06-20 17:24 ` Ferruh Yigit
2018-06-20 17:39 ` Andrew Rybchenko
2018-06-20 18:12 ` Ferruh Yigit
2018-06-20 21:16 ` Andrew Rybchenko
2018-06-20 10:54 ` Legacy, Allain
2018-06-20 13:44 ` Shahaf Shuler
2018-06-20 16:12 ` Ferruh Yigit
2018-06-21 7:53 ` Shahaf Shuler
2018-06-21 13:14 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2018-06-28 23:46 ` Thomas Monjalon [this message]
2018-06-29 12:41 ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2018-06-29 11:57 ` Thomas Monjalon
2018-06-29 16:33 ` 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=2254507.T9honQIVyD@xps \
--to=thomas@monjalon.net \
--cc=adrien.mazarguil@6wind.com \
--cc=ajit.khaparde@broadcom.com \
--cc=alejandro.lucero@netronome.com \
--cc=allain.legacy@windriver.com \
--cc=arybchenko@solarflare.com \
--cc=beilei.xing@intel.com \
--cc=bruce.richardson@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=dima@marvell.com \
--cc=ferruh.yigit@intel.com \
--cc=harish.patil@cavium.com \
--cc=jasvinder.singh@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jianbo.liu@arm.com \
--cc=john.mcnamara@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=linville@tuxdriver.com \
--cc=maciej.czekaj@caviumnetworks.com \
--cc=marko.kovacevic@intel.com \
--cc=matt.peters@windriver.com \
--cc=maxime.coquelin@redhat.com \
--cc=mtetsuyah@gmail.com \
--cc=nelio.laranjeiro@6wind.com \
--cc=nhorman@tuxdriver.com \
--cc=nsamsono@marvell.com \
--cc=qi.z.zhang@intel.com \
--cc=rahul.lakkireddy@chelsio.com \
--cc=rasesh.mody@cavium.com \
--cc=ravi1.kumar@amd.com \
--cc=santosh.shukla@caviumnetworks.com \
--cc=shahed.shaikh@cavium.com \
--cc=somnath.kotur@broadcom.com \
--cc=tdu@semihalf.com \
--cc=tiwei.bie@intel.com \
--cc=vido@cesnet.cz \
--cc=wenzhuo.lu@intel.com \
--cc=xiao.w.wang@intel.com \
--cc=yongwang@vmware.com \
--cc=yskoh@mellanox.com \
--cc=zhihong.wang@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).