From nobody Thu Aug 21 18:38:03 2025 X-Original-To: dev-commits-src-main@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 4c7Bs743p5z65Vqq; Thu, 21 Aug 2025 18:38:03 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c7Bs71Xp7z3k3D; Thu, 21 Aug 2025 18:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755801483; 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=HEjVmiPjWiES7GZNdI+DLT9g3NI41CAhWGbTaRvz6tQ=; b=SFNhaPLPAFINOnIOA+4d/2e8yYS5CYYgXqKnWBBtdYYxh8VA1vNCw5bHpS4t2Ia9Gg3PmF VG+7RLnyePpzXGX4ggdsdItqVbrojYmQMQGeQqmcC4goJ6Oo4oDw+f7qfGcxC+68++99Ew 9aij0Ld7JOKw26Yay5YPaJH6ayQ5Kd5JHkELxFrOn0juRQNlyppUm3vJG91Rt8pVxwNODU cHTPA2KKf+EQP46yqXy4s1BOOPvg/A+NzyHwGbGm/5gb3HSTxWrq2glKaY6Jc/k3tBo0Lx IL0tcab9fwwSbW9tlvVJBmZ+hZ/xOlnMEbGG9cRtu1z3LVZulzykaOQByRJRNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755801483; 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=HEjVmiPjWiES7GZNdI+DLT9g3NI41CAhWGbTaRvz6tQ=; b=fLMa7PY1t392peJZ8vhpbi9XenO3K6/WgwKJ95H+sHZgNoNY0xP5lZ4c1xkeCmIogtOtNq 3DrD5haeYzX94CfkggQjWatmagwKMVJ18F+k22fxplPwtJTbBEft2Ay/XEb3arMEsSEKDR /nlwdS9537bfqz3y3EaS4RbAwsamD+antbIJyrXRWqv/IgW7qLQuDw7Oz50Orwpq+RDPcF 2+7s2p8cKIB54bjyXylCdw/U3fQDU6c96YjzDUlt7xVbqH5DNBxekztZfAuKw3J56XZyR7 ROrkpeT5KXxoouapOropJhVbOF0D2niTaYp4sMyWNnJStLLTBwctm5mBjAROBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755801483; a=rsa-sha256; cv=none; b=a7GoIjWNhQhBN4uR3n5E5k1RlNiqHXuRafUG0nTbIvjNYl1t9/g5n9Nksmtb8aD86wI7Td WUgLJIPz1FD9MYY46lnvP6pa0Sx8X4WZe1nq2MgEWZAorfdY4e1q2JUPp55zv2JcOwy1DA 1P1FY5SjwXuGyp4RDjC7Bj6pHIZL4F8wGTY2phDVxflPXjGYF35sw1iKzvcjLwmUeqY3nR 8rjDDVDRbCDQnqCxOsjxqdrlQ88DAmsz+Deb5Ti4Mr7XCT35vakAncQ2FL/ajxKTX6d+dU wDoSQYjttFDlSIor9n8ElEvsl6Uak5epEJf/s/WUQQKkij22MNWixBzpzMEWCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c7Bs716htz19G9; Thu, 21 Aug 2025 18:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57LIc39G065566; Thu, 21 Aug 2025 18:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57LIc35S065563; Thu, 21 Aug 2025 18:38:03 GMT (envelope-from git) Date: Thu, 21 Aug 2025 18:38:03 GMT Message-Id: <202508211838.57LIc35S065563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: ac87d70563f8 - main - vtnet.4: improve existing descriptions and add missing ones List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac87d70563f85d53575956c6fe40615b2e501c13 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ac87d70563f85d53575956c6fe40615b2e501c13 commit ac87d70563f85d53575956c6fe40615b2e501c13 Author: Michael Tuexen AuthorDate: 2025-08-21 15:11:06 +0000 Commit: Michael Tuexen CommitDate: 2025-08-21 15:11:06 +0000 vtnet.4: improve existing descriptions and add missing ones Improve several descriptions for loader tunables and add descriptions of the statistics provided by read only sysctl-variables. Reviewed by: bcr MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51985 --- share/man/man4/vtnet.4 | 142 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 136 insertions(+), 6 deletions(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 8b99cd9f17b9..43c10afa8561 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 29, 2025 +.Dd August 21, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -68,20 +68,29 @@ prompt before booting the kernel or stored in .Bl -tag -width "xxxxxx" .It Va hw.vtnet.csum_disable .It Va hw.vtnet. Ns Ar X Ns Va .csum_disable -This tunable disables receive and send checksum offload. +This tunable disables receive and transmission checksum offloading for TCP and +UDP. +This also implies that TCP segmentation offloading and large receive offload +are disabled. The default value is 0. .It Va hw.vtnet.fixup_needs_csum .It Va hw.vtnet. Ns Ar X Ns Va .fixup_needs_csum -This tunable enforces the calculation of a valid checksum for NEEDS_CSUM -packets. +This tunable enforces the calculation of a valid TCP or UDP checksum for +packets received with +.Dv VIRTIO_NET_HDR_F_NEEDS_CSUM +being set in the +.Va flags +field of the structure +.Vt struct virtio_net_hdr . +It also marks the checksum as being correct in the mbuf packet header. The default value is 0. .It Va hw.vtnet.tso_disable .It Va hw.vtnet. Ns Ar X Ns Va .tso_disable -This tunable disables TSO. +This tunable disables TCP segmentation offloading. The default value is 0. .It Va hw.vtnet.lro_disable .It Va hw.vtnet. Ns Ar X Ns Va .lro_disable -This tunable disables LRO. +This tunable disables large receive offload. The default value is 0. .It Va hw.vtnet.mq_disable .It Va hw.vtnet. Ns Ar X Ns Va .mq_disable @@ -117,6 +126,127 @@ This tunable disables ALTQ support, allowing the use of multiqueue instead. This option applies to all interfaces. The default value is 0. .El +.Sh TRANSMIT QUEUE STATISTICS +.Bl -tag -width "xxxxxx" +For each transmit queue of each interface the following read-only statistics +are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .rescheduled +The number of times the transmit interrupt handler was rescheduled. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .tso +The number of times TCP segment offloading was performed. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .csum +The number of times transmission checksum offloading for UDP or TCP was +performed. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .omcasts +The number of multicast packets that were transmitted. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .obytes +The number of bytes that were transmitted (based on Ethernet frames). +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .opackets +The number of packets that were transmitted (Ethernet frames). +.El +.Sh RECEIVE QUEUE STATISTICS +For each receive queue of each interface the following read-only statistics +are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .rescheduled +The number of times the receive interrupt handler was rescheduled. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .host_lro +The number of times TCP large receive offload was performed. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum_failed +Currently not used. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum +The number of times receive checksum offloading for UDP or TCP was performed. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ierrors +The number of times an error occurred during input processing. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .iqdrops +The number of times a packet was dropped during input processing. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ibytes +The number of bytes that were received (based on Ethernet frames). +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ipackets +The number of packets that were received (Ethernet frames). +.El +.Sh INTERFACE TRANSMIT STATISTICS +For each interface the following read-only transmit statistics are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .tx_task_rescheduled +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .rescheduled +over all transmit queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_offloaded +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .tso +over all transmit queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_offloaded +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .csum +over all transmit queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_defrag_failed +The number of times an attempt to defragment an mbuf chain failed during a +transmit operation. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_defragged +The number of times an mbuf chain was defragmented during a transmit operation. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_without_csum +The number of times TCP segment offloading was attempted without transmission +checksum offloading. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_not_tcp +The number of times TCP segment offloading was attempted for a non-TCP packet. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_proto_mismatch +The number of times the IP protocol version of the transmission checksum +offloading request did not match the IP protocol version of the packet. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_unknown_ethtype +The number of times a transmission offload operation was requested for an +ethernet frame for which the EtherType was neither IPv4 nor IPv6 +(considering simple VLAN tagging). +.El +.Sh INTERFACE RECEIVE STATISTICS +For each interface the following read-only receive statistics are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .rx_task_rescheduled +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .rescheduled +over all receive queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_offloaded +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum +over all receive queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_failed +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum_failed +over all receive queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_proto +Currently unused. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_offset +Currently unused. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ipproto +Currently unused. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ethtype +The number of times fixing the checksum required by +.Va hw.vtnet.fixup_needs_csum +or +.Va hw.vtnet. Ns Ar X Ns Va .fixup_needs_csum +was attempted for a packet with an EtherType other than IPv4 or IPv6. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_mergeable_failed +The number of times receiving a mergable buffer failed. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_enq_replacement_failed +The number of times the enqueuing the replacement receive mbuf chain failed. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_frame_too_large +The number of times the frame was loger than the mbuf chain during large +receive offload without mergeable buffers. +.It Va dev.vtnet. Ns Ar X Ns Va .mbuf_alloc_failed +The number of times an mbuf cluster allocation for the receive buffer failed. +.El +.Sh INTERFACE CONFIGURATION PARAMETER +For each interface the following read-only configuration parameters are +provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .act_vq_pairs +The number of active virtqueue pairs. +.It Va dev.vtnet. Ns Ar X Ns Va .req_vq_pairs +The number of requested virtqueue pairs. +.It Va dev.vtnet. Ns Ar X Ns Va .max_vq_pairs +The maximum number of supported virtqueue pairs. +.El .Sh SEE ALSO .Xr arp 4 , .Xr netintro 4 ,