Date: Fri, 2 Apr 2021 06:47:36 GMT From: Vincenzo Maffione <vmaffione@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 66671ae589c3 - main - netmap: fix typo bug in netmap_compute_buf_len Message-ID: <202104020647.1326laIK054412@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=66671ae589c3c605c9ededa8980ce3fc4b27e642 commit 66671ae589c3c605c9ededa8980ce3fc4b27e642 Author: Vincenzo Maffione <vmaffione@FreeBSD.org> AuthorDate: 2021-04-02 06:42:34 +0000 Commit: Vincenzo Maffione <vmaffione@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104020647.1326laIK054412>