enic: fix checksum validation for IPv6
Subsystems (3)
PATCH 1/1 enic: fix checksum validation for IPv6
In case of IPv6 pkts, ipv4_csum_ok is 0. Because of this, driver does not set skb->ip_summed. So IPv6 rx checksum is not offloaded.
Signed-off-by Govindarajulu Varadarajan <[email protected]>
--- drivers/net/ethernet/cisco/enic/enic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/cisco/enic/enic_main.c +2 -1
@@ -1434,7 +1434,8 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq,* csum is correct or is zero. */ if ((netdev->features &NETIF_F_RXCSUM ) && !csum_not_calc && - tcp_udp_csum_ok && ipv4_csum_ok && outer_csum_ok) { + tcp_udp_csum_ok && outer_csum_ok && + (ipv4_csum_ok || ipv6)) { skb->ip_summed =CHECKSUM_UNNECESSARY ; skb->csum_level = encap; }
Signature · 1 line
2.20.1
David Miller
maintainerFrom: Govindarajulu Varadarajan <[email protected]>
Date: Wed, 30 Jan 2019 06:59:00 -0800
Quoted 4 lines
In case of IPv6 pkts,
ipv4_csum_okis 0. Because of this, driver does not setskb->ip_summed. So IPv6 rx checksum is not offloaded.Signed-off-by Govindarajulu Varadarajan <[email protected]>
Applied and queued up for -stable, thanks.