From patchwork Wed Nov 23 19:16:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Coco Li X-Patchwork-Id: 25144 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2986432wrr; Wed, 23 Nov 2022 11:34:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GRk1RlMjlFVxGhBffy95kPyvWALzMKUoN3ZYvZ5vd0sKDnhauM+kj0MHiJETNPlza1jlL X-Received: by 2002:a17:902:d58d:b0:17f:72a4:30a1 with SMTP id k13-20020a170902d58d00b0017f72a430a1mr12728749plh.124.1669232056268; Wed, 23 Nov 2022 11:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232056; cv=none; d=google.com; s=arc-20160816; b=f9tG3ieWCn4eiMpQS7Ud8Bn0pTJKZ6rV7vcKd1olAP9yrgeQT+9Bnn2MoMc3R/CAP6 Wclu9D3B+6SMevrWMQPLmhthDyr5K5bHGQV2tXJSbjE51YB5MxcS98AgF89cmCtiUfdN LVyRiqnpjn/dAWyp9AvMfyJjzH1CNOz8S35+gmV5ndjSh/y/q4AE00db1GXKofD6Shkd pUuygQDi20ZqxaWPrfNbcVJiisVwf5H1+eNtHYPj1ujPEecFj6cRyB6MnzhphzhQmi4V Yw+4hHqjCBlrkZwHlLMqI/viOd7SVr3mVnRQpozjLi4x7giFqcwF7unGgBu8OTHzCLWf yCYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=X97CaIo508IuewzPhurtDZScOLGwj1jfW1Uvg0x2Gcc=; b=msTm9BI7+295ff6xYN2iqFs5BxGAyetIFKPHfgv4DDUAGSUykv2ucTx2Uxb1HMUexp +xCARuaQBOaXAauuHcgi6TOSsrDE5u68ynkudnWK3/pmA0pmNGEgnqHRtd9sOdCABgi2 bRmpSrNpJCGAjcHTU9xnI0Zb3GKli3aA9ew95oQ+7kLnns91TOwU/WCKShuyozUTG2iO JoQybnAU6GfQm4F/px3Qp5s/bDPYZIwcAik+RjR3oOwlpDIvfz7kBeAeKOk1PmDKJZQO LskCDLMoImPwmOaTOTWLFJXTG3bn84Q9AJ4pZxh76BvZRV8RXiayyMDIjWC6KX7RBMrF wOdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=FHWwtiQN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m12-20020a170902e40c00b001891a67e46csi8767030ple.352.2022.11.23.11.34.02; Wed, 23 Nov 2022 11:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=FHWwtiQN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239281AbiKWTQf (ORCPT + 99 others); Wed, 23 Nov 2022 14:16:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239728AbiKWTQc (ORCPT ); Wed, 23 Nov 2022 14:16:32 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9C94C5611 for ; Wed, 23 Nov 2022 11:16:31 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-37360a6236fso175901717b3.12 for ; Wed, 23 Nov 2022 11:16:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=X97CaIo508IuewzPhurtDZScOLGwj1jfW1Uvg0x2Gcc=; b=FHWwtiQNvy7LXVX5r2hmXUm2NChPmeQc8EC2GwExWP95KYacmbh1RS0fFSCWKRhcwl fjfuiKHMrGkmvZsz4LHOVQLer203z1ekyo5pyPQZRLkR7rVsE9HAEy3+bqcIcIYsaGVr 4uxnio8pONXGIZXDIgCA0VBhA27uA60ZDm0ru6p3nstKwlgvX7uIeE0rJtEFJMgJ+kiM DLc306NYw8LHhIRXqiaH22anU5AqYomy8orX8NzPQRcYcDpQR5+0rmErEkaa15co2oJU 2amK0DiknwOE2PEwNRnzfEuEEFDtNXTt4LGCRTYfFJD8ntK6NmMDfBbnP6PaEKzbVMRg IFEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=X97CaIo508IuewzPhurtDZScOLGwj1jfW1Uvg0x2Gcc=; b=hxZ9ZyAOWl/LHtujfoeA5pd2SkktTazC+3RMglsjCDq/dQg9o94G87pEyoDicEsjl9 LyNznMjqPdf60CFTVhEo8nBGv3jfrA8PNfMKMjr6MdeVobUYMcSpFta2wqF9q7XlKqFz +9vhJFLr+DMLdY1loR9k5hq50igQXLEKjBuMuN9hYvdMrJgsONsjU2TmCfQ+x0TX87AM JebtYpXFlpSTfT6R8vdcg/MN0woaGseF7sveFlMxpn3xU66QXubl0rBbQtKqUIr1g+bc 6pQm22lZxSc/PjqQIK9W04DlB5hFc25/lqdvt3W5l+nNkSDJYQ6CjXPT/oH2IZmaPrmm 0SWw== X-Gm-Message-State: ANoB5pllOuvIuAwk0NM5w8SfdjH/W0WyXJuVtdiUCUHMq0L7eRgLipVy mld6HBy2YxOx/ineJm9bejtP7Hsr/u4RdJA= X-Received: from lixiaoyan-desktop.svl.corp.google.com ([2620:15c:2c4:201:d403:2d3e:7222:9b9c]) (user=lixiaoyan job=sendgmr) by 2002:a81:4ec8:0:b0:3b1:ef5d:ab0d with SMTP id c191-20020a814ec8000000b003b1ef5dab0dmr2629055ywb.43.1669230990603; Wed, 23 Nov 2022 11:16:30 -0800 (PST) Date: Wed, 23 Nov 2022 11:16:26 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog Message-ID: <20221123191627.3442831-1-lixiaoyan@google.com> Subject: [PATCH net-next v2 1/2] IPv6/GRO: generic helper to remove temporary HBH/jumbo header in driver From: Coco Li To: "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michael Chan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Coco Li X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750316672159922031?= X-GMAIL-MSGID: =?utf-8?q?1750316672159922031?= IPv6/TCP and GRO stacks can build big TCP packets with an added temporary Hop By Hop header. Is GSO is not involved, then the temporary header needs to be removed in the driver. This patch provides a generic helper for drivers that need to modify their headers in place. Signed-off-by: Coco Li --- include/net/ipv6.h | 36 ++++++++++++++++++++++++++++++++++++ net/ipv6/ip6_offload.c | 26 ++++---------------------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index d383c895592a..c5a1daaf5056 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -500,6 +500,42 @@ static inline int ipv6_has_hopopt_jumbo(const struct sk_buff *skb) return jhdr->nexthdr; } +/* Return 0 if HBH header is successfully removed + * Or if HBH removal is unnecessary (packet is not big TCP) + * Return error to indicate dropping the packet + */ +static inline int ipv6_hopopt_jumbo_remove(struct sk_buff *skb) +{ + const int hophdr_len = sizeof(struct hop_jumbo_hdr); + int nexthdr = ipv6_has_hopopt_jumbo(skb); + struct ipv6hdr *h6; + int err = 0; + + if (!nexthdr) + return err; + + err = skb_cow_head(skb, 0); + if (err) + return err; + + /* Remove the HBH header. + * Layout: [Ethernet header][IPv6 header][HBH][L4 Header] + */ + memmove(skb_mac_header(skb) + hophdr_len, skb_mac_header(skb), + skb_network_header(skb) - skb_mac_header(skb) + + sizeof(struct ipv6hdr)); + + skb->data += hophdr_len; + skb->len -= hophdr_len; + skb->network_header += hophdr_len; + skb->mac_header += hophdr_len; + + h6 = ipv6_hdr(skb); + h6->nexthdr = nexthdr; + + return err; +} + static inline bool ipv6_accept_ra(struct inet6_dev *idev) { /* If forwarding is enabled, RA are not accepted unless the special diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c index 3ee345672849..60a82342fe57 100644 --- a/net/ipv6/ip6_offload.c +++ b/net/ipv6/ip6_offload.c @@ -77,7 +77,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, struct sk_buff *segs = ERR_PTR(-EINVAL); struct ipv6hdr *ipv6h; const struct net_offload *ops; - int proto, nexthdr; + int proto, err; struct frag_hdr *fptr; unsigned int payload_len; u8 *prevhdr; @@ -87,28 +87,10 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, bool gso_partial; skb_reset_network_header(skb); - nexthdr = ipv6_has_hopopt_jumbo(skb); - if (nexthdr) { - const int hophdr_len = sizeof(struct hop_jumbo_hdr); - int err; + err = ipv6_hopopt_jumbo_remove(skb); + if (err) + return ERR_PTR(err); - err = skb_cow_head(skb, 0); - if (err < 0) - return ERR_PTR(err); - - /* remove the HBH header. - * Layout: [Ethernet header][IPv6 header][HBH][TCP header] - */ - memmove(skb_mac_header(skb) + hophdr_len, - skb_mac_header(skb), - ETH_HLEN + sizeof(struct ipv6hdr)); - skb->data += hophdr_len; - skb->len -= hophdr_len; - skb->network_header += hophdr_len; - skb->mac_header += hophdr_len; - ipv6h = (struct ipv6hdr *)skb->data; - ipv6h->nexthdr = nexthdr; - } nhoff = skb_network_header(skb) - skb_mac_header(skb); if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) goto out; From patchwork Wed Nov 23 19:16:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Coco Li X-Patchwork-Id: 25145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2986985wrr; Wed, 23 Nov 2022 11:35:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf4wxNf8okOqoGYU0zFNKGWRCcZtot3NMJVtpWTA39mm4CeILcO43NcMoIb1j856UtQadFXu X-Received: by 2002:a63:ec07:0:b0:470:90f1:6216 with SMTP id j7-20020a63ec07000000b0047090f16216mr27310343pgh.42.1669232132298; Wed, 23 Nov 2022 11:35:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669232132; cv=none; d=google.com; s=arc-20160816; b=NJtKE18Sb/HQr4tDW6Oqky5SyIRlsSfCDdsRP104coN0sP5VfVUTOcYk1MnzyJa5kL XeYTwnKCNXQU/E8pIUrqhMC/AnBv9LLu0ByBfsRUos0Enf+JrES1/HcEtqxR4nVz+psq Q0ahuWYOSF5QPYfhe8X6+eroC0qOH49FukJjgmxoLySuci3xWwfEGuo279LdyQVBifGt 1m4swDNM/xBrs8oAbpQVzO4d6wrQLChsPrKilD+eqGcFFgmSooU8z0ex0VTgjesLo7HE rJImLch9qJjhaPdP0t7oEV8DhuQrOWpvZMGRuXzPMc+ALc9xKbrsa9UsdkwDM361Iq+c 2nyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=mXrL4mXjPPRNXGN8jBngxsBYSqmiNdb+yw7fcajaaOY=; b=YjhjcUmCDAAhddHOZi89lMKq9yJxA2mjjFjr9ymXHa8L4OQkBIM1uiFIWY1/BJx5Ax EkPWUUiOn3DossgJdn2yRNge4K18n4h/gERT/+13NUMY2AmY3ea+AxE2fCGYSNsypHN8 H+YOd7d3ejjOR4UE+xzeuQLNpEJRX4SOXBPFmqOH/5axZciFgsnrnVR0GILFmOpNQwhv kpvvXQSo+dxxQAgX/FG18UU9EMQkUpJpyj/seu2zYkX4YA5f1NexGAAH+Ug70H33OP0x WwlgAbmVRtSRfKlkbn64NKfrk+55fGDopP2IgjyC9oARLEnHvu2opQKxHOM4NTrLG/2d aK9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IB+ar8Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1-20020a63b441000000b00438b79bcf26si17134829pgu.151.2022.11.23.11.35.19; Wed, 23 Nov 2022 11:35:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IB+ar8Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236688AbiKWTQp (ORCPT + 99 others); Wed, 23 Nov 2022 14:16:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239329AbiKWTQm (ORCPT ); Wed, 23 Nov 2022 14:16:42 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE185C720C for ; Wed, 23 Nov 2022 11:16:40 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-39967085ae9so121610457b3.11 for ; Wed, 23 Nov 2022 11:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=mXrL4mXjPPRNXGN8jBngxsBYSqmiNdb+yw7fcajaaOY=; b=IB+ar8WmQFgm8e6yBH0P9Orz+hB2yaIz/otrVtei4QWtyj59kJt1c7tiuX7/fBPoSL RdX4ca0AUITSv5FsjskmtSgYK/c7CwNua3yClFXeyWHsalnTdTuBgQk9dm52CNntiRmP cv/RPUbgGsbuNJFjjlCSXaE7Fs/k8DHDPB68UqRo/Mq59Vn2bLRPRrnvc9vFw15DkI95 wpbaxjxkegzhABrjskD/Esv5IuLITp0Om7jyukeXKmUeMDELC8F4UGu2fj1Y2M390d9l IwxU520sbdiwpnZrKzvLOrta6O7+W6d0vXuGWC9fbjW9L6os3L8z2k85Za30Djjrtc3S jb+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mXrL4mXjPPRNXGN8jBngxsBYSqmiNdb+yw7fcajaaOY=; b=mzuBowwn0l0AuKJw7GnmQ1CLVWc72vncC3yva0W7DH9jJxwM/uMKYoA3zcZD6qaIZm 3DdNBUQ+3hLJ0h9Ey4PFZobebo7vFgbqgNGWHK3ql64sq1oWf/P/ljqmT96GxwFrCqUk nItAcAHR6z+VNqy9YN+oe6PjiZ5MkS/fpND4RND5NGb9/WlpGRhfk62J5Zd4hhF0Z370 Q7YksFXHSuDKHSTNxM+pyqCvEI6fVpqq7GBQdjlme7M6DRVioZKgAJN2CPUHfIcTWMh2 E6bV+Pi4J+CsxoOOo6BTeg9ENJrOQWEpT/CwsxFbhKiUI8gpqZ6jgoJ52TD5+aYXk7Gw V/Qw== X-Gm-Message-State: ANoB5pkGIOB2MOO7XpLE4eMtTqxW0JS/mSfAJxZL4rtAWew/zhuNWGEI IzNzX3Jjo01DLx9MoCKVeylfRMubBzV0q8o= X-Received: from lixiaoyan-desktop.svl.corp.google.com ([2620:15c:2c4:201:d403:2d3e:7222:9b9c]) (user=lixiaoyan job=sendgmr) by 2002:a25:84cc:0:b0:6e6:b5f0:3ae0 with SMTP id x12-20020a2584cc000000b006e6b5f03ae0mr28492403ybm.439.1669231000212; Wed, 23 Nov 2022 11:16:40 -0800 (PST) Date: Wed, 23 Nov 2022 11:16:27 -0800 In-Reply-To: <20221123191627.3442831-1-lixiaoyan@google.com> Mime-Version: 1.0 References: <20221123191627.3442831-1-lixiaoyan@google.com> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog Message-ID: <20221123191627.3442831-2-lixiaoyan@google.com> Subject: [RFC net-next v2 2/2] bnxt: Use generic HBH removal helper in tx path From: Coco Li To: "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michael Chan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Coco Li X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750316752163955097?= X-GMAIL-MSGID: =?utf-8?q?1750316752163955097?= Eric Dumazet implemented Big TCP that allowed bigger TSO/GRO packet sizes for IPv6 traffic. See patch series: 'commit 89527be8d8d6 ("net: add IFLA_TSO_{MAX_SIZE|SEGS} attributes")' This reduces the number of packets traversing the networking stack and should usually improves performance. However, it also inserts a temporary Hop-by-hop IPv6 extension header. Using the HBH header removal method in the previous path, the extra header be removed in bnxt drivers to allow it to send big TCP packets (bigger TSO packets) as well. Tested: Compiled locally To further test functional correctness, update the GSO/GRO limit on the physical NIC: ip link set eth0 gso_max_size 181000 ip link set eth0 gro_max_size 181000 Note that if there are bonding or ipvan devices on top of the physical NIC, their GSO sizes need to be updated as well. Then, IPv6/TCP packets with sizes larger than 64k can be observed. Signed-off-by: Coco Li Tested-by: Michael Chan Reviewed-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 0fe164b42c5d..2bfa5e9fb179 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -389,6 +389,9 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev) return NETDEV_TX_BUSY; } + if (unlikely(ipv6_hopopt_jumbo_remove(skb))) + goto tx_free; + length = skb->len; len = skb_headlen(skb); last_frag = skb_shinfo(skb)->nr_frags; @@ -13657,6 +13660,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) dev->features &= ~NETIF_F_LRO; dev->priv_flags |= IFF_UNICAST_FLT; + netif_set_tso_max_size(dev, GSO_MAX_SIZE); #ifdef CONFIG_BNXT_SRIOV init_waitqueue_head(&bp->sriov_cfg_wait); #endif