Skip to content

Retrieve net_stats for ethernet vlan cause assert trap in Arm target #88899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
linuxemb opened this issue Apr 22, 2025 · 5 comments
Open

Retrieve net_stats for ethernet vlan cause assert trap in Arm target #88899

linuxemb opened this issue Apr 22, 2025 · 5 comments
Assignees
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@linuxemb
Copy link

Describe the bug

Logs and console output
<ASSERTION FAIL [iface] @ WEST_TOPDIR/zephyr/subsys/net/ip/net_stats.h:38
Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (Zephyr 3.7
  • Commit SHA or Version used
@linuxemb linuxemb added the bug The issue is a bug, or the PR is fixing a bug label Apr 22, 2025
Copy link

Hi @linuxemb! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

@linuxemb linuxemb changed the title Retrive net_stats for ethernet vlan cause assert trap in Arm target Retrieve net_stats for ethernet vlan cause assert trap in Arm target Apr 22, 2025
@jukkar
Copy link
Member

jukkar commented Apr 22, 2025

Could you provide instructions how to replicate the issue?

@linuxemb
Copy link
Author

Repro steps:
1 Enable config in prj file

#define CONFIG_NET_STATISTICS
#define CONFIG_NET_STATISTICS_ETHERNET
#define CONFIG_NET_MGMT
#define CONFIG_NET_MGMT_EVENT
2 call this in c file

if(net_if_l2(iface) == &NET_L2_GET_NAME(ETHERNET)) {
	net_mgmt(NET_REQUEST_STATS_GET_ETHERNET, iface, &stats, sizeof(stats));
}

3 --tested on my Fpga board running on A55

@linuxemb
Copy link
Author

step 4 -- call network config and bring vlan up api in mon shell

crash happed

@jukkar
Copy link
Member

jukkar commented Apr 22, 2025

I have not been able to reproduce this. I tried with two qemu ARM boards in latest main (4.1.99+ commit 0b2d455) and also in latest v3.7 like this

west build -p -b qemu_cortex_a53/qemu_cortex_a53 -t run samples/net/sockets/echo_server/ \
           -d ../build/echo-server-qemu/ -- \
-DEXTRA_CONF_FILE=overlay-vlan.conf -DCONFIG_NET_STATISTICS=y -DCONFIG_NET_STATISTICS_ETHERNET=y \
-DCONFIG_NET_MGMT=y -DCONFIG_NET_MGMT_EVENT=y -DCONFIG_NET_STATISTICS_USER_API=y

and

west build -p -b qemu_cortex_m3 -t run samples/net/vlan/ -d ../build/echo-server-qemu/ -- \
-DCONFIG_NET_STATISTICS=y -DCONFIG_NET_STATISTICS_ETHERNET=y -DCONFIG_NET_MGMT=y \
-DCONFIG_NET_MGMT_EVENT=y -DCONFIG_NET_STATISTICS_USER_API=y -DCONFIG_NET_QEMU_SLIP=n \
-DCONFIG_NET_QEMU_ETHERNET=y

Both worked fine when trying to see Ethernet statistics from net-shell. Needed to enable e1000 Ethernet driver statistics to see statistics with qemu_cortex_a53 board, the PR is here #88909

@danieldegrasse danieldegrasse added the priority: low Low impact/importance bug label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants