Re: [edk2-devel] [PATCH 23/35] OvmfPkg/VirtioNetDxe: fix SignalEvent() call

2019-09-26 Thread Ard Biesheuvel
On Tue, 17 Sep 2019 at 21:50, Laszlo Ersek  wrote:
>
> The SignalEvent() boot service takes an EFI_EVENT, not an (EFI_EVENT*).
> Fix the call in the notification function of
> "EFI_SIMPLE_NETWORK_PROTOCOL.WaitForPacket".
>
> This is an actual bug. The reason it's never been triggered is likely that
> the "SNP.WaitForPacket" event is rarely waited for by applications -- edk2
> itself has zero instances of that, for example.
>
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Signed-off-by: Laszlo Ersek 

Reviewed-by: Ard Biesheuvel 

> ---
>
> Notes:
> build-tested only
>
>  OvmfPkg/VirtioNetDxe/Events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c
> index 620910774bc5..83e96e5e5d91 100644
> --- a/OvmfPkg/VirtioNetDxe/Events.c
> +++ b/OvmfPkg/VirtioNetDxe/Events.c
> @@ -58,7 +58,7 @@ VirtioNetIsPacketAvailable (
>MemoryFence ();
>
>if (Dev->RxLastUsed != RxCurUsed) {
> -gBS->SignalEvent (>Snp.WaitForPacket);
> +gBS->SignalEvent (Dev->Snp.WaitForPacket);
>}
>  }
>
> --
> 2.19.1.3.g30247aa5d201
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48101): https://edk2.groups.io/g/devel/message/48101
Mute This Topic: https://groups.io/mt/34180224/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 23/35] OvmfPkg/VirtioNetDxe: fix SignalEvent() call

2019-09-26 Thread Laszlo Ersek
Jordan, Ard,

may I please get an R-b for this patch? It's quite simple. (Sorry if
it's already in your queue.)

Thank you,
Laszlo

On 09/17/19 21:49, Laszlo Ersek wrote:
> The SignalEvent() boot service takes an EFI_EVENT, not an (EFI_EVENT*).
> Fix the call in the notification function of
> "EFI_SIMPLE_NETWORK_PROTOCOL.WaitForPacket".
> 
> This is an actual bug. The reason it's never been triggered is likely that
> the "SNP.WaitForPacket" event is rarely waited for by applications -- edk2
> itself has zero instances of that, for example.
> 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  OvmfPkg/VirtioNetDxe/Events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c
> index 620910774bc5..83e96e5e5d91 100644
> --- a/OvmfPkg/VirtioNetDxe/Events.c
> +++ b/OvmfPkg/VirtioNetDxe/Events.c
> @@ -58,7 +58,7 @@ VirtioNetIsPacketAvailable (
>MemoryFence ();
>  
>if (Dev->RxLastUsed != RxCurUsed) {
> -gBS->SignalEvent (>Snp.WaitForPacket);
> +gBS->SignalEvent (Dev->Snp.WaitForPacket);
>}
>  }
>  
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48099): https://edk2.groups.io/g/devel/message/48099
Mute This Topic: https://groups.io/mt/34180224/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 23/35] OvmfPkg/VirtioNetDxe: fix SignalEvent() call

2019-09-20 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> The SignalEvent() boot service takes an EFI_EVENT, not an (EFI_EVENT*).
> Fix the call in the notification function of
> "EFI_SIMPLE_NETWORK_PROTOCOL.WaitForPacket".
> 
> This is an actual bug. The reason it's never been triggered is likely that
> the "SNP.WaitForPacket" event is rarely waited for by applications -- edk2
> itself has zero instances of that, for example.
> 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  OvmfPkg/VirtioNetDxe/Events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c
> index 620910774bc5..83e96e5e5d91 100644
> --- a/OvmfPkg/VirtioNetDxe/Events.c
> +++ b/OvmfPkg/VirtioNetDxe/Events.c
> @@ -58,7 +58,7 @@ VirtioNetIsPacketAvailable (
>MemoryFence ();
>  
>if (Dev->RxLastUsed != RxCurUsed) {
> -gBS->SignalEvent (>Snp.WaitForPacket);
> +gBS->SignalEvent (Dev->Snp.WaitForPacket);
>}
>  }
>  
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47723): https://edk2.groups.io/g/devel/message/47723
Mute This Topic: https://groups.io/mt/34180224/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 23/35] OvmfPkg/VirtioNetDxe: fix SignalEvent() call

2019-09-17 Thread Laszlo Ersek
The SignalEvent() boot service takes an EFI_EVENT, not an (EFI_EVENT*).
Fix the call in the notification function of
"EFI_SIMPLE_NETWORK_PROTOCOL.WaitForPacket".

This is an actual bug. The reason it's never been triggered is likely that
the "SNP.WaitForPacket" event is rarely waited for by applications -- edk2
itself has zero instances of that, for example.

Cc: Ard Biesheuvel 
Cc: Jordan Justen 
Signed-off-by: Laszlo Ersek 
---

Notes:
build-tested only

 OvmfPkg/VirtioNetDxe/Events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c
index 620910774bc5..83e96e5e5d91 100644
--- a/OvmfPkg/VirtioNetDxe/Events.c
+++ b/OvmfPkg/VirtioNetDxe/Events.c
@@ -58,7 +58,7 @@ VirtioNetIsPacketAvailable (
   MemoryFence ();
 
   if (Dev->RxLastUsed != RxCurUsed) {
-gBS->SignalEvent (>Snp.WaitForPacket);
+gBS->SignalEvent (Dev->Snp.WaitForPacket);
   }
 }
 
-- 
2.19.1.3.g30247aa5d201



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47410): https://edk2.groups.io/g/devel/message/47410
Mute This Topic: https://groups.io/mt/34180224/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-