mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
datapath-windows: Add LSOv2 support for VXLAN
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>
This commit is contained in:
@@ -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
|
||||
@@ -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;
|
||||
|
Reference in New Issue
Block a user