]> git.droids-corp.org - dpdk.git/commitdiff
ixgbe: fix Rx CRC stripping for X540
authorVlad Zolotarov <vladz@cloudius-systems.com>
Thu, 12 Mar 2015 21:17:31 +0000 (23:17 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 16 Mar 2015 23:46:01 +0000 (00:46 +0100)
According to x540 spec chapter 8.2.4.8.9 CRCSTRIP field of RDRXCTL should
be configured to the same value as HLREG0.RXCRCSTRP.

Clearing the RDRXCTL.RSCFRSTSIZE field for x540 is not required by the spec
but seems harmless.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_pmd_ixgbe/ixgbe_rxtx.c

index f7c081ff63695f7dd8f318800af7bf1480e4412d..92be61e749c3657a1fa557366ea41fe1517c162a 100644 (file)
@@ -3680,7 +3680,8 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev)
 
        IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum);
 
-       if (hw->mac.type == ixgbe_mac_82599EB) {
+       if (hw->mac.type == ixgbe_mac_82599EB ||
+           hw->mac.type == ixgbe_mac_X540) {
                rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
                if (dev->data->dev_conf.rxmode.hw_strip_crc)
                        rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP;