MAC_LSO_GET(9F) Kernel Functions for Drivers MAC_LSO_GET(9F)

NAME


mac_lso_get - get LSO information on message blocks

SYNOPSIS


#include <sys/mac_provider.h>

void
mac_lso_get(mblk_t *mp, uint32_t *mss, uint32_t *flags);

INTERFACE LEVEL


illumos DDI specific

PARAMETERS


mp A pointer to a mblk(9S) structure that contains an outgoing
frame.

mss A pointer to a value that will be filled in with the maximum
segment size (MSS).

flags A pointer to a value that will be filled in with various
flags that indicate the behavior to perform.

DESCRIPTION


The mac_lso_get() function is used by device drivers that have indicated
that they support the MAC_CAPAB_LSO capability to determine whether large
send offload (also known as large segmentation offload or LSO) is required
for this frame or not. If so, the driver should take the appropriate
actions to program the hardware to perform LSO.

The mac_lso_get() function should only be called on the first 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 b_cont member. The first mblk_t received from any mac(9E) API or
pointed to by a b_next pointer should be used.

A device driver should first look at the flags argument to determine what
to do. flags may be a bitwise inclusive OR of the following:

HW_LSO This flag indicates that hardware needs to perform segmentation
offload. The maximum segment size that the driver should use is
available through the mss argument.

CONTEXT


The mac_lso_get() function may be called from user, kernel, or interrupt
context.

SEE ALSO


mac(9E), mblk(9S)

illumos June 2, 2016 illumos