Date   

Re: [RFC 0/3] Timer Fiber API

Szymon Janc <ext.szymon.janc@...>
 

Hi Luiz,

On Monday 18 of April 2016 18:16:00 Luiz Augusto von Dentz wrote:
From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

Following the discussion about the Timer API I decided to prototype the
feature in the Bluetooth subsystem:

XX:XX:XX:XX:XX:XX (public)> security 2
bt: bt_timer_queue_add (0x0011a54c): tq 0x00119940 t 0x0011bb1c ticks 3000
XX:XX:XX:XX:XX:XX (public)> bt: timer_queue_fiber (0x0011994c): tq
0x00119940 thread_id 1153356 started bt: timer_queue_ticks_remains
(0x0011994c): tq 0x00119940 ticks 3000 bt: bt_timer_queue_cancel
(0x0011dc60): tq 0x00119940 t 0x0011bb1c bt: bt_timer_queue_add
(0x0011dc60): tq 0x00119940 t 0x0011bb1c ticks 3000 bt:
timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 3000 bt:
bt_timer_queue_cancel (0x0011dc60): tq 0x00119940 t 0x0011bb1c bt:
bt_timer_queue_add (0x0011dc60): tq 0x00119940 t 0x0011bb1c ticks 3000 bt:
timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 2990 Confirm
passkey for XX:XX:XX:XX:XX:XX (public): 775621
bt: timer_expired (0x0011994c): t 0x0011bb1c
bt: smp_timeout: SMP Timeout
bt: timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 0
bt: timer_queue_fiber (0x0011994c): tq 0x00119940 thread_id 1153356 stopped
Disconnected: XX:XX:XX:XX:XX:XX (public) (reason 19)

So at this point it works properly, I tested what could be the minimal stack
necessary in order to run the timer queue and arrive at 512 bytes which is
4 times bigger than what we used to have when using a delayed fiber in SMP
so the timer API only really payoff in terms of memory in case there is 4
or more timer active, which there will be since we will be adding more user
for that in ATT and L2CAP protocols.
I don't get this why you need 512bytes if only 128 was needed by SMP. This
should mostly depend on how heavy is the callback, right? Is overhead for
queue that big?


Ive also make the timer queue abort if there is no timers left, this is
something that perhaps is not such a good idea if there is too much
overhead starting the fibers on demand, perhaps by the it cannot be used if
the ticks are low perhaps it is shorter then starting a fiber thus loosing
precision. Anyway the idea here is not to invent a high precision timer, in
fact later on we may introduce a function that takes the timeout in seconds
instead of ticks and then coalesce multiple timers that would happen in the
same second thus reducing the amount of wakeups.

Luiz Augusto von Dentz (3):
Bluetooth: Add timer API
Bluetooth: Kconfig: Add BLUETOOTH_DEBUG_TIMER
Bluetooth: SMP: Make use of bt_timer API

net/bluetooth/Kconfig | 17 ++++
net/bluetooth/Makefile | 1 +
net/bluetooth/smp.c | 40 ++++-----
net/bluetooth/timer.c | 216
+++++++++++++++++++++++++++++++++++++++++++++++++ net/bluetooth/timer.h |
48 +++++++++++
5 files changed, 299 insertions(+), 23 deletions(-)
create mode 100644 net/bluetooth/timer.c
create mode 100644 net/bluetooth/timer.h
--
BR
Szymon Janc


Re: [RFC 1/3] Bluetooth: Add timer API

Luiz Augusto von Dentz
 

Hi Jukka,

On Tue, Apr 19, 2016 at 10:34 AM, Jukka Rissanen
<jukka.rissanen(a)linux.intel.com> wrote:
Hi Luiz,

On Mon, 2016-04-18 at 18:16 +0300, Luiz Augusto von Dentz wrote:
From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

This adds a timer fiber which can be used track timeouts removing the
need to use one delayed fiber per timeout.

Change-Id: Id13347fbc69b1e83bca22094fbeb741e045ed516
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
---
net/bluetooth/Kconfig | 9 +++
net/bluetooth/Makefile | 1 +
net/bluetooth/timer.c | 211
+++++++++++++++++++++++++++++++++++++++++++++++++
net/bluetooth/timer.h | 48 +++++++++++
4 files changed, 269 insertions(+)
create mode 100644 net/bluetooth/timer.c
create mode 100644 net/bluetooth/timer.h

diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index 2ffb0e0..2d703e3 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -20,6 +20,7 @@ menuconfig BLUETOOTH
bool "Bluetooth support"
default n
select NANO_TIMEOUTS
+ select NANO_TIMERS
select NET_BUF
select BLUETOOTH_LE if !BLUETOOTH_STACK_NBLE
help
@@ -132,6 +133,14 @@ config BLUETOOTH_CONN
default n

if BLUETOOTH_CONN
+config BLUETOOTH_TIMER_STACK_SIZE
+ int "Size of the timer fiber stack"
+ default 512
+ range 512 65536
+ help
+ Size of the timer fiber stack. This is the context from
+ which all timer callbacks occur.
+
config BLUETOOTH_ACL_IN_COUNT
int "Number of incoming ACL data buffers"
default 5
Could we make the timer more generic from day one as this can be used
quite easily by IP sub-system. So the config could be placed to
net/Kconfig already.
Sure, this was just a little bit more convenient to show how it could
be implemented, etc. I guess this one will actually end up as a
sys_timer_queue or something like that.


diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
index 160ba34..18f9231 100644
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
@@ -4,6 +4,7 @@ obj-$(CONFIG_BLUETOOTH_STACK_HCI) = \

ifeq ($(CONFIG_BLUETOOTH_CONN),y)
obj-y += conn.o \
+ timer.o \
l2cap.o \
att.o \
gatt.o
diff --git a/net/bluetooth/timer.c b/net/bluetooth/timer.c
new file mode 100644
index 0000000..608ee4f
--- /dev/null
+++ b/net/bluetooth/timer.c
@@ -0,0 +1,211 @@
+/** @file
+ * @brief Internal APIs for Bluetooth timer handling.
+ */
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
+ * See the License for the specific language governing permissions
and
+ * limitations under the License.
+ */
+
+#include <nanokernel.h>
+#include <toolchain.h>
+#include <sections.h>
+#include <string.h>
+#include <errno.h>
+#include <misc/stack.h>
+
+#include <bluetooth/log.h>
+
+#include "timer.h"
+
+struct timer_queue {
+ struct bt_timer_queue tq;
+
+ BT_STACK(stack, CONFIG_BLUETOOTH_TIMER_STACK_SIZE);
+};
+
+static struct timer_queue global_tq = {
+ .tq.stack_size = CONFIG_BLUETOOTH_TIMER_STACK_SIZE,
Why do we need to store the stack size to a variable here?
This is initializing the __global_tq, the stack_size is later on used
with timer_queue_start.


+};
+
+struct bt_timer_queue *__global_tq = &global_tq.tq;
+
+static void timer_expired(struct bt_timer *t)
+{
+ BT_DBG("t %p", t);
+
+ /* Just to be safe stop the timer */
+ nano_fiber_timer_stop(&t->__nano_timer);
+
+ t->func(t->user_data);
+}
+
+static int32_t timer_queue_ticks_remains(struct bt_timer_queue *tq)
+{
+ int32_t ticks;
+
+ stack_analyze("timer queue stack", tq->stack, tq-
stack_size);
+
+ while (tq->__head) {
+ struct bt_timer *cur;
+
+ /* If head is not expired sleep the remaining ticks
*/
+ ticks = nano_timer_ticks_remain(&tq->__head-
__nano_timer);
+ if (ticks > 0)
+ goto done;
Missing { }

+
+ /* Remove head since it has expired */
+ cur = tq->__head;
+ tq->__head = tq->__head->__next;
+
+ /* Execute callback */
+ timer_expired(cur);
+ }
+
+ /* No timers left, abort fiber */
+ ticks = 0;
+
+done:
+ BT_DBG("tq %p ticks %d", tq, ticks);
+
+ return ticks;
+}
+
+static void timer_queue_fiber(struct bt_timer_queue *tq)
+{
+ int32_t ticks;
+
+ BT_DBG("tq %p thread_id %d started", tq, tq->__thread_id);
+
+ while ((ticks = timer_queue_ticks_remains(tq))) {
+ fiber_sleep(ticks);
+ }
+
+ BT_DBG("tq %p thread_id %d stopped", tq, tq->__thread_id);
+
+ tq->__thread_id = 0;
+ fiber_abort();
+}
+
+static int timer_queue_start(struct bt_timer_queue *tq)
+{
+ if (tq->__thread_id) {
+ return 0;
+ }
+
+ tq->__thread_id = fiber_start(tq->stack, tq->stack_size,
+ (nano_fiber_entry_t)
timer_queue_fiber,
+ (int) tq, 0, 7, 0);
+
+ return 0;
+}
+
+int bt_timer_queue_init(struct bt_timer_queue *tq, size_t
stack_size)+{
Why not timer_queue_init()?


+ if (!tq || !stack_size) {
+ return -EINVAL;
+ }
+
+ tq->stack_size = stack_size;
+
+ return 0;
+}
+
+static inline void timer_queue_wakeup(struct bt_timer_queue *tq)
+{
+ if (sys_thread_self_get() != tq->__thread_id)
+ fiber_wakeup(tq->__thread_id);
Missing { }


+}
+
+int bt_timer_queue_add(struct bt_timer_queue *tq, struct bt_timer
*t, int ticks)
Why not timer_queue_add()?


