linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Whitmore <arigead@gmail.com>
To: linux-can@vger.kernel.org
Subject: vcan multithreaded problem testing
Date: Sun, 16 Feb 2014 10:04:31 +0000	[thread overview]
Message-ID: <20140216100428.GC5440@griso.site> (raw)

Hello all, I'll try keep this short. I'm using vcan to test code I'm porting
from my embedded hardware. My embedded code has a simple dispatcher which
process all messages received from the Network. Higher layers of the
Application register an interest in certain CAN ids or ranges.

I don't need this dispatcher as Socket CAN filters already so in porting my
application the higher layers now simply create a new linux thread and socket
to listen for CAN Frames that they have an interest in.

My problem is that in testing with vcan if my core process thead sends a CAN
id which a child thread is filtering on then the child thread receives the
message. I've looked at vcan code and it simply consumes the sent frames back
into the linux networking stack.

At present a single process will not receive a CAN Frame which is sends but
it's child threads will recive the frame. Is there a way to restrict this? I
might have to wait until I get back to Hardware and test there but it would be
very handy to be able to use vcan.

John

             reply	other threads:[~2014-02-16 10:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 10:04 John Whitmore [this message]
2014-02-16 11:16 ` vcan multithreaded problem testing Marc Kleine-Budde

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=20140216100428.GC5440@griso.site \
    --to=arigead@gmail.com \
    --cc=linux-can@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).