net/nfp: fix CRC strip check behaviour
authorAlejandro Lucero <alejandro.lucero@netronome.com>
Fri, 24 Nov 2017 14:26:02 +0000 (14:26 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
NFP does CRC strip by default and it is not configurable. But, even
if an app requests not to do it, that should not be a reason for PMD
configuration failure.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
drivers/net/nfp/nfp_net.c

index 4aec94d..fa8ff3c 100644 (file)
@@ -491,10 +491,8 @@ nfp_net_configure(struct rte_eth_dev *dev)
        if (rxmode->jumbo_frame)
                hw->mtu = rxmode->max_rx_pkt_len;
 
-       if (rxmode->hw_strip_crc) {
-               PMD_INIT_LOG(INFO, "strip CRC not supported");
-               return -EINVAL;
-       }
+       if (!rxmode->hw_strip_crc)
+               PMD_INIT_LOG(INFO, "HW does strip CRC and it is not configurable");
 
        if (rxmode->enable_scatter) {
                PMD_INIT_LOG(INFO, "Scatter not supported");