daniel-p-carvalho opened a new pull request, #3819: URL: https://github.com/apache/nuttx-apps/pull/3819
## Summary Add the `brctl` command (`CONFIG_SYSTEM_BRCTL`) to configure the Ethernet bridges added to the kernel by apache/nuttx#NUTTXPR: ``` brctl addbr <bridge> brctl delbr <bridge> brctl addif <bridge> <device> brctl delif <bridge> <device> ``` It uses the Linux bridge ioctl commands `SIOCBRADDBR`, `SIOCBRDELBR`, `SIOCBRADDIF` and `SIOCBRDELIF` (already defined in `include/nuttx/net/ioctl.h`), with the same arguments as Linux. Draft: depends on apache/nuttx#NUTTXPR (`CONFIG_NET_BRIDGE`), whose design is still open for discussion. ## Impact New command, only built with `CONFIG_SYSTEM_BRCTL=y`, which depends on `CONFIG_NET_BRIDGE`. No change to other applications. ## Testing Host: Ubuntu Linux x86_64, `sim:bridge` from apache/nuttx#NUTTXPR (two TAP devices, each moved to its own network namespace on the host). NSH commands used by the test: ``` nsh> ifup eth0 nsh> ifup eth1 nsh> brctl addbr br0 nsh> brctl addif br0 eth0 nsh> brctl addif br0 eth1 nsh> ifconfig br0 10.0.0.2 netmask 255.255.255.0 nsh> ifup br0 ... nsh> brctl delbr br0 ERROR: brctl delbr failed: Unknown error 16 <- EBUSY, bridge still up nsh> ifdown br0 nsh> brctl delif br0 eth1 nsh> brctl delbr br0 ``` Traffic through the bridge was verified from the host (ping, iperf); see apache/nuttx#NUTTXPR for the results. `./tools/checkpatch.sh -g` passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
