-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
area: NetworkingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug
Description
The DHCP client is adding an empty file and sname in a tremendously wasteful way:
static inline bool dhcpv4_add_sname(struct net_pkt *pkt)
{
u8_t len = SIZE_OF_SNAME;
while (len-- > 0) {
if (!net_pkt_append_u8(pkt, 0)) {
return false;
}
}
return true;
}
causing a boatload of net_buf_simple_add calls per outgoing DHCPv4 packet:
[net/dhcpv4] [DBG] dhcph4_manage_timers: (0x20006930): iface 0x2000dd20 state=selecting
[net/buf] [DBG] net_buf_alloc_len_debug: (0x20006930) net_pkt_get_reserve_data_debug():357: pool 0x2000dcf0 size 128 timeout -1
[net/buf] [DBG] net_buf_alloc_len_debug: (0x20006930) allocated buf 0x20009e68
[net/buf] [DBG] net_buf_simple_reserve: (0x20006930) buf 0x20009e70 reserve 14
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 20
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 8
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 44
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
[net/buf] [DBG] net_buf_simple_add: (0x20006930) buf 0x20009e70 len 1
...
Metadata
Metadata
Assignees
Labels
area: NetworkingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug