Large UDP message fails

When I send large UDP message of 65k bytes from user application, I receive it as one NBL, and a multiple NB’. I combine all the nb’s into a single buffer that will have Ethernet header once Mac, IP, UDP. Followed by data. I create one NBL and send it to lower layers using light weight send function. But I can’t see the data in the wireshark.

Is there any restrictions on the size message in one NB.

What are the other cases I need to consider in this case.

Appreciate your help.

Wait a moment. Are you sending to the wire, or receiving from the wire? Why do you mess with NBs? By definition, each NB is a single L2 packet (unless LSO is enabled on send).

The UDP and IP packet length is encoded with 16 bits, header plus payload. 16 bits make 64k I think.

So can you really “combine” NBs into one NB here ?

Have you tried with a 30k UDP message ?

Alex,

I am sending the data to the wire. I am trying to re-use an existing design that used NDIS 5.x, where each Fragment in Ethernet Frame is received at once and then proceed in my code. Now am trying to re-use the same design, so I combine all the NB’s into one Large Data, and do the header modification as needed. Frame the Ethernet Packet as, MAC->IP->UDP->Data.

Yes, UDP maximum payload length is 65535 bytes. I have tried different payload lengths. I can see the data on the wireshark, when the payload length is less than 8300 bytes. When I send data more than this, I can see driver sent the data successfully, but I can’t see the same on the wire.

The ethernet frame payload cannot exceed 1500 bytes.

Each NB is sent as a separate Ethernet frame (or multiple TCP frames with LSO). You should never try to combine them into one frame.