From owner-dev-commits-src-all@freebsd.org Fri Apr 2 06:47:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 375BF5C4549; Fri, 2 Apr 2021 06:47:37 +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 4FBVwn15Rgz3vj8; Fri, 2 Apr 2021 06:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 17FBD1B902; Fri, 2 Apr 2021 06:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1326laHF054413; Fri, 2 Apr 2021 06:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1326laIK054412; Fri, 2 Apr 2021 06:47:36 GMT (envelope-from git) Date: Fri, 2 Apr 2021 06:47:36 GMT Message-Id: <202104020647.1326laIK054412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vincenzo Maffione Subject: git: 66671ae589c3 - main - netmap: fix typo bug in netmap_compute_buf_len MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66671ae589c3c605c9ededa8980ce3fc4b27e642 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 06:47:37 -0000 The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=66671ae589c3c605c9ededa8980ce3fc4b27e642 commit 66671ae589c3c605c9ededa8980ce3fc4b27e642 Author: Vincenzo Maffione AuthorDate: 2021-04-02 06:42:34 +0000 Commit: Vincenzo Maffione CommitDate: 2021-04-02 06:47:28 +0000 netmap: fix typo bug in netmap_compute_buf_len --- sys/dev/netmap/netmap.c | 2 +- sys/dev/netmap/netmap_kern.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 18de5ef205eb..a9ddb5fb5728 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -2412,7 +2412,7 @@ netmap_compute_buf_len(struct netmap_priv_d *priv) maxframe = mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; if (maxframe < target) { - target = kring->offset_gap; + target = maxframe; } } diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index d9ae6a4f2054..0239a385270b 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -832,7 +832,7 @@ struct netmap_adapter { * current NETMAP_BUF_SIZE (b) of the memory region used by the * adapter. We want the largest supported l such that o + l <= b. * If m is known to be <= b - o, the callback may also choose the - * largest l <= b, ignoring the offset. The buf_align field is + * largest l <= m, ignoring the offset. The buf_align field is * most important for TX rings when there are offsets. The user * will see this value in the ring->buf_align field. Misaligned * offsets will cause the corresponding packets to be silently