On armv8-m the MPU region limits are inclusive. Thus, we must substract
one byte of size from (base + limit).
Signed-off-by: Michael Jung <michael.jung@secore.ly>
In host route mode (bridge mode disabled), the d_pktsize of TAP device is not initialized and will be set to CONFIG_NET_ETH_PKTSIZE in netdev_register, while the MTU on host side keeps at 1500. Input packets larger than CONFIG_NET_ETH_PKTSIZE will be dropped because 'IP packet shorter than length in IP header'.
This patch fix this issue by reading MTU from host side and set as d_pktsize, just the same as what is done in bridge mode.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
When a function is known to preserve eight-byte alignment of the stack, armclang assigns the build
attribute Tag_ABI_align_preserved to that function. However, the armclang integrated assembler does
not automatically assign this attribute to assembly code.
Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
When devif_loopback handles a packet (like a ping targeting at this dev), it does not call the txdone callback, breaking the tx pipeline and may left some packets unhandled, delayed until next transmit on the network interface.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Share one worker between multiple simulated network devices may work most of the time, but sometimes breaks the tx pipeline when sending packets on more than one interface at the same time, and leaves some packets unprocessed in network stack, delayed until next transmit on the network interface. The rx process is likely delayed in packet processing under similar situation, so keep g_avail_work and g_recv_work the same number as interfaces.
dev0 tx1 avail tx1 done
v v
work dev0 tx1 -> dev0 tx1 -> empty -> dev1 tx2 -> dev1 tx3 -> empty
^ ^ ^ ^
dev1 tx2 avail (failed to queue) tx3 avail tx2 done tx3 done
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
common/arm_backtrace_fp.c: In function 'up_backtrace':
common/arm_backtrace_fp.c:126:23: warning: assignment to 'void *' from 'uintptr_t' {aka 'unsigned int'} makes pointer from integer without a cast [-Wint-conversion]
126 | istacklimit = arm_intstack_top();
| ^
Signed-off-by: chao an <anchao@xiaomi.com>
This change adds the following:
- Rename the board configuration name from qemu-a53 to qemu-v8a.
- Add the configurations for Cortex-A57 and Cortex-A72.
Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
Use CONFIG_ARCH_CHIP_QEMU instead of CONFIG_ARCH_CHIP_QEMU_A53. This is because these configurations depend on the hardware configuration of qemu (memory map, irq numbers, etc.).
Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
Support more than one TAP device for debugging (future) NAT and FORWARD, left WPCAP and VPNKit unchanged (force number to 1).
Although we can support at most 31 interfaces, limit to 8 like CONFIG_TUN_NINTERFACES.
Signed-off-by: wengzhe <wengzhe@xiaomi.com>
1. rename arm_backtrace_thumb.c to arm_backtrace_sp.c
2. use EHABI stack unwinder instead of instruction unwind
Signed-off-by: chao an <anchao@xiaomi.com>