linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: add a note that RECV_OWN_MSGS frames are subject to filtering
@ 2021-04-20 19:12 Erik Flodin
  2021-04-21  6:58 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Flodin @ 2021-04-20 19:12 UTC (permalink / raw)
  Cc: Erik Flodin, Oliver Hartkopp, Marc Kleine-Budde, David S. Miller,
	Jakub Kicinski, Jonathan Corbet, linux-can, netdev, linux-doc

Some parts of the documentation may lead the reader to think that the
socket's own frames are always received when CAN_RAW_RECV_OWN_MSGS is
enabled, but all frames are subject to filtering.

As explained by Marc Kleine-Budde:

On TX complete of a CAN frame it's pushed into the RX path of the
networking stack, along with the information of the originating socket.

Then the CAN frame is delivered into AF_CAN, where it is passed on to
all registered receivers depending on filters. One receiver is the
sending socket in CAN_RAW. Then in CAN_RAW the it is checked if the
sending socket has RECV_OWN_MSGS enabled.

Signed-off-by: Erik Flodin <erik@flodin.me>
---
 Documentation/networking/can.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
index f8dae662e454..f34cb0e4460e 100644
--- a/Documentation/networking/can.rst
+++ b/Documentation/networking/can.rst
@@ -608,6 +608,8 @@ demand:
     setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS,
                &recv_own_msgs, sizeof(recv_own_msgs));
 
+Note that reception of a socket's own CAN frames are subject to the same
+filtering as other CAN frames (see :ref:`socketcan-rawfilter`).
 
 .. _socketcan-rawfd:
 
-- 
2.31.0


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

end of thread, other threads:[~2021-04-21  6:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 19:12 [PATCH] can: add a note that RECV_OWN_MSGS frames are subject to filtering Erik Flodin
2021-04-21  6:58 ` Marc Kleine-Budde

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).