datapath-windows/ovsext/Offload.c
/*
 * OVSGetTcpMSS --
 *
 * This function returns the maximum segment size of the given NBL. It takes
 * into consideration both LSO v1 and v2.
 */
OVSGetTcpMSS
This function returns the maximum segment size of the given NBL. It takes
into consideration both LSO v1 and v2.
OVSGetTcpMSS This function returns the maximum segment size of the given NBL . It takes into consideration both LSO v1 and v2 .
ULONG
OVSGetTcpMSS(PNET_BUFFER_LIST nbl)
{
    NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO lsoInfo;
    ASSERT(nbl != NULL);
    lsoInfo.Value = NET_BUFFER_LIST_INFO(nbl,
                                         TcpLargeSendNetBufferListInfo);
    switch (lsoInfo.Transmit.Type) {
        case NDIS_TCP_LARGE_SEND_OFFLOAD_V1_TYPE:
            return lsoInfo.LsoV1Transmit.MSS;
            break;
        case NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE:
            return lsoInfo.LsoV2Transmit.MSS;
            break;
        default:
            OVS_LOG_ERROR("Unknown LSO transmit type:%d",
                          lsoInfo.Transmit.Type);
            return 0;
    }
}
ULONG OVSGetTcpMSS ( PNET_BUFFER_LIST nbl ) { NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO lsoInfo ; ASSERT ( nbl != NULL ) ; lsoInfo . Value = NET_BUFFER_LIST_INFO ( nbl , TcpLargeSendNetBufferListInfo ) ; switch ( lsoInfo . Transmit . Type ) { case NDIS_TCP_LARGE_SEND_OFFLOAD_V1_TYPE : return lsoInfo . LsoV1Transmit . MSS ; break ; case NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE : return lsoInfo . LsoV2Transmit . MSS ; break ; default : OVS_LOG_ERROR ( " " , lsoInfo . Transmit . Type ) ; return 0 ; } }
OVSGetTcpMSS
 This function returns the maximum segment size of the given NBL.
OVSGetTcpMSS This function returns the maximum segment size of the given NBL .