ethdev: make default behavior CRC strip on Rx
Subsystems (2)
PATCH 1/1 ethdev: make default behavior CRC strip on Rx
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()
--- app/test-eventdev/test_perf_common.c | 1 - app/test-eventdev/test_pipeline_common.c | 1 - app/test-pmd/cmdline.c | 2 -- app/test-pmd/parameters.c | 4 +-- app/test-pmd/testpmd.c | 5 ---- doc/guides/nics/features.rst | 3 ++- doc/guides/nics/fm10k.rst | 3 +-- doc/guides/rel_notes/deprecation.rst | 6 ----- doc/guides/sample_app_ug/flow_filtering.rst | 2 -- doc/guides/sample_app_ug/link_status_intr.rst | 1 - drivers/net/af_packet/rte_eth_af_packet.c | 1 - drivers/net/avf/avf_ethdev.c | 1 - drivers/net/avp/avp_ethdev.c | 1 - drivers/net/axgbe/axgbe_ethdev.c | 1 - drivers/net/axgbe/axgbe_rxtx.c | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 1 - drivers/net/bnxt/bnxt_rxq.c | 6 +++-- drivers/net/cxgbe/cxgbe_ethdev.c | 12 --------- drivers/net/dpaa/dpaa_ethdev.c | 1 - drivers/net/dpaa2/dpaa2_ethdev.c | 1 - drivers/net/e1000/em_rxtx.c | 7 +++-- drivers/net/e1000/igb_ethdev.c | 8 +++--- drivers/net/e1000/igb_rxtx.c | 7 +++-- drivers/net/enic/enic_res.c | 1 - drivers/net/failsafe/failsafe_ops.c | 2 -- drivers/net/fm10k/fm10k_ethdev.c | 7 ----- drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev_vf.c | 3 +-- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++--- drivers/net/ixgbe/ixgbe_ipsec.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 15 ++++++----- drivers/net/kni/rte_eth_kni.c | 1 - drivers/net/mlx4/mlx4_rxq.c | 3 +-- drivers/net/mlx5/mlx5_rxq.c | 3 +-- drivers/net/mvpp2/mrvl_ethdev.c | 10 ------- drivers/net/netvsc/hn_ethdev.c | 3 +-- drivers/net/netvsc/hn_rndis.c | 3 +-- drivers/net/nfp/nfp_net.c | 9 +------ drivers/net/null/rte_eth_null.c | 1 - drivers/net/octeontx/octeontx_ethdev.c | 8 ------ drivers/net/octeontx/octeontx_ethdev.h | 3 +-- drivers/net/pcap/rte_eth_pcap.c | 1 - drivers/net/qede/qede_ethdev.c | 1 - drivers/net/ring/rte_eth_ring.c | 1 - drivers/net/sfc/sfc_rx.c | 9 ------- drivers/net/softnic/rte_eth_softnic.c | 1 - drivers/net/szedata2/rte_eth_szedata2.c | 3 +-- drivers/net/tap/rte_eth_tap.c | 3 +-- drivers/net/thunderx/nicvf_ethdev.c | 9 ------- drivers/net/thunderx/nicvf_ethdev.h | 1 - drivers/net/vhost/rte_eth_vhost.c | 3 +-- drivers/net/virtio/virtio_ethdev.c | 3 +-- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 +-- examples/bbdev_app/main.c | 1 - examples/bond/main.c | 1 - examples/exception_path/main.c | 3 --- examples/flow_filtering/main.c | 1 - examples/ip_fragmentation/main.c | 3 +-- examples/ip_pipeline/link.c | 1 - examples/ip_reassembly/main.c | 3 +-- examples/ipsec-secgw/ipsec-secgw.c | 3 +-- examples/ipv4_multicast/main.c | 3 +-- examples/kni/main.c | 3 --- examples/l2fwd-crypto/main.c | 1 - examples/l2fwd-jobstats/main.c | 1 - examples/l2fwd-keepalive/main.c | 1 - examples/l2fwd/main.c | 1 - examples/l3fwd-acl/main.c | 3 +-- examples/l3fwd-power/main.c | 3 +-- examples/l3fwd-vf/main.c | 3 +-- examples/l3fwd/main.c | 3 +-- examples/link_status_interrupt/main.c | 1 - examples/load_balancer/init.c | 3 +-- examples/multi_process/symmetric_mp/main.c | 3 +-- examples/netmap_compat/bridge/bridge.c | 1 - .../performance-thread/l3fwd-thread/main.c | 3 +-- examples/qos_meter/main.c | 3 +-- examples/qos_sched/init.c | 1 - examples/quota_watermark/qw/init.c | 1 - examples/tep_termination/vxlan_setup.c | 1 - examples/vhost/main.c | 3 +-- lib/librte_ethdev/rte_ethdev.c | 9 ------- lib/librte_ethdev/rte_ethdev.h | 7 +---- lib/librte_ethdev/rte_ethdev_driver.h | 26 ------------------- test/test-pipeline/init.c | 2 +- test/test/test_kni.c | 3 --- test/test/test_link_bonding_mode4.c | 1 - test/test/test_pmd_perf.c | 1 - test/test/virtual_pmd.c | 1 - 90 files changed, 60 insertions(+), 248 deletions(-)
app/test-eventdev/test_perf_common.c +0 -1
@@ -680,7 +680,6 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = ETHER_MAX_LEN, .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .rx_adv_conf = { .rss_conf = {
app/test-eventdev/test_pipeline_common.c +0 -1
@@ -222,7 +222,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) .rxmode = { .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = ETHER_MAX_LEN, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .rx_adv_conf = { .rss_conf = {
app/test-pmd/cmdline.c +0 -2
@@ -1898,11 +1898,9 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, rx_offloads = port->dev_conf.rxmode.offloads;if (!strcmp (res->name,"crc-strip" )) {if (!strcmp (res->value,"on" )) { - rx_offloads |=DEV_RX_OFFLOAD_CRC_STRIP ; rx_offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC ; }else if (!strcmp (res->value,"off" )) { rx_offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; - rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; }else {printf ("Unknown parameter\n" );return ;
app/test-pmd/parameters.c +1 -3
@@ -878,10 +878,8 @@ launch_args_parse(int argc, char** argv) " must be >= 0\n", n); }#endif -if (!strcmp (lgopts[opt_idx].name,"disable-crc-strip" )) { - rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; +if (!strcmp (lgopts[opt_idx].name,"disable-crc-strip" )) rx_offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; - }if (!strcmp (lgopts[opt_idx].name,"enable-lro" )) rx_offloads |=DEV_RX_OFFLOAD_TCP_LRO ;if (!strcmp (lgopts[opt_idx].name,"enable-scatter" ))
app/test-pmd/testpmd.c +0 -5
@@ -334,7 +334,6 @@ lcoreid_t latencystats_lcore_id = -1;*/ struct rte_eth_rxmode rx_mode = { .max_rx_pkt_len =ETHER_MAX_LEN ,/**< Default maximum frame length. */ - .offloads =DEV_RX_OFFLOAD_CRC_STRIP , };struct rte_eth_txmode tx_mode = {
@@ -739,10 +738,6 @@ init_config(void) port->dev_conf.rxmode = rx_mode;rte_eth_dev_info_get (pid, &port->dev_info); -if (!(port->dev_info.rx_offload_capa & -DEV_RX_OFFLOAD_CRC_STRIP )) - port->dev_conf.rxmode.offloads &= - ~DEV_RX_OFFLOAD_CRC_STRIP ;if (!(port->dev_info.tx_offload_capa &DEV_TX_OFFLOAD_MBUF_FAST_FREE )) port->dev_conf.txmode.offloads &=
doc/guides/nics/features.rst +2 -1
@@ -513,8 +513,9 @@ CRC offload ----------- Supports CRC stripping by hardware. +A PMD assumed to support CRC stripping by default. PMD should advertise if it supports keeping CRC. -* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_CRC_STRIP,DEV_RX_OFFLOAD_KEEP_CRC``. +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_KEEP_CRC``. .. _nic_features_vlan_offload:
doc/guides/nics/fm10k.rst +1 -2
@@ -139,8 +139,7 @@ CRC striping ~~~~~~~~~~~~ The FM10000 family of NICs strip the CRC for every packets coming into the -host interface. So, CRC will be stripped even when ``DEV_RX_OFFLOAD_CRC_STRIP`` -in ``rxmode.offloads`` is NOT set in ``struct rte_eth_conf``. +host interface. So, keeping CRC is not supported. Maximum packet length ~~~~~~~~~~~~~~~~~~~~~
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -56,12 +56,6 @@ Deprecation Notices experimental API ``rte_pktmbuf_attach_extbuf()`` is used. Removal of the macro is to fix this semantic inconsistency. -* ethdev: In v18.11 ``DEV_RX_OFFLOAD_CRC_STRIP`` offload flag will be removed, default - behavior without any flag will be changed to CRC strip. - To keep CRC ``DEV_RX_OFFLOAD_KEEP_CRC`` flag is required. - ``KEEP_CRC``: Keep CRC in packet - No flag: Strip CRC from packet - * ethdev: the legacy filter API, including ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
doc/guides/sample_app_ug/flow_filtering.rst +0 -2
@@ -139,7 +139,6 @@ application is shown below: struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .offloads =
@@ -215,7 +214,6 @@ The Ethernet port is configured with default settings using the struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .offloads =
doc/guides/sample_app_ug/link_status_intr.rst +0 -1
@@ -137,7 +137,6 @@ The global configuration is stored in a static structure: static const struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = {}, .intr_conf = {
drivers/net/af_packet/rte_eth_af_packet.c +0 -1
@@ -305,7 +305,6 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = (uint16_t )internals->nb_queues; dev_info->max_tx_queues = (uint16_t )internals->nb_queues; dev_info->min_rx_bufsize =0 ; - dev_info->rx_offload_capa =DEV_RX_OFFLOAD_CRC_STRIP ; } static int
drivers/net/avf/avf_ethdev.c +0 -1
@@ -523,7 +523,6 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME |
drivers/net/avp/avp_ethdev.c +0 -1
@@ -2170,7 +2170,6 @@ avp_dev_info_get(struct rte_eth_dev *eth_dev, dev_info->rx_offload_capa =DEV_RX_OFFLOAD_VLAN_STRIP ; dev_info->tx_offload_capa =DEV_TX_OFFLOAD_VLAN_INSERT ; } - dev_info->rx_offload_capa |=DEV_RX_OFFLOAD_CRC_STRIP ; } static int
drivers/net/axgbe/axgbe_ethdev.c +0 -1
@@ -364,7 +364,6 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_IPV4_CKSUM |DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC ; dev_info->tx_offload_capa =
drivers/net/axgbe/axgbe_rxtx.c +1 -1
@@ -74,7 +74,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, (DMA_CH_INC * rxq->queue_id)); rxq->dma_tail_reg = (volatile uint32_t *)((uint8_t *)rxq->dma_regs +DMA_CH_RDTR_LO ); -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
drivers/net/bnxt/bnxt_ethdev.c +0 -1
@@ -149,7 +149,6 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {DEV_RX_OFFLOAD_TCP_CKSUM | \DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \DEV_RX_OFFLOAD_JUMBO_FRAME | \ -DEV_RX_OFFLOAD_CRC_STRIP | \DEV_RX_OFFLOAD_KEEP_CRC | \ DEV_RX_OFFLOAD_TCP_LRO)
drivers/net/bnxt/bnxt_rxq.c +4 -2
@@ -331,8 +331,10 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, rxq->queue_id = queue_idx; rxq->port_id = eth_dev->data->port_id; - rxq->crc_len =rte_eth_dev_must_keep_crc (rx_offloads) ? -ETHER_CRC_LEN :0 ; +if (rx_offloads |DEV_RX_OFFLOAD_KEEP_CRC ) + rxq->crc_len =ETHER_CRC_LEN ; +else + rxq->crc_len =0 ; eth_dev->data->rx_queues[queue_idx] = rxq;/* Allocate RX ring hardware descriptors */
drivers/net/cxgbe/cxgbe_ethdev.c +0 -12
@@ -66,7 +66,6 @@ DEV_TX_OFFLOAD_TCP_TSO)#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP |\ - DEV_RX_OFFLOAD_CRC_STRIP |\ DEV_RX_OFFLOAD_IPV4_CKSUM |\ DEV_RX_OFFLOAD_JUMBO_FRAME |\ DEV_RX_OFFLOAD_UDP_CKSUM |\
@@ -413,20 +412,9 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev) {struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);struct adapter *adapter = pi->adapter; -uint64_t configured_offloads;int err;CXGBE_FUNC_TRACE (); - configured_offloads = eth_dev->data->dev_conf.rxmode.offloads; - -/* 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 (configured_offloads)) { -dev_info (adapter,"can't disable hw crc strip\n" ); - eth_dev->data->dev_conf.rxmode.offloads |= -DEV_RX_OFFLOAD_CRC_STRIP ; - }if (!(adapter->flags &FW_QUEUE_BOUND )) { err =setup_sge_fwevtq (adapter);
drivers/net/dpaa/dpaa_ethdev.c +0 -1
@@ -55,7 +55,6 @@ static uint64_t dev_rx_offloads_nodis =DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER ;/* Supported Tx offloads */
drivers/net/dpaa2/dpaa2_ethdev.c +0 -1
@@ -39,7 +39,6 @@ static uint64_t dev_rx_offloads_sup =/* Rx offloads which cannot be disabled */ static uint64_t dev_rx_offloads_nodis = -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER ;/* Supported Tx offloads */
drivers/net/e1000/em_rxtx.c +3 -4
@@ -1363,7 +1363,6 @@ em_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_IPV4_CKSUM |DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER ;if (max_rx_pktlen >ETHER_MAX_LEN )
@@ -1459,7 +1458,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev, rxq->rx_free_thresh = rx_conf->rx_free_thresh; rxq->queue_id = queue_idx; rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -1795,7 +1794,7 @@ eth_em_rx_init(struct rte_eth_dev *dev)* Reset crc_len in case it was changed after queue setup by a * call to configure */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -1877,7 +1876,7 @@ eth_em_rx_init(struct rte_eth_dev *dev) }/* Setup the Receive Control Register. */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rctl &= ~E1000_RCTL_SECRC ;/* Do not Strip Ethernet CRC. */ else rctl |=E1000_RCTL_SECRC ;/* Strip Ethernet CRC. */
drivers/net/e1000/igb_ethdev.c +4 -4
@@ -3197,14 +3197,14 @@ igbvf_dev_configure(struct rte_eth_dev *dev)* Keep the persistent behavior the same as Host PF */ #ifndef RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC -if (rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (conf->rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {PMD_INIT_LOG (NOTICE ,"VF can't disable HW CRC Strip" ); - conf->rxmode.offloads |=DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC ; }#else -if (!rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (!(conf->rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC )) {PMD_INIT_LOG (NOTICE ,"VF can't enable HW CRC Strip" ); - conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; }#endif
drivers/net/e1000/igb_rxtx.c +3 -4
@@ -1638,7 +1638,6 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER ;
@@ -1721,7 +1720,7 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev, rxq->reg_idx = (uint16_t )((RTE_ETH_DEV_SRIOV (dev).active ==0 ) ? queue_idx :RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx + queue_idx); rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -2374,7 +2373,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)* Reset crc_len in case it was changed after queue setup by a * call to configure */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -2506,7 +2505,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)E1000_WRITE_REG (hw,E1000_RXCSUM , rxcsum);/* Setup the Receive Control Register. */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) { +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) { rctl &= ~E1000_RCTL_SECRC ;/* Do not Strip Ethernet CRC. */ /* clear STRCRC bit in all queues */
drivers/net/enic/enic_res.c +0 -1
@@ -195,7 +195,6 @@ int enic_get_vnic_config(struct enic *enic) enic->rx_offload_capa =DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_VLAN_STRIP |DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM |
drivers/net/failsafe/failsafe_ops.c +0 -2
@@ -57,7 +57,6 @@ static struct rte_eth_dev_info default_infos = {DEV_RX_OFFLOAD_VLAN_FILTER |DEV_RX_OFFLOAD_VLAN_EXTEND |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_SECURITY,
@@ -74,7 +73,6 @@ static struct rte_eth_dev_info default_infos = {DEV_RX_OFFLOAD_VLAN_FILTER |DEV_RX_OFFLOAD_VLAN_EXTEND |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_SECURITY,
drivers/net/fm10k/fm10k_ethdev.c +0 -7
@@ -451,12 +451,6 @@ fm10k_dev_configure(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); -/* 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)) -PMD_INIT_LOG (WARNING ,"fm10k always strip CRC" ); -/* multipe queue mode checking */ ret =fm10k_check_mq_mode (dev);if (ret !=0 ) {
@@ -1796,7 +1790,6 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP | DEV_RX_OFFLOAD_HEADER_SPLIT); }
drivers/net/i40e/i40e_ethdev.c +0 -1
@@ -3363,7 +3363,6 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_VLAN_EXTEND | DEV_RX_OFFLOAD_VLAN_FILTER |
drivers/net/i40e/i40e_ethdev_vf.c +1 -2
@@ -1536,7 +1536,7 @@ i40evf_dev_configure(struct rte_eth_dev *dev)/* For non-DPDK PF drivers, VF has no ability to disable HW * CRC strip, and is implicitly enabled by the PF. */ -if (rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (conf->rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) { vf =I40EVF_DEV_PRIVATE_TO_VF (dev->data->dev_private);if ((vf->version_major ==VIRTCHNL_VERSION_MAJOR ) && (vf->version_minor <=VIRTCHNL_VERSION_MINOR )) {
@@ -2180,7 +2180,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME |
drivers/net/i40e/i40e_rxtx.c +1 -1
@@ -1828,7 +1828,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, rxq->queue_id = queue_idx; rxq->reg_idx = reg_idx; rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
drivers/net/ixgbe/ixgbe_ethdev.c +4 -4
@@ -5008,14 +5008,14 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev)* Keep the persistent behavior the same as Host PF */ #ifndef RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC -if (rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (conf->rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {PMD_INIT_LOG (NOTICE ,"VF can't disable HW CRC Strip" ); - conf->rxmode.offloads |=DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC ; }#else -if (!rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (!(conf->rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC )) {PMD_INIT_LOG (NOTICE ,"VF can't enable HW CRC Strip" ); - conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; }#endif
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
@@ -609,7 +609,7 @@ ixgbe_crypto_enable_ipsec(struct rte_eth_dev *dev)PMD_DRV_LOG (ERR ,"RSC and IPsec not supported" );return -1 ; } -if (rte_eth_dev_must_keep_crc (rx_offloads)) { +if (rx_offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {PMD_DRV_LOG (ERR ,"HW CRC strip needs to be enabled for IPsec" );return -1 ; }
drivers/net/ixgbe/ixgbe_rxtx.c +8 -7
@@ -2848,7 +2848,6 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev) offloads =DEV_RX_OFFLOAD_IPV4_CKSUM |DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_SCATTER ;
@@ -2936,7 +2935,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, rxq->reg_idx = (uint16_t )((RTE_ETH_DEV_SRIOV (dev).active ==0 ) ? queue_idx :RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx + queue_idx); rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -4705,7 +4704,7 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)/* RSC global configuration (chapter 4.6.7.2.1 of 82599 Spec) */ -if (rte_eth_dev_must_keep_crc (rx_conf->offloads) && +if ((rx_conf->offloads |DEV_RX_OFFLOAD_KEEP_CRC ) && (rx_conf->offloads &DEV_RX_OFFLOAD_TCP_LRO )) {/* * According to chapter of 4.6.7.2.1 of the Spec Rev.
@@ -4854,7 +4853,7 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)* Configure CRC stripping, if any. */ hlreg0 =IXGBE_READ_REG (hw,IXGBE_HLREG0 ); -if (rte_eth_dev_must_keep_crc (rx_conf->offloads)) +if (rx_conf->offloads |DEV_RX_OFFLOAD_KEEP_CRC ) hlreg0 &= ~IXGBE_HLREG0_RXCRCSTRP ;else hlreg0 |=IXGBE_HLREG0_RXCRCSTRP ;
@@ -4895,8 +4894,10 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)* Reset crc_len in case it was changed after queue setup by a * call to configure. */ - rxq->crc_len =rte_eth_dev_must_keep_crc (rx_conf->offloads) ? -ETHER_CRC_LEN :0 ; +if (rx_conf->offloads |DEV_RX_OFFLOAD_KEEP_CRC ) + rxq->crc_len =ETHER_CRC_LEN ; +else + rxq->crc_len =0 ;/* Setup the Base and Length of the Rx Descriptor Rings */ bus_addr = rxq->rx_ring_phys_addr;
@@ -4965,7 +4966,7 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)if (hw->mac.type == ixgbe_mac_82599EB || hw->mac.type == ixgbe_mac_X540) { rdrxctl =IXGBE_READ_REG (hw,IXGBE_RDRXCTL ); -if (rte_eth_dev_must_keep_crc (rx_conf->offloads)) +if (rx_conf->offloads |DEV_RX_OFFLOAD_KEEP_CRC ) rdrxctl &= ~IXGBE_RDRXCTL_CRCSTRIP ;else rdrxctl |=IXGBE_RDRXCTL_CRCSTRIP ;
drivers/net/kni/rte_eth_kni.c +0 -1
@@ -207,7 +207,6 @@ eth_kni_dev_info(struct rte_eth_dev *dev __rte_unused, dev_info->max_rx_queues =KNI_MAX_QUEUE_PER_PORT ; dev_info->max_tx_queues =KNI_MAX_QUEUE_PER_PORT ; dev_info->min_rx_bufsize =0 ; - dev_info->rx_offload_capa =DEV_RX_OFFLOAD_CRC_STRIP ; } static int
drivers/net/mlx4/mlx4_rxq.c +1 -2
@@ -678,7 +678,6 @@ uint64_t mlx4_get_rx_queue_offloads(struct priv *priv) {uint64_t offloads =DEV_RX_OFFLOAD_SCATTER | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_JUMBO_FRAME ;
@@ -780,7 +779,7 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, }/* By default, FCS (CRC) is stripped by hardware. */ crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {if (priv->hw_fcs_strip) { crc_present =1 ; }else {
drivers/net/mlx5/mlx5_rxq.c +1 -2
@@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_JUMBO_FRAME); - offloads |=DEV_RX_OFFLOAD_CRC_STRIP ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ;
@@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, tmpl->rxq.vlan_strip = !!(offloads &DEV_RX_OFFLOAD_VLAN_STRIP );/* By default, FCS (CRC) is stripped by hardware. */ tmpl->rxq.crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {if (config->hw_fcs_strip) { tmpl->rxq.crc_present =1 ; }else {
drivers/net/mvpp2/mrvl_ethdev.c +0 -10
@@ -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 ; }
drivers/net/netvsc/hn_ethdev.c +1 -2
@@ -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;
drivers/net/netvsc/hn_rndis.c +1 -2
@@ -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 ;
drivers/net/nfp/nfp_net.c +1 -8
@@ -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 ;
drivers/net/null/rte_eth_null.c +0 -1
@@ -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
drivers/net/octeontx/octeontx_ethdev.c +0 -8
@@ -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 ;
drivers/net/octeontx/octeontx_ethdev.h +1 -2
@@ -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 *
drivers/net/pcap/rte_eth_pcap.c +0 -1
@@ -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
drivers/net/qede/qede_ethdev.c +0 -1
@@ -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 |
drivers/net/ring/rte_eth_ring.c +0 -1
@@ -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
drivers/net/sfc/sfc_rx.c +0 -9
@@ -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
drivers/net/softnic/rte_eth_softnic.c +0 -1
@@ -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;
drivers/net/szedata2/rte_eth_szedata2.c +1 -2
@@ -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 ;
drivers/net/tap/rte_eth_tap.c +1 -2
@@ -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
drivers/net/thunderx/nicvf_ethdev.c +0 -9
@@ -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 ;
drivers/net/thunderx/nicvf_ethdev.h +0 -1
@@ -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)
drivers/net/vhost/rte_eth_vhost.c +1 -2
@@ -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
drivers/net/virtio/virtio_ethdev.c +1 -2
@@ -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 |
drivers/net/vmxnet3/vmxnet3_ethdev.c +1 -2
@@ -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);
examples/bbdev_app/main.c +0 -1
@@ -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,
examples/bond/main.c +0 -1
@@ -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 = {
examples/exception_path/main.c +0 -3
@@ -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 , },
examples/flow_filtering/main.c +0 -1
@@ -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 =
examples/ip_fragmentation/main.c +1 -2
@@ -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,
examples/ip_pipeline/link.c +0 -1
@@ -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 = {
examples/ip_reassembly/main.c +1 -2
@@ -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 = {
examples/ipsec-secgw/ipsec-secgw.c +1 -2
@@ -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 = {
examples/ipv4_multicast/main.c +1 -2
@@ -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,
examples/kni/main.c +0 -3
@@ -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 , },
examples/l2fwd-crypto/main.c +0 -1
@@ -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,
examples/l2fwd-jobstats/main.c +0 -1
@@ -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 ,
examples/l2fwd-keepalive/main.c +0 -1
@@ -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 ,
examples/l2fwd/main.c +0 -1
@@ -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 ,
examples/l3fwd-acl/main.c +1 -2
@@ -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 = {
examples/l3fwd-power/main.c +1 -2
@@ -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 = {
examples/l3fwd-vf/main.c +1 -2
@@ -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 = {
examples/l3fwd/main.c +1 -2
@@ -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 = {
examples/link_status_interrupt/main.c +0 -1
@@ -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 ,
examples/load_balancer/init.c +1 -2
@@ -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 = {
examples/multi_process/symmetric_mp/main.c +1 -2
@@ -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 = {
examples/netmap_compat/bridge/bridge.c +0 -1
@@ -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 ,
examples/performance-thread/l3fwd-thread/main.c +1 -2
@@ -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 = {
examples/qos_meter/main.c +1 -2
@@ -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 = {
examples/qos_sched/init.c +0 -1
@@ -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,
examples/quota_watermark/qw/init.c +0 -1
@@ -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 ,
examples/tep_termination/vxlan_setup.c +0 -1
@@ -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 ,
examples/vhost/main.c +1 -2
@@ -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 = {
lib/librte_ethdev/rte_ethdev.c +0 -9
@@ -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) !=
lib/librte_ethdev/rte_ethdev.h +1 -6
@@ -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)
lib/librte_ethdev/rte_ethdev_driver.h +0 -26
@@ -324,32 +324,6 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); int __rte_experimentalrte_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
test/test-pipeline/init.c +1 -1
@@ -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 = {
test/test/test_kni.c +0 -3
@@ -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 , },
test/test/test_link_bonding_mode4.c +0 -1
@@ -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,
test/test/test_pmd_perf.c +0 -1
@@ -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,
test/test/virtual_pmd.c +0 -1
@@ -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
Signature · 1 line
2.17.1
Quoted 4 lines · Ferruh Yigit
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload flag.
Without any specific Rx offload flag, default behavior by PMDs is to strip CRC.
Quoted 8 lines
PMDs that support keeping CRC should advertise
DEV_RX_OFFLOAD_KEEP_CRCRx 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>
Hi Ferruh,
Monday, September 3, 2018 5:45 PM, Ferruh Yigit:
Quoted 15 lines
Subject: [PATCH] ethdev: make default behavior CRC strip on Rx
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>
[...]
Quoted 14 lines
drivers/net/mlx5/mlx5_rxq.c +0
-1@@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_JUMBO_FRAME); - offloads |=DEV_RX_OFFLOAD_CRC_STRIP ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ;
drivers/net/mlx5/mlx5_rxq.c mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t · line 1442
Quoted 7 lines
drivers/net/mlx5/mlx5_rxq.c +1
-1@@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, tmpl->rxq.vlan_strip = !!(offloads &DEV_RX_OFFLOAD_VLAN_STRIP );/* By default, FCS (CRC) is stripped by hardware. */ tmpl->rxq.crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {
I don't understand this logic, and it exists on many other location in the patch. Shouldn't it be (offloads & DEV_RX_OFFLOAD_KEEP_CRC) ?
drivers/net/mlx5/mlx5_rxq.c mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, · line 1443
Quoted 3 lines
drivers/net/mlx5/mlx5_rxq.c +0
-0if (config->hw_fcs_strip) {drivers/net/mlx5/mlx5_rxq.c +0
-0tmpl->rxq.crc_present =1 ; }else {
Also I think the CRC offload should have an entry on the port caps printed by testpmt "show port caps 0" (see port_offload_cap_display()).
Hi Ferruh,
Monday, September 3, 2018 5:45 PM, Ferruh Yigit:
Quoted 14 lines
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>---
[...]
Quoted 14 lines
drivers/net/mlx5/mlx5_rxq.c +0
-1@@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_JUMBO_FRAME); - offloads |=DEV_RX_OFFLOAD_CRC_STRIP ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ;
drivers/net/mlx5/mlx5_rxq.c mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t · line 1441
Quoted 6 lines
drivers/net/mlx5/mlx5_rxq.c +1
-1@@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, tmpl->rxq.vlan_strip = !!(offloads &DEV_RX_OFFLOAD_VLAN_STRIP );/* By default, FCS (CRC) is stripped by hardware. */ tmpl->rxq.crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {
I don't understand this logic, and it exists on many other location in the patch. Shouldn't it be (offloads & DEV_RX_OFFLOAD_KEEP_CRC) ?
Quoted 3 lines
drivers/net/mlx5/mlx5_rxq.c +0
-0if (config->hw_fcs_strip) { tmpl->rxq.crc_present =1 ;} else {
Also I think the CRC offload should have an entry on the port caps printed by testpmt "show port caps 0" (see port_offload_cap_display()).
Quoted 32 lines · Shahaf Shuler
Hi Ferruh,
Monday, September 3, 2018 5:45 PM, Ferruh Yigit:
Quoted 14 lines
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>---
[...]
Quoted 13 lines
drivers/net/mlx5/mlx5_rxq.c +0
-1@@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_JUMBO_FRAME); - offloads |=DEV_RX_OFFLOAD_CRC_STRIP ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ;
Quoted 9 lines
drivers/net/mlx5/mlx5_rxq.c mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t · line 1441
Quoted 7 lines
drivers/net/mlx5/mlx5_rxq.c +1
-1@@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, tmpl->rxq.vlan_strip = !!(offloads &DEV_RX_OFFLOAD_VLAN_STRIP );/* By default, FCS (CRC) is stripped by hardware. */ tmpl->rxq.crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {I don't understand this logic, and it exists on many other location in the patch. Shouldn't it be (offloads &
DEV_RX_OFFLOAD_KEEP_CRC) ?
OMG, how can I overlook it on my review. Really good catch.
Quoted 43 lines · Andrew Rybchenko
Quoted 32 lines · Shahaf Shuler
Hi Ferruh,
Monday, September 3, 2018 5:45 PM, Ferruh Yigit:
Quoted 14 lines
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>---
[...]
Quoted 13 lines
drivers/net/mlx5/mlx5_rxq.c +0
-1@@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_JUMBO_FRAME); - offloads |=DEV_RX_OFFLOAD_CRC_STRIP ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ;Quoted 9 lines
drivers/net/mlx5/mlx5_rxq.c mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t · line 1441
Quoted 7 lines
drivers/net/mlx5/mlx5_rxq.c +1
-1@@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, tmpl->rxq.vlan_strip = !!(offloads &DEV_RX_OFFLOAD_VLAN_STRIP );/* By default, FCS (CRC) is stripped by hardware. */ tmpl->rxq.crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads |DEV_RX_OFFLOAD_KEEP_CRC ) {I don't understand this logic, and it exists on many other location in the patch. Shouldn't it be (offloads &
DEV_RX_OFFLOAD_KEEP_CRC) ?
Quoted 1 line
OMG, how can I overlook it on my review. Really good catch.
Same here, new version coming soon.
Quoted 13 lines · Ferruh Yigit
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCRx 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>---
[...]
Quoted 28 lines
drivers/net/mvpp2/mrvl_ethdev.c +0
-9@@ -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 ;
drivers/net/mvpp2/mrvl_ethdev.c mrvl_dev_infos_get(struct rte_eth_dev *dev __rte_unused, · line 1330
Quoted 7 lines
drivers/net/mvpp2/mrvl_ethdev.c +0
-1@@ -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:
Quoted 800 lines
drivers/net/netvsc/hn_ethdev.c +1
-2@@ -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;drivers/net/netvsc/hn_rndis.c +1
-2@@ -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 ;drivers/net/nfp/nfp_net.c +1
-8@@ -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 ;drivers/net/null/rte_eth_null.c +0
-1@@ -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 intdrivers/net/octeontx/octeontx_ethdev.c +0
-8@@ -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 ;drivers/net/octeontx/octeontx_ethdev.h +1
-2@@ -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 *drivers/net/pcap/rte_eth_pcap.c +0
-1@@ -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 intdrivers/net/qede/qede_ethdev.c +0
-1@@ -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 |drivers/net/ring/rte_eth_ring.c +0
-1@@ -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 intdrivers/net/sfc/sfc_rx.c +0
-9@@ -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 drivers/net/softnic/rte_eth_softnic.c +0
-1@@ -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;drivers/net/szedata2/rte_eth_szedata2.c +1
-2@@ -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 ;drivers/net/tap/rte_eth_tap.c +1
-2@@ -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 drivers/net/thunderx/nicvf_ethdev.c +0
-9@@ -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 ;drivers/net/thunderx/nicvf_ethdev.h +0
-1@@ -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)drivers/net/vhost/rte_eth_vhost.c +1
-2@@ -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 intdrivers/net/virtio/virtio_ethdev.c +1
-2@@ -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 |drivers/net/vmxnet3/vmxnet3_ethdev.c +1
-2@@ -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);examples/bbdev_app/main.c +0
-1@@ -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,examples/bond/main.c +0
-1@@ -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 = {examples/exception_path/main.c +0
-3@@ -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 , },examples/flow_filtering/main.c +0
-1@@ -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 =examples/ip_fragmentation/main.c +1
-2@@ -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,examples/ip_pipeline/link.c +0
-1@@ -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 = {examples/ip_reassembly/main.c +1
-2@@ -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 = {examples/ipsec-secgw/ipsec-secgw.c +1
-2@@ -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 = {examples/ipv4_multicast/main.c +1
-2@@ -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,examples/kni/main.c +0
-3@@ -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 , },examples/l2fwd-crypto/main.c +0
-1@@ -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,examples/l2fwd-jobstats/main.c +0
-1@@ -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 ,examples/l2fwd-keepalive/main.c +0
-1@@ -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 ,examples/l2fwd/main.c +0
-1@@ -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 ,examples/l3fwd-acl/main.c +1
-2@@ -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 = {examples/l3fwd-power/main.c +1
-2@@ -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 = {examples/l3fwd-vf/main.c +1
-2@@ -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 = {examples/l3fwd/main.c +1
-2@@ -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 = {examples/link_status_interrupt/main.c +0
-1@@ -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 ,examples/load_balancer/init.c +1
-2@@ -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 = {examples/multi_process/symmetric_mp/main.c +1
-2@@ -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 = {examples/netmap_compat/bridge/bridge.c +0
-1@@ -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 ,examples/performance-thread/l3fwd-thread/main.c +1
-2@@ -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 = {examples/qos_meter/main.c +1
-2@@ -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 = {examples/qos_sched/init.c +0
-1@@ -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,examples/quota_watermark/qw/init.c +0
-1@@ -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 ,examples/tep_termination/vxlan_setup.c +0
-1@@ -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 ,examples/vhost/main.c +1
-2@@ -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 = {lib/librte_ethdev/rte_ethdev.c +0
-9@@ -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) !=lib/librte_ethdev/rte_ethdev.h +1
-6@@ -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)lib/librte_ethdev/rte_ethdev_driver.h +0
-26@@ -324,32 +324,6 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); int __rte_experimentalrte_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 test/test-pipeline/init.c +1
-1@@ -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 = {test/test/test_kni.c +0
-3@@ -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 , },test/test/test_link_bonding_mode4.c +0
-1@@ -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,test/test/test_pmd_perf.c +0
-1@@ -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,test/test/virtual_pmd.c +0
-2@@ -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 --
Quoted 2 lines
2.17.1
--
- Tomasz Duszyński
PATCH v2 1/1 ethdev: make default behavior CRC strip on Rx
In reply to Ferruh YigitRemoved 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()
---
v2:
* fix flag check
* add KEEP_CRC flag into "show port cap #"
Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" one
--- app/test-eventdev/test_perf_common.c | 1 - app/test-eventdev/test_pipeline_common.c | 1 - app/test-pmd/cmdline.c | 2 -- app/test-pmd/config.c | 25 ++++++++++++------ app/test-pmd/parameters.c | 4 +-- app/test-pmd/testpmd.c | 5 ---- doc/guides/nics/features.rst | 3 ++- doc/guides/nics/fm10k.rst | 3 +-- doc/guides/rel_notes/deprecation.rst | 6 ----- doc/guides/sample_app_ug/flow_filtering.rst | 2 -- doc/guides/sample_app_ug/link_status_intr.rst | 1 - drivers/net/af_packet/rte_eth_af_packet.c | 1 - drivers/net/avf/avf_ethdev.c | 1 - drivers/net/avp/avp_ethdev.c | 1 - drivers/net/axgbe/axgbe_ethdev.c | 1 - drivers/net/axgbe/axgbe_rxtx.c | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 1 - drivers/net/bnxt/bnxt_rxq.c | 6 +++-- drivers/net/cxgbe/cxgbe_ethdev.c | 12 --------- drivers/net/dpaa/dpaa_ethdev.c | 1 - drivers/net/dpaa2/dpaa2_ethdev.c | 1 - drivers/net/e1000/em_rxtx.c | 7 +++-- drivers/net/e1000/igb_ethdev.c | 8 +++--- drivers/net/e1000/igb_rxtx.c | 7 +++-- drivers/net/enic/enic_res.c | 1 - drivers/net/failsafe/failsafe_ops.c | 2 -- drivers/net/fm10k/fm10k_ethdev.c | 7 ----- drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev_vf.c | 3 +-- drivers/net/i40e/i40e_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++--- drivers/net/ixgbe/ixgbe_ipsec.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 15 ++++++----- drivers/net/kni/rte_eth_kni.c | 1 - drivers/net/mlx4/mlx4_rxq.c | 3 +-- drivers/net/mlx5/mlx5_rxq.c | 3 +-- drivers/net/mvpp2/mrvl_ethdev.c | 10 ------- drivers/net/netvsc/hn_ethdev.c | 3 +-- drivers/net/netvsc/hn_rndis.c | 3 +-- drivers/net/nfp/nfp_net.c | 9 +------ drivers/net/null/rte_eth_null.c | 1 - drivers/net/octeontx/octeontx_ethdev.c | 8 ------ drivers/net/octeontx/octeontx_ethdev.h | 3 +-- drivers/net/pcap/rte_eth_pcap.c | 1 - drivers/net/qede/qede_ethdev.c | 1 - drivers/net/ring/rte_eth_ring.c | 1 - drivers/net/sfc/sfc_rx.c | 9 ------- drivers/net/softnic/rte_eth_softnic.c | 1 - drivers/net/szedata2/rte_eth_szedata2.c | 3 +-- drivers/net/tap/rte_eth_tap.c | 3 +-- drivers/net/thunderx/nicvf_ethdev.c | 9 ------- drivers/net/thunderx/nicvf_ethdev.h | 1 - drivers/net/vhost/rte_eth_vhost.c | 3 +-- drivers/net/virtio/virtio_ethdev.c | 3 +-- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 +-- examples/bbdev_app/main.c | 1 - examples/bond/main.c | 1 - examples/exception_path/main.c | 3 --- examples/flow_filtering/main.c | 1 - examples/ip_fragmentation/main.c | 3 +-- examples/ip_pipeline/link.c | 1 - examples/ip_reassembly/main.c | 3 +-- examples/ipsec-secgw/ipsec-secgw.c | 3 +-- examples/ipv4_multicast/main.c | 3 +-- examples/kni/main.c | 3 --- examples/l2fwd-crypto/main.c | 1 - examples/l2fwd-jobstats/main.c | 1 - examples/l2fwd-keepalive/main.c | 1 - examples/l2fwd/main.c | 1 - examples/l3fwd-acl/main.c | 3 +-- examples/l3fwd-power/main.c | 3 +-- examples/l3fwd-vf/main.c | 3 +-- examples/l3fwd/main.c | 3 +-- examples/link_status_interrupt/main.c | 1 - examples/load_balancer/init.c | 3 +-- examples/multi_process/symmetric_mp/main.c | 3 +-- examples/netmap_compat/bridge/bridge.c | 1 - .../performance-thread/l3fwd-thread/main.c | 3 +-- examples/qos_meter/main.c | 3 +-- examples/qos_sched/init.c | 1 - examples/quota_watermark/qw/init.c | 1 - examples/tep_termination/vxlan_setup.c | 1 - examples/vhost/main.c | 3 +-- lib/librte_ethdev/rte_ethdev.c | 9 ------- lib/librte_ethdev/rte_ethdev.h | 7 +---- lib/librte_ethdev/rte_ethdev_driver.h | 26 ------------------- test/test-pipeline/init.c | 2 +- test/test/test_kni.c | 3 --- test/test/test_link_bonding_mode4.c | 1 - test/test/test_pmd_perf.c | 1 - test/test/virtual_pmd.c | 1 - 91 files changed, 77 insertions(+), 256 deletions(-)
app/test-eventdev/test_perf_common.c +0 -1
@@ -680,7 +680,6 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = ETHER_MAX_LEN, .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .rx_adv_conf = { .rss_conf = {
app/test-eventdev/test_pipeline_common.c +0 -1
@@ -222,7 +222,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) .rxmode = { .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = ETHER_MAX_LEN, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .rx_adv_conf = { .rss_conf = {
app/test-pmd/cmdline.c +0 -2
@@ -1898,11 +1898,9 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, rx_offloads = port->dev_conf.rxmode.offloads;if (!strcmp (res->name,"crc-strip" )) {if (!strcmp (res->value,"on" )) { - rx_offloads |=DEV_RX_OFFLOAD_CRC_STRIP ; rx_offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC ; }else if (!strcmp (res->value,"off" )) { rx_offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; - rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; }else {printf ("Unknown parameter\n" );return ;
app/test-pmd/config.c +17 -8
@@ -577,7 +577,7 @@ port_offload_cap_display(portid_t port_id) }if (dev_info.rx_offload_capa &DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM ) { -printf ("RX Outer IPv4 checksum: " ); +printf ("RX Outer IPv4 checksum: " );if (ports[port_id].dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM )printf ("on\n" );
@@ -594,19 +594,28 @@ port_offload_cap_display(portid_t port_id)printf ("off\n" ); } -if (dev_info.tx_offload_capa &DEV_TX_OFFLOAD_VLAN_INSERT ) { -printf ("VLAN insert: " ); -if (ports[port_id].dev_conf.txmode.offloads & -DEV_TX_OFFLOAD_VLAN_INSERT ) +if (dev_info.rx_offload_capa &DEV_RX_OFFLOAD_TIMESTAMP ) { +printf ("HW timestamp: " ); +if (ports[port_id].dev_conf.rxmode.offloads & +DEV_RX_OFFLOAD_TIMESTAMP )printf ("on\n" );else printf ("off\n" ); } -if (dev_info.rx_offload_capa &DEV_RX_OFFLOAD_TIMESTAMP ) { -printf ("HW timestamp: " ); +if (dev_info.rx_offload_capa &DEV_RX_OFFLOAD_KEEP_CRC ) { +printf ("Rx Keep CRC: " );if (ports[port_id].dev_conf.rxmode.offloads & -DEV_RX_OFFLOAD_TIMESTAMP ) +DEV_RX_OFFLOAD_KEEP_CRC ) +printf ("on\n" ); +else +printf ("off\n" ); + } + +if (dev_info.tx_offload_capa &DEV_TX_OFFLOAD_VLAN_INSERT ) { +printf ("VLAN insert: " ); +if (ports[port_id].dev_conf.txmode.offloads & +DEV_TX_OFFLOAD_VLAN_INSERT )printf ("on\n" );else printf ("off\n" );
app/test-pmd/parameters.c +1 -3
@@ -878,10 +878,8 @@ launch_args_parse(int argc, char** argv) " must be >= 0\n", n); }#endif -if (!strcmp (lgopts[opt_idx].name,"disable-crc-strip" )) { - rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; +if (!strcmp (lgopts[opt_idx].name,"disable-crc-strip" )) rx_offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; - }if (!strcmp (lgopts[opt_idx].name,"enable-lro" )) rx_offloads |=DEV_RX_OFFLOAD_TCP_LRO ;if (!strcmp (lgopts[opt_idx].name,"enable-scatter" ))
app/test-pmd/testpmd.c +0 -5
@@ -334,7 +334,6 @@ lcoreid_t latencystats_lcore_id = -1;*/ struct rte_eth_rxmode rx_mode = { .max_rx_pkt_len =ETHER_MAX_LEN ,/**< Default maximum frame length. */ - .offloads =DEV_RX_OFFLOAD_CRC_STRIP , };struct rte_eth_txmode tx_mode = {
@@ -739,10 +738,6 @@ init_config(void) port->dev_conf.rxmode = rx_mode;rte_eth_dev_info_get (pid, &port->dev_info); -if (!(port->dev_info.rx_offload_capa & -DEV_RX_OFFLOAD_CRC_STRIP )) - port->dev_conf.rxmode.offloads &= - ~DEV_RX_OFFLOAD_CRC_STRIP ;if (!(port->dev_info.tx_offload_capa &DEV_TX_OFFLOAD_MBUF_FAST_FREE )) port->dev_conf.txmode.offloads &=
doc/guides/nics/features.rst +2 -1
@@ -513,8 +513,9 @@ CRC offload ----------- Supports CRC stripping by hardware. +A PMD assumed to support CRC stripping by default. PMD should advertise if it supports keeping CRC. -* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_CRC_STRIP,DEV_RX_OFFLOAD_KEEP_CRC``. +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_KEEP_CRC``. .. _nic_features_vlan_offload:
doc/guides/nics/fm10k.rst +1 -2
@@ -139,8 +139,7 @@ CRC striping ~~~~~~~~~~~~ The FM10000 family of NICs strip the CRC for every packets coming into the -host interface. So, CRC will be stripped even when ``DEV_RX_OFFLOAD_CRC_STRIP`` -in ``rxmode.offloads`` is NOT set in ``struct rte_eth_conf``. +host interface. So, keeping CRC is not supported. Maximum packet length ~~~~~~~~~~~~~~~~~~~~~
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -56,12 +56,6 @@ Deprecation Notices experimental API ``rte_pktmbuf_attach_extbuf()`` is used. Removal of the macro is to fix this semantic inconsistency. -* ethdev: In v18.11 ``DEV_RX_OFFLOAD_CRC_STRIP`` offload flag will be removed, default - behavior without any flag will be changed to CRC strip. - To keep CRC ``DEV_RX_OFFLOAD_KEEP_CRC`` flag is required. - ``KEEP_CRC``: Keep CRC in packet - No flag: Strip CRC from packet - * ethdev: the legacy filter API, including ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
doc/guides/sample_app_ug/flow_filtering.rst +0 -2
@@ -139,7 +139,6 @@ application is shown below: struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .offloads =
@@ -215,7 +214,6 @@ The Ethernet port is configured with default settings using the struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .offloads =
doc/guides/sample_app_ug/link_status_intr.rst +0 -1
@@ -137,7 +137,6 @@ The global configuration is stored in a static structure: static const struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = {}, .intr_conf = {
drivers/net/af_packet/rte_eth_af_packet.c +0 -1
@@ -305,7 +305,6 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = (uint16_t )internals->nb_queues; dev_info->max_tx_queues = (uint16_t )internals->nb_queues; dev_info->min_rx_bufsize =0 ; - dev_info->rx_offload_capa =DEV_RX_OFFLOAD_CRC_STRIP ; } static int
drivers/net/avf/avf_ethdev.c +0 -1
@@ -523,7 +523,6 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME |
drivers/net/avp/avp_ethdev.c +0 -1
@@ -2170,7 +2170,6 @@ avp_dev_info_get(struct rte_eth_dev *eth_dev, dev_info->rx_offload_capa =DEV_RX_OFFLOAD_VLAN_STRIP ; dev_info->tx_offload_capa =DEV_TX_OFFLOAD_VLAN_INSERT ; } - dev_info->rx_offload_capa |=DEV_RX_OFFLOAD_CRC_STRIP ; } static int
drivers/net/axgbe/axgbe_ethdev.c +0 -1
@@ -364,7 +364,6 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_IPV4_CKSUM |DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC ; dev_info->tx_offload_capa =
drivers/net/axgbe/axgbe_rxtx.c +1 -1
@@ -74,7 +74,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, (DMA_CH_INC * rxq->queue_id)); rxq->dma_tail_reg = (volatile uint32_t *)((uint8_t *)rxq->dma_regs +DMA_CH_RDTR_LO ); -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
drivers/net/bnxt/bnxt_ethdev.c +0 -1
@@ -149,7 +149,6 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {DEV_RX_OFFLOAD_TCP_CKSUM | \DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \DEV_RX_OFFLOAD_JUMBO_FRAME | \ -DEV_RX_OFFLOAD_CRC_STRIP | \DEV_RX_OFFLOAD_KEEP_CRC | \ DEV_RX_OFFLOAD_TCP_LRO)
drivers/net/bnxt/bnxt_rxq.c +4 -2
@@ -331,8 +331,10 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, rxq->queue_id = queue_idx; rxq->port_id = eth_dev->data->port_id; - rxq->crc_len =rte_eth_dev_must_keep_crc (rx_offloads) ? -ETHER_CRC_LEN :0 ; +if (rx_offloads &DEV_RX_OFFLOAD_KEEP_CRC ) + rxq->crc_len =ETHER_CRC_LEN ; +else + rxq->crc_len =0 ; eth_dev->data->rx_queues[queue_idx] = rxq;/* Allocate RX ring hardware descriptors */
drivers/net/cxgbe/cxgbe_ethdev.c +0 -12
@@ -66,7 +66,6 @@ DEV_TX_OFFLOAD_TCP_TSO)#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP |\ - DEV_RX_OFFLOAD_CRC_STRIP |\ DEV_RX_OFFLOAD_IPV4_CKSUM |\ DEV_RX_OFFLOAD_JUMBO_FRAME |\ DEV_RX_OFFLOAD_UDP_CKSUM |\
@@ -413,20 +412,9 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev) {struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);struct adapter *adapter = pi->adapter; -uint64_t configured_offloads;int err;CXGBE_FUNC_TRACE (); - configured_offloads = eth_dev->data->dev_conf.rxmode.offloads; - -/* 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 (configured_offloads)) { -dev_info (adapter,"can't disable hw crc strip\n" ); - eth_dev->data->dev_conf.rxmode.offloads |= -DEV_RX_OFFLOAD_CRC_STRIP ; - }if (!(adapter->flags &FW_QUEUE_BOUND )) { err =setup_sge_fwevtq (adapter);
drivers/net/dpaa/dpaa_ethdev.c +0 -1
@@ -55,7 +55,6 @@ static uint64_t dev_rx_offloads_nodis =DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER ;/* Supported Tx offloads */
drivers/net/dpaa2/dpaa2_ethdev.c +0 -1
@@ -39,7 +39,6 @@ static uint64_t dev_rx_offloads_sup =/* Rx offloads which cannot be disabled */ static uint64_t dev_rx_offloads_nodis = -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER ;/* Supported Tx offloads */
drivers/net/e1000/em_rxtx.c +3 -4
@@ -1363,7 +1363,6 @@ em_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_IPV4_CKSUM |DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER ;if (max_rx_pktlen >ETHER_MAX_LEN )
@@ -1459,7 +1458,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev, rxq->rx_free_thresh = rx_conf->rx_free_thresh; rxq->queue_id = queue_idx; rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -1795,7 +1794,7 @@ eth_em_rx_init(struct rte_eth_dev *dev)* Reset crc_len in case it was changed after queue setup by a * call to configure */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -1877,7 +1876,7 @@ eth_em_rx_init(struct rte_eth_dev *dev) }/* Setup the Receive Control Register. */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rctl &= ~E1000_RCTL_SECRC ;/* Do not Strip Ethernet CRC. */ else rctl |=E1000_RCTL_SECRC ;/* Strip Ethernet CRC. */
drivers/net/e1000/igb_ethdev.c +4 -4
@@ -3197,14 +3197,14 @@ igbvf_dev_configure(struct rte_eth_dev *dev)* Keep the persistent behavior the same as Host PF */ #ifndef RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC -if (rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (conf->rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) {PMD_INIT_LOG (NOTICE ,"VF can't disable HW CRC Strip" ); - conf->rxmode.offloads |=DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC ; }#else -if (!rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (!(conf->rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC )) {PMD_INIT_LOG (NOTICE ,"VF can't enable HW CRC Strip" ); - conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; }#endif
drivers/net/e1000/igb_rxtx.c +3 -4
@@ -1638,7 +1638,6 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER ;
@@ -1721,7 +1720,7 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev, rxq->reg_idx = (uint16_t )((RTE_ETH_DEV_SRIOV (dev).active ==0 ) ? queue_idx :RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx + queue_idx); rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -2374,7 +2373,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)* Reset crc_len in case it was changed after queue setup by a * call to configure */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -2506,7 +2505,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)E1000_WRITE_REG (hw,E1000_RXCSUM , rxcsum);/* Setup the Receive Control Register. */ -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) { +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) { rctl &= ~E1000_RCTL_SECRC ;/* Do not Strip Ethernet CRC. */ /* clear STRCRC bit in all queues */
drivers/net/enic/enic_res.c +0 -1
@@ -195,7 +195,6 @@ int enic_get_vnic_config(struct enic *enic) enic->rx_offload_capa =DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_VLAN_STRIP |DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM |
drivers/net/failsafe/failsafe_ops.c +0 -2
@@ -57,7 +57,6 @@ static struct rte_eth_dev_info default_infos = {DEV_RX_OFFLOAD_VLAN_FILTER |DEV_RX_OFFLOAD_VLAN_EXTEND |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_SECURITY,
@@ -74,7 +73,6 @@ static struct rte_eth_dev_info default_infos = {DEV_RX_OFFLOAD_VLAN_FILTER |DEV_RX_OFFLOAD_VLAN_EXTEND |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_SECURITY,
drivers/net/fm10k/fm10k_ethdev.c +0 -7
@@ -451,12 +451,6 @@ fm10k_dev_configure(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); -/* 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)) -PMD_INIT_LOG (WARNING ,"fm10k always strip CRC" ); -/* multipe queue mode checking */ ret =fm10k_check_mq_mode (dev);if (ret !=0 ) {
@@ -1796,7 +1790,6 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP | DEV_RX_OFFLOAD_HEADER_SPLIT); }
drivers/net/i40e/i40e_ethdev.c +0 -1
@@ -3363,7 +3363,6 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_VLAN_EXTEND | DEV_RX_OFFLOAD_VLAN_FILTER |
drivers/net/i40e/i40e_ethdev_vf.c +1 -2
@@ -1536,7 +1536,7 @@ i40evf_dev_configure(struct rte_eth_dev *dev)/* For non-DPDK PF drivers, VF has no ability to disable HW * CRC strip, and is implicitly enabled by the PF. */ -if (rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (conf->rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) { vf =I40EVF_DEV_PRIVATE_TO_VF (dev->data->dev_private);if ((vf->version_major ==VIRTCHNL_VERSION_MAJOR ) && (vf->version_minor <=VIRTCHNL_VERSION_MINOR )) {
@@ -2180,7 +2180,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM |DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME |
drivers/net/i40e/i40e_rxtx.c +1 -1
@@ -1828,7 +1828,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev, rxq->queue_id = queue_idx; rxq->reg_idx = reg_idx; rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
drivers/net/ixgbe/ixgbe_ethdev.c +4 -4
@@ -5008,14 +5008,14 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev)* Keep the persistent behavior the same as Host PF */ #ifndef RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC -if (rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (conf->rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) {PMD_INIT_LOG (NOTICE ,"VF can't disable HW CRC Strip" ); - conf->rxmode.offloads |=DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC ; }#else -if (!rte_eth_dev_must_keep_crc (conf->rxmode.offloads)) { +if (!(conf->rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC )) {PMD_INIT_LOG (NOTICE ,"VF can't enable HW CRC Strip" ); - conf->rxmode.offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP ; + conf->rxmode.offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; }#endif
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
@@ -609,7 +609,7 @@ ixgbe_crypto_enable_ipsec(struct rte_eth_dev *dev)PMD_DRV_LOG (ERR ,"RSC and IPsec not supported" );return -1 ; } -if (rte_eth_dev_must_keep_crc (rx_offloads)) { +if (rx_offloads &DEV_RX_OFFLOAD_KEEP_CRC ) {PMD_DRV_LOG (ERR ,"HW CRC strip needs to be enabled for IPsec" );return -1 ; }
drivers/net/ixgbe/ixgbe_rxtx.c +8 -7
@@ -2848,7 +2848,6 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev) offloads =DEV_RX_OFFLOAD_IPV4_CKSUM |DEV_RX_OFFLOAD_UDP_CKSUM |DEV_RX_OFFLOAD_TCP_CKSUM | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_SCATTER ;
@@ -2936,7 +2935,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, rxq->reg_idx = (uint16_t )((RTE_ETH_DEV_SRIOV (dev).active ==0 ) ? queue_idx :RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx + queue_idx); rxq->port_id = dev->data->port_id; -if (rte_eth_dev_must_keep_crc (dev->data->dev_conf.rxmode.offloads)) +if (dev->data->dev_conf.rxmode.offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rxq->crc_len =ETHER_CRC_LEN ;else rxq->crc_len =0 ;
@@ -4705,7 +4704,7 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)/* RSC global configuration (chapter 4.6.7.2.1 of 82599 Spec) */ -if (rte_eth_dev_must_keep_crc (rx_conf->offloads) && +if ((rx_conf->offloads &DEV_RX_OFFLOAD_KEEP_CRC ) && (rx_conf->offloads &DEV_RX_OFFLOAD_TCP_LRO )) {/* * According to chapter of 4.6.7.2.1 of the Spec Rev.
@@ -4854,7 +4853,7 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)* Configure CRC stripping, if any. */ hlreg0 =IXGBE_READ_REG (hw,IXGBE_HLREG0 ); -if (rte_eth_dev_must_keep_crc (rx_conf->offloads)) +if (rx_conf->offloads &DEV_RX_OFFLOAD_KEEP_CRC ) hlreg0 &= ~IXGBE_HLREG0_RXCRCSTRP ;else hlreg0 |=IXGBE_HLREG0_RXCRCSTRP ;
@@ -4895,8 +4894,10 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)* Reset crc_len in case it was changed after queue setup by a * call to configure. */ - rxq->crc_len =rte_eth_dev_must_keep_crc (rx_conf->offloads) ? -ETHER_CRC_LEN :0 ; +if (rx_conf->offloads &DEV_RX_OFFLOAD_KEEP_CRC ) + rxq->crc_len =ETHER_CRC_LEN ; +else + rxq->crc_len =0 ;/* Setup the Base and Length of the Rx Descriptor Rings */ bus_addr = rxq->rx_ring_phys_addr;
@@ -4965,7 +4966,7 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)if (hw->mac.type == ixgbe_mac_82599EB || hw->mac.type == ixgbe_mac_X540) { rdrxctl =IXGBE_READ_REG (hw,IXGBE_RDRXCTL ); -if (rte_eth_dev_must_keep_crc (rx_conf->offloads)) +if (rx_conf->offloads &DEV_RX_OFFLOAD_KEEP_CRC ) rdrxctl &= ~IXGBE_RDRXCTL_CRCSTRIP ;else rdrxctl |=IXGBE_RDRXCTL_CRCSTRIP ;
drivers/net/kni/rte_eth_kni.c +0 -1
@@ -207,7 +207,6 @@ eth_kni_dev_info(struct rte_eth_dev *dev __rte_unused, dev_info->max_rx_queues =KNI_MAX_QUEUE_PER_PORT ; dev_info->max_tx_queues =KNI_MAX_QUEUE_PER_PORT ; dev_info->min_rx_bufsize =0 ; - dev_info->rx_offload_capa =DEV_RX_OFFLOAD_CRC_STRIP ; } static int
drivers/net/mlx4/mlx4_rxq.c +1 -2
@@ -678,7 +678,6 @@ uint64_t mlx4_get_rx_queue_offloads(struct priv *priv) {uint64_t offloads =DEV_RX_OFFLOAD_SCATTER | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_JUMBO_FRAME ;
@@ -780,7 +779,7 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, }/* By default, FCS (CRC) is stripped by hardware. */ crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads &DEV_RX_OFFLOAD_KEEP_CRC ) {if (priv->hw_fcs_strip) { crc_present =1 ; }else {
drivers/net/mlx5/mlx5_rxq.c +1 -2
@@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_TIMESTAMP | DEV_RX_OFFLOAD_JUMBO_FRAME); - offloads |=DEV_RX_OFFLOAD_CRC_STRIP ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ;
@@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, tmpl->rxq.vlan_strip = !!(offloads &DEV_RX_OFFLOAD_VLAN_STRIP );/* By default, FCS (CRC) is stripped by hardware. */ tmpl->rxq.crc_present =0 ; -if (rte_eth_dev_must_keep_crc (offloads)) { +if (offloads &DEV_RX_OFFLOAD_KEEP_CRC ) {if (config->hw_fcs_strip) { tmpl->rxq.crc_present =1 ; }else {
drivers/net/mvpp2/mrvl_ethdev.c +0 -10
@@ -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 ; }
drivers/net/netvsc/hn_ethdev.c +1 -2
@@ -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;
drivers/net/netvsc/hn_rndis.c +1 -2
@@ -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 ;
drivers/net/nfp/nfp_net.c +1 -8
@@ -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 ;
drivers/net/null/rte_eth_null.c +0 -1
@@ -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
drivers/net/octeontx/octeontx_ethdev.c +0 -8
@@ -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 ;
drivers/net/octeontx/octeontx_ethdev.h +1 -2
@@ -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 *
drivers/net/pcap/rte_eth_pcap.c +0 -1
@@ -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
drivers/net/qede/qede_ethdev.c +0 -1
@@ -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 |
drivers/net/ring/rte_eth_ring.c +0 -1
@@ -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
drivers/net/sfc/sfc_rx.c +0 -9
@@ -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
drivers/net/softnic/rte_eth_softnic.c +0 -1
@@ -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;
drivers/net/szedata2/rte_eth_szedata2.c +1 -2
@@ -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 ;
drivers/net/tap/rte_eth_tap.c +1 -2
@@ -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
drivers/net/thunderx/nicvf_ethdev.c +0 -9
@@ -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 ;
drivers/net/thunderx/nicvf_ethdev.h +0 -1
@@ -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)
drivers/net/vhost/rte_eth_vhost.c +1 -2
@@ -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
drivers/net/virtio/virtio_ethdev.c +1 -2
@@ -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 |
drivers/net/vmxnet3/vmxnet3_ethdev.c +1 -2
@@ -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);
examples/bbdev_app/main.c +0 -1
@@ -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,
examples/bond/main.c +0 -1
@@ -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 = {
examples/exception_path/main.c +0 -3
@@ -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 , },
examples/flow_filtering/main.c +0 -1
@@ -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 =
examples/ip_fragmentation/main.c +1 -2
@@ -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,
examples/ip_pipeline/link.c +0 -1
@@ -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 = {
examples/ip_reassembly/main.c +1 -2
@@ -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 = {
examples/ipsec-secgw/ipsec-secgw.c +1 -2
@@ -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 = {
examples/ipv4_multicast/main.c +1 -2
@@ -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,
examples/kni/main.c +0 -3
@@ -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 , },
examples/l2fwd-crypto/main.c +0 -1
@@ -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,
examples/l2fwd-jobstats/main.c +0 -1
@@ -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 ,
examples/l2fwd-keepalive/main.c +0 -1
@@ -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 ,
examples/l2fwd/main.c +0 -1
@@ -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 ,
examples/l3fwd-acl/main.c +1 -2
@@ -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 = {
examples/l3fwd-power/main.c +1 -2
@@ -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 = {
examples/l3fwd-vf/main.c +1 -2
@@ -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 = {
examples/l3fwd/main.c +1 -2
@@ -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 = {
examples/link_status_interrupt/main.c +0 -1
@@ -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 ,
examples/load_balancer/init.c +1 -2
@@ -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 = {
examples/multi_process/symmetric_mp/main.c +1 -2
@@ -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 = {
examples/netmap_compat/bridge/bridge.c +0 -1
@@ -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 ,
examples/performance-thread/l3fwd-thread/main.c +1 -2
@@ -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 = {
examples/qos_meter/main.c +1 -2
@@ -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 = {
examples/qos_sched/init.c +0 -1
@@ -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,
examples/quota_watermark/qw/init.c +0 -1
@@ -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 ,
examples/tep_termination/vxlan_setup.c +0 -1
@@ -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 ,
examples/vhost/main.c +1 -2
@@ -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 = {
lib/librte_ethdev/rte_ethdev.c +0 -9
@@ -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) !=
lib/librte_ethdev/rte_ethdev.h +1 -6
@@ -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)
lib/librte_ethdev/rte_ethdev_driver.h +0 -26
@@ -324,32 +324,6 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev); int __rte_experimentalrte_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
test/test-pipeline/init.c +1 -1
@@ -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 = {
test/test/test_kni.c +0 -3
@@ -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 , },
test/test/test_link_bonding_mode4.c +0 -1
@@ -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,
test/test/test_pmd_perf.c +0 -1
@@ -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,
test/test/virtual_pmd.c +0 -1
@@ -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
Signature · 1 line
2.17.1
Tuesday, September 4, 2018 1:13 PM, Ferruh Yigit:
Quoted 16 lines
Subject: [PATCH v2] ethdev: make default behavior CRC strip on Rx
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>Acked-by Tomasz Duszynski <[email protected]>
Quoted 8 lines
---
v2:
* fix flag check
* addKEEP_CRCflag into "show port cap #"Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" one
Ferruh Yigit
AppliedQuoted 22 lines · Shahaf Shuler
Tuesday, September 4, 2018 1:13 PM, Ferruh Yigit:
Quoted 21 lines
Subject: [PATCH v2] ethdev: make default behavior CRC strip on Rx
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>Acked-by Tomasz Duszynski <[email protected]>---
v2:
* fix flag check
* addKEEP_CRCflag into "show port cap #"
Quoted 7 lines
Quoted 3 lines
Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" oneAcked-by Shahaf Shuler <[email protected]>
Applied to dpdk-next-net/master, thanks.
Hello Ferruh,
Quoted 28 lines · Ferruh Yigit
Quoted 27 lines · Shahaf Shuler
Tuesday, September 4, 2018 1:13 PM, Ferruh Yigit:
Quoted 24 lines
Subject: [PATCH v2] ethdev: make default behavior CRC strip on Rx
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>Acked-by Tomasz Duszynski <[email protected]>---
v2:
* fix flag check
* addKEEP_CRCflag into "show port cap #"Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" one
Quoted 4 lines
Quoted 2 lines
Acked-by Shahaf Shuler <[email protected]>Applied to dpdk-next-net/master, thanks.
Should we have a little note about this api change in 18.11 release notes ?
Signature · 1 line
David Marchand
Quoted 31 lines · David Marchand
Hello Ferruh,
Quoted 28 lines · Ferruh Yigit
Quoted 27 lines · Shahaf Shuler
Tuesday, September 4, 2018 1:13 PM, Ferruh Yigit:
Quoted 24 lines
Subject: [PATCH v2] ethdev: make default behavior CRC strip on Rx
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>Acked-by Tomasz Duszynski <[email protected]>---
v2:
* fix flag check
* addKEEP_CRCflag into "show port cap #"Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" one
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Acked-by Shahaf Shuler <[email protected]>Applied to dpdk-next-net/master, thanks.
Should we have a little note about this api change in 18.11 release notes ?
Right, I will send a patch for it.
Quoted 19 lines · Ferruh Yigit
drivers/net/vhost/rte_eth_vhost.c +1
-2@@ -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 intdrivers/net/virtio/virtio_ethdev.c +0
-0
drivers/net/virtio/virtio_ethdev.c virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) · line 2172
Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +1
-2@@ -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 |
For Vhost & Virtio PMDs:
Thanks,
Maxime
For szedata2:
Thanks, Jan
Quoted 12 lines
drivers/net/szedata2/rte_eth_szedata2.c +1
-2@@ -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 ;
-----Original Message-----
Quoted 14 lines
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCRx 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_CRCin Rx offload flag inrte_eth_dev_configure()Signed-off-by Ferruh Yigit <[email protected]>Acked-by Tomasz Duszynski <[email protected]>
Quoted 8 lines
---
v2:
* fix flag check
* addKEEP_CRCflag into "show port cap #"Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" one
For thunderx and octeontx
Legacy, Allain
Acked-byQuoted 26 lines
-----Original Message-----
From: Jerin Jacob [mailto:[email protected]]
Sent: Monday, September 10, 2018 7:35 AM
To: Ferruh Yigit
Cc: Wenzhuo Lu; Jingjing Wu; Bernard Iremonger; John McNamara; Marko Kovacevic; Qi Zhang; Xiao Wang; Neil Horman; Remy Horton; Ori Kam; Bruce Richardson; Pablo de Lara; Radu Nicolau; Akhil Goyal; Tomasz Kantecki; John W. Linville; Legacy, Allain; Peters, Matt; Ravi Kumar; Ajit Khaparde; Somnath Kotur; Rahul Lakkireddy; Hemant Agrawal; Shreyansh Jain; John Daley; Hyong Youb Kim; Gaetan Rivet; Beilei Xing; Konstantin Ananyev; Matan Azrad; Shahaf Shuler; Yongseok Koh; Tomasz Duszynski; Dmitri Epshtein; Natalie Samsonov; Stephen Hemminger; K. Y. Srinivasan; Haiyang Zhang; Alejandro Lucero; Tetsuya Mukawa; Santosh Shukla; Rasesh Mody; Harish Patil; Shahed Shaikh; Andrew Rybchenko; Jasvinder Singh; Cristian Dumitrescu; Jan Remes; Keith Wiles; Maciej Czekaj; Maxime Coquelin; Tiwei Bie; Zhihong Wang; Yong Wang; Amr Mokhtar; Declan Doherty; Chas Williams; David Hunt; Anatoly Burakov; Harry van Haaren; Xiaoyun Li; Thomas Monjalon; [email protected]
Subject: Re: [PATCH v2] ethdev: make default behavior CRC strip on Rx-----Original Message-----
Quoted 5 lines
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload flag.
Without any specific Rx offload flag, default behavior by PMDs is to strip CRC.
Quoted 20 lines
Quoted 1 line
PMDs that support keeping CRC should advertise
DEV_RX_OFFLOAD_KEEP_CRCQuoted 5 lines
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_CRCin Rx offload flag in
rte_eth_dev_configure()Quoted 11 lines
Signed-off-by Ferruh Yigit <[email protected]>Acked-by Tomasz Duszynski <[email protected]>---
v2:
* fix flag check
* addKEEP_CRCflag into "show port cap #"Note "show port cap #" and
"show port # [r/t]x_offload capabilities/configuration" does same thing, in long term I suggest removing "show port cap" one
For AVP devices
Quoted 10 lines · Ferruh Yigit
Removed
DEV_RX_OFFLOAD_CRC_STRIPoffload 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_CRCRx 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_CRCin Rx offload flag inrte_eth_dev_configure()
[...]
drivers/net/enic/enic_res.c int enic_get_vnic_config(struct enic *enic) · line 200
Quoted 12 lines
drivers/net/enic/enic_res.c +0
-1@@ -195,7 +195,6 @@ int enic_get_vnic_config(struct enic *enic) enic->rx_offload_capa =DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_JUMBO_FRAME | -DEV_RX_OFFLOAD_CRC_STRIP |DEV_RX_OFFLOAD_VLAN_STRIP |DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM |
For net/enic.
PATCH 1/1 doc: announce CRC strip changes in release notes
In reply to Ferruh YigitDocument changes done in
commit 323e7b667f18 ("ethdev: make default behavior CRC strip on Rx")
--- doc/guides/rel_notes/release_18_11.rst | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/rel_notes/release_18_11.rst +6 -0
@@ -112,6 +112,12 @@ API Changes flag the MAC can be properly configured in any case. This is particularly important for bonding. +* The default behaviour of CRC strip offload changed. Without any specific Rx + offload flag, default behavior by PMD is now to strip CRC. + DEV_RX_OFFLOAD_CRC_STRIP offload flag has been removed. + To request keeping CRC, application should set ``DEV_RX_OFFLOAD_KEEP_CRC`` Rx + offload. + ABI Changes -----------
Signature · 1 line
2.17.1
Re: [PATCH] doc: announce CRC strip changes in release notes
24/09/2018 19:31, Ferruh Yigit:
doc/guides/rel_notes/release_18_11.rst API Changes · line 116
Quoted 13 lines
Document changes done in
commit323e7b667f18("ethdev: make default behavior CRC strip on Rx")Signed-off-by Ferruh Yigit <[email protected]>---
doc/guides/rel_notes/release_18_11.rst +5
-0@@ -112,6 +112,12 @@ API Changes +* The default behaviour of CRC strip offload changed. Without any specific Rx + offload flag, default behavior by PMD is now to strip CRC. + DEV_RX_OFFLOAD_CRC_STRIP offload flag has been removed. + To request keeping CRC, application should set ``DEV_RX_OFFLOAD_KEEP_CRC`` Rx + offload.
Thanks
Re: [PATCH] doc: announce CRC strip changes in release notes
In reply to Ferruh YigitQuoted 15 lines · Ferruh Yigit
Document changes done in
commit323e7b667f18("ethdev: make default behavior CRC strip on Rx")Signed-off-by Ferruh Yigit <[email protected]>--- doc/guides/rel_notes/release_18_11.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/release_18_11.rst +0
-0@@ -112,6 +112,12 @@ API Changes flag the MAC can be properly configured in any case. This is particularly important for bonding.
doc/guides/rel_notes/release_18_11.rst API Changes · line 123
Quoted 10 lines
doc/guides/rel_notes/release_18_11.rst +6
-0+* The default behaviour of CRC strip offload changed. Without any specific Rx + offload flag, default behavior by PMD is now to strip CRC. + DEV_RX_OFFLOAD_CRC_STRIP offload flag has been removed. + To request keeping CRC, application should set ``DEV_RX_OFFLOAD_KEEP_CRC`` Rx + offload. + ABI Changes -----------
Signature · 1 line
David Marchand
Re: [PATCH] doc: announce CRC strip changes in release notes
Quoted 5 lines · David Marchand
Quoted 4 lines · Ferruh Yigit
Document changes done in
commit323e7b667f18("ethdev: make default behavior CRC strip on Rx")Signed-off-by Ferruh Yigit <[email protected]>
Quoted 1 line
Reviewed-by David Marchand <[email protected]>
Applied to dpdk-next-net/master, thanks.