public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>,
	Masami Hiramatsu <masami.hiramatsu@linaro.org>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	u-boot@lists.denx.de
Subject: [PATCH 0/3] efi_selftest: Update SIMPLE_NETWORK_PROTOCOL selftest
Date: Thu, 16 Sep 2021 17:53:18 +0900	[thread overview]
Message-ID: <163178239865.65790.17211919979018423637.stgit@localhost> (raw)

Hello Heinrich,

Here is a series of patches to update the SIMPLE_NETWORK_PROTOCOL
according to the explanation in the previous thread [1].

[1] https://lists.denx.de/pipermail/u-boot/2021-September/460711.html

So basically this seires modifies the SNP testcase as I said
in the previous mail [1].

----
net->get_status();
if (!net->mode.MediaPresent) {
   error(no link up!)
   return;
}

submit_dhcp_discover()
for (;;) {
   wait_for_event(net)
   while (net->receive() != EFI_NOT_READY) {
      // check dhcp reply
   }
}
----

I removed EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT check because
that is just expectation what the received packet avaiability
is meaning that the EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT flag
bit is set. Of course U-Boot EFI SNP implementation does it,
but that is not ensured in the UEFI spec. The spec said that
the get_status() should update the MediaPresent flag (which
means the network link up or down). So I added the get_status()
test case before starting the network test so that it can
test the link status.

BTW, actually the mode->media_present is not supported yet.
Is there any way to get the network link status?

Thank you,

---

Masami Hiramatsu (3):
      efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for media check
      efi_selftest: Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT
      efi_selftest: Recieve the packets until the receive buffer is empty


 lib/efi_selftest/efi_selftest_snp.c |   90 +++++++++++++++++++----------------
 1 file changed, 49 insertions(+), 41 deletions(-)

--
Masami Hiramatsu <masami.hiramatsu@linaro.org>

             reply	other threads:[~2021-09-16  8:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16  8:53 Masami Hiramatsu [this message]
2021-09-16  8:53 ` [PATCH 1/3] efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for media check Masami Hiramatsu
2021-09-16  8:53 ` [PATCH 2/3] efi_selftest: Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT Masami Hiramatsu
2021-09-16  9:30   ` Heinrich Schuchardt
2021-09-16  9:57     ` Masami Hiramatsu
2021-09-16  8:53 ` [PATCH 3/3] efi_selftest: Recieve the packets until the receive buffer is empty Masami Hiramatsu
2021-09-16  9:29   ` Heinrich Schuchardt
2021-09-16 10:05     ` Masami Hiramatsu
2021-09-17  3:54 ` [PATCH 0/3] efi_selftest: Update SIMPLE_NETWORK_PROTOCOL selftest Heinrich Schuchardt
2021-09-17  4:47   ` Masami Hiramatsu
2021-10-04  5:08     ` Masami Hiramatsu

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-all 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=163178239865.65790.17211919979018423637.stgit@localhost \
    --to=masami.hiramatsu@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=sakamoto.kazuhiko@socionext.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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