public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Using USB-Ethernet adapter in UEFI on an arm64 platform
@ 2017-04-07 19:06 Vladimir Olovyannikov
  2017-04-10  4:48 ` Tian, Feng
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Olovyannikov @ 2017-04-07 19:06 UTC (permalink / raw)
  To: edk2-devel

Hi,

I would like to enable Ethernet using USB-Ethernet AX88772 adapter in the
UEFI on an armv8 arm64 platform.
Ethernet polling is done by MnpPoll() periodically. This creates a burden
on the system so that UEFI boots in 1 minute to the Shell due to receive
polling.
The USB operation is very resource expensive which causes UEFI to choke
up.
There is DisableBackgroundPolling option in the
EFI_MANAGED_NETWORK_CONFIG_DATA structure, but it is turned off by all
other drivers (DNSDxe, Ip4Dxe, ArpDxe...).
Can anybody advise what I could do?
Mass storage/keyboard/etc. all work fine...

Thank you,
Vladimir


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using USB-Ethernet adapter in UEFI on an arm64 platform
  2017-04-07 19:06 Using USB-Ethernet adapter in UEFI on an arm64 platform Vladimir Olovyannikov
@ 2017-04-10  4:48 ` Tian, Feng
  2017-04-10 16:13   ` Vladimir Olovyannikov
  0 siblings, 1 reply; 5+ messages in thread
From: Tian, Feng @ 2017-04-10  4:48 UTC (permalink / raw)
  To: Vladimir Olovyannikov, edk2-devel@lists.01.org; +Cc: Tian, Feng

Hi, Vladimir,

Which usb2lan driver you are using for AX88772 adpater? The one in OptionRomPkg\Bus\Usb\UsbNetworking has bug on the polling performance. The one in OptionRomPkg\Bus\Usb\UsbNetworking\Ax88772b is better but if there is no data received, the polling operation still wastes some time.

The root cause about the low performance of polling is because USB spec doesn't clearly define which value should be returned if user requests Bulk Read operation but there is no data. Some data-streaming usb devices, such as Realtek usb2lan, return success with data length setting to 0, but others, such as AX88772, just keep active and wait for data always. From BIOS view, we have to return EFI_TIMEOUT for latter case to avoid system hang. That's why you see the low performance for polling operation in no-data case. 

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Vladimir Olovyannikov
Sent: Saturday, April 8, 2017 3:06 AM
To: edk2-devel@lists.01.org
Subject: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi,

I would like to enable Ethernet using USB-Ethernet AX88772 adapter in the UEFI on an armv8 arm64 platform.
Ethernet polling is done by MnpPoll() periodically. This creates a burden on the system so that UEFI boots in 1 minute to the Shell due to receive polling.
The USB operation is very resource expensive which causes UEFI to choke up.
There is DisableBackgroundPolling option in the EFI_MANAGED_NETWORK_CONFIG_DATA structure, but it is turned off by all other drivers (DNSDxe, Ip4Dxe, ArpDxe...).
Can anybody advise what I could do?
Mass storage/keyboard/etc. all work fine...

Thank you,
Vladimir
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using USB-Ethernet adapter in UEFI on an arm64 platform
  2017-04-10  4:48 ` Tian, Feng
@ 2017-04-10 16:13   ` Vladimir Olovyannikov
  2017-04-11  1:53     ` Tian, Feng
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Olovyannikov @ 2017-04-10 16:13 UTC (permalink / raw)
  To: Tian, Feng, edk2-devel

Hi Feng,

Thank you for your explanation.
I have Cisco 300M AX88772A-based adapter, so AX88772 (with no "b") driver
was picked up.
I had to modify it with circular buffer to get ping and tftp going. Also I
had to receive packets in GetStatus rather than in SN_Receive (otherwise I
could never get into the Shell).
This way I have ping with response time of approx. 200ms, and tftp
working, albeit it is slow.
So do you suggest me to use Ax88772b driver for AX88772A/AX88772
usb-ethernet adapter?
Also maybe you know if there are UEFI drivers for other USB-ethernet
adapters (maybe 1G?) available somewhere?

Thank you,
Vladimir
-----Original Message-----
From: Tian, Feng [mailto:feng.tian@intel.com]
Sent: April-09-17 9:49 PM
To: Vladimir Olovyannikov; edk2-devel@lists.01.org
Cc: Tian, Feng
Subject: RE: [edk2] Using USB-Ethernet adapter in UEFI on an arm64
platform

Hi, Vladimir,

Which usb2lan driver you are using for AX88772 adpater? The one in
OptionRomPkg\Bus\Usb\UsbNetworking has bug on the polling performance. The
one in OptionRomPkg\Bus\Usb\UsbNetworking\Ax88772b is better but if there
is no data received, the polling operation still wastes some time.

