From: Shahaf Shuler <shahafs@mellanox.com>
To: "Ferruh Yigit" <ferruh.yigit@intel.com>,
"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>,
"Nélio 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>,
"Thomas Monjalon" <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ethdev: add new offload flag to keep CRC
Date: Wed, 20 Jun 2018 13:44:59 +0000 [thread overview]
Message-ID: <DB7PR05MB4426E8345D63FD3C8B75A9C7C3770@DB7PR05MB4426.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180619180230.72585-1-ferruh.yigit@intel.com>
Hi Ferruh,
Tuesday, June 19, 2018 9:03 PM, Ferruh Yigit
> Subject: [dpdk-dev] [PATCH] ethdev: add new offload flag to keep CRC
>
[...]
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index de3f869ed..28cf168aa 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -388,6 +388,9 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev
> *dev)
>
> if (config->hw_fcs_strip)
> offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> + else
> + offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
> +
I think it should be:
if (config->hw_fcs_strip) {
offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
}
The hw_fcs_strip is the capability from device which allows the PMD to toggle the CRC stripping.
> if (config->hw_csum)
> offloads |= (DEV_RX_OFFLOAD_IPV4_CKSUM |
> DEV_RX_OFFLOAD_UDP_CKSUM |
> @@ -1419,17 +1422,17 @@ mlx5_rxq_new(struct rte_eth_dev *dev,
> uint16_t idx, uint16_t desc,
> /* Configure VLAN stripping. */
> tmpl->rxq.vlan_strip = !!(offloads &
> DEV_RX_OFFLOAD_VLAN_STRIP);
> /* By default, FCS (CRC) is stripped by hardware. */
> - if (offloads & DEV_RX_OFFLOAD_CRC_STRIP) {
> - tmpl->rxq.crc_present = 0;
> - } else if (config->hw_fcs_strip) {
> - tmpl->rxq.crc_present = 1;
> - } else {
> - DRV_LOG(WARNING,
> - "port %u CRC stripping has been disabled but will"
> - " still be performed by hardware, make sure
> MLNX_OFED"
> - " and firmware are up to date",
> - dev->data->port_id);
> - tmpl->rxq.crc_present = 0;
> + tmpl->rxq.crc_present = 0;
> + if (rte_eth_dev_is_keep_crc(offloads)) {
> + if (config->hw_fcs_strip) {
> + tmpl->rxq.crc_present = 1;
> + } else {
> + DRV_LOG(WARNING,
> + "port %u CRC stripping has been disabled but
> will"
> + " still be performed by hardware, make sure
> MLNX_OFED"
> + " and firmware are up to date",
> + dev->data->port_id);
> + }
> }
> DRV_LOG(DEBUG,
> "port %u CRC stripping is %s, %u bytes will be subtracted
> from"
next prev parent reply other threads:[~2018-06-20 13:45 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 [this message]
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
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=DB7PR05MB4426E8345D63FD3C8B75A9C7C3770@DB7PR05MB4426.eurprd05.prod.outlook.com \
--to=shahafs@mellanox.com \
--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=thomas@monjalon.net \
--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).