public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] mesh: On exit free timer for filtering duplicates
@ 2023-03-20  5:06 Inga Stotland
  2023-03-20  6:07 ` [BlueZ] " bluez.test.bot
  2023-03-20 19:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Inga Stotland @ 2023-03-20  5:06 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, brian.gix, Inga Stotland

This frees resources associated with duplicate filter timer
when destroying management IO.
---
 mesh/mesh-io-mgmt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mesh/mesh-io-mgmt.c b/mesh/mesh-io-mgmt.c
index f1385edcc..5f51f3a1f 100644
--- a/mesh/mesh-io-mgmt.c
+++ b/mesh/mesh-io-mgmt.c
@@ -35,6 +35,7 @@ struct mesh_io_private {
 	struct mesh_io *io;
 	void *user_data;
 	struct l_timeout *tx_timeout;
+	struct l_timeout *dup_timeout;
 	struct l_queue *dup_filters;
 	struct l_queue *rx_regs;
 	struct l_queue *tx_pkts;
@@ -146,6 +147,7 @@ static void filter_timeout(struct l_timeout *timeout, void *user_data)
 
 done:
 	l_timeout_remove(timeout);
+	pvt->dup_timeout = NULL;
 }
 
 /* Ignore consequtive duplicate advertisements within timeout period */
@@ -179,7 +181,8 @@ static bool filter_dups(const uint8_t *addr, const uint8_t *adv,
 
 	/* Start filter expiration timer */
 	if (!l_queue_length(pvt->dup_filters))
-		l_timeout_create(1, filter_timeout, NULL, NULL);
+		pvt->dup_timeout = l_timeout_create(1, filter_timeout, NULL,
+									NULL);
 
 	l_queue_push_head(pvt->dup_filters, filter);
 	instant_delta = instant - filter->instant;
@@ -474,6 +477,7 @@ static bool dev_destroy(struct mesh_io *io)
 	mesh_mgmt_unregister(pvt->rx_id);
 	mesh_mgmt_unregister(pvt->tx_id);
 	l_timeout_remove(pvt->tx_timeout);
+	l_timeout_remove(pvt->dup_timeout);
 	l_queue_destroy(pvt->dup_filters, l_free);
 	l_queue_destroy(pvt->rx_regs, free_rx_reg);
 	l_queue_destroy(pvt->tx_pkts, l_free);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] mesh: On exit free timer for filtering duplicates
  2023-03-20  5:06 [PATCH BlueZ] mesh: On exit free timer for filtering duplicates Inga Stotland
@ 2023-03-20  6:07 ` bluez.test.bot
  2023-03-20 19:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-03-20  6:07 UTC (permalink / raw)
  To: linux-bluetooth, inga.stotland

[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=731677

---Test result---

Test Summary:
CheckPatch                    PASS      0.49 seconds
GitLint                       PASS      0.34 seconds
BuildEll                      PASS      26.24 seconds
BluezMake                     PASS      744.98 seconds
MakeCheck                     PASS      11.38 seconds
MakeDistcheck                 PASS      147.43 seconds
CheckValgrind                 PASS      240.10 seconds
CheckSmatch                   WARNING   320.59 seconds
bluezmakeextell               PASS      96.84 seconds
IncrementalBuild              PASS      602.89 seconds
ScanBuild                     PASS      950.63 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
mesh/mesh-io-mgmt.c:541:67: warning: Variable length array is used.


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ] mesh: On exit free timer for filtering duplicates
  2023-03-20  5:06 [PATCH BlueZ] mesh: On exit free timer for filtering duplicates Inga Stotland
  2023-03-20  6:07 ` [BlueZ] " bluez.test.bot
@ 2023-03-20 19:30 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-03-20 19:30 UTC (permalink / raw)
  To: Inga Stotland; +Cc: linux-bluetooth, brian.gix, brian.gix

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Brian Gix <brian.gix@gmail.com>:

On Sun, 19 Mar 2023 22:06:18 -0700 you wrote:
> This frees resources associated with duplicate filter timer
> when destroying management IO.
> ---
>  mesh/mesh-io-mgmt.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [BlueZ] mesh: On exit free timer for filtering duplicates
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4a3f465a55c9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-20 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20  5:06 [PATCH BlueZ] mesh: On exit free timer for filtering duplicates Inga Stotland
2023-03-20  6:07 ` [BlueZ] " bluez.test.bot
2023-03-20 19:30 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox