SLIP: Switch to poll based design
This is a refactored version of the SLIP network driver. Updates include: 1. The original design started two kernel threads per SLIP device. The refactored version uses file_poll to essentially be driven by the UART RX and TX interrupts and pushes work to the low priority work queue. 2. The SLIP byte un-/stuffing is more efficient now, using memcpy instead of handling each byte individually. 3. The switch of the old SLIP driver to IOBs caused buffer overwrites if packets were sent that would not fit into a single IOB. This is fixed now. Signed-off-by: Michael Jung <michael.jung@secore.ly>
This commit is contained in:
parent
6424b5322f
commit
2e27698d6c
1216
drivers/net/slip.c
1216
drivers/net/slip.c
File diff suppressed because it is too large
Load Diff
16
net/Kconfig
16
net/Kconfig
@ -192,6 +192,7 @@ menuconfig NET_MBIM
|
||||
menuconfig NET_SLIP
|
||||
bool "SLIP support"
|
||||
select ARCH_HAVE_NETDEV_STATISTICS
|
||||
depends on NET_IPv4
|
||||
default n
|
||||
---help---
|
||||
Enables building of the SLIP driver. SLIP requires
|
||||
@ -221,21 +222,6 @@ config NET_SLIP_NINTERFACES
|
||||
interfaces to support.
|
||||
Default: 1
|
||||
|
||||
config NET_SLIP_STACKSIZE
|
||||
int "SLIP per-thread stack size"
|
||||
default DEFAULT_TASK_STACKSIZE
|
||||
---help---
|
||||
Select the stack size of the SLIP RX and TX tasks.
|
||||
|
||||
SLIP starts two dedicated threads per interface
|
||||
to handle network events, enabling high performance.
|
||||
|
||||
config NET_SLIP_DEFPRIO
|
||||
int "SLIP threads priority"
|
||||
default 128
|
||||
---help---
|
||||
The priority of the SLIP RX and TX tasks. Default: 128
|
||||
|
||||
endif # NET_SLIP
|
||||
|
||||
menuconfig NET_TUN
|
||||
|
Loading…
Reference in New Issue
Block a user