summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/ip
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2018-03-28 23:20:07 +0000
committerRobert Mustacchi <rm@joyent.com>2018-04-02 16:52:13 +0000
commit9dc0f5536a83ce4ef09e0009beec208ac83f0a75 (patch)
treee27546e6376142b460df5081c90a7ebd09859472 /usr/src/uts/common/inet/ip
parent51e13f4784dca9f0e910f3d0fb85b659ad68ceb2 (diff)
downloadillumos-joyent-netperf.tar.gz
OS-XXXX wip vxlan lsonetperf
Diffstat (limited to 'usr/src/uts/common/inet/ip')
-rw-r--r--usr/src/uts/common/inet/ip/ip_if.c16
-rw-r--r--usr/src/uts/common/inet/ip/ip_output.c15
2 files changed, 15 insertions, 16 deletions
diff --git a/usr/src/uts/common/inet/ip/ip_if.c b/usr/src/uts/common/inet/ip/ip_if.c
index 917e526bb1..b1bb4abbc3 100644
--- a/usr/src/uts/common/inet/ip/ip_if.c
+++ b/usr/src/uts/common/inet/ip/ip_if.c
@@ -2096,6 +2096,8 @@ ill_capability_lso_enable(ill_t *ill)
DLD_ENABLE)) == 0) {
ill->ill_lso_capab->ill_lso_flags = lso.lso_flags;
ill->ill_lso_capab->ill_lso_max = lso.lso_max;
+ ill->ill_lso_capab->ill_lso_vxlan_cksum = lso.lso_vxlan_cksum;
+ ill->ill_lso_capab->ill_lso_vxlan_tcp_max = lso.lso_vxlan_tcp_max;
ill->ill_capabilities |= ILL_CAPAB_LSO;
ip1dbg(("ill_capability_lso_enable: interface %s "
"has enabled LSO\n ", ill->ill_name));
@@ -19212,8 +19214,7 @@ out:
}
int
-ip_bindif_hwcaps(conn_t *connp, uint_t *hckflags, uint_t *lsoflags,
- uint_t *lsomax)
+ip_bindif_hwcaps(conn_t *connp, uint_t *hckflags, ill_lso_capab_t *lso)
{
in6_addr_t laddrv6;
in_addr_t laddrv4;
@@ -19222,8 +19223,7 @@ ip_bindif_hwcaps(conn_t *connp, uint_t *hckflags, uint_t *lsoflags,
ip_stack_t *ipst;
int ret;
- if (connp == NULL || hckflags == NULL || lsoflags == NULL ||
- lsomax == NULL) {
+ if (connp == NULL || hckflags == NULL || lso == NULL) {
return (EINVAL);
}
@@ -19270,12 +19270,10 @@ ip_bindif_hwcaps(conn_t *connp, uint_t *hckflags, uint_t *lsoflags,
* to deal with getting updates.
*/
if (ILL_LSO_USABLE(ipif->ipif_ill)) {
- ill_lso_capab_t *lsop = ipif->ipif_ill->ill_lso_capab;
- *lsoflags = lsop->ill_lso_flags;
- *lsomax = lsop->ill_lso_max;
+ bcopy(ipif->ipif_ill->ill_lso_capab, lso,
+ sizeof (ill_lso_capab_t));
} else {
- *lsoflags = 0;
- *lsomax = 0;
+ bzero(lso, sizeof (ill_lso_capab_t));
}
if (ILL_HCKSUM_CAPABLE(ipif->ipif_ill)) {
diff --git a/usr/src/uts/common/inet/ip/ip_output.c b/usr/src/uts/common/inet/ip/ip_output.c
index 690f39e0dc..05c9115e03 100644
--- a/usr/src/uts/common/inet/ip/ip_output.c
+++ b/usr/src/uts/common/inet/ip/ip_output.c
@@ -1721,13 +1721,6 @@ ip_output_cksum_v4(iaflags_t ixaflags, mblk_t *mp, ipha_t *ipha,
}
/*
- * If we've been asked to skip the ULP checksum, then just let IP do its
- * business.
- */
- if ((ixa->ixa_flags & IXAF_SKIP_ULP_CKSUM) != 0)
- goto ip_hdr_cksum;
-
- /*
* Calculate ULP checksum. Note that we don't use cksump and cksum
* if the ill has FULL support.
*/
@@ -1795,6 +1788,14 @@ ip_output_cksum_v4(iaflags_t ixaflags, mblk_t *mp, ipha_t *ipha,
can_partial = (hck_flags & HCKSUM_INET_PARTIAL) != 0;
}
DB_CKSUMFLAGS(mp) &= ~HCK_OUTER_FLAGS;
+
+ if ((ixa->ixa_flags & IXAF_SKIP_ULP_CKSUM) != 0 && can_inet) {
+ DB_CKSUMFLAGS(mp) |= HCK_IPV4_HDRCKSUM;
+ *cksump = 0;
+ ipha->ipha_hdr_checksum = 0;
+ return (B_TRUE);
+ }
+
if (can_full) {
/*
* Hardware calculates pseudo-header, header and the