public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tomas Pilar (tpilar)" <tpilar@solarflare.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Network Stack Budgeting
Date: Thu, 24 Jan 2019 11:37:46 +0000	[thread overview]
Message-ID: <5185c0b2-031f-ec50-b273-2665d83ef38a@solarflare.com> (raw)
In-Reply-To: <67f8fb4a-5e1b-8bbc-90d4-670ff7e3bfe8@redhat.com>


Hi Laszlo,

> 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)?
>
Unfortunately I do not have access to the platform firmware itself (I maintain an IHV network driver that's shipped in OptionROMs) and I don't believe a generic stack capture is available in EDK2 yet. However I have comprehensive debug from my driver that shows that our driver gets a DriverBinding.Start() at TPL_APPLICATION and we perform the entire probe at TPL_NOTIFY and as soon as that completes and we drop the TPL, the newly installed SNP gets a Snp.Start() call at TPL_CALLBACK - I assume that MNP or something higher had an event registered that fired as soon as the TPL dropped after the DriverBinding.Start() finished.

Here is a snip of the debug log (that I assume will not be of much interest). We don't observe the actual call to DriverBinding.Start() because the debug output is initialised as one of the first things that method does.


      1 [sfc]..|INFO: [sfc] Debug  Output Initialised
      2 [sfc]..|INFO: Linked list max_size=1000000
      3 [sfc]..|SfcDebugLibStart:208 [Not Found]
      4 [sfc]..|[0x866D9396<] SfcDebugLibStart:222 [Success]
      5 [sfc]..|INFO: Running Solarflare UEFI Driver 2.7.8.5 (f71064c4d0a0) for MEDFORD
      6 [sfc]..|INFO: Ctrl=954E4B18 Driver=954E4418 Image=866B0000 Size=0x4D9C0 loaded from Device=954E4B18
      7 [sfc]..|INFO: Probing PciDev=942C3118
... snip ...
    376 [sfc]..|INFO: Support strings done
    377 [sfc]..|INFO: Hii init on hunt=942A6018 complete
    378 [sfc]..|TRACE: Closing the DeferredInit event
    379 [sfc]..|INFO: Processed deferred init okay
    380 [sfc].|[0x9940F873<] GetSupportedTypes:178 [Success]
    381 [sfc]|[0x9D4E1DE8<] DriverBindingStart:211 [Success]
    382 [sfc].|INFO: Starting SNP=942A2018
    383 [sfc].|[0x99653BA4<] SimpleNetworkStart:33 [Success]
    384 [sfc].|INFO: Init snp=942A2018
    385 [sfc].|TRACE: INIT: Found netdev=942A5D18
    386 [sfc].|INFO: Hunt open netdev=942A5D18
    387 [sfc].|INFO: Resetting mcdi=942A6480
    388 [sfc].|[Base+0x209E0<] HuntReset:312 [Success]
    389 [sfc].|INFO: Allocating vis count=3 on mcdi=942A6480
... snip ...
    491 [sfc].|TRACE: Final state filters=0x942A2018 mcastcnt=7
    492 [sfc].|TRACE: Filter Snp=942A2018 Add=0x7 Del=0x18 Reset=0 McastCount=1 List=9400EE98
    493 [sfc].|TRACE: Final state filters=0x942A2018 mcastcnt=7
    494 [sfc].|TRACE: Filter Snp=942A2018 Add=0x7 Del=0x18 Reset=0 McastCount=2 List=93FB5A98
    495 [sfc].|TRACE: Final state filters=0x942A2018 mcastcnt=7
    496 [sfc]|TRACE: Name Handle=0x954E4B18 PciDev=942C3118 Child=0x0
    497 [sfc]|INFO: STR [*ControllerName]=[Solarflare Adapter 17:00.0]
    498 [sfc]|TRACE: Name Handle=0x954E4B18 PciDev=942C3118 Child=0x942A5F98
    499 [sfc]|INFO: STR [*ControllerName]=[Solarflare NIC [00:0F:53:4C:A7:A0]]
    500 [sfc]..|INFO: [sfc] Debug  Output Initialised
    501 [sfc]..|INFO: Linked list max_size=1000000
    502 [sfc]..|SfcDebugLibStart:208 [Not Found]
    503 [sfc]..|[Base+0x29396<] SfcDebugLibStart:222 [Success]
    504 [sfc]..|INFO: Running Solarflare UEFI Driver 2.7.8.5 (f71064c4d0a0) for MEDFORD
    505 [sfc]..|INFO: Ctrl=954E3B98 Driver=954E4418 Image=866B0000 Size=0x4D9C0 loaded from Device=954E4B18
... snip ...
---

The dots between [sfc] and | symbol indicate the TPL the operation is being carried out at. No dots mean TPL_APPLICATION, one dot is TPL_CALLBACK etc. You can see that the Snp.Start() on the first device is called before even the second device gets a DriverBinding.Start().

Cheers,
Tom





  reply	other threads:[~2019-01-24 11:37 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
2019-01-24 11:37       ` Tomas Pilar (tpilar) [this message]
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=5185c0b2-031f-ec50-b273-2665d83ef38a@solarflare.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