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

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next

Steffen Klassert says:

====================
pull request (net-next): ipsec-next 2021-02-09

1) Support TSO on xfrm interfaces.
From Eyal Birger.

2) Variable calculation simplifications in esp4/esp6.
From Jiapeng Chong / Jiapeng Zhong.

3) Fix a return code in xfrm_do_migrate.
From Zheng Yongjun.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+12 -4
+1 -1
net/ipv4/esp4_offload.c
··· 285 285 esp.esph = ip_esp_hdr(skb); 286 286 287 287 288 - if (!hw_offload || (hw_offload && !skb_is_gso(skb))) { 288 + if (!hw_offload || !skb_is_gso(skb)) { 289 289 esp.nfrags = esp_output_head(x, skb, &esp); 290 290 if (esp.nfrags < 0) 291 291 return esp.nfrags;
+1 -1
net/ipv6/esp6.c
··· 788 788 int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); 789 789 int hdr_len = skb_network_header_len(skb); 790 790 791 - if (!xo || (xo && !(xo->flags & CRYPTO_DONE))) 791 + if (!xo || !(xo->flags & CRYPTO_DONE)) 792 792 kfree(ESP_SKB_CB(skb)->tmp); 793 793 794 794 if (unlikely(err))
+9 -1
net/xfrm/xfrm_interface.c
··· 296 296 } 297 297 298 298 mtu = dst_mtu(dst); 299 - if (skb->len > mtu) { 299 + if ((!skb_is_gso(skb) && skb->len > mtu) || 300 + (skb_is_gso(skb) && !skb_gso_validate_network_len(skb, mtu))) { 300 301 skb_dst_update_pmtu_no_confirm(skb, mtu); 301 302 302 303 if (skb->protocol == htons(ETH_P_IPV6)) { ··· 565 564 eth_broadcast_addr(dev->broadcast); 566 565 } 567 566 567 + #define XFRMI_FEATURES (NETIF_F_SG | \ 568 + NETIF_F_FRAGLIST | \ 569 + NETIF_F_GSO_SOFTWARE | \ 570 + NETIF_F_HW_CSUM) 571 + 568 572 static int xfrmi_dev_init(struct net_device *dev) 569 573 { 570 574 struct xfrm_if *xi = netdev_priv(dev); ··· 587 581 } 588 582 589 583 dev->features |= NETIF_F_LLTX; 584 + dev->features |= XFRMI_FEATURES; 585 + dev->hw_features |= XFRMI_FEATURES; 590 586 591 587 if (phydev) { 592 588 dev->needed_headroom = phydev->needed_headroom;
+1 -1
net/xfrm/xfrm_user.c
··· 2504 2504 encap = kmemdup(nla_data(attrs[XFRMA_ENCAP]), 2505 2505 sizeof(*encap), GFP_KERNEL); 2506 2506 if (!encap) 2507 - return 0; 2507 + return -ENOMEM; 2508 2508 } 2509 2509 2510 2510 err = xfrm_migrate(&pi->sel, pi->dir, type, m, n, kmp, net, encap);