ReactOS  0.4.15-dev-4872-g8a3db97
send.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS nVidia nForce Ethernet Controller Driver
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Packet sending
5  * COPYRIGHT: Copyright 2021-2022 Dmitry Borisov <di.sean@protonmail.com>
6  */
7 
8 /* INCLUDES *******************************************************************/
9 
10 #include "nvnet.h"
11 
12 #define NDEBUG
13 #include "debug.h"
14 
15 /* FUNCTIONS ******************************************************************/
16 
17 VOID
19  _In_ PNVNET_ADAPTER Adapter,
20  _In_ PNVNET_TCB Tcb,
22 {
23  NVNET_TBD Tbd, LastTbd;
24  ULONG i, Flags;
25  ULONG Slots;
26 
27  Flags = 0;
28  Slots = 0;
29  Tbd = Adapter->Send.CurrentTbd;
30 
31  for (i = 0; i < SgList->NumberOfElements; ++i)
32  {
33  ULONG Address = NdisGetPhysicalAddressLow(SgList->Elements[i].Address);
34  ULONG Length = SgList->Elements[i].Length;
35 
37  {
38  ULONG ImplicitEntries = NV_IMPLICIT_ENTRIES(Length);
39 
40  do
41  {
42  ++Slots;
43 
44  Tbd.x32->Address = Address;
45  Tbd.x32->FlagsLength = Flags | (NV_MAXIMUM_SG_SIZE - 1);
46  LastTbd = Tbd;
47  Tbd = NV_NEXT_TBD_32(Adapter, Tbd);
48 
50 
53 
54  --ImplicitEntries;
55  }
56  while (ImplicitEntries);
57  }
58 
59  ++Slots;
60 
61  Tbd.x32->Address = Address;
62  Tbd.x32->FlagsLength = Flags | (Length - 1);
63  LastTbd = Tbd;
64  Tbd = NV_NEXT_TBD_32(Adapter, Tbd);
65 
67  }
68 
69  Tcb->Slots = Slots;
70  Tcb->Tbd = LastTbd;
71 
72  if (Adapter->Features & DEV_HAS_LARGEDESC)
73  {
74  LastTbd.x32->FlagsLength |= NV_TX2_LASTPACKET;
75  }
76  else
77  {
78  LastTbd.x32->FlagsLength |= NV_TX_LASTPACKET;
79  }
80 
81  if (Tcb->Flags & NV_TCB_LARGE_SEND)
82  {
83  Flags |= (Tcb->Mss << NV_TX2_TSO_SHIFT) | NV_TX2_TSO;
84  }
85  else
86  {
87  if (Tcb->Flags & NV_TCB_CHECKSUM_IP)
88  {
90  }
91  if (Tcb->Flags & (NV_TCB_CHECKSUM_TCP | NV_TCB_CHECKSUM_UDP))
92  {
94  }
95  }
96 
97  Adapter->Send.CurrentTbd.x32->FlagsLength |= Flags;
98  Adapter->Send.CurrentTbd = Tbd;
99 
100  NV_WRITE(Adapter, NvRegTxRxControl, Adapter->TxRxControl | NVREG_TXRXCTL_KICK);
101 }
102 
103 VOID
105  _In_ PNVNET_ADAPTER Adapter,
106  _In_ PNVNET_TCB Tcb,
108 {
109  NVNET_TBD Tbd, LastTbd;
110  ULONG i, Flags;
111  ULONG Slots;
112 
113  Flags = 0;
114  Slots = 0;
115  Tbd = Adapter->Send.CurrentTbd;
116 
117  for (i = 0; i < SgList->NumberOfElements; ++i)
118  {
119  ULONG64 Address = SgList->Elements[i].Address.QuadPart;
120  ULONG Length = SgList->Elements[i].Length;
121 
123  {
124  ULONG ImplicitEntries = NV_IMPLICIT_ENTRIES(Length);
125 
126  do
127  {
128  ++Slots;
129 
130  Tbd.x64->AddressLow = (ULONG)Address;
131  Tbd.x64->AddressHigh = Address >> 32;
132  Tbd.x64->VlanTag = 0;
133  Tbd.x64->FlagsLength = Flags | (NV_MAXIMUM_SG_SIZE - 1);
134  LastTbd = Tbd;
135  Tbd = NV_NEXT_TBD_64(Adapter, Tbd);
136 
138 
141 
142  --ImplicitEntries;
143  }
144  while (ImplicitEntries);
145  }
146 
147  ++Slots;
148 
149  Tbd.x64->AddressLow = (ULONG)Address;
150  Tbd.x64->AddressHigh = Address >> 32;
151  Tbd.x64->VlanTag = 0;
152  Tbd.x64->FlagsLength = Flags | (Length - 1);
153  LastTbd = Tbd;
154  Tbd = NV_NEXT_TBD_64(Adapter, Tbd);
155 
157  }
158 
159  Tcb->Slots = Slots;
160  Tcb->Tbd = LastTbd;
161 
162  LastTbd.x64->FlagsLength |= NV_TX2_LASTPACKET;
163 
164  if (Adapter->Flags & NV_SEND_ERRATA_PRESENT)
165  {
166  if (Adapter->Send.PacketsCount == NV_TX_LIMIT_COUNT)
167  {
168  Tcb->DeferredTbd = Adapter->Send.CurrentTbd;
169 
170  if (!Adapter->Send.DeferredTcb)
171  {
172  Adapter->Send.DeferredTcb = Tcb;
173  }
174 
175  Flags = 0;
176  }
177  else
178  {
179  ++Adapter->Send.PacketsCount;
180  }
181  }
182 
183  if (Tcb->Flags & NV_TCB_LARGE_SEND)
184  {
185  Flags |= (Tcb->Mss << NV_TX2_TSO_SHIFT) | NV_TX2_TSO;
186  }
187  else
188  {
189  if (Tcb->Flags & NV_TCB_CHECKSUM_IP)
190  {
192  }
193  if (Tcb->Flags & (NV_TCB_CHECKSUM_TCP | NV_TCB_CHECKSUM_UDP))
194  {
196  }
197  }
198 
199  // Adapter->Send.CurrentTbd.x64->VlanTag = NV_TX3_VLAN_TAG_PRESENT; TODO
200  Adapter->Send.CurrentTbd.x64->FlagsLength |= Flags;
201  Adapter->Send.CurrentTbd = Tbd;
202 
203  NV_WRITE(Adapter, NvRegTxRxControl, Adapter->TxRxControl | NVREG_TXRXCTL_KICK);
204 }
205 
206 static
208 ULONG
210  _In_ PNVNET_ADAPTER Adapter,
212 {
214  PVOID Address;
215  UINT CurrentLength;
216  UINT PacketLength;
217  PIPv4_HEADER IpHeader;
218  PTCPv4_HEADER TcpHeader;
219  ULONG BytesCopied = 0;
220  UCHAR Buffer[136];
221 
223  &CurrentBuffer,
224  &Address,
225  &CurrentLength,
226  &PacketLength,
228  if (!Address)
229  return 0;
230 
231  while (TRUE)
232  {
233  CurrentLength = min(CurrentLength, sizeof(Buffer) - BytesCopied);
234 
235  NdisMoveMemory(&Buffer[BytesCopied], Address, CurrentLength);
236  BytesCopied += CurrentLength;
237 
238  if (BytesCopied >= sizeof(Buffer))
239  break;
240 
242 
243  if (!CurrentBuffer)
244  return 0;
245 
247  &Address,
248  &CurrentLength,
250  }
251 
252  IpHeader = (PIPv4_HEADER)&Buffer[Adapter->IpHeaderOffset];
253  TcpHeader = (PTCPv4_HEADER)((PUCHAR)IpHeader + IP_HEADER_LENGTH(IpHeader));
254 
255  return IP_HEADER_LENGTH(IpHeader) + TCP_HEADER_LENGTH(TcpHeader);
256 }
257 
258 static
259 BOOLEAN
261  _In_ PNVNET_ADAPTER Adapter,
264 {
266  PVOID Address;
267  UINT CurrentLength;
268  UINT PacketLength;
270 
272  &CurrentBuffer,
273  &Address,
274  &CurrentLength,
275  &PacketLength,
277  if (!Address)
278  return FALSE;
279 
280  Destination = Buffer->VirtualAddress;
281 
282  while (TRUE)
283  {
284  NdisMoveMemory(Destination, Address, CurrentLength);
285  Destination += CurrentLength;
286 
288 
289  if (!CurrentBuffer)
290  break;
291 
293  &Address,
294  &CurrentLength,
296  if (!Address)
297  return FALSE;
298  }
299 
300  return TRUE;
301 }
302 
303 static
306  _In_ PNVNET_ADAPTER Adapter,
309 {
311  ULONG Mss, Length;
312  PNVNET_TCB Tcb;
313 
314  if (!Adapter->Send.TcbSlots)
315  {
316  return NDIS_STATUS_RESOURCES;
317  }
318 
320 
321  /* Make sure we have room to setup all fragments */
323  ASSERT(SgList->NumberOfElements +
326 
327  if (SgList->NumberOfElements +
328  (NVNET_MAXIMUM_LSO_FRAME_SIZE / (NV_MAXIMUM_SG_SIZE + 1)) < Adapter->Send.TbdSlots)
329  {
330  return NDIS_STATUS_RESOURCES;
331  }
332 
334  if (!Length)
335  {
336  return NDIS_STATUS_RESOURCES;
337  }
338 
340  UlongToPtr(TotalLength - Adapter->IpHeaderOffset - Length);
341 
342  --Adapter->Send.TcbSlots;
343 
345 
346  Tcb = Adapter->Send.CurrentTcb;
347  Tcb->Mss = Mss;
348  Tcb->Packet = Packet;
349  Tcb->Flags = NV_TCB_LARGE_SEND;
350 
351  Adapter->TransmitPacket(Adapter, Tcb, SgList);
352 
353  ASSERT(Adapter->Send.TbdSlots >= Tcb->Slots);
354  Adapter->Send.TbdSlots -= Tcb->Slots;
355 
356  Adapter->Send.CurrentTcb = NV_NEXT_TCB(Adapter, Tcb);
357 
358  return NDIS_STATUS_SUCCESS;
359 }
360 
361 static
362 ULONG
364  _In_ PNVNET_ADAPTER Adapter,
366 {
367  ULONG Flags;
369 
371  return 0;
372 
375 
376  Flags = 0;
377  if (ChecksumInfo.Transmit.NdisPacketChecksumV4)
378  {
379  if (ChecksumInfo.Transmit.NdisPacketTcpChecksum && Adapter->Offload.SendTcpChecksum)
380  {
382  }
383  if (ChecksumInfo.Transmit.NdisPacketUdpChecksum && Adapter->Offload.SendUdpChecksum)
384  {
386  }
387  if (ChecksumInfo.Transmit.NdisPacketIpChecksum && Adapter->Offload.SendIpChecksum)
388  {
390  }
391  }
392 
393  return Flags;
394 }
395 
396 static
399  _In_ PNVNET_ADAPTER Adapter,
402 {
404  SCATTER_GATHER_LIST LocalSgList;
405  PNVNET_TCB Tcb;
406  ULONG Flags;
407 
408  ASSERT(TotalLength <= Adapter->MaximumFrameSize);
409 
410  if (!Adapter->Send.TcbSlots)
411  {
412  return NDIS_STATUS_RESOURCES;
413  }
414 
415  Flags = NvNetGetChecksumInfo(Adapter, Packet);
416 
418 
419  if (SgList->NumberOfElements > NVNET_FRAGMENTATION_THRESHOLD)
420  {
421  if (!Adapter->Send.TbdSlots || !Adapter->Send.BufferList.Next)
422  {
423  return NDIS_STATUS_RESOURCES;
424  }
425  else
426  {
427  PNVNET_TX_BUFFER CoalesceBuffer;
429 
430  --Adapter->Send.TcbSlots;
431 
432  CoalesceBuffer = (PNVNET_TX_BUFFER)PopEntryList(&Adapter->Send.BufferList);
433 
434  NdisDprReleaseSpinLock(&Adapter->Send.Lock);
435 
436  Success = NvNetCopyPacket(Adapter, Packet, CoalesceBuffer);
437 
438  NdisDprAcquireSpinLock(&Adapter->Send.Lock);
439 
440  if (!Success || !Adapter->Send.TbdSlots || !(Adapter->Flags & NV_ACTIVE))
441  {
442  PushEntryList(&Adapter->Send.BufferList, &CoalesceBuffer->Link);
443 
444  ++Adapter->Send.TcbSlots;
445 
446  return NDIS_STATUS_RESOURCES;
447  }
448 
450 
451  LocalSgList.NumberOfElements = 1;
452  LocalSgList.Elements[0].Address = CoalesceBuffer->PhysicalAddress;
453  LocalSgList.Elements[0].Length = TotalLength;
454  SgList = &LocalSgList;
455 
456  Tcb = Adapter->Send.CurrentTcb;
457  Tcb->Buffer = CoalesceBuffer;
458  }
459  }
460  else
461  {
462  if (SgList->NumberOfElements +
463  (NVNET_MAXIMUM_FRAME_SIZE_JUMBO / (NV_MAXIMUM_SG_SIZE + 1)) > Adapter->Send.TbdSlots)
464  {
465  return NDIS_STATUS_RESOURCES;
466  }
467 
468  --Adapter->Send.TcbSlots;
469 
470  Tcb = Adapter->Send.CurrentTcb;
471  }
472 
473  Tcb->Packet = Packet;
474  Tcb->Flags = Flags;
475 
476  Adapter->TransmitPacket(Adapter, Tcb, SgList);
477 
478  ASSERT(Adapter->Send.TbdSlots >= Tcb->Slots);
479  Adapter->Send.TbdSlots -= Tcb->Slots;
480 
481  Adapter->Send.CurrentTcb = NV_NEXT_TCB(Adapter, Tcb);
482 
483  return NDIS_STATUS_PENDING;
484 }
485 
486 /* FIXME: Use the proper send function (MiniportSendPackets) */
488 NTAPI
490  _In_ NDIS_HANDLE MiniportAdapterContext,
492  _In_ UINT Flags)
493 {
494  PNVNET_ADAPTER Adapter = (PNVNET_ADAPTER)MiniportAdapterContext;
497 
498  NDIS_DbgPrint(MIN_TRACE, ("()\n"));
499 
501 
502  NdisDprAcquireSpinLock(&Adapter->Send.Lock);
503 
504  if (!(Adapter->Flags & NV_ACTIVE))
505  {
506  NdisDprReleaseSpinLock(&Adapter->Send.Lock);
507 
508  return NDIS_STATUS_FAILURE;
509  }
510 
511  if (Adapter->Flags & NV_SEND_LARGE_SEND &&
513  {
515  }
516  else
517  {
519  }
520 
521  NdisDprReleaseSpinLock(&Adapter->Send.Lock);
522 
523  return Status;
524 }
ULONG AddressLow
Definition: nic.h:364
#define NV_TCB_LARGE_SEND
Definition: nvnet.h:212
static ACPI_BUFFER CurrentBuffer
#define NV_TX2_LASTPACKET
Definition: nic.h:387
struct _NVNET_ADAPTER * PNVNET_ADAPTER
Definition: nvnet.h:259
#define NV_SEND_LARGE_SEND
Definition: nvnet.h:288
#define NV_TCB_CHECKSUM_TCP
Definition: nvnet.h:214
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
ULONG FlagsLength
Definition: nic.h:358
ULONG Flags
Definition: nvnet.h:285
#define NDIS_STATUS_PENDING
Definition: ndis.h:347
ULONG Slots
Definition: nvnet.h:210
#define TRUE
Definition: types.h:120
VOID EXPORT NdisDprReleaseSpinLock(IN PNDIS_SPIN_LOCK SpinLock)
Definition: control.c:187
ULONG AddressHigh
Definition: nic.h:363
MDL * PNDIS_BUFFER
Definition: ndis.h:343
#define NV_TX2_VALID
Definition: nic.h:397
unsigned char * PUCHAR
Definition: retypes.h:3
NDIS_PHYSICAL_ADDRESS PhysicalAddress
Definition: nvnet.h:194
#define NV_MAXIMUM_SG_SIZE
Definition: nic.h:404
static DECLSPEC_NOINLINE ULONG NvNetQueryTcpIpHeaders(_In_ PNVNET_ADAPTER Adapter, _In_ PNDIS_PACKET Packet)
Definition: send.c:209
#define NV_TCB_CHECKSUM_UDP
Definition: nvnet.h:215
SINGLE_LIST_ENTRY Link
Definition: nvnet.h:192
static NDIS_STATUS NvNetSendPacket(_In_ PNVNET_ADAPTER Adapter, _In_ PNDIS_PACKET Packet, _In_ ULONG TotalLength)
Definition: send.c:398
struct _NDIS_TCP_IP_CHECKSUM_PACKET_INFO::@2065::@2067 Transmit
#define NV_TX2_CHECKSUM_L3
Definition: nic.h:401
_In_ ULONG TotalLength
Definition: usbdlib.h:158
#define NVNET_FRAGMENTATION_THRESHOLD
Definition: nvnet.h:55
#define NVNET_MAXIMUM_LSO_FRAME_SIZE
Definition: nvnet.h:67
#define NDIS_GET_PACKET_PROTOCOL_TYPE(_Packet)
Definition: ndis.h:3410
#define NV_TX_LASTPACKET
Definition: nic.h:375
#define NV_IMPLICIT_ENTRIES(Length)
Definition: nvnet.h:585
#define NdisGetNextBuffer(CurrentBuffer, NextBuffer)
Definition: ndis.h:3386
int NDIS_STATUS
Definition: ntddndis.h:475
#define NV_TX2_TSO
Definition: nic.h:398
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:253
VOID EXPORT NdisDprAcquireSpinLock(IN PNDIS_SPIN_LOCK SpinLock)
Definition: control.c:169
#define TCP_HEADER_LENGTH(pHeader)
Definition: sw-offload.c:92
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
#define NV_TX2_TSO_SHIFT
Definition: nic.h:399
unsigned char BOOLEAN
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
Definition: ndis.h:3167
static WCHAR Address[46]
Definition: ping.c:68
#define _In_
Definition: ms_sal.h:308
FORCEINLINE VOID NV_WRITE(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_REGISTER Register, _In_ ULONG Value)
Definition: nvnet.h:646
Definition: bufpool.h:45
#define C_ASSERT(e)
Definition: intsafe.h:73
FORCEINLINE NVNET_TBD NV_NEXT_TBD_32(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_TBD Tbd)
Definition: nvnet.h:622
struct _SCATTER_GATHER_LIST SCATTER_GATHER_LIST
Definition: iotypes.h:2204
struct IPv4_HEADER * PIPv4_HEADER
#define UlongToPtr(u)
Definition: config.h:106
#define PtrToUlong(u)
Definition: config.h:107
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead)
Definition: rtlfuncs.h:240
VOID EXPORT NdisGetFirstBufferFromPacketSafe(IN PNDIS_PACKET _Packet, OUT PNDIS_BUFFER *_FirstBuffer, OUT PVOID *_FirstBufferVA, OUT PUINT _FirstBufferLength, OUT PUINT _TotalBufferLength, IN MM_PAGE_PRIORITY Priority)
Definition: buffer.c:918
Status
Definition: gdiplustypes.h:24
#define NVNET_TRANSMIT_DESCRIPTORS
Definition: nvnet.h:32
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
FORCEINLINE PNVNET_TCB NV_NEXT_TCB(_In_ PNVNET_ADAPTER Adapter, _In_ PNVNET_TCB Tcb)
Definition: nvnet.h:610
PNVNET_DESCRIPTOR_64 x64
Definition: nvnet.h:200
#define ASSERT(a)
Definition: mode.c:44
struct _NVNET_TX_BUFFER * PNVNET_TX_BUFFER
NDIS_SPIN_LOCK Lock
Definition: nvnet.h:237
static BOOLEAN NvNetCopyPacket(_In_ PNVNET_ADAPTER Adapter, _In_ PNDIS_PACKET Packet, _In_ PNVNET_TX_BUFFER Buffer)
Definition: send.c:260
VOID NvNetTransmitPacket32(_In_ PNVNET_ADAPTER Adapter, _In_ PNVNET_TCB Tcb, _In_ PSCATTER_GATHER_LIST SgList)
Definition: send.c:18
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2950
static NDIS_STATUS NvNetSendPacketLargeSend(_In_ PNVNET_ADAPTER Adapter, _In_ PNDIS_PACKET Packet, _In_ ULONG TotalLength)
Definition: send.c:305
PNVNET_TX_BUFFER Buffer
Definition: nvnet.h:209
#define NV_TCB_CHECKSUM_IP
Definition: nvnet.h:213
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
unsigned __int64 ULONG64
Definition: imports.h:198
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID EXPORT NdisQueryBufferSafe(IN PNDIS_BUFFER Buffer, OUT PVOID *VirtualAddress OPTIONAL, OUT PUINT Length, IN UINT Priority)
Definition: buffer.c:981
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION _In_ PSCATTER_GATHER_LIST SgList
#define NVNET_MAXIMUM_FRAME_SIZE_JUMBO
Definition: nvnet.h:61
#define IP_HEADER_LENGTH(pHeader)
Definition: sw-offload.c:91
#define PAGE_SIZE
Definition: env_spec_w32.h:49
PNVNET_DESCRIPTOR_32 x32
Definition: nvnet.h:199
#define NVREG_TXRXCTL_KICK
Definition: nic.h:202
#define NV_TX_LIMIT_COUNT
Definition: nic.h:567
PNDIS_PACKET Packet
Definition: nvnet.h:208
#define NV_TX_VALID
Definition: nic.h:385
#define NV_SEND_ERRATA_PRESENT
Definition: nvnet.h:289
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
FORCEINLINE NVNET_TBD NV_NEXT_TBD_64(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_TBD Tbd)
Definition: nvnet.h:634
#define NdisQueryPacketLength(_Packet, _TotalPacketLength)
Definition: ndis.h:3645
#define min(a, b)
Definition: monoChain.cc:55
ULONG Mss
Definition: nvnet.h:218
unsigned int UINT
Definition: ndis.h:50
#define NV_TX2_CHECKSUM_L4
Definition: nic.h:402
#define NDIS_PROTOCOL_ID_TCP_IP
Definition: ndis.h:1030
#define NDIS_DbgPrint(_t_, _x_)
Definition: debug.h:40
ULONG FlagsLength
Definition: nic.h:366
NDIS_STATUS NTAPI MiniportSend(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ PNDIS_PACKET Packet, _In_ UINT Flags)
Definition: send.c:49
#define NV_TCB_COALESCE
Definition: nvnet.h:216
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2204
#define NDIS_STATUS_RESOURCES
Definition: ndis.h:466
unsigned int ULONG
Definition: retypes.h:1
#define NV_ACTIVE
Definition: nvnet.h:286
#define MIN_TRACE
Definition: debug.h:14
#define DEV_HAS_LARGEDESC
Definition: nic.h:20
ULONG Flags
Definition: nvnet.h:211
VOID NvNetTransmitPacket64(_In_ PNVNET_ADAPTER Adapter, _In_ PNVNET_TCB Tcb, _In_ PSCATTER_GATHER_LIST SgList)
Definition: send.c:104
#define NdisGetPhysicalAddressLow(PhysicalAddress)
Definition: ndis.h:3847
#define NdisMoveMemory(Destination, Source, Length)
Definition: ndis.h:3896
#define DECLSPEC_NOINLINE
Definition: ntbasedef.h:225
#define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType)
Definition: ndis.h:1351
static ULONG NvNetGetChecksumInfo(_In_ PNVNET_ADAPTER Adapter, _In_ PNDIS_PACKET Packet)
Definition: send.c:363
NVNET_SEND Send
Definition: nvnet.h:310
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465