Skip to content
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

Zephyr Project Development with 2 Ethernet Interfaces Supported (eth0, and eth1) #35197

Closed
bob2oneil opened this issue May 12, 2021 · 2 comments

Comments

@bob2oneil
Copy link

Is it possible to develop a Zephyr application that supports 2 Ethernet interfaces, that what would be 2 physical NICs on a hardware platform.

One NIC would be a standard interface accepting UDP packets with a standard 1500 byte MTU.

The other NIC would require a raw socket, with an MTU of over 8K (jumboframe).

The secondary NIC would be bridged with other secondary NICS to form a bridge between running instances of Zephyr, with the emulation environment being native_posix_64 and qemu_riscv64.

Is it possible to 2 have two NIC support in Zephyr for a single application?

@jukkar
Copy link
Member

jukkar commented May 12, 2021

Yes, you can have two or any number of Ethernet controllers in the system. For each Ethernet network interface, there needs to be a call to ETH_NET_DEVICE_INIT(). See for example drivers/ethernet/eth_native_posix.c does exactly this. In that driver user can set CONFIG_ETH_NATIVE_POSIX_INTERFACE_COUNT and the driver will create as many network interfaces to the system.

What traffic UDP etc. is being trasferred, depends on your application, the Ethernet driver does not really care what the data is.

@bob2oneil
Copy link
Author

Many thanks jukkar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants