net: pkt: Fix build with CONFIG_NET_BUF_VARIABLE_DATA_SIZE
In case variable buffer length feature was enabled, net_pkt code did not build due to unconditional references to CONFIG_NET_BUF_DATA_SIZE, which is not avaialable in this configuration. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
00269af3e6
commit
521341813e
1 changed files with 2 additions and 0 deletions
|
@ -85,6 +85,7 @@ LOG_MODULE_REGISTER(net_pkt, CONFIG_NET_PKT_LOG_LEVEL);
|
|||
/* Make sure that IP + TCP/UDP/ICMP headers fit into one fragment. This
|
||||
* makes possible to cast a fragment pointer to protocol header struct.
|
||||
*/
|
||||
#if defined(CONFIG_NET_BUF_FIXED_DATA_SIZE)
|
||||
#if CONFIG_NET_BUF_DATA_SIZE < (MAX_IP_PROTO_LEN + MAX_NEXT_PROTO_LEN)
|
||||
#if defined(STRING2)
|
||||
#undef STRING2
|
||||
|
@ -98,6 +99,7 @@ LOG_MODULE_REGISTER(net_pkt, CONFIG_NET_PKT_LOG_LEVEL);
|
|||
#pragma message "Minimum len " STRING(MAX_IP_PROTO_LEN + MAX_NEXT_PROTO_LEN)
|
||||
#error "Too small net_buf fragment size"
|
||||
#endif
|
||||
#endif /* CONFIG_NET_BUF_FIXED_DATA_SIZE */
|
||||
|
||||
#if CONFIG_NET_PKT_RX_COUNT <= 0
|
||||
#error "Minimum value for CONFIG_NET_PKT_RX_COUNT is 1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue