* [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments
@ 2025-04-24 18:59 Pauli Virtanen
2025-04-24 19:10 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 7+ messages in thread
From: Pauli Virtanen @ 2025-04-24 18:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pauli Virtanen
Copy timestamp too when allocating new skb for received fragment.
Fixes missing RX timestamps with fragmentation.
Signed-off-by: Pauli Virtanen <pav@iki.fi>
---
net/bluetooth/l2cap_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 5ca7ac43c58d..73472756618a 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -7415,6 +7415,9 @@ static int l2cap_recv_frag(struct l2cap_conn *conn, struct sk_buff *skb,
return -ENOMEM;
/* Init rx_len */
conn->rx_len = len;
+
+ skb_set_delivery_time(conn->rx_skb, skb->tstamp,
+ skb->tstamp_type);
}
/* Copy as much as the rx_skb can hold */
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments
2025-04-24 18:59 Pauli Virtanen
@ 2025-04-24 19:10 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2025-04-24 19:10 UTC (permalink / raw)
To: Pauli Virtanen; +Cc: linux-bluetooth
Hi Pauli,
On Thu, Apr 24, 2025 at 3:02 PM Pauli Virtanen <pav@iki.fi> wrote:
>
> Copy timestamp too when allocating new skb for received fragment.
> Fixes missing RX timestamps with fragmentation.
This seems to be missing the Fixes tag.
> Signed-off-by: Pauli Virtanen <pav@iki.fi>
> ---
> net/bluetooth/l2cap_core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 5ca7ac43c58d..73472756618a 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -7415,6 +7415,9 @@ static int l2cap_recv_frag(struct l2cap_conn *conn, struct sk_buff *skb,
> return -ENOMEM;
> /* Init rx_len */
> conn->rx_len = len;
> +
> + skb_set_delivery_time(conn->rx_skb, skb->tstamp,
> + skb->tstamp_type);
> }
>
> /* Copy as much as the rx_skb can hold */
> --
> 2.49.0
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments
@ 2025-04-24 19:51 Pauli Virtanen
2025-04-24 20:19 ` Luiz Augusto von Dentz
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Pauli Virtanen @ 2025-04-24 19:51 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pauli Virtanen
Copy timestamp too when allocating new skb for received fragment.
Fixes missing RX timestamps with fragmentation.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
---
net/bluetooth/l2cap_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 5ca7ac43c58d..73472756618a 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -7415,6 +7415,9 @@ static int l2cap_recv_frag(struct l2cap_conn *conn, struct sk_buff *skb,
return -ENOMEM;
/* Init rx_len */
conn->rx_len = len;
+
+ skb_set_delivery_time(conn->rx_skb, skb->tstamp,
+ skb->tstamp_type);
}
/* Copy as much as the rx_skb can hold */
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments
2025-04-24 19:51 [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments Pauli Virtanen
@ 2025-04-24 20:19 ` Luiz Augusto von Dentz
2025-04-24 20:43 ` Pauli Virtanen
2025-04-24 20:35 ` bluez.test.bot
2025-04-24 21:10 ` [PATCH] " patchwork-bot+bluetooth
2 siblings, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2025-04-24 20:19 UTC (permalink / raw)
To: Pauli Virtanen; +Cc: linux-bluetooth
Hi Pauli,
On Thu, Apr 24, 2025 at 3:59 PM Pauli Virtanen <pav@iki.fi> wrote:
>
> Copy timestamp too when allocating new skb for received fragment.
> Fixes missing RX timestamps with fragmentation.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Pauli Virtanen <pav@iki.fi>
Hmm I though it only matters for TX timestamp but this is actually
different, anyway I don't think it would be possible to backport to
that old patch, so we might need to use a more recent one when we
introduced l2cap_recv_frag to make sure it properly backported:
Fixes: 4d7ea8ee90e4 ("Bluetooth: L2CAP: Fix handling fragmented length")
I can fix it up in place though, so don't bother spinning a new one,
btw shall we replace the __net_timestamp with skb_set_delivery_time?
> ---
> net/bluetooth/l2cap_core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 5ca7ac43c58d..73472756618a 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -7415,6 +7415,9 @@ static int l2cap_recv_frag(struct l2cap_conn *conn, struct sk_buff *skb,
> return -ENOMEM;
> /* Init rx_len */
> conn->rx_len = len;
> +
> + skb_set_delivery_time(conn->rx_skb, skb->tstamp,
> + skb->tstamp_type);
> }
>
> /* Copy as much as the rx_skb can hold */
> --
> 2.49.0
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Bluetooth: L2CAP: copy RX timestamp to new fragments
2025-04-24 19:51 [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments Pauli Virtanen
2025-04-24 20:19 ` Luiz Augusto von Dentz
@ 2025-04-24 20:35 ` bluez.test.bot
2025-04-24 21:10 ` [PATCH] " patchwork-bot+bluetooth
2 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2025-04-24 20:35 UTC (permalink / raw)
To: linux-bluetooth, pav
[-- Attachment #1: Type: text/plain, Size: 1949 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=956750
---Test result---
Test Summary:
CheckPatch PENDING 0.22 seconds
GitLint PENDING 0.22 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 24.69 seconds
CheckAllWarning PASS 27.05 seconds
CheckSparse PASS 30.42 seconds
BuildKernel32 PASS 24.25 seconds
TestRunnerSetup PASS 458.00 seconds
TestRunner_l2cap-tester PASS 21.12 seconds
TestRunner_iso-tester PASS 33.21 seconds
TestRunner_bnep-tester PASS 4.72 seconds
TestRunner_mgmt-tester FAIL 117.13 seconds
TestRunner_rfcomm-tester PASS 7.83 seconds
TestRunner_sco-tester PASS 12.48 seconds
TestRunner_ioctl-tester PASS 8.28 seconds
TestRunner_mesh-tester PASS 6.04 seconds
TestRunner_smp-tester PASS 7.16 seconds
TestRunner_userchan-tester PASS 4.98 seconds
IncrementalBuild PENDING 0.78 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Set Flags 4 (RL is full) Failed 0.244 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments
2025-04-24 20:19 ` Luiz Augusto von Dentz
@ 2025-04-24 20:43 ` Pauli Virtanen
0 siblings, 0 replies; 7+ messages in thread
From: Pauli Virtanen @ 2025-04-24 20:43 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
to, 2025-04-24 kello 16:19 -0400, Luiz Augusto von Dentz kirjoitti:
> Hi Pauli,
>
> On Thu, Apr 24, 2025 at 3:59 PM Pauli Virtanen <pav@iki.fi> wrote:
> >
> > Copy timestamp too when allocating new skb for received fragment.
> > Fixes missing RX timestamps with fragmentation.
> >
> > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> > Signed-off-by: Pauli Virtanen <pav@iki.fi>
>
> Hmm I though it only matters for TX timestamp but this is actually
> different, anyway I don't think it would be possible to backport to
> that old patch, so we might need to use a more recent one when we
> introduced l2cap_recv_frag to make sure it properly backported:
>
> Fixes: 4d7ea8ee90e4 ("Bluetooth: L2CAP: Fix handling fragmented length")
>
> I can fix it up in place though, so don't bother spinning a new one,
Yes, that's probably first where the patch applies directly. The bug
itself is old.
> btw shall we replace the __net_timestamp with skb_set_delivery_time?
AFAICS the __net_timestamp() in hci_recv_frame() is correct as it is
now.
> > ---
> > net/bluetooth/l2cap_core.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> > index 5ca7ac43c58d..73472756618a 100644
> > --- a/net/bluetooth/l2cap_core.c
> > +++ b/net/bluetooth/l2cap_core.c
> > @@ -7415,6 +7415,9 @@ static int l2cap_recv_frag(struct l2cap_conn *conn, struct sk_buff *skb,
> > return -ENOMEM;
> > /* Init rx_len */
> > conn->rx_len = len;
> > +
> > + skb_set_delivery_time(conn->rx_skb, skb->tstamp,
> > + skb->tstamp_type);
> > }
> >
> > /* Copy as much as the rx_skb can hold */
> > --
> > 2.49.0
> >
> >
>
--
Pauli Virtanen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments
2025-04-24 19:51 [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments Pauli Virtanen
2025-04-24 20:19 ` Luiz Augusto von Dentz
2025-04-24 20:35 ` bluez.test.bot
@ 2025-04-24 21:10 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+bluetooth @ 2025-04-24 21:10 UTC (permalink / raw)
To: Pauli Virtanen; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 24 Apr 2025 22:51:03 +0300 you wrote:
> Copy timestamp too when allocating new skb for received fragment.
> Fixes missing RX timestamps with fragmentation.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Pauli Virtanen <pav@iki.fi>
> ---
> net/bluetooth/l2cap_core.c | 3 +++
> 1 file changed, 3 insertions(+)
Here is the summary with links:
- Bluetooth: L2CAP: copy RX timestamp to new fragments
https://git.kernel.org/bluetooth/bluetooth-next/c/60b82ca5d6bc
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] 7+ messages in thread
end of thread, other threads:[~2025-04-24 21:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 19:51 [PATCH] Bluetooth: L2CAP: copy RX timestamp to new fragments Pauli Virtanen
2025-04-24 20:19 ` Luiz Augusto von Dentz
2025-04-24 20:43 ` Pauli Virtanen
2025-04-24 20:35 ` bluez.test.bot
2025-04-24 21:10 ` [PATCH] " patchwork-bot+bluetooth
-- strict thread matches above, loose matches on Subject: below --
2025-04-24 18:59 Pauli Virtanen
2025-04-24 19:10 ` Luiz Augusto von Dentz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.