ethdev: make default behavior CRC strip on Rx
[dpdk.git] / drivers / net / e1000 / em_rxtx.c
index 7d2ac4e..1103a18 100644 (file)
@@ -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. */