* [PATCH can-next v2] can: bcm: Document cyclic transmission failures
@ 2026-11-18 9:19 raoxu
2026-11-18 10:28 ` Oliver Hartkopp
0 siblings, 1 reply; 2+ messages in thread
From: raoxu @ 2026-11-18 9:19 UTC (permalink / raw)
To: socketcan
Cc: mkl, davem, edumazet, kuba, pabeni, corbet, horms, skhan,
rdunlap, linux-can, netdev, linux-doc, linux-kernel, raoxu
From: Xu Rao <raoxu@uniontech.com>
The CAN broadcast manager continues its configured cyclic transmission
schedule even when a CAN frame cannot be passed to the configured
network interface.
Such failures are not reported to user space. The failed transmission
is not retried by the broadcast manager, the timing remains unchanged,
and a non-zero count is decremented.
As a result, a TX_EXPIRED notification requested with TX_COUNTEVT
indicates that the configured transmissions at ival1 have been
processed, not that they were successfully sent.
Document this behavior to prevent applications from treating TX_EXPIRED
as confirmation of successful transmission.
Suggested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
Changes in v2:
- Target can-next as requested by Oliver Hartkopp.
- Adopt Oliver's suggested wording describing transmission failures
from the user's perspective.
- Clarify the TX_EXPIRED notification semantics and scope the lack of
retries to the broadcast manager.
- Remove implementation details and redundant descriptions.
This documentation-only update follows the review of v1. The earlier
proposal to change BCM transmission accounting was dropped.
Documentation/networking/can.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
index 51bc70748f75..ae47f40bf456 100644
--- a/Documentation/networking/can.rst
+++ b/Documentation/networking/can.rst
@@ -892,6 +892,14 @@ only one timer is needed 'count' is set to zero and only 'ival2' is used.
When SET_TIMER and START_TIMER flag were set the timers are activated.
The timer values can be altered at runtime when only SET_TIMER is set.
+If a CAN frame cannot be passed to the configured CAN network interface
+(e.g. due to a full transmit queue or the interface being down), this
+failure is not reported to user space. The transmission sequence
+continues as configured: the frame is not retried by the broadcast
+manager, the timing remains unchanged, and a non-zero ``count`` is
+decremented anyway. Therefore, a ``TX_EXPIRED`` notification (requested
+with ``TX_COUNTEVT``) only indicates that the ``count`` transmissions
+at ``ival1`` have been processed, not that they were successfully sent.
Broadcast Manager message sequence transmission
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
2.50.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH can-next v2] can: bcm: Document cyclic transmission failures
2026-11-18 9:19 [PATCH can-next v2] can: bcm: Document cyclic transmission failures raoxu
@ 2026-11-18 10:28 ` Oliver Hartkopp
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Hartkopp @ 2026-11-18 10:28 UTC (permalink / raw)
To: raoxu
Cc: mkl, davem, edumazet, kuba, pabeni, corbet, horms, skhan,
rdunlap, linux-can, netdev, linux-doc, linux-kernel
On 18.11.26 10:19, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
>
> The CAN broadcast manager continues its configured cyclic transmission
> schedule even when a CAN frame cannot be passed to the configured
> network interface.
>
> Such failures are not reported to user space. The failed transmission
> is not retried by the broadcast manager, the timing remains unchanged,
> and a non-zero count is decremented.
>
> As a result, a TX_EXPIRED notification requested with TX_COUNTEVT
> indicates that the configured transmissions at ival1 have been
> processed, not that they were successfully sent.
>
> Document this behavior to prevent applications from treating TX_EXPIRED
> as confirmation of successful transmission.
>
> Suggested-by: Oliver Hartkopp <socketcan@hartkopp.net>
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Many thanks,
Oliver
> ---
> Changes in v2:
> - Target can-next as requested by Oliver Hartkopp.
> - Adopt Oliver's suggested wording describing transmission failures
> from the user's perspective.
> - Clarify the TX_EXPIRED notification semantics and scope the lack of
> retries to the broadcast manager.
> - Remove implementation details and redundant descriptions.
>
> This documentation-only update follows the review of v1. The earlier
> proposal to change BCM transmission accounting was dropped.
>
> Documentation/networking/can.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
> index 51bc70748f75..ae47f40bf456 100644
> --- a/Documentation/networking/can.rst
> +++ b/Documentation/networking/can.rst
> @@ -892,6 +892,14 @@ only one timer is needed 'count' is set to zero and only 'ival2' is used.
> When SET_TIMER and START_TIMER flag were set the timers are activated.
> The timer values can be altered at runtime when only SET_TIMER is set.
>
> +If a CAN frame cannot be passed to the configured CAN network interface
> +(e.g. due to a full transmit queue or the interface being down), this
> +failure is not reported to user space. The transmission sequence
> +continues as configured: the frame is not retried by the broadcast
> +manager, the timing remains unchanged, and a non-zero ``count`` is
> +decremented anyway. Therefore, a ``TX_EXPIRED`` notification (requested
> +with ``TX_COUNTEVT``) only indicates that the ``count`` transmissions
> +at ``ival1`` have been processed, not that they were successfully sent.
>
> Broadcast Manager message sequence transmission
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-18 10:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 9:19 [PATCH can-next v2] can: bcm: Document cyclic transmission failures raoxu
2026-11-18 10:28 ` Oliver Hartkopp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®