From nobody Thu Sep 14 07:50:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RmTyR2yVwz4sbXn; Thu, 14 Sep 2023 07:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RmTyR2C2nz3dRc; Thu, 14 Sep 2023 07:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694677839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dfosmuuHJo84b40Q3fBsU61YxixJ2V6+aLzz7nCd/nM=; b=yZ4Xv9VJUNQmDpQaEbJRVf3KXW7WUjIxwbzsL/zjjGt+m8pxjz3FidYA+Qni3+g70azbzy h1MdtLAiv8ffQkc3S7ND7/PwC7aM3fLV9voEzczp8v2xiGj2fX69sgWB7jW3uRpeuWvqj5 ahEKlQyaiPWdEum67MPoSXu9gMcajEDOwgNfuSftppLaXq/it5ar2M9K5uFw52kpWFFpQy O+lrod8UkkofKuLRYIp2NjxLqHkal8yOrSADDLz68Xg0vSynwaIiDyxnl5lYAMmn/jdySG 8IwW2QndntNqr1tKfjpoS1TProXsGFytcXe+qQy5U/hff5pfO2kJRxxg7qb36A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694677839; a=rsa-sha256; cv=none; b=AVwAzFLjx2+revwsam/YhJoa5oM0igEdzYzXTdSY5bxsUyLYhr7Jm+RG/GSWzinRHwbbCd aMx857fbZ2+ABYTTey6GGqhQhTO6naTxAt7LhJRZp1VrMbRPBcG9+dpdSzHtd0iXx5HEPD X/fo0VCZG+0CHOoG6vz+LLOjvnn60IlBYUXN8xejXfZ08djDtlsVJI8yHkvcG4EINXMTrQ 0sBqDVncd2+AP7CrFPR9si7njlg89TERUkbvVSHUJkzl2geCCy8UPaEiu7WvBoxyrY2GRM MQdAJvTnZeopCcD/yEpt/RTR2eo0I1neppofICehgx9f+qpEmtrK16WCnnIkeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694677839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dfosmuuHJo84b40Q3fBsU61YxixJ2V6+aLzz7nCd/nM=; b=MqDFNVnsAOx8kaAlgRTiX0ojFarj8gCUr8FWyA4/mWvR1TrsW2qqZDPOIoA6OmTjXp8D61 Nki/UDO2z45e4KwoeqR1kptmF0GiyniiY/JqfvzUfgxXeY/MVVw6/FPHWiWhjuyGec2Htg SiYp9+TfP+1+I7W2q3+ig2GVacPl+XKucbp6AxsPfLL5WkNtYApTX0GwBRkh7bY5hpVD5M 6YMAlW9ZkzSRhWGEjekhOfqlPvryAaXWPQPY4jnVUl5yiZdzS0cBoCk4LVPxMAjiXNf92V j28qXeO41Ve5Z71D0n2/W75oaepc4PDxCMmkiRdp0vfbG97rxl/kEgkXsvtbIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RmTyR1F9tzpPp; Thu, 14 Sep 2023 07:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38E7od5d067886; Thu, 14 Sep 2023 07:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38E7odkt067884; Thu, 14 Sep 2023 07:50:39 GMT (envelope-from git) Date: Thu, 14 Sep 2023 07:50:39 GMT Message-Id: <202309140750.38E7odkt067884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 04ada3cc2b53 - stable/14 - gve: Make LRO work for jumbo packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 04ada3cc2b530a5c170ebefa8c28c5625009d37a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=04ada3cc2b530a5c170ebefa8c28c5625009d37a commit 04ada3cc2b530a5c170ebefa8c28c5625009d37a Author: Shailend Chand AuthorDate: 2023-09-07 13:28:26 +0000 Commit: Mark Johnston CommitDate: 2023-09-14 07:50:15 +0000 gve: Make LRO work for jumbo packets Each Rx descriptor points to a packet buffer of size 2K, which means that MTUs greater than 2K see multi-descriptor packets. The TCP-hood of such packets was being incorrectly determined by looking for a flag on the last descriptor instead of the first descriptor. Also fixed and progressed the version number. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41754 (cherry picked from commit 5f62584a9adb7887bae33af617cfa4f43017abf8) --- sys/dev/gve/gve.h | 1 + sys/dev/gve/gve_main.c | 8 ++++---- sys/dev/gve/gve_rx.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index 61781cddee94..c446199dff2d 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -164,6 +164,7 @@ struct gve_rx_ctx { struct mbuf *mbuf_tail; uint32_t total_size; uint8_t frag_cnt; + bool is_tcp; bool drop_pkt; }; diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index c3ee6d5c3433..cd7849778bce 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -31,10 +31,10 @@ #include "gve.h" #include "gve_adminq.h" -#define GVE_DRIVER_VERSION "GVE-FBSD-1.0.0\n" -#define GVE_VERSION_MAJOR 0 -#define GVE_VERSION_MINOR 9 -#define GVE_VERSION_SUB 0 +#define GVE_DRIVER_VERSION "GVE-FBSD-1.0.1\n" +#define GVE_VERSION_MAJOR 1 +#define GVE_VERSION_MINOR 0 +#define GVE_VERSION_SUB 1 #define GVE_DEFAULT_RX_COPYBREAK 256 diff --git a/sys/dev/gve/gve_rx.c b/sys/dev/gve/gve_rx.c index f5d8fd7a7b75..9be96cf1ee3a 100644 --- a/sys/dev/gve/gve_rx.c +++ b/sys/dev/gve/gve_rx.c @@ -546,6 +546,7 @@ gve_rx(struct gve_priv *priv, struct gve_rx_ring *rx, struct gve_rx_desc *desc, if (is_first_frag) { mbuf->m_pkthdr.rcvif = priv->ifp; + ctx->is_tcp = desc->flags_seq & GVE_RXF_TCP; if (gve_needs_rss(desc->flags_seq)) { gve_set_rss_type(desc->flags_seq, mbuf); @@ -567,7 +568,7 @@ gve_rx(struct gve_priv *priv, struct gve_rx_ring *rx, struct gve_rx_desc *desc, do_if_input = true; if (((if_getcapenable(priv->ifp) & IFCAP_LRO) != 0) && /* LRO is enabled */ - (desc->flags_seq & GVE_RXF_TCP) && /* pkt is a TCP pkt */ + (ctx->is_tcp) && /* pkt is a TCP pkt */ ((mbuf->m_pkthdr.csum_flags & CSUM_DATA_VALID) != 0) && /* NIC verified csum */ (rx->lro.lro_cnt != 0) && /* LRO resources exist */ (tcp_lro_rx(&rx->lro, mbuf, 0) == 0))