mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
All network drivers! Change pre-processor logic that selects the high priority work queue or gives preferential treatment to the high priority work. All network logic must run on the low priority work queue! Or suffer the consequences.
This commit is contained in:
@@ -98,26 +98,6 @@ config IEEE80211_BROADCOM_FULLMAC_SDIO
|
||||
|
||||
if IEEE80211_BROADCOM_FULLMAC
|
||||
|
||||
choice
|
||||
prompt "Broadcom FullMAC driver work queue"
|
||||
default IEEE80211_BROADCOM_LPWORK if SCHED_LPWORK
|
||||
default IEEE80211_BROADCOM_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||
depends on SCHED_WORKQUEUE
|
||||
---help---
|
||||
Work queue support is required to use the loopback driver. If the
|
||||
low priority work queue is available, then it should be used by the
|
||||
loopback driver.
|
||||
|
||||
config IEEE80211_BROADCOM_HPWORK
|
||||
bool "High priority"
|
||||
depends on SCHED_HPWORK
|
||||
|
||||
config IEEE80211_BROADCOM_LPWORK
|
||||
bool "Low priority"
|
||||
depends on SCHED_LPWORK
|
||||
|
||||
endchoice # Work queue
|
||||
|
||||
config IEEE80211_BROADCOM_NINTERFACES
|
||||
int "Number of Broadcom FullMAC interfaces"
|
||||
default 1
|
||||
|
||||
@@ -77,19 +77,19 @@
|
||||
|
||||
#if !defined(CONFIG_SCHED_WORKQUEUE)
|
||||
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
|
||||
#else
|
||||
|
||||
/* Use the selected work queue */
|
||||
|
||||
# if defined(CONFIG_IEEE80211_BROADCOM_HPWORK)
|
||||
# define BCMFWORK HPWORK
|
||||
# elif defined(CONFIG_IEEE80211_BROADCOM_LPWORK)
|
||||
# define BCMFWORK LPWORK
|
||||
# else
|
||||
# error Neither CONFIG_IEEE80211_BROADCOM_HPWORK nor CONFIG_IEEE80211_BROADCOM_LPWORK defined
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The low priority work queue is preferred. If it is not enabled, LPWORK
|
||||
* will be the same as HPWORK.
|
||||
*
|
||||
* NOTE: However, the network should NEVER run on the high priority work
|
||||
* queue! That queue is intended only to service short back end interrupt
|
||||
* processing that never suspends. Suspending the high priority work queue
|
||||
* may bring the system to its knees!
|
||||
*/
|
||||
|
||||
#define BCMFWORK LPWORK
|
||||
|
||||
/* CONFIG_IEEE80211_BROADCOM_NINTERFACES determines the number of physical interfaces
|
||||
* that will be supported.
|
||||
*/
|
||||
|
||||
@@ -11,34 +11,6 @@ config IEEE802154_XBEE_FREQUENCY
|
||||
---help---
|
||||
SPI SLCK frequency in Hz
|
||||
|
||||
choice
|
||||
prompt "Work queue"
|
||||
default XBEE_NETDEV_LPWORK if SCHED_LPWORK
|
||||
default XBEE_NETDEV_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||
depends on SCHED_WORKQUEUE
|
||||
---help---
|
||||
Work queue support is required to use the XBee MAC network
|
||||
driver.
|
||||
|
||||
WARNING!! The IEEE802.15.4 network device must never run on the same
|
||||
work queue as does the IEEE 802.15.4 MAC. That configuration will
|
||||
cause deadlocks: The network logic may be blocked on the work queue
|
||||
waiting on resources that can only be freed by the MAC logic but the
|
||||
MAC is unable to run because the work queue is blocked. The
|
||||
recommended configuration is: Network on the LP work queue; MAC on HP
|
||||
work queue. Blocking on the HP work queue is a very bad thing in
|
||||
any case.
|
||||
|
||||
config XBEE_NETDEV_HPWORK
|
||||
bool "High priority"
|
||||
depends on SCHED_HPWORK
|
||||
|
||||
config XBEE_NETDEV_LPWORK
|
||||
bool "Low priority"
|
||||
depends on SCHED_LPWORK
|
||||
|
||||
endchoice # Work queue
|
||||
|
||||
config XBEE_NETDEV_RECVRPRIO
|
||||
int "Priority of frame receiver registerd with the MAC layer"
|
||||
default 1
|
||||
|
||||
@@ -85,19 +85,19 @@
|
||||
|
||||
#if !defined(CONFIG_SCHED_WORKQUEUE)
|
||||
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
|
||||
#else
|
||||
|
||||
/* Use the selected work queue */
|
||||
|
||||
# if defined(CONFIG_XBEE_NETDEV_HPWORK)
|
||||
# define XBEENET_WORK HPWORK
|
||||
# elif defined(CONFIG_XBEE_NETDEV_LPWORK)
|
||||
# define XBEENET_WORK LPWORK
|
||||
# else
|
||||
# error Neither CONFIG_XBEE_NETDEV_HPWORK nor CONFIG_XBEE_NETDEV_LPWORK defined
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The low priority work queue is preferred. If it is not enabled, LPWORK
|
||||
* will be the same as HPWORK.
|
||||
*
|
||||
* NOTE: However, the network should NEVER run on the high priority work
|
||||
* queue! That queue is intended only to service short back end interrupt
|
||||
* processing that never suspends. Suspending the high priority work queue
|
||||
* may bring the system to its knees!
|
||||
*/
|
||||
|
||||
#define XBEENET_WORK LPWORK
|
||||
|
||||
/* Preferred address size */
|
||||
|
||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||
|
||||
Reference in New Issue
Block a user