zephyr/tests/net
Ravi kumar Veeramally 58ba1d834e net: nbuf: Fix net_nbuf_compact() API
Current API description of net_nbuf_compact() is not very clear.
The first parameter needs to be the first net_buf in the chain.

The changes to this API are needed in order to clarify following
use cases:
1) User provides fragment that is not first of the chain and compact is
successfully done. In this case there is no free space in fragment list
after the input fragment. But there might be empty space in previous
fragments. So fragment chain is not completely compacted.

2) What if input fragment has been deleted and api returns the same
buf?

So this commit simplifies the API behavior. Now net_nbuf_compact()
expects the first parameter to be either TX or RX net_buf and then it
compacts it. It fails only if the input fragment is a data fragment.

Change-Id: I9e02dfcb6f3f2e2998826522a25ec207850a8056
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-08 10:12:36 +02:00
..
6lo net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
arp net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
buf license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
context net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
dhcpv4 net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
icmpv6 license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
ieee802154 net: tests: 15.4: Increase max data size and fix config option 2017-02-08 10:12:35 +02:00
iface net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
ip-addr net: tests: Use lighter printk() instead of printf() 2017-01-27 12:35:51 +02:00
ipv6 net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
lib license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
mgmt license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
nbuf net: nbuf: Fix net_nbuf_compact() API 2017-02-08 10:12:36 +02:00
neighbor license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
route net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
rpl net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
tcp net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
trickle license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
udp net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00
utils net: nbuf: Add timeout to net_buf getters 2017-02-08 10:12:35 +02:00