net/net_pkt: Fully separate struct net_pkt from struct net_buf

- net_pkt becomes a stand-alone structure with network packet meta
  information.
- network packet data is still managed through net_buf, mostly named
  'frag'.
- net_pkt memory management is done through k_mem_slab
- function got introduced or relevantly renamed to target eithe net_pkt
  or net_buf fragments.
- net_buf's sent_list ends up in net_pkt now, and thus helps to save
  memory when TCP is enabled.

Change-Id: Ibd5c17df4f75891dec79db723a4c9fc704eb843d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2017-04-05 08:37:44 +02:00 committed by Jukka Rissanen
commit db11fcd174
122 changed files with 5510 additions and 5480 deletions

View file

@ -19,7 +19,7 @@
int http_request(struct net_context *net_ctx, int32_t timeout,
struct http_client_request *req)
{
struct net_buf *tx;
struct net_pkt *tx;
int rc = -ENOMEM;
tx = net_pkt_get_tx(net_ctx, timeout);
@ -97,7 +97,7 @@ int http_request(struct net_context *net_ctx, int32_t timeout,
return net_context_send(tx, NULL, timeout, NULL, NULL);
lb_exit:
net_buf_unref(tx);
net_pkt_unref(tx);
return rc;
}