+{
+ struct bt_timer *cur, *prev;
+
+ BT_DBG("tq %p t %p ticks %d", tq, t, ticks);
+
+ if (!t || !t->func)
+ return -EINVAL;
+
+ timer_queue_start(tq);
+ nano_timer_start(&t->__nano_timer, ticks);
+
+ /* Sort the list of timers */
+ for (cur = tq->__head, prev = NULL; cur;
+ prev = cur, cur = cur->__next) {
+ if (ticks < nano_timer_ticks_remain(&cur-
__nano_timer)) {
+ break;
+ }
+ }
+
+ t->__next = cur;
+
+ if (prev) {
+ prev->__next = t;
+ } else {
+ tq->__head = t;
+ /* Wakeup timer queue fiber since there is a new
head */
+ timer_queue_wakeup(tq);
+ }
+
+ return 0;
+}
+
+int bt_timer_queue_cancel(struct bt_timer_queue *tq, struct bt_timer
*t)
Also this one could be named more generic?

+{
+ struct bt_timer *cur, *prev;
+
+ BT_DBG("tq %p t %p", tq, t);
+
+ if (!t) {
+ return -EINVAL;
+ }
+
+ /* Lookup existing timers */
+ for (cur = tq->__head, prev = NULL; cur;
+ prev = cur, cur = cur->__next) {
+ if (cur == t) {
+ break;
+ }
+ }
+
+ if (!cur) {
+ return -ENOENT;
+ }
+
+ nano_timer_stop(&t->__nano_timer);
+
+ /* Remove timer for the queue */
+ if (prev) {
+ prev->__next = t->__next;
+ } else {
+ tq->__head = t->__next;
+ /* Wakeup timer queue fiber since there is a new
head */
+ timer_queue_wakeup(tq);
+ }
+
+ return 0;
+}
+
+int bt_timer_init(struct bt_timer *t, bt_timer_func func, void
*user_data)
+{
+ if (!t || !func) {
+ return -EINVAL;
+ }
+
+ t->func = func;
+ t->user_data = user_data;
+ nano_timer_init(&t->__nano_timer, t);
+
+ return 0;
+}
diff --git a/net/bluetooth/timer.h b/net/bluetooth/timer.h
new file mode 100644
index 0000000..82bee8f
--- /dev/null
+++ b/net/bluetooth/timer.h
@@ -0,0 +1,48 @@
+/** @file
+ * @brief Internal APIs for Bluetooth timer handling.
+ */
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
+ * See the License for the specific language governing permissions
and
+ * limitations under the License.
+ */
+
+extern struct bt_timer_queue *__global_tq;
+
+struct bt_timer_queue {
+ nano_thread_id_t __thread_id;
+ struct bt_timer *__head;
+ size_t stack_size;
+ char stack[0];
+};
+
+typedef void (*bt_timer_func)(void *user_data);
+
+struct bt_timer {
+ struct nano_timer __nano_timer;
+ bt_timer_func func;
+ void *user_data;
+ struct bt_timer *__next;
+};
+
+int bt_timer_queue_init(struct bt_timer_queue *tq, size_t
stack_size);
+
+int bt_timer_queue_add(struct bt_timer_queue *tq, struct bt_timer
*t,
+ int ticks);
+int bt_timer_queue_cancel(struct bt_timer_queue *tq, struct bt_timer
*t);
+
+int bt_timer_init(struct bt_timer *t, bt_timer_func func, void
*user_data);
+
+#define bt_timer_add(_t, _ticks) bt_timer_queue_add(__global_tq, _t,
_ticks)
+#define bt_timer_cancel(_t) bt_timer_queue_cancel(__global_tq, _t)

Cheers,
Jukka



--
Luiz Augusto von Dentz


Re: [RFC 1/3] Bluetooth: Add timer API

Jukka Rissanen
 

Hi Luiz,

On Mon, 2016-04-18 at 18:16 +0300, Luiz Augusto von Dentz wrote:
From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

This adds a timer fiber which can be used track timeouts removing the
need to use one delayed fiber per timeout.

Change-Id: Id13347fbc69b1e83bca22094fbeb741e045ed516
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
---
 net/bluetooth/Kconfig  |   9 +++
 net/bluetooth/Makefile |   1 +
 net/bluetooth/timer.c  | 211
+++++++++++++++++++++++++++++++++++++++++++++++++
 net/bluetooth/timer.h  |  48 +++++++++++
 4 files changed, 269 insertions(+)
 create mode 100644 net/bluetooth/timer.c
 create mode 100644 net/bluetooth/timer.h

diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index 2ffb0e0..2d703e3 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -20,6 +20,7 @@ menuconfig BLUETOOTH
  bool "Bluetooth support"
  default n
  select NANO_TIMEOUTS
+ select NANO_TIMERS
  select NET_BUF
  select BLUETOOTH_LE if !BLUETOOTH_STACK_NBLE
  help
@@ -132,6 +133,14 @@ config BLUETOOTH_CONN
  default n
 
 if BLUETOOTH_CONN
+config  BLUETOOTH_TIMER_STACK_SIZE
+ int "Size of the timer fiber stack"
+ default 512
+ range 512 65536
+ help
+   Size of the timer fiber stack. This is the context from
+   which all timer callbacks occur.
+
 config  BLUETOOTH_ACL_IN_COUNT
  int "Number of incoming ACL data buffers"
  default 5
Could we make the timer more generic from day one as this can be used
quite easily by IP sub-system. So the config could be placed to
net/Kconfig already.


diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
index 160ba34..18f9231 100644
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
@@ -4,6 +4,7 @@ obj-$(CONFIG_BLUETOOTH_STACK_HCI) = \
 
 ifeq ($(CONFIG_BLUETOOTH_CONN),y)
  obj-y += conn.o \
+ timer.o \
  l2cap.o \
  att.o \
  gatt.o
diff --git a/net/bluetooth/timer.c b/net/bluetooth/timer.c
new file mode 100644
index 0000000..608ee4f
--- /dev/null
+++ b/net/bluetooth/timer.c
@@ -0,0 +1,211 @@
+/** @file
+ *  @brief Internal APIs for Bluetooth timer handling.
+ */
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
+ * See the License for the specific language governing permissions
and
+ * limitations under the License.
+ */
+
+#include <nanokernel.h>
+#include <toolchain.h>
+#include <sections.h>
+#include <string.h>
+#include <errno.h>
+#include <misc/stack.h>
+
+#include <bluetooth/log.h>
+
+#include "timer.h"
+
+struct timer_queue {
+ struct bt_timer_queue tq;
+
+ BT_STACK(stack, CONFIG_BLUETOOTH_TIMER_STACK_SIZE);
+};
+
+static struct timer_queue global_tq = {
+ .tq.stack_size = CONFIG_BLUETOOTH_TIMER_STACK_SIZE,
Why do we need to store the stack size to a variable here?


+};
+
+struct bt_timer_queue *__global_tq = &global_tq.tq;
+
+static void timer_expired(struct bt_timer *t)
+{
+ BT_DBG("t %p", t);
+
+ /* Just to be safe stop the timer */
+ nano_fiber_timer_stop(&t->__nano_timer);
+
+ t->func(t->user_data);
+}
+
+static int32_t timer_queue_ticks_remains(struct bt_timer_queue *tq)
+{
+ int32_t ticks;
+
+ stack_analyze("timer queue stack", tq->stack, tq-
stack_size);
+
+ while (tq->__head) {
+ struct bt_timer *cur;
+
+ /* If head is not expired sleep the remaining ticks
*/
+ ticks = nano_timer_ticks_remain(&tq->__head-
__nano_timer);
+ if (ticks > 0)
+ goto done;
Missing { }

+
+ /* Remove head since it has expired */
+ cur = tq->__head;
+ tq->__head = tq->__head->__next;
+
+ /* Execute callback */
+ timer_expired(cur);
+ }
+
+ /* No timers left, abort fiber */
+ ticks = 0;
+
+done:
+ BT_DBG("tq %p ticks %d", tq, ticks);
+
+ return ticks;
+}
+
+static void timer_queue_fiber(struct bt_timer_queue *tq)
+{
+ int32_t ticks;
+
+ BT_DBG("tq %p thread_id %d started", tq, tq->__thread_id);
+
+ while ((ticks = timer_queue_ticks_remains(tq))) {
+ fiber_sleep(ticks);
+ }
+
+ BT_DBG("tq %p thread_id %d stopped", tq, tq->__thread_id);
+
+ tq->__thread_id = 0;
+ fiber_abort();
+}
+
+static int timer_queue_start(struct bt_timer_queue *tq)
+{
+ if (tq->__thread_id) {
+ return 0;
+ }
+
+ tq->__thread_id = fiber_start(tq->stack, tq->stack_size,
+       (nano_fiber_entry_t)
timer_queue_fiber,
+       (int) tq, 0, 7, 0);
+
+ return 0;
+}
+
+int bt_timer_queue_init(struct bt_timer_queue *tq, size_t
stack_size)+{
Why not timer_queue_init()?


+ if (!tq || !stack_size) {
+ return -EINVAL;
+ }
+
+ tq->stack_size = stack_size;
+
+ return 0;
+}
+
+static inline void timer_queue_wakeup(struct bt_timer_queue *tq)
+{
+ if (sys_thread_self_get() != tq->__thread_id)
+ fiber_wakeup(tq->__thread_id);
Missing { }


+}
+
+int bt_timer_queue_add(struct bt_timer_queue *tq, struct bt_timer
*t, int ticks)
Why not timer_queue_add()?


+{
+ struct bt_timer *cur, *prev;
+
+ BT_DBG("tq %p t %p ticks %d", tq, t, ticks);
+
+ if (!t || !t->func)
+ return -EINVAL;
+
+ timer_queue_start(tq);
+ nano_timer_start(&t->__nano_timer, ticks);
+
+ /* Sort the list of timers */
+ for (cur = tq->__head, prev = NULL; cur;
+      prev = cur, cur = cur->__next) {
+ if (ticks < nano_timer_ticks_remain(&cur-
__nano_timer)) {
+ break;
+ }
+ }
+
+ t->__next = cur;
+
+ if (prev) {
+ prev->__next = t;
+ } else {
+ tq->__head = t;
+ /* Wakeup timer queue fiber since there is a new
head */
+ timer_queue_wakeup(tq);
+ }
+
+ return 0;
+}
+
+int bt_timer_queue_cancel(struct bt_timer_queue *tq, struct bt_timer
*t)
Also this one could be named more generic?

+{
+ struct bt_timer *cur, *prev;
+
+ BT_DBG("tq %p t %p", tq, t);
+
+ if (!t) {
+ return -EINVAL;
+ }
+
+ /* Lookup existing timers */
+ for (cur = tq->__head, prev = NULL; cur;
+      prev = cur, cur = cur->__next) {
+ if (cur == t) {
+ break;
+ }
+ }
+
+ if (!cur) {
+ return -ENOENT;
+ }
+
+ nano_timer_stop(&t->__nano_timer);
+
+ /* Remove timer for the queue */
+ if (prev) {
+ prev->__next = t->__next;
+ } else {
+ tq->__head = t->__next;
+ /* Wakeup timer queue fiber since there is a new
head */
+ timer_queue_wakeup(tq);
+ }
+
+ return 0;
+}
+
+int bt_timer_init(struct bt_timer *t, bt_timer_func func, void
*user_data)
+{
+ if (!t || !func) {
+ return -EINVAL;
+ }
+
+ t->func = func;
+ t->user_data = user_data;
+ nano_timer_init(&t->__nano_timer, t);
+
+ return 0;
+}
diff --git a/net/bluetooth/timer.h b/net/bluetooth/timer.h
new file mode 100644
index 0000000..82bee8f
--- /dev/null
+++ b/net/bluetooth/timer.h
@@ -0,0 +1,48 @@
+/** @file
+ *  @brief Internal APIs for Bluetooth timer handling.
+ */
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
+ * See the License for the specific language governing permissions
and
+ * limitations under the License.
+ */
+
+extern struct bt_timer_queue *__global_tq;
+
+struct bt_timer_queue {
+ nano_thread_id_t __thread_id;
+ struct bt_timer *__head;
+ size_t stack_size;
+ char stack[0];
+};
+
+typedef void (*bt_timer_func)(void *user_data);
+
+struct bt_timer {
+ struct nano_timer __nano_timer;
+ bt_timer_func func;
+ void *user_data;
+ struct bt_timer *__next;
+};
+
+int bt_timer_queue_init(struct bt_timer_queue *tq, size_t
stack_size);
+
+int bt_timer_queue_add(struct bt_timer_queue *tq, struct bt_timer
*t,
+        int ticks);
+int bt_timer_queue_cancel(struct bt_timer_queue *tq, struct bt_timer
*t);
+
+int bt_timer_init(struct bt_timer *t, bt_timer_func func, void
*user_data);
+
+#define bt_timer_add(_t, _ticks) bt_timer_queue_add(__global_tq, _t,
_ticks)
+#define bt_timer_cancel(_t) bt_timer_queue_cancel(__global_tq, _t)

Cheers,
Jukka


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 0

UPDATED JIRA items within last 24 hours: 0

CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


[RFC 3/3] Bluetooth: SMP: Make use of bt_timer API

Luiz Augusto von Dentz
 

From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

This replaces use of delayed fiber with bt_timer which uses a common
fiber and stack with other timers used by the stack.

Change-Id: Ie8f0ea778d7a415a61bd326da70cfae4131156af
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
---
net/bluetooth/smp.c | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 42f6ecf..f54b6c9 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -50,6 +50,7 @@
#include "conn_internal.h"
#include "l2cap_internal.h"
#include "smp.h"
+#include "timer.h"

#define SMP_TIMEOUT (30 * sys_clock_ticks_per_sec)

