public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* SNP Receive callback
@ 2016-11-09  7:13 Meenakshi Aggarwal
  0 siblings, 0 replies; only message in thread
From: Meenakshi Aggarwal @ 2016-11-09  7:13 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi,


I am implementing network driver for my arm based Soc which installs SNP protocol.

As per explanation of EFI_SIMPLE_NETWORK.Receive() in UEFI spec 2.6,

typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
OUT UINTN *HeaderSize OPTIONAL,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
OUT UINT16 *Protocol OPTIONAL
);

If there is a packet on the receive queue, and the size of the packet is smaller than BufferSize, then the contents of the packet will be placed in Buffer, and BufferSize will be updated with the actual size of the packet.
If BufferSize is smaller than the received packet, then the size of the receive packet will be placed in BufferSize and EFI_BUFFER_TOO_SMALL will be returned.


In my case I am receiving-
first packet of size 311 (buffersize is 2048), so I updated buffersize to 311.
Second packet of size 316 (buffersize is 311), so I updated buffersize to 316 and returned EFI_BUFFER_TOO_SMALL.

Now if I try to assign IP to my interface using dhcp then it doesn't work.
If I assign IP statically and try to ping then too it doesn't work.


But if I comment out "return EFI_BUFFER_TOO_SMALL" from my SNP receive callback, then everything starts working.


Please help me in understanding what am I missing in my network driver. Why it is not working if I follow UEFI spec for SNP receive callback.


Thanks & Regards,
Meenakshi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-09  7:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09  7:13 SNP Receive callback Meenakshi Aggarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox