Re: OID_TCP_TASK_OFFLOAD problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Guys,

Apparently, the problem is telling the TCP/IP transport of the size of the
buffer that my NDIS_TASK_OFFLOAD needs. The driver now tells the querying
module of the number of bytes it needs and the querying module will provide
the necessary buffer size.

Bottomline: always check for the available buffers. :)

Best Regards,
Rodel

"Rodel Miguel" <rodel_miguel@xxxxxxxxx> wrote in message
news:%23pE1mKSwGHA.4872@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

My WinCE version is 4.2. I am trying to support checksum offloading on my
NIC. However, I am having some problems with OID_TCP_TASK_OFFLOAD support
on my NDIS driver. Here's the scenario:

OID_TCP_TASK_OFFLOAD is being queried by the TCP/IP transport, which I can
actually verify with some debug messages. I am giving the following
information to the InformationBuffer:

/*--------- start of code segment --------*/
NDIS_TASK_OFFLOAD_HEADER *pNetOffloadInfo = (NDIS_TASK_OFFLOAD_HEADER
*)pBuffer; // pBuffer is the InformationBuffer
NDIS_ENCAPSULATION_FORMAT *pNetEncapsulation =
(NDIS_ENCAPSULATION_FORMAT *)&pNetOffloadInfo->EncapsulationFormat;
NDIS_TASK_OFFLOAD SOffloadCapability, *pSOffloadCapability; // let us
support only checksum capability, let us do large send later
NDIS_TASK_TCP_IP_CHECKSUM SChecksumCapability; // tell NDIS of MAC's
checksum capability

/* offload capability */
SOffloadCapability.Version = 0;
SOffloadCapability.Size = sizeof(NDIS_TASK_OFFLOAD);
SOffloadCapability.Task = TcpIpChecksumNdisTask;
SOffloadCapability.OffsetNextTask = 0; // tell NDIS this is the only
task we have. Let us extend this for Large Sends Later!
SOffloadCapability.TaskBufferLength = sizeof(NDIS_TASK_TCP_IP_CHECKSUM);

/* checksum checking capability */
*((ULONG *)&SChecksumCapability.V6Receive) = 0; // there's IPv6
capability on the MAC, however, we do not need to support it yet
*((ULONG *)&SChecksumCapability.V6Transmit) = 0; // there's IPv6
capability on the MAC, however, we do not need to support it yet
*((ULONG *)&SChecksumCapability.V4Transmit) = 0;
*((ULONG *)&SChecksumCapability.V4Receive) = 0;
SChecksumCapability.V4Transmit.IpOptionsSupported = 1;
SChecksumCapability.V4Transmit.TcpOptionsSupported = 1;
SChecksumCapability.V4Transmit.TcpChecksum = 1;
SChecksumCapability.V4Transmit.UdpChecksum = 1;
SChecksumCapability.V4Transmit.IpChecksum = 1;
SChecksumCapability.V4Receive.IpOptionsSupported = 1;
SChecksumCapability.V4Receive.TcpOptionsSupported = 1;
SChecksumCapability.V4Receive.TcpChecksum = 1;
SChecksumCapability.V4Receive.UdpChecksum = 1;
SChecksumCapability.V4Receive.IpChecksum = 1;

/* copy the offload capability to the information buffer */
pNetOffloadInfo->OffsetFirstTask = sizeof(NDIS_TASK_OFFLOAD_HEADER); //
pNetOffloadInfo points to the InformationBuffer which contains the
NDIS_TASK_OFFLOAD_HEADER
pSOffloadCapability = (NDIS_TASK_OFFLOAD *)((BYTE *)pBuffer +
pNetOffloadInfo->OffsetFirstTask);
memcpy((void *)pSOffloadCapability, (void *)&SOffloadCapability,
sizeof(NDIS_TASK_OFFLOAD));
memcpy((void *)pSOffloadCapability->TaskBuffer, (void
*)&SChecksumCapability, sizeof(NDIS_TASK_TCP_IP_CHECKSUM));
/*--------- end of code segment --------*/

As a summary on the code fragment that I have given, I want to support
only TCP/IPv4 checksum offloading.
I assume that the TCP/IP stack of WinCE would automatically SET this OID,
however no set is being given by the stack. I have tried looking into the
following:

1. Assuming that the Network Application (not the WinCE's TCP/IP stack)
requests for this feature: setsockopt - there's no option to support
checksum offloading.
2. TCP/IP registry settings - there's no specific to checksum
offloading key based on the documentation
3. Check on the Send routine if the TCP/IP is actually requesting
checksum offloading, the macro NDIS_PER_PACKET_INFO_FROM_PACKET(Packet,
TcpIpChecksumPacketInfo) returns NULL always.

With this background, I have the following questions:
1. How can we be sure that TCP/IP is not having errors whenever it queries
OID_TCP_TASK_OFFLOAD?
2. Would TCP/IP stack know if we forcefully set the OID_TCP_TASK_OFFLOAD
using for example DeviceIoControl?
3. Is there a way to set this OID with Windows sockets or any other means
at the Application layer?

Thank you very much for your help!

Best Regards,
Rodel



.



Relevant Pages

  • OID_TCP_TASK_OFFLOAD problem
    ... I am having some problems with OID_TCP_TASK_OFFLOAD support ... support only checksum capability, let us do large send later ... TCP/IPv4 checksum offloading. ... I assume that the TCP/IP stack of WinCE would automatically SET this OID, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: terminal servers, X-terminals in upgrade to Integrity
    ... I wonder if these will work if I upgrade to Integrity Servers? ... So there is a chance that the only thing that you need to do to use your Xyplex on an Integrity VMS system is to make sure that the LAT protocol is started. ... It may also allow TCP/IP to be used to manage it, once a TCPIP address is assigned. ... Current TCP/IP and DECW-Motif both support TCP/IP including font servers. ...
    (comp.os.vms)
  • Re: TN3270 *from* a host??
    ... escaped my extensive testing of the function in the earliest TCP/IP for MVS ... That such a handy function would escape ... It's also remarkable that the TELNET client in the Communications Server IP ... the READY prompt does support TN3270. ...
    (bit.listserv.ibm-main)
  • RE: Is it possible to disable NETBIOS and still allow NTLM and Kerberos authentication?
    ... I think what you mentioned is the NetBIOS over TCP/IP options in TCP/IP ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.inetserver.iis.security)
  • Re: whiny question: Why wont z/OS support the HMC 3270 emulator
    ... VM had TCP/IP first. ... some old mainframe tcp/ip folklore ... ... subcontract to implement tcp/ip support in vtam. ... more efficient than tcp ... ...
    (bit.listserv.ibm-main)