This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 66147e7c8 nimble/transport: Fix mempool alignment
66147e7c8 is described below

commit 66147e7c811f1eec4acb41d524c2bf9484fa7b67
Author: Guy Mishol <[email protected]>
AuthorDate: Wed Apr 10 10:24:31 2024 +0300

    nimble/transport: Fix mempool alignment
    
    Change transport pool buffers type from uint8_t to os_membuf_t to ensure 
the required address OS alignment.
---
 nimble/transport/src/transport.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/nimble/transport/src/transport.c b/nimble/transport/src/transport.c
index c9b37a7e9..99c11c266 100644
--- a/nimble/transport/src/transport.c
+++ b/nimble/transport/src/transport.c
@@ -70,23 +70,23 @@
                                       BLE_MBUF_MEMBLOCK_OVERHEAD +         \
                                       BLE_HCI_DATA_HDR_SZ, OS_ALIGNMENT))
 
-static uint8_t pool_cmd_buf[ OS_MEMPOOL_BYTES(POOL_CMD_COUNT, POOL_CMD_SIZE) ];
+static os_membuf_t pool_cmd_buf[ OS_MEMPOOL_SIZE(POOL_CMD_COUNT, 
POOL_CMD_SIZE) ];
 static struct os_mempool pool_cmd;
 
-static uint8_t pool_evt_buf[ OS_MEMPOOL_BYTES(POOL_EVT_COUNT, POOL_EVT_SIZE) ];
+static os_membuf_t pool_evt_buf[ OS_MEMPOOL_SIZE(POOL_EVT_COUNT, 
POOL_EVT_SIZE) ];
 static struct os_mempool pool_evt;
 
-static uint8_t pool_evt_lo_buf[ OS_MEMPOOL_BYTES(POOL_EVT_LO_COUNT, 
POOL_EVT_SIZE) ];
+static os_membuf_t pool_evt_lo_buf[ OS_MEMPOOL_SIZE(POOL_EVT_LO_COUNT, 
POOL_EVT_SIZE) ];
 static struct os_mempool pool_evt_lo;
 
 #if POOL_ACL_COUNT > 0
-static uint8_t pool_acl_buf[ OS_MEMPOOL_BYTES(POOL_ACL_COUNT, POOL_ACL_SIZE) ];
+static os_membuf_t pool_acl_buf[ OS_MEMPOOL_SIZE(POOL_ACL_COUNT, 
POOL_ACL_SIZE) ];
 static struct os_mempool_ext pool_acl;
 static struct os_mbuf_pool mpool_acl;
 #endif
 
 #if POOL_ISO_COUNT > 0
-static uint8_t pool_iso_buf[ OS_MEMPOOL_BYTES(POOL_ISO_COUNT, POOL_ISO_SIZE) ];
+static os_membuf_t pool_iso_buf[ OS_MEMPOOL_SIZE(POOL_ISO_COUNT, 
POOL_ISO_SIZE) ];
 static struct os_mempool_ext pool_iso;
 static struct os_mbuf_pool mpool_iso;
 #endif

Reply via email to