From owner-svn-src-all@freebsd.org Fri Dec 2 09:51:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4045C5FE6D; Fri, 2 Dec 2016 09:51:13 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E9E316BA; Fri, 2 Dec 2016 09:51:13 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uB29pCRw042578; Fri, 2 Dec 2016 09:51:12 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uB29pCMc042577; Fri, 2 Dec 2016 09:51:12 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201612020951.uB29pCMc042577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Fri, 2 Dec 2016 09:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309407 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 09:51:13 -0000 Author: julian Date: Fri Dec 2 09:51:12 2016 New Revision: 309407 URL: https://svnweb.freebsd.org/changeset/base/309407 Log: A little light wordsmithing only. Sponsored by: FreeBSD Modified: head/share/man/man4/ng_checksum.4 Modified: head/share/man/man4/ng_checksum.4 ============================================================================== --- head/share/man/man4/ng_checksum.4 Fri Dec 2 09:41:54 2016 (r309406) +++ head/share/man/man4/ng_checksum.4 Fri Dec 2 09:51:12 2016 (r309407) @@ -29,26 +29,26 @@ .Os .Sh NAME .Nm ng_checksum -.Nd IP checksum node type +.Nd reconstructing IP checksums node type .Sh SYNOPSIS .In netgraph/ng_checksum.h .Sh DESCRIPTION The .Nm checksum -node can calculate and prepare for calculation in hardware -IPv4 header, TCP, UDP checksum. +node can calculate, or prepare for calculation in hardware, +IPv4 header, TCP and UDP checksums. .Sh HOOKS This node type has two hooks: .Bl -tag -width ".Va out" .It Va in Packets received on this hook are processed according to settings specified -in config and then forwarded to +in config and then forwarded to the .Ar out -hook, if it exists and connected. Otherwise they are reflected back to the +hook, if it exists and is connected. Otherwise they are reflected back to the .Ar in hook. .It Va out -Packets received on this hook are forwarded to +Packets received on this hook are forwarded to the .Ar in hook without any changes. .El @@ -56,13 +56,13 @@ hook without any changes. This node type supports the generic control messages, plus the following: .Bl -tag -width foo .It Dv NGM_CHECKSUM_SETDLT Pq Ic setdlt -Sets data link type on the +Sets the data link type on the .Va in hook. Currently, supported types are .Cm DLT_RAW (raw IP datagrams) and .Cm DLT_EN10MB -(Ethernet). DLT_ definitions can be found in +(Ethernet). DLT_ definitions can be found in the .In net/bpf.h header. Currently used values are .Cm DLT_EN10MB @@ -70,11 +70,11 @@ header. Currently used values are .Cm DLT_RAW = 12. .It Dv NGM_CHECKSUM_GETDLT Pq Ic getdlt -This control message obtains data link type on the +This control message obtains the data link type on the .Va in hook. .It Dv NGM_CHECKSUM_SETCONFIG Pq Ic setconfig -Sets node configuration. The following +Sets the node configuration. The following .Vt "struct ng_checksum_config" must be supplied as an argument: .Bd -literal -offset 4n @@ -87,23 +87,24 @@ struct ng_checksum_config { The .Va csum_flags can be set to any combination of CSUM_IP, CSUM_TCP, CSUM_UDP, CSUM_TCP_IPV6 and CSUM_UDP_IPV6 -(other values are ignored) for instructing node need calculate the corresponding checksum. +(other values are ignored) for instructing the node to calculate the corresponding checksum. .Pp The .Va csum_offload -can be set to any combination of CSUM_IP, CSUM_TCP, CSUM_UDP, CSUM_TCP_IPV6 and CSUM_UDP_IPV6 -(other values are ignored) for instructing node what checksum can calculate in hardware. +value can be set to any combination of CSUM_IP, CSUM_TCP, CSUM_UDP, CSUM_TCP_IPV6 and CSUM_UDP_IPV6 +(other values are ignored) for instructing the node what checksums should be requested from the hardware. .Pp -Also processed any combination of CSUM_IP, CSUM_TCP, CSUM_UDP, CSUM_TCP_IPV6 and CSUM_UDP_IPV6 sets before on mbuf. +The node also takes into account any combination of +CSUM_IP, CSUM_TCP, CSUM_UDP, CSUM_TCP_IPV6 and CSUM_UDP_IPV6 already +flagged on the mbuf. .It Dv NGM_CHECKSUM_GETCONFIG Pq Ic getconfig -This control message obtains current node configuration, -returned as +This control message obtains the current node configuration returned as a .Vt "struct ng_checksum_config" . .It Dv NGM_CHECKSUM_GET_STATS Pq Ic getstats Returns node statistics as a .Vt "struct ng_checksum_stats" . .It Dv NGM_CHECKSUM_CLR_STATS Pq Ic clrstats -Clear node statistics. +Clear the node statistics. .It Dv NGM_CHECKSUM_GETCLR_STATS Pq Ic getclrstats This command is identical to .Dv NGM_CHECKSUM_GET_STATS , @@ -118,14 +119,15 @@ control message, or when all hooks have script: .Bd -literal -offset 4n /usr/sbin/ngctl -f- <<-SEQ - msg checksum-1: "setdlt 1" - ngctl msg checksum-1: "setconfig { csum_flags=0 csum_offload=6 }" + msg checksum-1: setdlt 1 + msg checksum-1: setconfig { csum_flags=0 csum_offload=6 } +SEQ .Ed .Pp -Set data link type to +Set the data link type to .Cm DLT_EN10MB -(Ethernet), not set additional checksum flags, set hardware -can calculate CSUM_IP_UDP|CSUM_IP_TCP. +(Ethernet), do not set additional checksum flags +and request that the hardware calculate CSUM_IP_UDP|CSUM_IP_TCP. .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_patch 4 ,