From 9c8d4a1a37ad374d40250c38a5103106b29903a6 Mon Sep 17 00:00:00 2001 From: Dan McDonald Date: Wed, 9 Jan 2019 10:20:57 -0500 Subject: OS-7501 overlay(7D) can receive packets with DB_CKSUMFLAGS() set Reviewed by: Ryan Zezeski Reviewed by: Robert Mustacchi Approved by: Ryan Zezeski --- usr/src/uts/common/io/overlay/overlay_mux.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/usr/src/uts/common/io/overlay/overlay_mux.c b/usr/src/uts/common/io/overlay/overlay_mux.c index 9f70e8c83e..58e9f2665d 100644 --- a/usr/src/uts/common/io/overlay/overlay_mux.c +++ b/usr/src/uts/common/io/overlay/overlay_mux.c @@ -10,7 +10,7 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ /* @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -123,8 +124,21 @@ overlay_mux_recv(ksocket_t ks, mblk_t *mpchain, size_t msgsize, int oob, */ fmp = mp; mp = fmp->b_cont; - fmp->b_cont = NULL; - freemsg(fmp); + freeb(fmp); + + /* + * Until we have VXLAN-or-other-decap HW acceleration support + * (e.g. we support NICs that reach into VXLAN-encapsulated + * packets and check the inside-VXLAN IP packets' checksums, + * or do LSO with VXLAN), we should clear any HW-accelerated- + * performed bits. + * + * We do this, even in cases of HW_LOCAL_MAC, because we + * absolutely have NO context about the inner packet. + * It could've arrived off an external NIC and been forwarded + * to the overlay network, which means no context. + */ + DB_CKSUMFLAGS(mp) = 0; /* * Decap and deliver. -- cgit v1.2.3