public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Tomas Pilar (tpilar)" <tpilar@solarflare.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Network Stack Budgeting
Date: Wed, 23 Jan 2019 23:18:45 +0100	[thread overview]
Message-ID: <67f8fb4a-5e1b-8bbc-90d4-670ff7e3bfe8@redhat.com> (raw)
In-Reply-To: <09017041-d418-1186-9942-dfa70d82c4d6@solarflare.com>

On 01/23/19 17:27, Tomas Pilar (tpilar) wrote:
>
>> The set of devices connected during BDS is platform policy. It is not
>> the "network stack" that calls Snp.Start(), but the platform BDS code
>> that calls gBS->ConnectController() on the device, possibly without a
>> good reason (e.g. without the device being present in a UEFI boot
>> option). The network stack only "reacts" to that connection request.

> Indeed, but even if a SNP handle is present as a boot option in a boot
> manager, surely the Snp.Start() should be deferred until the user
> actually chooses to boot from that handle.

Yes, I agree. As far as I remember, UefiBootManagerLib is compatible
with that idea (it makes sure the device path is connected before the
boot is attempted). So again, the deferral you suggest applies to
platform BDS.

> A workaround that we have in the legacy implementation doesn't start
> the underlying hardware datapath until the platform tries to send the
> first packet (since PXE boot is always initiated by the client) but
> that is a horrible hack that should not be necessary. The distinction
> between Snp.Initialize() and Snp.Start() is there exactly for that
> reason, no?

That's a good question; if someone finds the answer, please let me too
know! :)

> In other words, ConnectController() should not immediately result in
> Snp.Start() being called.

Hmm, now that you put it like this, it's hard for me to comment on this
specific statement. I'm unsure if the higher level network drivers can
do their jobs (i.e. just bind the device) without calling Snp.Start(). I
haven't implemented anything higher level than SNP; I'm not sure about
MNP etc. internals. I do admit your original point makes a lot more
sense to me now.

Can you capture a call stack when Snp.Start() is invoked for the very
first time (which, IIUC, is a call that should not happen, in your
opinion)?

Thanks
Laszlo


  parent reply	other threads:[~2019-01-23 22:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 10:55 Network Stack Budgeting Tomas Pilar (tpilar)
2019-01-23 14:14 ` Ye, Ting
2019-01-23 14:51   ` Tomas Pilar (tpilar)
2019-01-23 16:08 ` Laszlo Ersek
2019-01-23 16:27   ` Tomas Pilar (tpilar)
2019-01-23 17:47     ` Andrew Fish
2019-01-23 22:18     ` Laszlo Ersek [this message]
2019-01-24 11:37       ` Tomas Pilar (tpilar)
2019-01-24 12:25         ` Laszlo Ersek
2019-01-24 12:58           ` Tomas Pilar (tpilar)
2019-01-24 13:25             ` Tomas Pilar (tpilar)
2019-01-24 16:49               ` Laszlo Ersek
2019-01-24 17:43                 ` Tomas Pilar (tpilar)
2019-01-25  8:44                   ` Wu, Jiaxin
2019-01-25 12:08                     ` Tomas Pilar (tpilar)
2019-01-27 14:28                       ` Fu, Siyuan
2019-01-28 11:24                         ` Tomas Pilar (tpilar)
2019-01-29  3:20                           ` Fu, Siyuan
2019-01-29 10:54                             ` Tomas Pilar (tpilar)
2019-01-29 13:06                               ` Fu, Siyuan
2019-01-29 13:12                                 ` Tomas Pilar (tpilar)
2019-01-29 13:42                               ` Laszlo Ersek
2019-01-29 13:52                                 ` Tomas Pilar (tpilar)

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=67f8fb4a-5e1b-8bbc-90d4-670ff7e3bfe8@redhat.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