You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The allocated user config variable "num_physical_ports" is unnecessary.
Info and functionality regarding the number of physical ports, does not change at runtime in any sane scenario. (As far as I know.) And the stack has no feature or functionality to modify this at runtime.
It makes good sense, to make this kind of option, into a compile time constant. (Which it also was, until some time ago.) All the sample apps, currently needs code like this:
Besides allocating unnecessary global memory, this also muddies the "option api", gives unnecessary user config code and prevents the compiler from making optimizations.
The fix is simple. Just replace all references of num_physical_ports with the PNET_MAX_PHYSICAL_PORTS.
This issue, is somewhat related to the issues: #316 #259
The text was updated successfully, but these errors were encountered:
The ability to be able to adjust a compile time setting PNET_MAX_PHYSICAL_PORTS, and to use num_physical_ports is actually a customer request. They would like to ship a single compiled version of the library, and it should be useful for several applications (using different number of ports).
I agree that this complicates the API somewhat. I will update the API documentation in a future release
The allocated user config variable "num_physical_ports" is unnecessary.
Info and functionality regarding the number of physical ports, does not change at runtime in any sane scenario. (As far as I know.) And the stack has no feature or functionality to modify this at runtime.
It makes good sense, to make this kind of option, into a compile time constant. (Which it also was, until some time ago.) All the sample apps, currently needs code like this:
pnet_cfg.num_physical_ports = PNET_MAX_PHYSICAL_PORTS;
Besides allocating unnecessary global memory, this also muddies the "option api", gives unnecessary user config code and prevents the compiler from making optimizations.
The fix is simple. Just replace all references of num_physical_ports with the PNET_MAX_PHYSICAL_PORTS.
This issue, is somewhat related to the issues:
#316
#259
The text was updated successfully, but these errors were encountered: