gustavonihei commented on code in PR #7826:
URL: https://github.com/apache/nuttx/pull/7826#discussion_r1043374386
##########
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:
```suggestion
static_assert(CONFIG_IOB_NBUFFERS > CONFIG_NET_IPFORWARD_NSTRUCT,
"IP forward may consume all the IOB and break netdev logic");
```
nit: How about using a `static_assert` instead? It is defined in `assert.h`
and seems cleaner.
--
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]