net/igc: fix Rx packet size
authorAlvin Zhang <alvinx.zhang@intel.com>
Tue, 20 Apr 2021 02:05:20 +0000 (10:05 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 20 Apr 2021 02:54:28 +0000 (04:54 +0200)
commitbe1fb9fe3cc8d2a70b76ba243eb19a4255cd8cd2
treeff3483ef05bb11c7905fb729ea23c4bf6becd079
parentd723d1fe5db00a266d38f5e8435eb9e4f2cc7add
net/igc: fix Rx packet size

When DEV_RX_OFFLOAD_KEEP_CRC is enabled, the PMD will minus 4 bytes
of CRC from the size of a packet, but the NIC will strip the CRC
because the CRC strip bit in DVMOLR register is not cleared. This
will cause the size of a packet to be 4 bytes less.

This patch updates the CRC strip bit according to whether
DEV_RX_OFFLOAD_KEEP_CRC is enabled.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/igc/igc_txrx.c