You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/03/30 02:41:50 UTC

[GitHub] [mynewt-nimble] ccollins476ad commented on a change in pull request #380: nimble/host: Improve usage of MSYS

ccollins476ad commented on a change in pull request #380: nimble/host: Improve usage of MSYS
URL: https://github.com/apache/mynewt-nimble/pull/380#discussion_r270610198
 
 

 ##########
 File path: nimble/host/src/ble_hs_mbuf.c
 ##########
 @@ -84,15 +100,52 @@ ble_hs_mbuf_l2cap_pkt(void)
     return ble_hs_mbuf_gen_pkt(BLE_HCI_DATA_HDR_SZ + BLE_L2CAP_HDR_SZ);
 }
 
+#if MYNEWT_VAL(BLE_HS_L2CAP_HDR_POOL_COUNT)
+/**
+ * Allocates an mbuf for use by the nimble host.
+ */
+static struct os_mbuf *
+ble_hs_mbuf_gen_hdr_pkt(uint16_t leading_space)
+{
+    struct os_mbuf *om;
+
+    om = os_mbuf_get_pkthdr(&ble_hs_hdr_mbuf_pool, leading_space);
 
 Review comment:
   This allocates an mbuf packet with a user header of size `leading_space` bytes.  This isn't what we want, is it?  The user header is never filled with normal data.  It is just some extra space after the packet header that can be used to "tag" an mbuf.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services