diff options
author | Ryan Zezeski <rpz@joyent.com> | 2018-09-21 08:48:14 -0600 |
---|---|---|
committer | Ryan Zezeski <rpz@joyent.com> | 2018-10-18 22:58:07 -0600 |
commit | 104c53876a87e773ef729efa9419a70fe24933cb (patch) | |
tree | 1f86b5c4cb5568dc09331c680935969592c58644 /usr/src/uts/common/inet/ip_impl.h | |
parent | c6d34d2b1dfd2a8be003867d868e26d325f8584f (diff) | |
download | illumos-joyent-104c53876a87e773ef729efa9419a70fe24933cb.tar.gz |
OS-2340 vnics should support LSO
OS-6778 MAC loopback traffic should avoid cksum work
OS-6794 want LSO support in viona
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Jorge Schrauwen <jorge@blackdot.be>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/inet/ip_impl.h')
-rw-r--r-- | usr/src/uts/common/inet/ip_impl.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/usr/src/uts/common/inet/ip_impl.h b/usr/src/uts/common/inet/ip_impl.h index 2b37528eb9..fc90e6f217 100644 --- a/usr/src/uts/common/inet/ip_impl.h +++ b/usr/src/uts/common/inet/ip_impl.h @@ -21,6 +21,7 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2018 Joyent, Inc. */ #ifndef _INET_IP_IMPL_H @@ -159,9 +160,27 @@ extern "C" { #define ILL_DIRECT_CAPABLE(ill) \ (((ill)->ill_capabilities & ILL_CAPAB_DLD_DIRECT) != 0) -/* This macro is used by the mac layer */ +/* + * Determine if a mblk needs to take the "slow path", aka OTH + * softring. There are multiple reasons why a mblk might take the slow + * path. + * + * o The mblk is not a data message. + * + * o There is more than one outstanding reference to the mblk and it + * does not originate from a local MAC client. If the mblk does + * originate from a local MAC then allow it to pass through with + * more than one reference and leave the copying up to the consumer. + * + * o The IP header is not aligned (we assume alignment in the checksum + * routine). + * + * o The mblk doesn't contain enough data to populate a simple IP header. + */ #define MBLK_RX_FANOUT_SLOWPATH(mp, ipha) \ - (DB_TYPE(mp) != M_DATA || DB_REF(mp) != 1 || !OK_32PTR(ipha) || \ + (DB_TYPE(mp) != M_DATA || \ + (DB_REF(mp) != 1 && ((DB_CKSUMFLAGS(mp) & HW_LOCAL_MAC) == 0)) || \ + !OK_32PTR(ipha) || \ (((uchar_t *)ipha + IP_SIMPLE_HDR_LENGTH) >= (mp)->b_wptr)) /* |