DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tdu@semihalf.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Xiao Wang <xiao.w.wang@intel.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Remy Horton <remy.horton@intel.com>, Ori Kam <orika@mellanox.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Tomasz Kantecki <tomasz.kantecki@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>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Shreyansh Jain <shreyansh.jain@nxp.com>,
	John Daley <johndale@cisco.com>,
	Hyong Youb Kim <hyonkim@cisco.com>,
	Gaetan Rivet <gaetan.rivet@6wind.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>,
	Tomasz Duszynski <tdu@semihalf.com>,
	Dmitri Epshtein <dima@marvell.com>,
	Natalie Samsonov <nsamsono@marvell.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Alejandro Lucero <alejandro.lucero@netronome.com>,
	Tetsuya Mukawa <mtetsuyah@gmail.com>,
	Santosh Shukla <santosh.shukla@caviumnetworks.com>,
	Rasesh Mody <rasesh.mody@cavium.com>,
	Harish Patil <harish.patil@cavium.com>,
	Shahed Shaikh <shahed.shaikh@cavium.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Jasvinder Singh <jasvinder.singh@intel.com>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	Jan Remes <remes@netcope.com>,
	Keith Wiles <keith.wiles@intel.com>,
	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>,
	Amr Mokhtar <amr.mokhtar@intel.com>,
	Declan Doherty <declan.doherty@intel.com>,
	Chas Williams <chas3@att.com>, David Hunt <david.hunt@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Harry van Haaren <harry.van.haaren@intel.com>,
	Xiaoyun Li <xiaoyun.li@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ethdev: make default behavior CRC strip on Rx
Date: Tue, 4 Sep 2018 08:29:02 +0200	[thread overview]
Message-ID: <20180904062902.GA13602@sh> (raw)
In-Reply-To: <20180903144501.31373-1-ferruh.yigit@intel.com>

On Mon, Sep 03, 2018 at 03:45:01PM +0100, Ferruh Yigit wrote:
> Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag.
> Without any specific Rx offload flag, default behavior by PMDs is to
> strip CRC.
>
> PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC
> Rx offload capability.
>
> Applications that require keeping CRC should check PMD capability first
> and if it is supported can enable this feature by setting
> DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure()
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---

[...]

> diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
> index 682444590..fa4af49af 100644
> --- a/drivers/net/mvpp2/mrvl_ethdev.c
> +++ b/drivers/net/mvpp2/mrvl_ethdev.c
> @@ -67,7 +67,6 @@
>  /** Port Rx offload capabilities */
>  #define MRVL_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_FILTER | \
>  			  DEV_RX_OFFLOAD_JUMBO_FRAME | \
> -			  DEV_RX_OFFLOAD_CRC_STRIP | \
>  			  DEV_RX_OFFLOAD_CHECKSUM)
>
>  /** Port Tx offloads capabilities */
> @@ -311,14 +310,6 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
>  		return -EINVAL;
>  	}
>
> -	/* KEEP_CRC offload flag is not supported by PMD
> -	 * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
> -	 */
> -	if (rte_eth_dev_must_keep_crc(dev->data->dev_conf.rxmode.offloads)) {
> -		MRVL_LOG(INFO, "L2 CRC stripping is always enabled in hw");
> -		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> -	}
> -
>  	if (dev->data->dev_conf.rxmode.split_hdr_size) {
>  		MRVL_LOG(INFO, "Split headers not supported");
>  		return -EINVAL;
> @@ -1334,7 +1325,6 @@ mrvl_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
>
>  	/* By default packets are dropped if no descriptors are available */
>  	info->default_rxconf.rx_drop_en = 1;
> -	info->default_rxconf.offloads = DEV_RX_OFFLOAD_CRC_STRIP;
>
>  	info->max_rx_pktlen = MRVL_PKT_SIZE_MAX;
>  }

As for mvpp2:
Acked-by: Tomasz Duszynski <tdu@semihalf.com>

> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
> index 2200ee319..7f7ac155e 100644
> --- a/drivers/net/netvsc/hn_ethdev.c
> +++ b/drivers/net/netvsc/hn_ethdev.c
> @@ -40,8 +40,7 @@
>  			    DEV_TX_OFFLOAD_VLAN_INSERT)
>
>  #define HN_RX_OFFLOAD_CAPS (DEV_RX_OFFLOAD_CHECKSUM | \
> -			    DEV_RX_OFFLOAD_VLAN_STRIP | \
> -			    DEV_RX_OFFLOAD_CRC_STRIP)
> +			    DEV_RX_OFFLOAD_VLAN_STRIP)
>
>  int hn_logtype_init;
>  int hn_logtype_driver;
> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
> index f44add726..9de99e16a 100644
> --- a/drivers/net/netvsc/hn_rndis.c
> +++ b/drivers/net/netvsc/hn_rndis.c
> @@ -892,8 +892,7 @@ int hn_rndis_get_offload(struct hn_data *hv,
>  	    == HN_NDIS_LSOV2_CAP_IP6)
>  		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
>
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
> -				    DEV_RX_OFFLOAD_CRC_STRIP;
> +	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
>
>  	if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
>  		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index ee743e975..168088c6d 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -411,12 +411,6 @@ nfp_net_configure(struct rte_eth_dev *dev)
>  		return -EINVAL;
>  	}
>
> -	/* KEEP_CRC offload flag is not supported by PMD
> -	 * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
> -	 */
> -	if (rte_eth_dev_must_keep_crc(rxmode->offloads))
> -		PMD_INIT_LOG(INFO, "HW does strip CRC. No configurable!");
> -
>  	return 0;
>  }
>
> @@ -1168,8 +1162,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  					     DEV_RX_OFFLOAD_UDP_CKSUM |
>  					     DEV_RX_OFFLOAD_TCP_CKSUM;
>
> -	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
> -				     DEV_RX_OFFLOAD_KEEP_CRC;
> +	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
>
>  	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
>  		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
> diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
> index 244f86545..de10b5bdf 100644
> --- a/drivers/net/null/rte_eth_null.c
> +++ b/drivers/net/null/rte_eth_null.c
> @@ -305,7 +305,6 @@ eth_dev_info(struct rte_eth_dev *dev,
>  	dev_info->min_rx_bufsize = 0;
>  	dev_info->reta_size = internals->reta_size;
>  	dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_CRC_STRIP;
>  }
>
>  static int
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
> index 0f3d5d673..71843c63a 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -281,14 +281,6 @@ octeontx_dev_configure(struct rte_eth_dev *dev)
>  		return -EINVAL;
>  	}
>
> -	/* KEEP_CRC offload flag is not supported by PMD
> -	 * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
> -	 */
> -	if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
> -		PMD_INIT_LOG(NOTICE, "can't disable hw crc strip");
> -		rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> -	}
> -
>  	if (!(txmode->offloads & DEV_TX_OFFLOAD_MT_LOCKFREE)) {
>  		PMD_INIT_LOG(NOTICE, "cant disable lockfree tx");
>  		txmode->offloads |= DEV_TX_OFFLOAD_MT_LOCKFREE;
> diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h
> index 14f169692..920f6f89b 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.h
> +++ b/drivers/net/octeontx/octeontx_ethdev.h
> @@ -28,8 +28,7 @@
>  #define OCTEONTX_MAX_BGX_PORTS			4
>  #define OCTEONTX_MAX_LMAC_PER_BGX		4
>
> -#define OCTEONTX_RX_OFFLOADS			(DEV_RX_OFFLOAD_CRC_STRIP \
> -						| DEV_RX_OFFLOAD_CHECKSUM)
> +#define OCTEONTX_RX_OFFLOADS			DEV_RX_OFFLOAD_CHECKSUM
>  #define OCTEONTX_TX_OFFLOADS			DEV_TX_OFFLOAD_MT_LOCKFREE
>
>  static inline struct octeontx_nic *
> diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
> index e8810a171..a015a9d48 100644
> --- a/drivers/net/pcap/rte_eth_pcap.c
> +++ b/drivers/net/pcap/rte_eth_pcap.c
> @@ -553,7 +553,6 @@ eth_dev_info(struct rte_eth_dev *dev,
>  	dev_info->max_rx_queues = dev->data->nb_rx_queues;
>  	dev_info->max_tx_queues = dev->data->nb_tx_queues;
>  	dev_info->min_rx_bufsize = 0;
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_CRC_STRIP;
>  }
>
>  static int
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index df52ea928..7bb52b157 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -1554,7 +1554,6 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
>  				     DEV_RX_OFFLOAD_TCP_CKSUM	|
>  				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
>  				     DEV_RX_OFFLOAD_TCP_LRO	|
> -				     DEV_RX_OFFLOAD_CRC_STRIP	|
>  				     DEV_RX_OFFLOAD_KEEP_CRC    |
>  				     DEV_RX_OFFLOAD_SCATTER	|
>  				     DEV_RX_OFFLOAD_JUMBO_FRAME |
> diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
> index 791deb0bb..bfe2f1780 100644
> --- a/drivers/net/ring/rte_eth_ring.c
> +++ b/drivers/net/ring/rte_eth_ring.c
> @@ -164,7 +164,6 @@ eth_dev_info(struct rte_eth_dev *dev,
>  	dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues;
>  	dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues;
>  	dev_info->min_rx_bufsize = 0;
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_CRC_STRIP;
>  }
>
>  static int
> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index d8503e201..acfd3b51c 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -792,7 +792,6 @@ sfc_rx_get_dev_offload_caps(struct sfc_adapter *sa)
>  	uint64_t caps = 0;
>
>  	caps |= DEV_RX_OFFLOAD_JUMBO_FRAME;
> -	caps |= DEV_RX_OFFLOAD_CRC_STRIP;
>
>  	if (sa->dp_rx->features & SFC_DP_RX_FEAT_CHECKSUM) {
>  		caps |= DEV_RX_OFFLOAD_IPV4_CKSUM;
> @@ -1439,14 +1438,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
>  		rc = EINVAL;
>  	}
>
> -	/* KEEP_CRC offload flag is not supported by PMD
> -	 * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
> -	 */
> -	if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
> -		sfc_warn(sa, "FCS stripping cannot be disabled - always on");
> -		rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> -	}
> -
>  	/*
>  	 * Requested offloads are validated against supported by ethdev,
>  	 * so unsupported offloads cannot be added as the result of
> diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
> index 30fb3952a..41c3a9b3e 100644
> --- a/drivers/net/softnic/rte_eth_softnic.c
> +++ b/drivers/net/softnic/rte_eth_softnic.c
> @@ -73,7 +73,6 @@ static const struct rte_eth_dev_info pmd_dev_info = {
>  		.nb_min = 0,
>  		.nb_align = 1,
>  	},
> -	.rx_offload_capa = DEV_RX_OFFLOAD_CRC_STRIP,
>  };
>
>  static int pmd_softnic_logtype;
> diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
> index 1d20cb51b..8f92e72f2 100644
> --- a/drivers/net/szedata2/rte_eth_szedata2.c
> +++ b/drivers/net/szedata2/rte_eth_szedata2.c
> @@ -1056,8 +1056,7 @@ eth_dev_info(struct rte_eth_dev *dev,
>  	dev_info->max_rx_queues = internals->max_rx_queues;
>  	dev_info->max_tx_queues = internals->max_tx_queues;
>  	dev_info->min_rx_bufsize = 0;
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_SCATTER |
> -				    DEV_RX_OFFLOAD_CRC_STRIP;
> +	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_SCATTER;
>  	dev_info->tx_offload_capa = 0;
>  	dev_info->rx_queue_offload_capa = 0;
>  	dev_info->tx_queue_offload_capa = 0;
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index feb92b48e..ad5ae988b 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -305,8 +305,7 @@ tap_rx_offload_get_queue_capa(void)
>  	return DEV_RX_OFFLOAD_SCATTER |
>  	       DEV_RX_OFFLOAD_IPV4_CKSUM |
>  	       DEV_RX_OFFLOAD_UDP_CKSUM |
> -	       DEV_RX_OFFLOAD_TCP_CKSUM |
> -	       DEV_RX_OFFLOAD_CRC_STRIP;
> +	       DEV_RX_OFFLOAD_TCP_CKSUM;
>  }
>
>  /* Callback to handle the rx burst of packets to the correct interface and
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index a55c3ca66..879d88998 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -1431,7 +1431,6 @@ nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  	dev_info->default_rxconf = (struct rte_eth_rxconf) {
>  		.rx_free_thresh = NICVF_DEFAULT_RX_FREE_THRESH,
>  		.rx_drop_en = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	};
>
>  	dev_info->default_txconf = (struct rte_eth_txconf) {
> @@ -1916,14 +1915,6 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
>  		return -EINVAL;
>  	}
>
> -	/* KEEP_CRC offload flag is not supported by PMD
> -	 * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
> -	 */
> -	if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
> -		PMD_INIT_LOG(NOTICE, "Can't disable hw crc strip");
> -		rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
> -	}
> -
>  	if (txmode->mq_mode) {
>  		PMD_INIT_LOG(INFO, "Tx mq_mode DCB or VMDq not supported");
>  		return -EINVAL;
> diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
> index ae440fef2..c0bfbf848 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.h
> +++ b/drivers/net/thunderx/nicvf_ethdev.h
> @@ -40,7 +40,6 @@
>  #define NICVF_RX_OFFLOAD_CAPA ( \
>  	DEV_RX_OFFLOAD_CHECKSUM    | \
>  	DEV_RX_OFFLOAD_VLAN_STRIP  | \
> -	DEV_RX_OFFLOAD_CRC_STRIP   | \
>  	DEV_RX_OFFLOAD_JUMBO_FRAME | \
>  	DEV_RX_OFFLOAD_SCATTER)
>
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index e58f32211..aa6052221 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -1070,8 +1070,7 @@ eth_dev_info(struct rte_eth_dev *dev,
>
>  	dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS |
>  				DEV_TX_OFFLOAD_VLAN_INSERT;
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
> -				    DEV_RX_OFFLOAD_CRC_STRIP;
> +	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
>  }
>
>  static int
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 614357da7..b81df0a99 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -2166,8 +2166,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  	dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
>
>  	host_features = VTPCI_OPS(hw)->get_features(hw);
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
> -				    DEV_RX_OFFLOAD_CRC_STRIP;
> +	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
>  	if (host_features & (1ULL << VIRTIO_NET_F_GUEST_CSUM)) {
>  		dev_info->rx_offload_capa |=
>  			DEV_RX_OFFLOAD_TCP_CKSUM |
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index 2613cd135..f1596ab19 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -57,8 +57,7 @@
>  	 DEV_RX_OFFLOAD_UDP_CKSUM |	\
>  	 DEV_RX_OFFLOAD_TCP_CKSUM |	\
>  	 DEV_RX_OFFLOAD_TCP_LRO |	\
> -	 DEV_RX_OFFLOAD_JUMBO_FRAME |   \
> -	 DEV_RX_OFFLOAD_CRC_STRIP)
> +	 DEV_RX_OFFLOAD_JUMBO_FRAME)
>
>  static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
>  static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
> diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
> index 045a190b9..d68c06aef 100644
> --- a/examples/bbdev_app/main.c
> +++ b/examples/bbdev_app/main.c
> @@ -64,7 +64,6 @@ static const struct rte_eth_conf port_conf = {
>  		.mq_mode = ETH_MQ_RX_NONE,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/bond/main.c b/examples/bond/main.c
> index 23d0981ab..b282e68ba 100644
> --- a/examples/bond/main.c
> +++ b/examples/bond/main.c
> @@ -122,7 +122,6 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode = ETH_MQ_RX_NONE,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
> index 440422bc8..4180a8689 100644
> --- a/examples/exception_path/main.c
> +++ b/examples/exception_path/main.c
> @@ -87,9 +87,6 @@
>
>  /* Options for configuring ethernet port */
>  static struct rte_eth_conf port_conf = {
> -	.rxmode = {
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> -	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
>  	},
> diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
> index ce91e8a6f..b3f85b563 100644
> --- a/examples/flow_filtering/main.c
> +++ b/examples/flow_filtering/main.c
> @@ -121,7 +121,6 @@ init_port(void)
>  	struct rte_eth_conf port_conf = {
>  		.rxmode = {
>  			.split_hdr_size = 0,
> -			.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  		},
>  		.txmode = {
>  			.offloads =
> diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
> index 5306d7672..17a877da2 100644
> --- a/examples/ip_fragmentation/main.c
> +++ b/examples/ip_fragmentation/main.c
> @@ -141,8 +141,7 @@ static struct rte_eth_conf port_conf = {
>  		.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
>  		.split_hdr_size = 0,
>  		.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> -			     DEV_RX_OFFLOAD_JUMBO_FRAME |
> -			     DEV_RX_OFFLOAD_CRC_STRIP),
> +			     DEV_RX_OFFLOAD_JUMBO_FRAME),
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
> index 392a890fb..787eb866a 100644
> --- a/examples/ip_pipeline/link.c
> +++ b/examples/ip_pipeline/link.c
> @@ -48,7 +48,6 @@ static struct rte_eth_conf port_conf_default = {
>  		.mq_mode = ETH_MQ_RX_NONE,
>  		.max_rx_pkt_len = 9000, /* Jumbo frame max packet len */
>  		.split_hdr_size = 0, /* Header split buffer size */
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
> index b830f67a5..17b55d4c7 100644
> --- a/examples/ip_reassembly/main.c
> +++ b/examples/ip_reassembly/main.c
> @@ -165,8 +165,7 @@ static struct rte_eth_conf port_conf = {
>  		.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
>  		.split_hdr_size = 0,
>  		.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> -			     DEV_RX_OFFLOAD_JUMBO_FRAME |
> -			     DEV_RX_OFFLOAD_CRC_STRIP),
> +			     DEV_RX_OFFLOAD_JUMBO_FRAME),
>  	},
>  	.rx_adv_conf = {
>  			.rss_conf = {
> diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
> index b45b87bde..020424334 100644
> --- a/examples/ipsec-secgw/ipsec-secgw.c
> +++ b/examples/ipsec-secgw/ipsec-secgw.c
> @@ -197,8 +197,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode	= ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CHECKSUM |
> -			    DEV_RX_OFFLOAD_CRC_STRIP,
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
> index 331c32e71..6530d4830 100644
> --- a/examples/ipv4_multicast/main.c
> +++ b/examples/ipv4_multicast/main.c
> @@ -109,8 +109,7 @@ static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_JUMBO_FRAME |
> -			     DEV_RX_OFFLOAD_CRC_STRIP),
> +		.offloads = DEV_RX_OFFLOAD_JUMBO_FRAME,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/kni/main.c b/examples/kni/main.c
> index 81336087d..80c401c51 100644
> --- a/examples/kni/main.c
> +++ b/examples/kni/main.c
> @@ -94,9 +94,6 @@ static struct kni_port_params *kni_port_params_array[RTE_MAX_ETHPORTS];
>
>  /* Options for configuring ethernet port */
>  static struct rte_eth_conf port_conf = {
> -	.rxmode = {
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> -	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
>  	},
> diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
> index 6061b7511..f12fd266e 100644
> --- a/examples/l2fwd-crypto/main.c
> +++ b/examples/l2fwd-crypto/main.c
> @@ -213,7 +213,6 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode = ETH_MQ_RX_NONE,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
> index af5423382..a4d28e178 100644
> --- a/examples/l2fwd-jobstats/main.c
> +++ b/examples/l2fwd-jobstats/main.c
> @@ -90,7 +90,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
>  static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
> index 2d8b4d1c6..0bf2b5336 100644
> --- a/examples/l2fwd-keepalive/main.c
> +++ b/examples/l2fwd-keepalive/main.c
> @@ -81,7 +81,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
>  static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
> index 9bb4c5bc4..6c23215a5 100644
> --- a/examples/l2fwd/main.c
> +++ b/examples/l2fwd/main.c
> @@ -82,7 +82,6 @@ static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
>  static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
> index 7c063a8d0..a322ce4f2 100644
> --- a/examples/l3fwd-acl/main.c
> +++ b/examples/l3fwd-acl/main.c
> @@ -127,8 +127,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode	= ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> -			     DEV_RX_OFFLOAD_CHECKSUM),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index d15cd520e..68527d26f 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -180,8 +180,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode        = ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> -			     DEV_RX_OFFLOAD_CHECKSUM),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
> index 5edd91a78..41137f978 100644
> --- a/examples/l3fwd-vf/main.c
> +++ b/examples/l3fwd-vf/main.c
> @@ -161,8 +161,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode	= ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> -			     DEV_RX_OFFLOAD_CHECKSUM),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
> index ab019b9e4..e4b99efe0 100644
> --- a/examples/l3fwd/main.c
> +++ b/examples/l3fwd/main.c
> @@ -120,8 +120,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode = ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> -			     DEV_RX_OFFLOAD_CHECKSUM),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
> index 3b732076b..f3346d23b 100644
> --- a/examples/link_status_interrupt/main.c
> +++ b/examples/link_status_interrupt/main.c
> @@ -79,7 +79,6 @@ struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
>  static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
> index f2045f235..3ab7d0211 100644
> --- a/examples/load_balancer/init.c
> +++ b/examples/load_balancer/init.c
> @@ -45,8 +45,7 @@ static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.mq_mode	= ETH_MQ_RX_RSS,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> -			     DEV_RX_OFFLOAD_CRC_STRIP),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
> index c6c6a537f..c310e942b 100644
> --- a/examples/multi_process/symmetric_mp/main.c
> +++ b/examples/multi_process/symmetric_mp/main.c
> @@ -178,8 +178,7 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
>  			.rxmode = {
>  				.mq_mode	= ETH_MQ_RX_RSS,
>  				.split_hdr_size = 0,
> -				.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> -					     DEV_RX_OFFLOAD_CRC_STRIP),
> +				.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  			},
>  			.rx_adv_conf = {
>  				.rss_conf = {
> diff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c
> index 7afca28cd..216e0105a 100644
> --- a/examples/netmap_compat/bridge/bridge.c
> +++ b/examples/netmap_compat/bridge/bridge.c
> @@ -26,7 +26,6 @@
>  struct rte_eth_conf eth_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
> index 5392fcea8..50fd1b00a 100644
> --- a/examples/performance-thread/l3fwd-thread/main.c
> +++ b/examples/performance-thread/l3fwd-thread/main.c
> @@ -306,8 +306,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode = ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> -			     DEV_RX_OFFLOAD_CRC_STRIP),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
> index 5cf4e9dfa..9b0112449 100644
> --- a/examples/qos_meter/main.c
> +++ b/examples/qos_meter/main.c
> @@ -56,8 +56,7 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode	= ETH_MQ_RX_RSS,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = (DEV_RX_OFFLOAD_CHECKSUM |
> -			     DEV_RX_OFFLOAD_CRC_STRIP),
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
> index 94cbb26f8..37c2b95fd 100644
> --- a/examples/qos_sched/init.c
> +++ b/examples/qos_sched/init.c
> @@ -59,7 +59,6 @@ static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_DCB_NONE,
> diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
> index 19164385a..5a0f64f45 100644
> --- a/examples/quota_watermark/qw/init.c
> +++ b/examples/quota_watermark/qw/init.c
> @@ -24,7 +24,6 @@
>  static struct rte_eth_conf port_conf = {
>  		.rxmode = {
>  			.split_hdr_size = 0,
> -			.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  		},
>  		.txmode = {
>  			.mq_mode = ETH_DCB_NONE,
> diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
> index b99ab97d3..ad7fbe9c6 100644
> --- a/examples/tep_termination/vxlan_setup.c
> +++ b/examples/tep_termination/vxlan_setup.c
> @@ -69,7 +69,6 @@ uint8_t tep_filter_type[] = {RTE_TUNNEL_FILTER_IMAC_TENID,
>  static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 2175c1186..97d196479 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -121,8 +121,7 @@ static struct rte_eth_conf vmdq_conf_default = {
>  		 * this fixes bug of ipv4 forwarding in guest can't
>  		 * forward pakets from one virtio dev to another virtio dev.
>  		 */
> -		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP |
> -			     DEV_RX_OFFLOAD_VLAN_STRIP),
> +		.offloads = DEV_RX_OFFLOAD_VLAN_STRIP,
>  	},
>
>  	.txmode = {
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 3f8de9341..04ee149f9 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -122,7 +122,6 @@ static const struct {
>  	RTE_RX_OFFLOAD_BIT2STR(VLAN_FILTER),
>  	RTE_RX_OFFLOAD_BIT2STR(VLAN_EXTEND),
>  	RTE_RX_OFFLOAD_BIT2STR(JUMBO_FRAME),
> -	RTE_RX_OFFLOAD_BIT2STR(CRC_STRIP),
>  	RTE_RX_OFFLOAD_BIT2STR(SCATTER),
>  	RTE_RX_OFFLOAD_BIT2STR(TIMESTAMP),
>  	RTE_RX_OFFLOAD_BIT2STR(SECURITY),
> @@ -1147,14 +1146,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
>  		return -EINVAL;
>  	}
>
> -	if ((local_conf.rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP) &&
> -			(local_conf.rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC)) {
> -		RTE_ETHDEV_LOG(ERR,
> -			"Port id=%u not allowed to set both CRC STRIP and KEEP CRC offload flags\n",
> -			port_id);
> -		return -EINVAL;
> -	}
> -
>  	/* Check that device supports requested rss hash functions. */
>  	if ((dev_info.flow_type_rss_offloads |
>  	     dev_conf->rx_adv_conf.rss_conf.rss_hf) !=
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index fa2812bca..44b4fb33f 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -890,16 +890,11 @@ struct rte_eth_conf {
>  #define DEV_RX_OFFLOAD_VLAN_FILTER	0x00000200
>  #define DEV_RX_OFFLOAD_VLAN_EXTEND	0x00000400
>  #define DEV_RX_OFFLOAD_JUMBO_FRAME	0x00000800
> -#define DEV_RX_OFFLOAD_CRC_STRIP	0x00001000
>  #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
> +
>  #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
>  				 DEV_RX_OFFLOAD_UDP_CKSUM | \
>  				 DEV_RX_OFFLOAD_TCP_CKSUM)
> diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
> index c6d9bc1a3..f158462a0 100644
> --- a/lib/librte_ethdev/rte_ethdev_driver.h
> +++ b/lib/librte_ethdev/rte_ethdev_driver.h
> @@ -324,32 +324,6 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
>  int __rte_experimental
>  rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
>
> -/**
> - * PMD helper function to check if keeping CRC is requested
> - *
> - * @note
> - * When CRC_STRIP offload flag is removed and default behavior switch to
> - * strip CRC, as planned, this helper function is not that useful and will be
> - * removed. In PMDs this function will be replaced with check:
> - *   if (offloads & DEV_RX_OFFLOAD_KEEP_CRC)
> - *
> - * @param rx_offloads
> - *   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_must_keep_crc(uint64_t rx_offloads)
> -{
> -	if (rx_offloads & DEV_RX_OFFLOAD_CRC_STRIP)
> -		return 0;
> -
> -	/* no KEEP_CRC or CRC_STRIP offload flags means keep CRC */
> -	return 1;
> -}
> -
>  #ifdef __cplusplus
>  }
>  #endif
> diff --git a/test/test-pipeline/init.c b/test/test-pipeline/init.c
> index f33216c90..b75688a87 100644
> --- a/test/test-pipeline/init.c
> +++ b/test/test-pipeline/init.c
> @@ -70,7 +70,7 @@ struct app_params app = {
>  static struct rte_eth_conf port_conf = {
>  	.rxmode = {
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CHECKSUM | DEV_RX_OFFLOAD_CRC_STRIP,
> +		.offloads = DEV_RX_OFFLOAD_CHECKSUM,
>  	},
>  	.rx_adv_conf = {
>  		.rss_conf = {
> diff --git a/test/test/test_kni.c b/test/test/test_kni.c
> index 56c98513a..cf64c0b27 100644
> --- a/test/test/test_kni.c
> +++ b/test/test/test_kni.c
> @@ -70,9 +70,6 @@ static const struct rte_eth_txconf tx_conf = {
>  };
>
>  static const struct rte_eth_conf port_conf = {
> -	.rxmode = {
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
> -	},
>  	.txmode = {
>  		.mq_mode = ETH_DCB_NONE,
>  	},
> diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c
> index 9163f6313..e539f078d 100644
> --- a/test/test/test_link_bonding_mode4.c
> +++ b/test/test/test_link_bonding_mode4.c
> @@ -110,7 +110,6 @@ static struct rte_eth_conf default_pmd_conf = {
>  		.mq_mode = ETH_MQ_RX_NONE,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c
> index 4549965fc..f5095c87d 100644
> --- a/test/test/test_pmd_perf.c
> +++ b/test/test/test_pmd_perf.c
> @@ -65,7 +65,6 @@ static struct rte_eth_conf port_conf = {
>  		.mq_mode = ETH_MQ_RX_NONE,
>  		.max_rx_pkt_len = ETHER_MAX_LEN,
>  		.split_hdr_size = 0,
> -		.offloads = DEV_RX_OFFLOAD_CRC_STRIP,
>  	},
>  	.txmode = {
>  		.mq_mode = ETH_MQ_TX_NONE,
> diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
> index 591b30989..f8ddc2db8 100644
> --- a/test/test/virtual_pmd.c
> +++ b/test/test/virtual_pmd.c
> @@ -91,7 +91,6 @@ virtual_ethdev_info_get(struct rte_eth_dev *dev __rte_unused,
>  	dev_info->max_tx_queues = (uint16_t)512;
>
>  	dev_info->min_rx_bufsize = 0;
> -	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_CRC_STRIP;
>  }
>
>  static int
> --
> 2.17.1
>

--
- Tomasz Duszyński

  parent reply	other threads:[~2018-09-04  6:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 14:45 Ferruh Yigit
2018-09-03 13:59 ` Andrew Rybchenko
2018-09-04  5:13 ` Shahaf Shuler
2018-09-04  5:17 ` Shahaf Shuler
2018-09-04  5:54   ` Andrew Rybchenko
2018-09-04  8:06     ` Ferruh Yigit
2018-09-04  6:29 ` Tomasz Duszynski [this message]
2018-09-04 10:12 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2018-09-04 10:02   ` Shahaf Shuler
2018-09-14 11:37     ` Ferruh Yigit
2018-09-19  7:34       ` David Marchand
2018-09-19 18:04         ` Ferruh Yigit
2018-09-10  7:13   ` Maxime Coquelin
2018-09-10 10:40   ` Jan Remeš
2018-09-10 11:34   ` Jerin Jacob
2018-09-18 13:05     ` Legacy, Allain
2018-09-11  8:05   ` Hyong Youb Kim
2018-09-24 17:31   ` [dpdk-dev] [PATCH] doc: announce CRC strip changes in release notes Ferruh Yigit
2018-09-24 17:01     ` Thomas Monjalon
2018-09-24 17:12     ` David Marchand
2018-09-25 15: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=20180904062902.GA13602@sh \
    --to=tdu@semihalf.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=akhil.goyal@nxp.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=allain.legacy@windriver.com \
    --cc=amr.mokhtar@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chas3@att.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.hunt@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=dima@marvell.com \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=haiyangz@microsoft.com \
    --cc=harish.patil@cavium.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hyonkim@cisco.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=johndale@cisco.com \
    --cc=keith.wiles@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=kys@microsoft.com \
    --cc=linville@tuxdriver.com \
    --cc=maciej.czekaj@caviumnetworks.com \
    --cc=marko.kovacevic@intel.com \
    --cc=matan@mellanox.com \
    --cc=matt.peters@windriver.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mtetsuyah@gmail.com \
    --cc=nhorman@tuxdriver.com \
    --cc=nsamsono@marvell.com \
    --cc=orika@mellanox.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=radu.nicolau@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rasesh.mody@cavium.com \
    --cc=ravi1.kumar@amd.com \
    --cc=remes@netcope.com \
    --cc=remy.horton@intel.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=shahafs@mellanox.com \
    --cc=shahed.shaikh@cavium.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=sthemmin@microsoft.com \
    --cc=thomas@monjalon.net \
    --cc=tiwei.bie@intel.com \
    --cc=tomasz.kantecki@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xiaoyun.li@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).