From: "Gix, Brian" <brian.gix@intel.com>
To: "isak.westin@loytec.com" <isak.westin@loytec.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH BlueZ 6/6] mesh: Fix msg cache ring buffer
Date: Thu, 6 Oct 2022 20:47:44 +0000 [thread overview]
Message-ID: <1431ea67c9b2146ee632d47503f0f666687df47d.camel@intel.com> (raw)
In-Reply-To: <20221006145927.32731-7-isak.westin@loytec.com>
Hi Isak,
On Thu, 2022-10-06 at 16:59 +0200, Isak Westin wrote:
> The message cache should be a strict ring buffer, suppressed message
> should not move to the front of the queue.
> ---
> mesh/net.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mesh/net.c b/mesh/net.c
> index e95ae5114..8be45e61a 100644
> --- a/mesh/net.c
> +++ b/mesh/net.c
> @@ -1028,12 +1028,11 @@ static bool msg_in_cache(struct mesh_net
> *net, uint16_t src, uint32_t seq,
> .mic = mic,
> };
>
> - msg = l_queue_remove_if(net->msg_cache, match_cache, &tst);
> + msg = l_queue_find(net->msg_cache, match_cache, &tst);
>
> if (msg) {
> l_debug("Supressing duplicate %4.4x + %6.6x + %8.8x",
> src, seq,
> mic);
> - l_queue_push_head(net->msg_cache, msg);
The purpose of this bit of code was to maintain a cache of the X most
recently received packets in the order most recently seen, which was
why the re-ordering took place. Was this causing incorrect behavior, or
are you doing this as a streamline?
> return true;
> }
>
next prev parent reply other threads:[~2022-10-06 20:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 14:59 [PATCH BlueZ 0/6] Mesh: Fixes for PTS issues Isak Westin
2022-10-06 14:59 ` [PATCH BlueZ 1/6] mesh: Update Key Refresh flag after provision Isak Westin
2022-10-06 16:22 ` Mesh: Fixes for PTS issues bluez.test.bot
2022-10-06 14:59 ` [PATCH BlueZ 2/6] mesh: provisionee: Handle unknown PDUs Isak Westin
2022-10-06 14:59 ` [PATCH BlueZ 3/6] mesh: provisionee: Handle failed provisioning Isak Westin
2022-10-06 14:59 ` [PATCH BlueZ 4/6] mesh: provisionee: Check prov start parameters Isak Westin
2022-10-06 14:59 ` [PATCH BlueZ 5/6] mesh: Keep canceled SAR data for at least 10 sec Isak Westin
2022-10-06 20:55 ` Gix, Brian
2022-10-07 13:33 ` Isak Westin
2022-10-07 14:56 ` Gix, Brian
2022-10-11 14:13 ` Isak Westin
2022-10-06 14:59 ` [PATCH BlueZ 6/6] mesh: Fix msg cache ring buffer Isak Westin
2022-10-06 20:47 ` Gix, Brian [this message]
2022-10-07 8:02 ` Isak Westin
2022-10-07 15:08 ` Gix, Brian
2022-10-06 21:00 ` [PATCH BlueZ 0/6] Mesh: Fixes for PTS issues patchwork-bot+bluetooth
2022-10-06 21:00 ` Gix, Brian
2022-10-07 15:10 ` patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431ea67c9b2146ee632d47503f0f666687df47d.camel@intel.com \
--to=brian.gix@intel.com \
--cc=isak.westin@loytec.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).