net: ARP unit test needs to be run from fiber

The ARP unit test is not able to pass packets between fiber
and task. Because of this the test is run from fiber.

Change-Id: I1825a0abdc1b04a78de76d58425f4d2a2ce26ab7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-06-09 09:00:57 +03:00
commit 9818cc7b1d
2 changed files with 20 additions and 6 deletions

View file

@ -2,4 +2,4 @@
% TASK NAME PRIO ENTRY STACK GROUPS
% ===================================================
TASK MAIN 7 mainloop 2048 [EXE]
TASK MAIN 7 main 2048 [EXE]

View file

@ -16,6 +16,9 @@
* limitations under the License.
*/
#include <zephyr.h>
#include <sections.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
@ -321,11 +324,7 @@ NET_DEVICE_INIT(net_arp_test, "net_arp_test",
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&net_arp_if_api, _ETH_L2_LAYER, 127);
#ifdef CONFIG_MICROKERNEL
void mainloop(void)
#else
void main(void)
#endif
void main_fiber(void)
{
struct net_buf *buf, *buf2;
struct net_buf *frag;
@ -763,3 +762,18 @@ void main(void)
printk("Network ARP checks passed\n");
}
#if defined(CONFIG_NANOKERNEL)
#define STACKSIZE 2000
char __noinit __stack fiberStack[STACKSIZE];
#endif
void main(void)
{
#if defined(CONFIG_MICROKERNEL)
main_fiber();
#else
task_fiber_start(&fiberStack[0], STACKSIZE,
(nano_fiber_entry_t)main_fiber, 0, 0, 7, 0);
#endif
}