The root cause about the low performance of polling is because USB spec
doesn't clearly define which value should be returned if user requests
Bulk Read operation but there is no data. Some data-streaming usb devices,
such as Realtek usb2lan, return success with data length setting to 0, but
others, such as AX88772, just keep active and wait for data always. From
BIOS view, we have to return EFI_TIMEOUT for latter case to avoid system
hang. That's why you see the low performance for polling operation in
no-data case.

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
Vladimir Olovyannikov
Sent: Saturday, April 8, 2017 3:06 AM
To: edk2-devel@lists.01.org
Subject: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi,

I would like to enable Ethernet using USB-Ethernet AX88772 adapter in the
UEFI on an armv8 arm64 platform.
Ethernet polling is done by MnpPoll() periodically. This creates a burden
on the system so that UEFI boots in 1 minute to the Shell due to receive
polling.
The USB operation is very resource expensive which causes UEFI to choke
up.
There is DisableBackgroundPolling option in the
EFI_MANAGED_NETWORK_CONFIG_DATA structure, but it is turned off by all
other drivers (DNSDxe, Ip4Dxe, ArpDxe...).
Can anybody advise what I could do?
Mass storage/keyboard/etc. all work fine...

Thank you,
Vladimir
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using USB-Ethernet adapter in UEFI on an arm64 platform
  2017-04-10 16:13   ` Vladimir Olovyannikov
@ 2017-04-11  1:53     ` Tian, Feng
       [not found]       ` <CACmgjaxbO51dfXiYf12PYJtGwbvFvKHo2ayx7Xx2vk1ZRLMbLg@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Tian, Feng @ 2017-04-11  1:53 UTC (permalink / raw)
  To: Vladimir Olovyannikov, edk2-devel@lists.01.org; +Cc: Tian, Feng

Ax88772b driver's quality is better than Ax88772. But all of them aren't handled no-data case without latency. So if possible, I would suggest you to not use Ax88772x device. Realtek usb2lan is a good choice but the disadvantage of it is there looks like has no corresponding open-source UEFI driver for use.

Thanks
Feng

-----Original Message-----
From: Vladimir Olovyannikov [mailto:vladimir.olovyannikov@broadcom.com] 
Sent: Tuesday, April 11, 2017 12:14 AM
To: Tian, Feng <feng.tian@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi Feng,

Thank you for your explanation.
I have Cisco 300M AX88772A-based adapter, so AX88772 (with no "b") driver was picked up.
I had to modify it with circular buffer to get ping and tftp going. Also I had to receive packets in GetStatus rather than in SN_Receive (otherwise I could never get into the Shell).
This way I have ping with response time of approx. 200ms, and tftp working, albeit it is slow.
So do you suggest me to use Ax88772b driver for AX88772A/AX88772 usb-ethernet adapter?
Also maybe you know if there are UEFI drivers for other USB-ethernet adapters (maybe 1G?) available somewhere?

Thank you,
Vladimir
-----Original Message-----
From: Tian, Feng [mailto:feng.tian@intel.com]
Sent: April-09-17 9:49 PM
To: Vladimir Olovyannikov; edk2-devel@lists.01.org
Cc: Tian, Feng
Subject: RE: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi, Vladimir,

Which usb2lan driver you are using for AX88772 adpater? The one in OptionRomPkg\Bus\Usb\UsbNetworking has bug on the polling performance. The one in OptionRomPkg\Bus\Usb\UsbNetworking\Ax88772b is better but if there is no data received, the polling operation still wastes some time.

The root cause about the low performance of polling is because USB spec doesn't clearly define which value should be returned if user requests Bulk Read operation but there is no data. Some data-streaming usb devices, such as Realtek usb2lan, return success with data length setting to 0, but others, such as AX88772, just keep active and wait for data always. From BIOS view, we have to return EFI_TIMEOUT for latter case to avoid system hang. That's why you see the low performance for polling operation in no-data case.

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Vladimir Olovyannikov
Sent: Saturday, April 8, 2017 3:06 AM
To: edk2-devel@lists.01.org
Subject: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi,

I would like to enable Ethernet using USB-Ethernet AX88772 adapter in the UEFI on an armv8 arm64 platform.
Ethernet polling is done by MnpPoll() periodically. This creates a burden on the system so that UEFI boots in 1 minute to the Shell due to receive polling.
The USB operation is very resource expensive which causes UEFI to choke up.
There is DisableBackgroundPolling option in the EFI_MANAGED_NETWORK_CONFIG_DATA structure, but it is turned off by all other drivers (DNSDxe, Ip4Dxe, ArpDxe...).
Can anybody advise what I could do?
Mass storage/keyboard/etc. all work fine...

Thank you,
Vladimir
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using USB-Ethernet adapter in UEFI on an arm64 platform
       [not found]         ` <CACmgjawJD1BFOdOPGqqv5xhGvqL7sjU5Trk_7N1tfSEqK3wLoQ@mail.gmail.com>
