Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

udp: enable UDP checksum offload for ESP

In case NIC has support for ESP TX CSUM offload skb->ip_summed is not
set to CHECKSUM_PARTIAL which results in checksum calculated by SW.

Fix enables ESP TX CSUM for UDP by extending condition with check for
NETIF_F_HW_ESP_TX_CSUM.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

authored by

Jacek Kalwas and committed by
Steffen Klassert
cd027a54 5e596ee1

+1 -1
+1 -1
net/ipv4/ip_output.c
··· 907 907 length + fragheaderlen <= mtu && 908 908 rt->dst.dev->features & (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM) && 909 909 !(flags & MSG_MORE) && 910 - !exthdrlen) 910 + (!exthdrlen || (rt->dst.dev->features & NETIF_F_HW_ESP_TX_CSUM))) 911 911 csummode = CHECKSUM_PARTIAL; 912 912 913 913 cork->length += length;