diff options
Diffstat (limited to 'usr/src/man/man9f/mac_hcksum_get.9f')
-rw-r--r-- | usr/src/man/man9f/mac_hcksum_get.9f | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/usr/src/man/man9f/mac_hcksum_get.9f b/usr/src/man/man9f/mac_hcksum_get.9f index b186890fd1..d6aec5441d 100644 --- a/usr/src/man/man9f/mac_hcksum_get.9f +++ b/usr/src/man/man9f/mac_hcksum_get.9f @@ -51,9 +51,9 @@ The value or a pointer to it that contains the offset from the L3 header, generally IP, of the first byte that's covered by the checksum. .It Fa stuff The value or a pointer to it that contains the offset from the L3 header -of where the L4 checksum is. For example, if using IPv4 and TCP, this -would contain the offset from the start of the IPv4 header to the first -byte of the TCP checksum. +of where the L4 checksum is. +For example, if using IPv4 and TCP, this would contain the offset from the start +of the IPv4 header to the first byte of the TCP checksum. .It Fa end The value or a pointer to it that contains the offset from the L3 header, generally IP, of the last byte that's covered by the checksum. @@ -72,7 +72,8 @@ The and .Fn mac_hcksum_set functions are provided to device drivers to get and set checksum related -information. When a device driver indicates that it supports the +information. +When a device driver indicates that it supports the .Sy MAC_CAPAB_HCKSUM capability as part of its .Xr mc_getcapab 9E @@ -83,11 +84,12 @@ While both functions operate on an .Sy mblk_t , this function should only be called on the first .Sy mblk_t -that begins a given individual frame in a chain. In other words, it only -works on entries where it is the first of many possible entries linked -together by the +that begins a given individual frame in a chain. +In other words, it only works on entries where it is the first of many possible +entries linked together by the .Sy b_cont -member. The first +member. +The first .Sy mblk_t received from any .Xr mac 9E @@ -99,14 +101,15 @@ When a device driver is receiving data, it is its responsibility to .Em set checksum information when it has indicated that it supports the .Sy MAC_CAPAB_HCKSUM -capability. Device drivers will call the +capability. +Device drivers will call the .Fn mac_hcksum_set function to indicate what checksum information has occurred. .Pp -The proper values to set depend on the flags passed in. The following -flags are supported when receiving data, note that they may have -different meanings from when transmitting data. The driver should set -the +The proper values to set depend on the flags passed in. +The following flags are supported when receiving data, note that they may have +different meanings from when transmitting data. +The driver should set the .Fa flags argument to the bitwise inclusive OR of the following values: .Bl -tag -width Sy @@ -125,14 +128,14 @@ and arguments. .It Sy HCK_FULLCKSUM This flag indicates that the hardware has calculated the full L4 header -checksum; however, it wants the system to verify it. The checksum should -be passed in the +checksum; however, it wants the system to verify it. +The checksum should be passed in the .Fa value argument. .It Sy HCK_FULLCKSUM_OK This flag indicates that the hardware has calculated the full L4 header -checksum and verified that it is correct. The networking stack does not -need to verify it. +checksum and verified that it is correct. +The networking stack does not need to verify it. .El .Pp The @@ -140,8 +143,8 @@ The .Sy HCK_FULLCKSUM , and .Sy HCK_FULLCKSUM_OK -flags are all mutually exclusive. A device driver should only set one of -the three flags. +flags are all mutually exclusive. +A device driver should only set one of the three flags. .Pp If one of the arguments is not required based on the specified value of .Fa flags , @@ -154,27 +157,28 @@ supports the capability, then it must call the .Fn mac_hcksum_get function to determine what hardware checksumming options are required to -be performed by the hardware. While the device driver may need the other -fields, it must check the +be performed by the hardware. +While the device driver may need the other fields, it must check the .Fa flags -argument to determine what it is being requested to do. The following -values may be set in +argument to determine what it is being requested to do. +The following values may be set in .Fa flags : .Bl -tag -width Sy .It Sy HCK_IPV4_HDRCKSUM -The device driver must compute the IPv4 header checksum. No other fields -have been filled in. +The device driver must compute the IPv4 header checksum. +No other fields have been filled in. .It Sy HCK_PARTIALCKSUM The device driver needs to compute the partial ones' complement of the -checksum. The system has filled in the +checksum. +The system has filled in the .Fa start , .Fa stuff , and .Fa end arguments to assist the device driver. .It Sy HCK_FULLCKSUM -The device driver should compute the full L4 checksum. No other fields -have been filled in for the device driver. +The device driver should compute the full L4 checksum. +No other fields have been filled in for the device driver. .El .Pp The flags that the device driver will get will depend on what the device |