@@ -101,9 +102,6 @@ struct bt_smp {
/* The channel this context is associated with */
struct bt_l2cap_chan chan;

- /* SMP Timeout fiber handle */
- nano_thread_id_t timeout;
-
/* Commands that remote is allowed to send */
atomic_t allowed_cmds;

@@ -155,8 +153,8 @@ struct bt_smp {
/* Remote key distribution */
uint8_t remote_dist;

- /* stack for timeout fiber */
- BT_STACK(stack, 128);
+ /* Timeout timer */
+ struct bt_timer timer;
};

/* based on table 2.8 Core Spec 2.3.5.1 Vol. 3 Part H */
@@ -571,12 +569,9 @@ static void smp_reset(struct bt_smp *smp)
{
struct bt_conn *conn = smp->chan.conn;

- if (smp->timeout) {
- fiber_fiber_delayed_start_cancel(smp->timeout);
- smp->timeout = NULL;
-
- stack_analyze("smp timeout stack", smp->stack,
- sizeof(smp->stack));
+ if (smp->timer.func) {
+ bt_timer_cancel(&smp->timer);
+ smp->timer.func = NULL;
}

smp->method = JUST_WORKS;
@@ -601,15 +596,13 @@ static void smp_reset(struct bt_smp *smp)
#endif /* CONFIG_BLUETOOTH_PERIPHERAL */
}

-static void smp_timeout(int arg1, int arg2)
+static void smp_timeout(void *user_data)
{
- struct bt_smp *smp = (struct bt_smp *)arg1;
-
- ARG_UNUSED(arg2);
+ struct bt_smp *smp = user_data;

BT_ERR("SMP Timeout");

- smp->timeout = NULL;
+ smp->timer.func = NULL;

/*
* If SMP timeout occurred during key distribution we should assume
@@ -627,13 +620,13 @@ static void smp_timeout(int arg1, int arg2)

static void smp_restart_timer(struct bt_smp *smp)
{
- if (smp->timeout) {
- fiber_fiber_delayed_start_cancel(smp->timeout);
+ if (smp->timer.func) {
+ bt_timer_cancel(&smp->timer);
+ } else {
+ bt_timer_init(&smp->timer, smp_timeout, smp);
}

- smp->timeout = fiber_delayed_start(smp->stack, sizeof(smp->stack),
- smp_timeout, (int)smp, 0, 7, 0,
- SMP_TIMEOUT);
+ bt_timer_add(&smp->timer, SMP_TIMEOUT);
}

static struct net_buf *smp_create_pdu(struct bt_conn *conn, uint8_t op,
@@ -2626,8 +2619,9 @@ static void bt_smp_disconnected(struct bt_l2cap_chan *chan)

BT_DBG("chan %p cid 0x%04x", chan, chan->tx.cid);

- if (smp->timeout) {
- fiber_fiber_delayed_start_cancel(smp->timeout);
+ if (smp->timer.func) {
+ bt_timer_cancel(&smp->timer);
+ smp->timer.func = NULL;
}

if (keys) {
--
2.5.5


[RFC 2/3] Bluetooth: Kconfig: Add BLUETOOTH_DEBUG_TIMER

Luiz Augusto von Dentz
 

From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

This adds BLUETOOTH_DEBUG_TIMER which can be used to enable debug for the
bt_timer related APIs.

Change-Id: I630de79339a831c060a8d81be6a49841af9f2587
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
---
net/bluetooth/Kconfig | 8 ++++++++
net/bluetooth/timer.c | 5 +++++
2 files changed, 13 insertions(+)

diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index 2d703e3..ee1057f 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -343,6 +343,14 @@ config BLUETOOTH_DEBUG_GATT
This option enables debug support for the Bluetooth
Generic Attribute Profile (GATT).

+config BLUETOOTH_DEBUG_TIMER
+ bool "Bluetooth Timer Fiber debug"
+ depends on BLUETOOTH_CONN
+ default n
+ help
+ This option enables debug support for the Bluetooth
+ Timer Fiber.
+
endif # BLUETOOTH_DEBUG

config BLUETOOTH_BREDR
diff --git a/net/bluetooth/timer.c b/net/bluetooth/timer.c
index 608ee4f..6967a2c 100644
--- a/net/bluetooth/timer.c
+++ b/net/bluetooth/timer.c
@@ -29,6 +29,11 @@

#include "timer.h"

+#if !defined(CONFIG_BLUETOOTH_DEBUG_TIMER)
+#undef BT_DBG
+#define BT_DBG(fmt, ...)
+#endif
+
struct timer_queue {
struct bt_timer_queue tq;

--
2.5.5


[RFC 1/3] Bluetooth: Add timer API

Luiz Augusto von Dentz
 

From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

This adds a timer fiber which can be used track timeouts removing the
need to use one delayed fiber per timeout.

Change-Id: Id13347fbc69b1e83bca22094fbeb741e045ed516
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
---
net/bluetooth/Kconfig | 9 +++
net/bluetooth/Makefile | 1 +
net/bluetooth/timer.c | 211 +++++++++++++++++++++++++++++++++++++++++++++++++
net/bluetooth/timer.h | 48 +++++++++++
4 files changed, 269 insertions(+)
create mode 100644 net/bluetooth/timer.c
create mode 100644 net/bluetooth/timer.h

diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index 2ffb0e0..2d703e3 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -20,6 +20,7 @@ menuconfig BLUETOOTH
bool "Bluetooth support"
default n
select NANO_TIMEOUTS
+ select NANO_TIMERS
select NET_BUF
select BLUETOOTH_LE if !BLUETOOTH_STACK_NBLE
help
@@ -132,6 +133,14 @@ config BLUETOOTH_CONN
default n

if BLUETOOTH_CONN
+config BLUETOOTH_TIMER_STACK_SIZE
+ int "Size of the timer fiber stack"
+ default 512
+ range 512 65536
+ help
+ Size of the timer fiber stack. This is the context from
+ which all timer callbacks occur.
+
config BLUETOOTH_ACL_IN_COUNT
int "Number of incoming ACL data buffers"
default 5
diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
index 160ba34..18f9231 100644
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
@@ -4,6 +4,7 @@ obj-$(CONFIG_BLUETOOTH_STACK_HCI) = \

ifeq ($(CONFIG_BLUETOOTH_CONN),y)
obj-y += conn.o \
+ timer.o \
l2cap.o \
att.o \
gatt.o
diff --git a/net/bluetooth/timer.c b/net/bluetooth/timer.c
new file mode 100644
index 0000000..608ee4f
--- /dev/null
+++ b/net/bluetooth/timer.c
@@ -0,0 +1,211 @@
+/** @file
+ * @brief Internal APIs for Bluetooth timer handling.
+ */
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <nanokernel.h>
+#include <toolchain.h>
+#include <sections.h>
+#include <string.h>
+#include <errno.h>
+#include <misc/stack.h>
+
+#include <bluetooth/log.h>
+
+#include "timer.h"
+
+struct timer_queue {
+ struct bt_timer_queue tq;
+
+ BT_STACK(stack, CONFIG_BLUETOOTH_TIMER_STACK_SIZE);
+};
+
+static struct timer_queue global_tq = {
+ .tq.stack_size = CONFIG_BLUETOOTH_TIMER_STACK_SIZE,
+};
+
+struct bt_timer_queue *__global_tq = &global_tq.tq;
+
+static void timer_expired(struct bt_timer *t)
+{
+ BT_DBG("t %p", t);
+
+ /* Just to be safe stop the timer */
+ nano_fiber_timer_stop(&t->__nano_timer);
+
+ t->func(t->user_data);
+}
+
+static int32_t timer_queue_ticks_remains(struct bt_timer_queue *tq)
+{
+ int32_t ticks;
+
+ stack_analyze("timer queue stack", tq->stack, tq->stack_size);
+
+ while (tq->__head) {
+ struct bt_timer *cur;
+
+ /* If head is not expired sleep the remaining ticks */
+ ticks = nano_timer_ticks_remain(&tq->__head->__nano_timer);
+ if (ticks > 0)
+ goto done;
+
+ /* Remove head since it has expired */
+ cur = tq->__head;
+ tq->__head = tq->__head->__next;
+
+ /* Execute callback */
+ timer_expired(cur);
+ }
+
+ /* No timers left, abort fiber */
+ ticks = 0;
+
+done:
+ BT_DBG("tq %p ticks %d", tq, ticks);
+
+ return ticks;
+}
+
+static void timer_queue_fiber(struct bt_timer_queue *tq)
+{
+ int32_t ticks;
+
+ BT_DBG("tq %p thread_id %d started", tq, tq->__thread_id);
+
+ while ((ticks = timer_queue_ticks_remains(tq))) {
+ fiber_sleep(ticks);
+ }
+
+ BT_DBG("tq %p thread_id %d stopped", tq, tq->__thread_id);
+
+ tq->__thread_id = 0;
+ fiber_abort();
+}
+
+static int timer_queue_start(struct bt_timer_queue *tq)
+{
+ if (tq->__thread_id) {
+ return 0;
+ }
+
+ tq->__thread_id = fiber_start(tq->stack, tq->stack_size,
+ (nano_fiber_entry_t) timer_queue_fiber,
+ (int) tq, 0, 7, 0);
+
+ return 0;
+}
+
+int bt_timer_queue_init(struct bt_timer_queue *tq, size_t stack_size)
+{
+ if (!tq || !stack_size) {
+ return -EINVAL;
+ }
+
+ tq->stack_size = stack_size;
+
+ return 0;
+}
+
+static inline void timer_queue_wakeup(struct bt_timer_queue *tq)
+{
+ if (sys_thread_self_get() != tq->__thread_id)
+ fiber_wakeup(tq->__thread_id);
+}
+
+int bt_timer_queue_add(struct bt_timer_queue *tq, struct bt_timer *t, int ticks)
+{
+ struct bt_timer *cur, *prev;
+
+ BT_DBG("tq %p t %p ticks %d", tq, t, ticks);
+
+ if (!t || !t->func)
+ return -EINVAL;
+
+ timer_queue_start(tq);
+ nano_timer_start(&t->__nano_timer, ticks);
+
+ /* Sort the list of timers */
+ for (cur = tq->__head, prev = NULL; cur;
+ prev = cur, cur = cur->__next) {
+ if (ticks < nano_timer_ticks_remain(&cur->__nano_timer)) {
+ break;
+ }
+ }
+
+ t->__next = cur;
+
+ if (prev) {
+ prev->__next = t;
+ } else {
+ tq->__head = t;
+ /* Wakeup timer queue fiber since there is a new head */
+ timer_queue_wakeup(tq);
+ }
+
+ return 0;
+}
+
+int bt_timer_queue_cancel(struct bt_timer_queue *tq, struct bt_timer *t)
+{
+ struct bt_timer *cur, *prev;
+
+ BT_DBG("tq %p t %p", tq, t);
+
+ if (!t) {
+ return -EINVAL;
+ }
+
+ /* Lookup existing timers */
+ for (cur = tq->__head, prev = NULL; cur;
+ prev = cur, cur = cur->__next) {
+ if (cur == t) {
+ break;
+ }
+ }
+
+ if (!cur) {
+ return -ENOENT;
+ }
+
+ nano_timer_stop(&t->__nano_timer);
+
+ /* Remove timer for the queue */
+ if (prev) {
+ prev->__next = t->__next;
+ } else {
+ tq->__head = t->__next;
+ /* Wakeup timer queue fiber since there is a new head */
+ timer_queue_wakeup(tq);
+ }
+
+ return 0;
+}
+
+int bt_timer_init(struct bt_timer *t, bt_timer_func func, void *user_data)
+{
+ if (!t || !func) {
+ return -EINVAL;
+ }
+
+ t->func = func;
+ t->user_data = user_data;
+ nano_timer_init(&t->__nano_timer, t);
+
+ return 0;
+}
diff --git a/net/bluetooth/timer.h b/net/bluetooth/timer.h
new file mode 100644
index 0000000..82bee8f
--- /dev/null
+++ b/net/bluetooth/timer.h
@@ -0,0 +1,48 @@
+/** @file
+ * @brief Internal APIs for Bluetooth timer handling.
+ */
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+extern struct bt_timer_queue *__global_tq;
+
+struct bt_timer_queue {
+ nano_thread_id_t __thread_id;
+ struct bt_timer *__head;
+ size_t stack_size;
+ char stack[0];
+};
+
+typedef void (*bt_timer_func)(void *user_data);
+
+struct bt_timer {
+ struct nano_timer __nano_timer;
+ bt_timer_func func;
+ void *user_data;
+ struct bt_timer *__next;
+};
+
+int bt_timer_queue_init(struct bt_timer_queue *tq, size_t stack_size);
+
+int bt_timer_queue_add(struct bt_timer_queue *tq, struct bt_timer *t,
+ int ticks);
+int bt_timer_queue_cancel(struct bt_timer_queue *tq, struct bt_timer *t);
+
+int bt_timer_init(struct bt_timer *t, bt_timer_func func, void *user_data);
+
+#define bt_timer_add(_t, _ticks) bt_timer_queue_add(__global_tq, _t, _ticks)
+#define bt_timer_cancel(_t) bt_timer_queue_cancel(__global_tq, _t)
--
2.5.5


[RFC 0/3] Timer Fiber API

Luiz Augusto von Dentz
 

From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>

Following the discussion about the Timer API I decided to prototype the
feature in the Bluetooth subsystem:

XX:XX:XX:XX:XX:XX (public)> security 2
bt: bt_timer_queue_add (0x0011a54c): tq 0x00119940 t 0x0011bb1c ticks 3000
XX:XX:XX:XX:XX:XX (public)> bt: timer_queue_fiber (0x0011994c): tq 0x00119940 thread_id 1153356 started
bt: timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 3000
bt: bt_timer_queue_cancel (0x0011dc60): tq 0x00119940 t 0x0011bb1c
bt: bt_timer_queue_add (0x0011dc60): tq 0x00119940 t 0x0011bb1c ticks 3000
bt: timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 3000
bt: bt_timer_queue_cancel (0x0011dc60): tq 0x00119940 t 0x0011bb1c
bt: bt_timer_queue_add (0x0011dc60): tq 0x00119940 t 0x0011bb1c ticks 3000
bt: timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 2990
Confirm passkey for XX:XX:XX:XX:XX:XX (public): 775621
bt: timer_expired (0x0011994c): t 0x0011bb1c
bt: smp_timeout: SMP Timeout
bt: timer_queue_ticks_remains (0x0011994c): tq 0x00119940 ticks 0
bt: timer_queue_fiber (0x0011994c): tq 0x00119940 thread_id 1153356 stopped
Disconnected: XX:XX:XX:XX:XX:XX (public) (reason 19)

So at this point it works properly, I tested what could be the minimal stack
necessary in order to run the timer queue and arrive at 512 bytes which is 4
times bigger than what we used to have when using a delayed fiber in SMP so the
timer API only really payoff in terms of memory in case there is 4 or more
timer active, which there will be since we will be adding more user for that
in ATT and L2CAP protocols.

Ive also make the timer queue abort if there is no timers left, this is
something that perhaps is not such a good idea if there is too much
overhead starting the fibers on demand, perhaps by the it cannot be used if
the ticks are low perhaps it is shorter then starting a fiber thus loosing
precision. Anyway the idea here is not to invent a high precision timer, in
fact later on we may introduce a function that takes the timeout in seconds
instead of ticks and then coalesce multiple timers that would happen in the
same second thus reducing the amount of wakeups.

Luiz Augusto von Dentz (3):
Bluetooth: Add timer API
Bluetooth: Kconfig: Add BLUETOOTH_DEBUG_TIMER
Bluetooth: SMP: Make use of bt_timer API

net/bluetooth/Kconfig | 17 ++++
net/bluetooth/Makefile | 1 +
net/bluetooth/smp.c | 40 ++++-----
net/bluetooth/timer.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++++
net/bluetooth/timer.h | 48 +++++++++++
5 files changed, 299 insertions(+), 23 deletions(-)
create mode 100644 net/bluetooth/timer.c
create mode 100644 net/bluetooth/timer.h

--
2.5.5


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1502 : Bluetooth: tester: Update tester application README
- https://gerrit.zephyrproject.org/r/1515 : sensor: bmi160: switch to the new logging API
- https://gerrit.zephyrproject.org/r/1514 : nanokernel: tighten _is_thread_essential()
- https://gerrit.zephyrproject.org/r/1508 : microkernel: use _thread_essential_set()
- https://gerrit.zephyrproject.org/r/1507 : arduino_101: speed up loading of firmware
- https://gerrit.zephyrproject.org/r/1506 : qmsi: flash: use built-in qmsi driver

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1481 : doc: remove collaboration guides
- https://gerrit.zephyrproject.org/r/1452 : sensor: bmi160: add x86 app for receiving BMI160 interrupts
- https://gerrit.zephyrproject.org/r/1454 : sensor: bmi160: create two wrappers for bmi160_reg_val_to_range
- https://gerrit.zephyrproject.org/r/1453 : sensor: bmi160: move the printing macro to the header
- https://gerrit.zephyrproject.org/r/1451 : sensor: sensor.h: fix typo
- https://gerrit.zephyrproject.org/r/1450 : sensor: bmi160: move sample app to arc subdirectory
- https://gerrit.zephyrproject.org/r/1455 : sensor: bmi160: fix bmi160_reg_field_update function
- https://gerrit.zephyrproject.org/r/1456 : sensor: bmi160: make some read/write functions global
- https://gerrit.zephyrproject.org/r/1458 : sensor: bmi160: add trigger tests to the application
- https://gerrit.zephyrproject.org/r/1457 : sensor: bmi160: add support for triggers
- https://gerrit.zephyrproject.org/r/1444 : Bluetooth: drivers/nble: Fix calling cmd from discov callback
- https://gerrit.zephyrproject.org/r/1501 : fixed inclusion of limits.h when building with newlib
- https://gerrit.zephyrproject.org/r/1482 : qmsi: rtc: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1483 : qmsi: watchdog: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1498 : nble: fixed dependencies on GPIO
- https://gerrit.zephyrproject.org/r/1500 : qmsi: uart: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1496 : qmsi: gpio: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1488 : qmsi: i2c: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1491 : spi: use global init priority
- https://gerrit.zephyrproject.org/r/1497 : samples: power: use string for driver name
- https://gerrit.zephyrproject.org/r/1489 : pwm: unify driver names
- https://gerrit.zephyrproject.org/r/1499 : qmsi: adc: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1493 : qmsi: aio: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1495 : qmsi: aon_counters: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1490 : qmsi: pwm: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1492 : qmsi: spi: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1494 : aio: rename sample name and make it generic
- https://gerrit.zephyrproject.org/r/1098 : drivers: add qmsi files for Quark MCUs
- https://gerrit.zephyrproject.org/r/914 : gpio: Improve the public API to handle multi callbacks
- https://gerrit.zephyrproject.org/r/1271 : sensors: Using new GPIO API callbacks
- https://gerrit.zephyrproject.org/r/998 : Bluetooth: BR/EDR: Initiate authentication
- https://gerrit.zephyrproject.org/r/999 : Bluetooth: BR/EDR: Initiate encryption on link
- https://gerrit.zephyrproject.org/r/1034 : Bluetooth: BR/EDR: Notify about pairing while JustWorks

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1511 : Bluetooth: samples/shell: Make more features optional
- https://gerrit.zephyrproject.org/r/1510 : Bluetooth: Provide static inline stubs for UUID string helpers
- https://gerrit.zephyrproject.org/r/1509 : net: rdc: Debug print missing \n in simplerdc plugin
- https://gerrit.zephyrproject.org/r/1503 : Bluetooth: Add support for waiting for "NOP" Command Complete
- https://gerrit.zephyrproject.org/r/1505 : arduino: Remove Kconfig warnings rearranging GPIO selection
- https://gerrit.zephyrproject.org/r/1504 : net: buf: Fix the code indentation in ip_buf_unref()
- https://gerrit.zephyrproject.org/r/1441 : net: buf: Fix the debug print when unreffing the net_buf
- https://gerrit.zephyrproject.org/r/1440 : net: buf: Check we are not overflowing free buf count
- https://gerrit.zephyrproject.org/r/1439 : net: buf: Add helper for catching ref counting errors
- https://gerrit.zephyrproject.org/r/1438 : net: Removed obsolete print defines from slip driver
- https://gerrit.zephyrproject.org/r/1442 : net: buf: Add reference count check for IP buf
- https://gerrit.zephyrproject.org/r/1437 : net: rdc: Make simplerdc a full replacement against nullrdc
- https://gerrit.zephyrproject.org/r/1436 : net: ieee802154: Add a simpler but working default RDC driver
- https://gerrit.zephyrproject.org/r/1409 : net:apps: zperf application


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 1
[ZEP-204] GPIO sample refuses to compile
https://jira.zephyrproject.org/browse/ZEP-204

UPDATED JIRA items within last 24 hours: 0

CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1501 : fixed inclusion of limits.h when building with newlib
- https://gerrit.zephyrproject.org/r/1484 : checkpatch: warn on COMPLEX_MACRO and MULTISTATEMENT_MACRO_USE_DO_WHILE
- https://gerrit.zephyrproject.org/r/1499 : qmsi: adc: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1496 : qmsi: gpio: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1500 : qmsi: uart: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1492 : qmsi: spi: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1497 : samples: power: use string for driver name
- https://gerrit.zephyrproject.org/r/1498 : nble: fixed dependencies on GPIO
- https://gerrit.zephyrproject.org/r/1495 : qmsi: aon_counters: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1493 : qmsi: aio: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1494 : aio: rename sample name and make it generic
- https://gerrit.zephyrproject.org/r/1491 : spi: use global init priority
- https://gerrit.zephyrproject.org/r/1489 : pwm: unify driver names
- https://gerrit.zephyrproject.org/r/1490 : qmsi: pwm: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1488 : qmsi: i2c: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1482 : qmsi: rtc: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1483 : qmsi: watchdog: use built-in qmsi driver
- https://gerrit.zephyrproject.org/r/1481 : doc: remove collaboration guides
- https://gerrit.zephyrproject.org/r/1480 : doc: process tinycrypt headers with doxygen

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1098 : drivers: add qmsi files for Quark MCUs

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1273 : spi: intel: fix port 1 pin setup
- https://gerrit.zephyrproject.org/r/1350 : samples: Use consistent file naming for project config file


Re: Zephyr environment maintenance Sat, Apr 16, 0800 - 1000 PDT

Andrew Grimberg <agrimberg@...>
 

This work has now been completed.

-Andy-

On 04/16/2016 07:56 AM, Andrew Grimberg wrote:
This work will be starting soon.

-Andy-

On 04/12/2016 09:48 AM, Andrew Grimberg wrote:
When: Saturday, April 16, 8AM - 10AM PDT (15:00-17:00 UTC)
What: Zephyr environment
Why: OS security updates and reboots

Impact
Services will be unavailable briefly as the systems are rebooted.

Jenkins will be paused to avoid having jobs fail due to missing
resources prior to the outage.

NOTE: Since upgrading to Gerrit 2.12.x Gerrit now takes a significant
amount of time to restart (anywhere form 5 - 20 minutes).

If you have any concerns, please contact helpdesk(a)zephyrproject.org

A notice will be sent out prior too and again after the maintenance as
well as a note in #zephyrproject on Freenode
--
Andrew J Grimberg
Systems Administrator
The Linux Foundation


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 1
[ZEP-203] clean up APIs for static exceptions
https://jira.zephyrproject.org/browse/ZEP-203

UPDATED JIRA items within last 24 hours: 1
[ZEP-186] ISSM - ARC support
https://jira.zephyrproject.org/browse/ZEP-186

CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1479 : make_zephyr_sdk: Install Nios2 toolchain
- https://gerrit.zephyrproject.org/r/1478 : newlib: Add support for Nios2
- https://gerrit.zephyrproject.org/r/1477 : zephyr-sdk.conf: Bumped DISTRO_VERSION
- https://gerrit.zephyrproject.org/r/1476 : make_zephyr_sdk.sh: Bumped SDK version to 0.8.0
- https://gerrit.zephyrproject.org/r/1475 : BOSSA: Add BOSSA tool for Arduino Due
- https://gerrit.zephyrproject.org/r/1474 : hosttools-tarbal.bb: Integrate PLY library into SDK
- https://gerrit.zephyrproject.org/r/1460 : doc: collaboration: code: gerrit commit message JIRA key
- https://gerrit.zephyrproject.org/r/1457 : bmi160: add support for triggers
- https://gerrit.zephyrproject.org/r/1454 : bmi160: create two inline wrappers for bmi160_reg_val_to_range
- https://gerrit.zephyrproject.org/r/1456 : bmi160: make some read/write functions global
- https://gerrit.zephyrproject.org/r/1455 : bmi160: fix bmi160_reg_field_update function
- https://gerrit.zephyrproject.org/r/1453 : bmi160: move the printing macro to the header
- https://gerrit.zephyrproject.org/r/1458 : bmi160: add trigger tests to the application
- https://gerrit.zephyrproject.org/r/1452 : bmi160: add x86 app for receiving BMI160 interrupts
- https://gerrit.zephyrproject.org/r/1450 : bmi160: move sample app to arc subdirectory
- https://gerrit.zephyrproject.org/r/1451 : sensor.h: fix typo

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1216 : kinetis: reorganise soc directory using soc family
- https://gerrit.zephyrproject.org/r/1217 : stm32: reorganise soc directory and use family/series
- https://gerrit.zephyrproject.org/r/1221 : new SoC naming convention
- https://gerrit.zephyrproject.org/r/1214 : stm32: rename CONFIG_SOC_STM32 -> CONFIG_SOC_FAMILY_STM32
- https://gerrit.zephyrproject.org/r/1215 : stm32: rename SOC_STM32F1X -> SOC_SERIES_STM32F1X
- https://gerrit.zephyrproject.org/r/1219 : soc: introduce SoC families and series
- https://gerrit.zephyrproject.org/r/1360 : sensor: fix init driver_api
- https://gerrit.zephyrproject.org/r/1325 : power_mgmt: Provide APIs for devices to signal busy to PM policy mgr
- https://gerrit.zephyrproject.org/r/1369 : samples: adding ADC pulse sensor sample
- https://gerrit.zephyrproject.org/r/1444 : Bluetooth: drivers/nble: Fix calling cmd from discov callback
- https://gerrit.zephyrproject.org/r/1263 : build: support icx llvm compiler
- https://gerrit.zephyrproject.org/r/1411 : build: add arc support to issm toolchain
- https://gerrit.zephyrproject.org/r/1034 : Bluetooth: BR/EDR: Notify about pairing while JustWorks
- https://gerrit.zephyrproject.org/r/999 : Bluetooth: BR/EDR: Initiate encryption on link
- https://gerrit.zephyrproject.org/r/1445 : gpio: Deprecate API 1.0 callback type and related function
- https://gerrit.zephyrproject.org/r/998 : Bluetooth: BR/EDR: Initiate authentication
- https://gerrit.zephyrproject.org/r/914 : gpio: Improve the public API to handle multi callbacks
- https://gerrit.zephyrproject.org/r/1353 : samples: Using new GPIO API callbacks
- https://gerrit.zephyrproject.org/r/1354 : cc2520: Using new GPIO API callbacks
- https://gerrit.zephyrproject.org/r/1271 : sensors: Using new GPIO API callbacks

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1448 : doc: Remove communication section.
- https://gerrit.zephyrproject.org/r/1447 : doc: Remove documentation collaboration section.
- https://gerrit.zephyrproject.org/r/1449 : doc: Modify the master file to a single ToC.
- https://gerrit.zephyrproject.org/r/1462 : doc: link in device model APIs
- https://gerrit.zephyrproject.org/r/1471 : doc: irq.h: fix mismatched parameter names in comment
- https://gerrit.zephyrproject.org/r/1467 : doc: clock_control/stm32f1: Fix @file tag
- https://gerrit.zephyrproject.org/r/1465 : doc: pwm: remove extra function param from comment
- https://gerrit.zephyrproject.org/r/1473 : doc: device.h: hide DEV_* from public documentation
- https://gerrit.zephyrproject.org/r/1466 : doc: microkernel/memory_pool: fix parameter reference tag
- https://gerrit.zephyrproject.org/r/1468 : doc: include/misc/slist: Fix @file tag
- https://gerrit.zephyrproject.org/r/1472 : doc: misc/slist: fixed unsupported xml/html tag warnings
- https://gerrit.zephyrproject.org/r/1469 : gitignore: Fix doxygen generated directory names
- https://gerrit.zephyrproject.org/r/1470 : doc: kernel_event_logger: fix complain about @defgroup
- https://gerrit.zephyrproject.org/r/1464 : headers: use __deprecated
- https://gerrit.zephyrproject.org/r/1461 : gcc: add __deprecated for shortened __attribute__((deprecated))
- https://gerrit.zephyrproject.org/r/1463 : doc: counter should be under device driver
- https://gerrit.zephyrproject.org/r/1459 : wdt: update sample code
- https://gerrit.zephyrproject.org/r/1446 : Bluetooth: Remove redundant returns from switch
- https://gerrit.zephyrproject.org/r/1396 : libc: add strncat() to minimal libc
- https://gerrit.zephyrproject.org/r/1397 : debug: fit Kconfig lines in 80 columns
- https://gerrit.zephyrproject.org/r/1399 : debug/x86: add runtime info needed by target debuggers
- https://gerrit.zephyrproject.org/r/1401 : x86/debug: GDB server needs to handle some exceptions
- https://gerrit.zephyrproject.org/r/1400 : debug: add target GDB server
- https://gerrit.zephyrproject.org/r/1394 : console: add hook for debug server to handle outgoing characters
- https://gerrit.zephyrproject.org/r/1395 : x86: add debug hook in _NanoFatalErrorHandler()
- https://gerrit.zephyrproject.org/r/1398 : debug: add missing MEM_SAFE dependency
- https://gerrit.zephyrproject.org/r/1303 : sensors: add driver for TMP007 infrared thermopile sensor
- https://gerrit.zephyrproject.org/r/1393 : gcc: add __weak for shorter __attribute__((__weak__))
- https://gerrit.zephyrproject.org/r/1385 : Bluetooth: include errno.h
- https://gerrit.zephyrproject.org/r/1386 : pinmux: include errno.h
- https://gerrit.zephyrproject.org/r/932 : drivers: Quark flash support
- https://gerrit.zephyrproject.org/r/1402 : docs: adding details for the D2000 board
- https://gerrit.zephyrproject.org/r/1421 : watchdog/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1423 : serial/k20: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1415 : i2c/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1410 : grove/lcd_rgb: assign magic number to driver_api
- https://gerrit.zephyrproject.org/r/1416 : i2c/quark_se_ss: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1389 : doc: merge coding conventions into one document
- https://gerrit.zephyrproject.org/r/1388 : doc: move code contribution guidelines one level up
- https://gerrit.zephyrproject.org/r/1418 : pwm/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1422 : gpio/k64: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1413 : serial/uart_ns16550: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1424 : pwm/k64_ftm: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1420 : rtc/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1414 : gpio/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1412 : clock_control/quark_se: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1368 : pinmux/dev: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1367 : device: add macro to assign driver_api at compile time
- https://gerrit.zephyrproject.org/r/1426 : uart/atmel_sam3: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1425 : spi/k64: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1427 : i2c/atmel_sam3: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1430 : gpio/stm32: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1429 : clock_control/stm32f10x: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1428 : gpio/atmel_sam3: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1417 : adc/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1419 : spi/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1432 : watchdog/iwdg_stm32: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1433 : serial/stellaris: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1431 : serial/uart_stm32: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1434 : ipm: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1373 : Bluetooth: L2CAP: l2cap_chan_get() can get BR/EDR L2CAP SIG channel
- https://gerrit.zephyrproject.org/r/1372 : Bluetooth: L2CAP: l2cap_send_reject() can use BR/EDR L2CAP SIG channel
- https://gerrit.zephyrproject.org/r/517 : Bluetooth: tester: Start using net_buf to store GATT database
- https://gerrit.zephyrproject.org/r/1443 : drivers/nble: Implement read multiple response
- https://gerrit.zephyrproject.org/r/1113 : nanokernel: deprecate dynamic IRQs
- https://gerrit.zephyrproject.org/r/1112 : microkernel: deprecate task IRQs
- https://gerrit.zephyrproject.org/r/1200 : Bluetooth: tester: Update server commands with sequence params
- https://gerrit.zephyrproject.org/r/1435 : drivers/nble: Fix NULL pointer dereference


Re: Zephyr environment maintenance Sat, Apr 16, 0800 - 1000 PDT

Andrew Grimberg <agrimberg@...>
 

This work will be starting soon.

-Andy-

On 04/12/2016 09:48 AM, Andrew Grimberg wrote:
When: Saturday, April 16, 8AM - 10AM PDT (15:00-17:00 UTC)
What: Zephyr environment
Why: OS security updates and reboots

Impact
Services will be unavailable briefly as the systems are rebooted.

Jenkins will be paused to avoid having jobs fail due to missing
resources prior to the outage.

NOTE: Since upgrading to Gerrit 2.12.x Gerrit now takes a significant
amount of time to restart (anywhere form 5 - 20 minutes).

If you have any concerns, please contact helpdesk(a)zephyrproject.org

A notice will be sent out prior too and again after the maintenance as
well as a note in #zephyrproject on Freenode
--
Andrew J Grimberg
Systems Administrator
The Linux Foundation


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 0

UPDATED JIRA items within last 24 hours: 0

CLOSED JIRA items within last 24 hours: 1
[ZEP-100] (Fixed) Test bug for Gerrit
https://jira.zephyrproject.org/browse/ZEP-100

RESOLVED JIRA items within last 24 hours: 0


Re: API deprecation / GPIO patch

Tomasz Bursztyka
 

Hi Andrew,

Another question: I had asked you to mark gpio_set_callback() with
__attribute__((deprecated)), but you said that broke the build. Can
you provide a little more detail here? is it because the sample
applications haven't been updated to the new API yet (I saw them later
in the patch series). Would it be possible to provide a new patch in
the series, after all the sample apps have been updated, to add the
__attribute__((deprecated)) tag there?
Ok I fixed that so the first patch still keeps the old behavior enabled
by default in Kconfig, so CI does not scream.
I did not wanted to merge all the adaptation patches on top with it, to
keep the history clear.

And last patch, as you advised, deprecate the call and disable by
default the old behavior in Kconfib

Tomasz


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1444 : Bluetooth: drivers/nble: Fix calling cmd from discov callback
- https://gerrit.zephyrproject.org/r/1445 : gpio: Deprecate API 1.0 callback type and related function
- https://gerrit.zephyrproject.org/r/1435 : drivers/nble: Fix NULL pointer dereference
- https://gerrit.zephyrproject.org/r/1443 : drivers/nble: Implement read multiple response
- https://gerrit.zephyrproject.org/r/1436 : net: ieee802154: Add a simpler but working default RDC driver
- https://gerrit.zephyrproject.org/r/1437 : net: rdc: Make simplerdc a full replacement against nullrdc
- https://gerrit.zephyrproject.org/r/1441 : net: buf: Fix the debug print when unreffing the net_buf
- https://gerrit.zephyrproject.org/r/1440 : net: buf: Check we are not overflowing free buf count
- https://gerrit.zephyrproject.org/r/1438 : net: Removed obsolete print defines from slip driver
- https://gerrit.zephyrproject.org/r/1442 : net: buf: Add reference count check for IP buf
- https://gerrit.zephyrproject.org/r/1439 : net: buf: Add helper for catching ref counting errors
- https://gerrit.zephyrproject.org/r/1411 : build: add arc support to issm toolchain
- https://gerrit.zephyrproject.org/r/1409 : net:apps: zperf application
- https://gerrit.zephyrproject.org/r/1410 : grove/lcd_rgb: assign magic number to driver_api
- https://gerrit.zephyrproject.org/r/1420 : rtc/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1430 : gpio/stm32: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1431 : serial/uart_stm32: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1432 : watchdog/iwdg_stm32: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1433 : serial/stellaris: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1429 : clock_control/stm32f10x: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1421 : watchdog/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1422 : gpio/k64: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1414 : gpio/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1417 : adc/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1434 : ipm: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1424 : pwm/k64_ftm: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1418 : pwm/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1419 : spi/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1423 : serial/k20: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1425 : spi/k64: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1426 : uart/atmel_sam3: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1427 : i2c/atmel_sam3: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1428 : gpio/atmel_sam3: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1415 : i2c/dw: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1416 : i2c/quark_se_ss: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1413 : serial/uart_ns16550: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1412 : clock_control/quark_se: convert to use DEVICE_AND_API_INIT()

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/914 : gpio: Improve the public API to handle multi callbacks
- https://gerrit.zephyrproject.org/r/1354 : cc2520: Using new GPIO API callbacks
- https://gerrit.zephyrproject.org/r/1271 : sensors: Using new GPIO API callbacks
- https://gerrit.zephyrproject.org/r/1353 : samples: Using new GPIO API callbacks
- https://gerrit.zephyrproject.org/r/999 : Bluetooth: BR/EDR: Initiate encryption on link
- https://gerrit.zephyrproject.org/r/1034 : Bluetooth: BR/EDR: Notify about pairing while JustWorks
- https://gerrit.zephyrproject.org/r/998 : Bluetooth: BR/EDR: Initiate authentication
- https://gerrit.zephyrproject.org/r/1201 : Bluetooth: tester: Add support for seqence gatt database
- https://gerrit.zephyrproject.org/r/1202 : Bluetooth: tester: Return pre defined db offset on start server
- https://gerrit.zephyrproject.org/r/1200 : Bluetooth: tester: Update server commands with sequence params
- https://gerrit.zephyrproject.org/r/1303 : sensors: add driver for TMP007 infrared thermopile sensor
- https://gerrit.zephyrproject.org/r/517 : Bluetooth: tester: Start using net_buf to store GATT database
- https://gerrit.zephyrproject.org/r/1360 : sensor: fix init driver_api
- https://gerrit.zephyrproject.org/r/1372 : Bluetooth: L2CAP: l2cap_send_reject() can use BR/EDR L2CAP SIG channel
- https://gerrit.zephyrproject.org/r/1373 : Bluetooth: L2CAP: l2cap_chan_get() can get BR/EDR L2CAP SIG channel
- https://gerrit.zephyrproject.org/r/1325 : power_mgmt: Provide APIs for devices to signal busy to PM policy mgr
- https://gerrit.zephyrproject.org/r/1403 : doc: add architecture porting guide
- https://gerrit.zephyrproject.org/r/1112 : microkernel: deprecate task IRQs
- https://gerrit.zephyrproject.org/r/1392 : debug: interrupt event logger sample for arc
- https://gerrit.zephyrproject.org/r/1113 : nanokernel: deprecate dynamic IRQs
- https://gerrit.zephyrproject.org/r/1391 : debug: interrupt event logger support for arc
- https://gerrit.zephyrproject.org/r/1367 : device: add macro to assign driver_api at compile time
- https://gerrit.zephyrproject.org/r/1368 : pinmux/dev: convert to use DEVICE_AND_API_INIT()
- https://gerrit.zephyrproject.org/r/1263 : build: support icx llvm compiler
- https://gerrit.zephyrproject.org/r/1399 : debug/x86: add runtime info needed by target debuggers
- https://gerrit.zephyrproject.org/r/1393 : gcc: add __weak for shorter __attribute((weak))
- https://gerrit.zephyrproject.org/r/1379 : microkernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1380 : nanokernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1376 : kernel: Init back pointer to microkernel task
- https://gerrit.zephyrproject.org/r/1378 : kernel: Add thread parameter to _nano_wait_q_put()
- https://gerrit.zephyrproject.org/r/1377 : nanokernel: Add thread parameter to _NANO_TIMEOUT_ADD()
- https://gerrit.zephyrproject.org/r/1387 : Bluetooth: gatt: include service api definition proposal
- https://gerrit.zephyrproject.org/r/1395 : x86: add debug hook in _NanoFatalErrorHandler()
- https://gerrit.zephyrproject.org/r/1397 : debug: fit Kconfig lines in 80 columns
- https://gerrit.zephyrproject.org/r/1398 : debug: add missing MEM_SAFE dependency
- https://gerrit.zephyrproject.org/r/1400 : debug: add target GDB server
- https://gerrit.zephyrproject.org/r/1375 : nanokernel: Add back pointer to microkernel task
- https://gerrit.zephyrproject.org/r/1401 : x86: if GDB_SERVER is enabled, set the needed number of exception stubs
- https://gerrit.zephyrproject.org/r/1374 : microkernel: Add TF_NANO wait flag reason
- https://gerrit.zephyrproject.org/r/1381 : tests: Pend microkernel tasks on nanokernel objects
- https://gerrit.zephyrproject.org/r/932 : drivers: Quark flash support
- https://gerrit.zephyrproject.org/r/1394 : console: add hook for debug server to handle outgoing characters
- https://gerrit.zephyrproject.org/r/1402 : docs: adding details for the D2000 board
- https://gerrit.zephyrproject.org/r/1385 : Bluetooth: include errno.h
- https://gerrit.zephyrproject.org/r/1386 : pinmux: include errno.h
- https://gerrit.zephyrproject.org/r/1389 : doc: merge coding conventions into one document
- https://gerrit.zephyrproject.org/r/1388 : doc: move code contribution guidelines one level up
- https://gerrit.zephyrproject.org/r/1029 : device: Remove DEV_* codes
- https://gerrit.zephyrproject.org/r/1363 : sanitycheck: Add olimexino_stm32 board to sanitycheck
- https://gerrit.zephyrproject.org/r/1362 : doc/board: Add documentation file for olimexino_stm32
- https://gerrit.zephyrproject.org/r/1361 : boards/olimexino_stm32: add new board
- https://gerrit.zephyrproject.org/r/1396 : libc: add strncat() to minimal libc

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1384 : Bluetooth: shell: Add confirming incoming JustWorks pairing
- https://gerrit.zephyrproject.org/r/1371 : quark_se_devboard: Do not select GPIO
- https://gerrit.zephyrproject.org/r/1390 : nios2: Add support for Altera Nios2 CPU
- https://gerrit.zephyrproject.org/r/1370 : arduino_101: Do not duplicate GPIO select
- https://gerrit.zephyrproject.org/r/1383 : Bluetooth: Add support for confirming incoming JustWorks pairing
- https://gerrit.zephyrproject.org/r/1356 : drivers/nble: Fix spelling typo


Re: API deprecation / GPIO patch

Tomasz Bursztyka
 

Hi Andrew,

Thank you for you thorough review, it sums up nicely the patchset.

Question: *_are we comfortable with preserving app compatibility, but
breaking driver compatibility?_* I am not so sure about this but would
like some feedback from the larger group.
This question is really critical.
If we have to support all API layers from 1.0: app, driver's interface,
low level kernel API - device for instance - etc.... things are going to
be much harder when introducing changes.

Another question: I had asked you to mark gpio_set_callback() with
__attribute__((deprecated)), but you said that broke the build. Can
you provide a little more detail here? is it because the sample
applications haven't been updated to the new API yet (I saw them later
in the patch series). Would it be possible to provide a new patch in
the series, after all the sample apps have been updated, to add the
__attribute__((deprecated)) tag there?
As far as I remember (CI does not have the logs, it drops them after
some time), it was failing due to gpio_api_compat.c which was
implementing the deprecated function, using the deprecated gpio_callback_t

That said, I could disable by default such compat layer, and set the
deprecated in a last patch yes. Should fix this issue.

Tomasz


checkpatch chokes on Change-Id

Geoff Thorpe <geoff.thorpe@...>
 

Howdy,

I was studiously checking patch-submission guidelines and noticed the scripts/checkpatch.pl reminder. The documentation had already instructed me to install the commit-msg hook (to generate Change-Id tags in the commit logs), which I did. So when I then made a commit and format-patch'd it to a file, I was amused to see that checkpatch choked on it because it considers Change-Id to be an error. :-)

I'm not game to fix it, but though I'd mention it in case it's light work for someone else. I'll ignore checkpatch for now (it wasn't complaining about anything else).

Cheers,
Geoff

8121 - 8140 of 8638