From: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: SNP Receive callback
Date: Wed, 9 Nov 2016 07:13:34 +0000 [thread overview]
Message-ID: <DB5PR04MB09986A48EE1EE8E64D91826F8EB90@DB5PR04MB0998.eurprd04.prod.outlook.com> (raw)
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
reply other threads:[~2016-11-09 7:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB5PR04MB09986A48EE1EE8E64D91826F8EB90@DB5PR04MB0998.eurprd04.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox