summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Stt.c
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2016-02-11 01:38:54 +0000
committerBen Pfaff <blp@ovn.org>2016-02-10 20:34:50 -0800
commit7b383a56a76e2496f630bcfbc8f9b46f82c62081 (patch)
tree578bc659fcc8851672bc028c0650b0dfba9938b4 /datapath-windows/ovsext/Stt.c
parent4b7396908d07a1a3576aad8b7ea2602e8fd072b5 (diff)
downloadopenvswitch-7b383a56a76e2496f630bcfbc8f9b46f82c62081.tar.gz
datapath-windows: Refactor sofware offloads and mss
The purpose of this patch is to refactor the software offloads found in the VXLAN and GRE code and also to refactor how the maximmum segment size for a given NBL is obtained. This patch introduces two functions OvsApplySWChecksumOnNB and OVSGetTcpMSS. OVSGetTcpMSS - will return the mss found in a given NBL. OvsApplySWChecksumOnNB - will compute and set software offloads for a given NBL. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sorin Vinturis <svinturis at cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Stt.c')
-rw-r--r--datapath-windows/ovsext/Stt.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/datapath-windows/ovsext/Stt.c b/datapath-windows/ovsext/Stt.c
index 0ae263391..dd7bf9279 100644
--- a/datapath-windows/ovsext/Stt.c
+++ b/datapath-windows/ovsext/Stt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 VMware, Inc.
+ * Copyright (c) 2015, 2016 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,10 +17,12 @@
#include "precomp.h"
#include "Atomic.h"
-#include "Checksum.h"
+#include "Debug.h"
#include "Flow.h"
#include "IpHelper.h"
+#include "Jhash.h"
#include "NetProto.h"
+#include "Offload.h"
#include "PacketIO.h"
#include "PacketParser.h"
#include "Stt.h"
@@ -33,8 +35,7 @@
#undef OVS_DBG_MOD
#endif
#define OVS_DBG_MOD OVS_DBG_STT
-#include "Debug.h"
-#include "Jhash.h"
+
KSTART_ROUTINE OvsSttDefragCleaner;
static PLIST_ENTRY OvsSttPktFragHash;
@@ -163,20 +164,7 @@ OvsDoEncapStt(POVS_VPORT_ENTRY vport,
BOOLEAN innerPartialChecksum = FALSE;
if (layers->isTcp) {
- lsoInfo.Value = NET_BUFFER_LIST_INFO(curNbl,
- TcpLargeSendNetBufferListInfo);
-
- switch (lsoInfo.Transmit.Type) {
- case NDIS_TCP_LARGE_SEND_OFFLOAD_V1_TYPE:
- mss = lsoInfo.LsoV1Transmit.MSS;
- break;
- case NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE:
- mss = lsoInfo.LsoV2Transmit.MSS;
- break;
- default:
- OVS_LOG_ERROR("Unknown LSO transmit type:%d",
- lsoInfo.Transmit.Type);
- }
+ mss = OVSGetTcpMSS(curNbl);
}
vportStt = (POVS_STT_VPORT) GetOvsVportPriv(vport);