Skip to content

Commit f945cec

Browse files
yelenaKrdavem330
authored andcommitted
net: mvneta: Verify hardware checksum only when offload checksum feature is set
If the checksum offload feature is not set, then there is no point to check the status of the hardware. [gregory: extract from a larger patch] Signed-off-by: Yelena Krivosheev <yelena@marvell.com> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7e47fd8 commit f945cec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/marvell/mvneta.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,8 @@ static void mvneta_rx_error(struct mvneta_port *pp,
17201720
static void mvneta_rx_csum(struct mvneta_port *pp, u32 status,
17211721
struct sk_buff *skb)
17221722
{
1723-
if ((status & MVNETA_RXD_L3_IP4) &&
1723+
if ((pp->dev->features & NETIF_F_RXCSUM) &&
1724+
(status & MVNETA_RXD_L3_IP4) &&
17241725
(status & MVNETA_RXD_L4_CSUM_OK)) {
17251726
skb->csum = 0;
17261727
skb->ip_summed = CHECKSUM_UNNECESSARY;

0 commit comments

Comments
 (0)