X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmlx4_rxq.c;h=0cd9560fc129201f5f0c195ee3d9ca25ee32d994;hb=70815c9ecadd780af101810119d385009cb0eb2d;hp=87688c1c7ed5b7a65d117832c3965c99a1622bbc;hpb=4ed05fcd441bc7720386950a95d0bd85a72a5cee;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index 87688c1c7e..0cd9560fc1 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -672,7 +672,8 @@ 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_CRC_STRIP | + DEV_RX_OFFLOAD_KEEP_CRC; if (priv->hw_csum) offloads |= DEV_RX_OFFLOAD_CHECKSUM; @@ -771,16 +772,16 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, (void *)dev, idx, desc); } /* By default, FCS (CRC) is stripped by hardware. */ - if (offloads & DEV_RX_OFFLOAD_CRC_STRIP) { - crc_present = 0; - } else if (priv->hw_fcs_strip) { - crc_present = 1; - } else { - WARN("%p: CRC stripping has been disabled but will still" - " be performed by hardware, make sure MLNX_OFED and" - " firmware are up to date", - (void *)dev); - crc_present = 0; + crc_present = 0; + if (rte_eth_dev_must_keep_crc(offloads)) { + if (priv->hw_fcs_strip) { + crc_present = 1; + } else { + WARN("%p: CRC stripping has been disabled but will still" + " be performed by hardware, make sure MLNX_OFED and" + " firmware are up to date", + (void *)dev); + } } DEBUG("%p: CRC stripping is %s, %u bytes will be subtracted from" " incoming frames to hide it",