Skip to content

Commit 1676ebb

Browse files
gentoo-rootkuba-moo
authored andcommitted
net/ipv6: Remove jumbo_remove step from TX path
Now that the kernel doesn't insert HBH for BIG TCP IPv6 packets, remove unnecessary steps from the GSO TX path, that used to check and remove HBH. Signed-off-by: Alice Mikityanska <alice@isovalent.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260205133925.526371-5-alice.kernel@fastmail.im Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 81be30c commit 1676ebb

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

net/core/dev.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,8 +3813,7 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb,
38133813
(skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4 &&
38143814
vlan_get_protocol(skb) == htons(ETH_P_IPV6))) &&
38153815
skb_transport_header_was_set(skb) &&
3816-
skb_network_header_len(skb) != sizeof(struct ipv6hdr) &&
3817-
!ipv6_has_hopopt_jumbo(skb))
3816+
skb_network_header_len(skb) != sizeof(struct ipv6hdr))
38183817
features &= ~(NETIF_F_IPV6_CSUM | NETIF_F_TSO6 | NETIF_F_GSO_UDP_L4);
38193818

38203819
return features;
@@ -3917,8 +3916,7 @@ int skb_csum_hwoffload_help(struct sk_buff *skb,
39173916

39183917
if (features & (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)) {
39193918
if (vlan_get_protocol(skb) == htons(ETH_P_IPV6) &&
3920-
skb_network_header_len(skb) != sizeof(struct ipv6hdr) &&
3921-
!ipv6_has_hopopt_jumbo(skb))
3919+
skb_network_header_len(skb) != sizeof(struct ipv6hdr))
39223920
goto sw_checksum;
39233921

39243922
switch (skb->csum_offset) {

net/ipv6/ip6_offload.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
9494
struct sk_buff *segs = ERR_PTR(-EINVAL);
9595
struct ipv6hdr *ipv6h;
9696
const struct net_offload *ops;
97-
int proto, err;
97+
int proto;
9898
struct frag_hdr *fptr;
9999
unsigned int payload_len;
100100
u8 *prevhdr;
@@ -104,9 +104,6 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
104104
bool gso_partial;
105105

106106
skb_reset_network_header(skb);
107-
err = ipv6_hopopt_jumbo_remove(skb);
108-
if (err)
109-
return ERR_PTR(err);
110107
nhoff = skb_network_header(skb) - skb_mac_header(skb);
111108
if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
112109
goto out;

0 commit comments

Comments
 (0)