@ 2017-04-11 13:54           ` Vladimir Olovyannikov
  0 siblings, 0 replies; 5+ messages in thread
From: Vladimir Olovyannikov @ 2017-04-11 13:54 UTC (permalink / raw)
  To: Tian, Feng; +Cc: edk2-devel

I see. Thank you for your input.
I wish I could use Realtek device, but they have only x86 based binaries
available, whereas I need arm64...
Anyway, I can port Linux driver to the Uefi.

Thank you,
Vladimir

On Apr 10, 2017 6:53 PM, "Tian, Feng" <feng.tian@intel.com> wrote:

Ax88772b driver's quality is better than Ax88772. But all of them aren't
handled no-data case without latency. So if possible, I would suggest you
to not use Ax88772x device. Realtek usb2lan is a good choice but the
disadvantage of it is there looks like has no corresponding open-source
UEFI driver for use.

Thanks
Feng

-----Original Message-----
From: Vladimir Olovyannikov [mailto:vladimir.olovyannikov@broadcom.com]
Sent: Tuesday, April 11, 2017 12:14 AM
To: Tian, Feng <feng.tian@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi Feng,

Thank you for your explanation.
I have Cisco 300M AX88772A-based adapter, so AX88772 (with no "b") driver
was picked up.
I had to modify it with circular buffer to get ping and tftp going. Also I
had to receive packets in GetStatus rather than in SN_Receive (otherwise I
could never get into the Shell).
This way I have ping with response time of approx. 200ms, and tftp working,
albeit it is slow.
So do you suggest me to use Ax88772b driver for AX88772A/AX88772
usb-ethernet adapter?
Also maybe you know if there are UEFI drivers for other USB-ethernet
adapters (maybe 1G?) available somewhere?

Thank you,
Vladimir
-----Original Message-----
From: Tian, Feng [mailto:feng.tian@intel.com]
Sent: April-09-17 9:49 PM
To: Vladimir Olovyannikov; edk2-devel@lists.01.org
Cc: Tian, Feng
Subject: RE: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi, Vladimir,

Which usb2lan driver you are using for AX88772 adpater? The one in
OptionRomPkg\Bus\Usb\UsbNetworking has bug on the polling performance. The
one in OptionRomPkg\Bus\Usb\UsbNetworking\Ax88772b is better but if there
is no data received, the polling operation still wastes some time.

The root cause about the low performance of polling is because USB spec
doesn't clearly define which value should be returned if user requests Bulk
Read operation but there is no data. Some data-streaming usb devices, such
as Realtek usb2lan, return success with data length setting to 0, but
others, such as AX88772, just keep active and wait for data always. From
BIOS view, we have to return EFI_TIMEOUT for latter case to avoid system
hang. That's why you see the low performance for polling operation in
no-data case.

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
Vladimir Olovyannikov
Sent: Saturday, April 8, 2017 3:06 AM
To: edk2-devel@lists.01.org
Subject: [edk2] Using USB-Ethernet adapter in UEFI on an arm64 platform

Hi,

I would like to enable Ethernet using USB-Ethernet AX88772 adapter in the
UEFI on an armv8 arm64 platform.
Ethernet polling is done by MnpPoll() periodically. This creates a burden
on the system so that UEFI boots in 1 minute to the Shell due to receive
polling.
The USB operation is very resource expensive which causes UEFI to choke up.
There is DisableBackgroundPolling option in the EFI_MANAGED_NETWORK_CONFIG_DATA
structure, but it is turned off by all other drivers (DNSDxe, Ip4Dxe,
ArpDxe...).
Can anybody advise what I could do?
Mass storage/keyboard/etc. all work fine...

Thank you,
Vladimir
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-11 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-07 19:06 Using USB-Ethernet adapter in UEFI on an arm64 platform Vladimir Olovyannikov
2017-04-10  4:48 ` Tian, Feng
2017-04-10 16:13   ` Vladimir Olovyannikov
2017-04-11  1:53     ` Tian, Feng
     [not found]       ` <CACmgjaxbO51dfXiYf12PYJtGwbvFvKHo2ayx7Xx2vk1ZRLMbLg@mail.gmail.com>
     [not found]         ` <CACmgjawJD1BFOdOPGqqv5xhGvqL7sjU5Trk_7N1tfSEqK3wLoQ@mail.gmail.com>
2017-04-11 13:54           ` Vladimir Olovyannikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox