wengzhe commented on code in PR #7826: URL: https://github.com/apache/nuttx/pull/7826#discussion_r1043508029
########## net/ipforward/ipforward.h: ########## @@ -42,6 +42,16 @@ # define CONFIG_NET_IPFORWARD_NSTRUCT 4 #endif +#if CONFIG_IOB_NBUFFERS <= CONFIG_NET_IPFORWARD_NSTRUCT +# error CONFIG_IOB_NBUFFERS <= CONFIG_NET_IPFORWARD_NSTRUCT \ + IP forward may consume all the IOB and break netdev logic. +#endif Review Comment: @gustavonihei It seems great here, but is there any way to make a warning like using `static_assert`? Otherwise the warning below cannot be changed to this type (it's an error here and a warning below). The below condition makes a warning because it won't let NuttX work totally wrong, but may only waste some resources under some conditions. -- 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]
