Skip to content

Commit

Permalink
datapath-windows: Add LSOv2 support for VXLAN
Browse files Browse the repository at this point in the history
This patch adds LSO version 2 support for the windows datapath.
(https://msdn.microsoft.com/en-us/library/windows/hardware/ff568840%28v=vs.85%29.aspx)

Tested using psping and iperf3.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
Alin Serdean authored and blp committed Jan 11, 2016
1 parent 6363d98 commit a274c2c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions datapath-windows/ovsext/Vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport,
POVS_VXLAN_VPORT vportVxlan;
UINT32 headRoom = OvsGetVxlanTunHdrSize();
UINT32 packetLength;
ULONG mss = 0;

/*
* XXX: the assumption currently is that the NBL is owned by OVS, and
Expand All @@ -204,12 +205,23 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport,

tsoInfo.Value = NET_BUFFER_LIST_INFO(curNbl,
TcpLargeSendNetBufferListInfo);
OVS_LOG_TRACE("MSS %u packet len %u", tsoInfo.LsoV1Transmit.MSS,
switch (tsoInfo.Transmit.Type) {
case NDIS_TCP_LARGE_SEND_OFFLOAD_V1_TYPE:
mss = tsoInfo.LsoV1Transmit.MSS;
break;
case NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE:
mss = tsoInfo.LsoV2Transmit.MSS;
break;
default:
OVS_LOG_ERROR("Unknown LSO transmit type:%d",
tsoInfo.Transmit.Type);
}
OVS_LOG_TRACE("MSS %u packet len %u", mss,
packetLength);
if (tsoInfo.LsoV1Transmit.MSS) {
if (mss) {
OVS_LOG_TRACE("l4Offset %d", layers->l4Offset);
*newNbl = OvsTcpSegmentNBL(switchContext, curNbl, layers,
tsoInfo.LsoV1Transmit.MSS, headRoom);
mss, headRoom);
if (*newNbl == NULL) {
OVS_LOG_ERROR("Unable to segment NBL");
return NDIS_STATUS_FAILURE;
Expand Down

0 comments on commit a274c2c

Please sign in to comment.