From: Oliver Hartkopp <socketcan@hartkopp.net>
To: linux-can@vger.kernel.org,
Mahesh.Maharjan-EXT@continental-corporation.com
Subject: Re: loopback problem with BCM, RAW using, Daniele Venzano
Date: Fri, 24 Aug 2012 06:58:58 +0200 [thread overview]
Message-ID: <50370A12.2030001@hartkopp.net> (raw)
In-Reply-To: <20120824044737.GA1718@vandijck-laurijssen.be>
On 24.08.2012 06:47, Kurt Van Dijck wrote:
> On Thu, Aug 23, 2012 at 08:35:45PM +0200, Oliver Hartkopp wrote:
>> On 22.08.2012 10:57, Kurt Van Dijck wrote:
>>
>>> Oliver,
>>>
>>> I did not follow this thread in depth.
>>>
>>> The patch looks minimal, but I doubt its usefullness.
>>> In a proper designed CAN system, each node uses distinct CAN-ids.
>>> Therefore, filtering out local traffic can always be accomplished
>>> with the current filtering (RTR frames are an exception, but are
>>> irrelevant here).
>>>
>>> userspace can test flags (MSG_DONTROUTE) to decide if a received
>>> frame is from <localhost> or remote.
>>> So I don't see the problem that you're addressing with this patch.
>>
>>
>> Hello Kurt,
>>
>> this was a quick shot.
>>
>> After thinking a bit more on this idea, this sockopt is something like an
>> additional filter. But then i needs to have two bits:
>>
>> - receive rx frames (from the outside)
>> - receive tx frames (from the local host)
>>
>> Default is to receive both types of frames ...
>>
>> Btw. i don't know if this additional sockopt makes it even more complicated
>> for users ...
>
> IMO, things get complicated.
> Example: what should I get when
> CAN_RAW_RECV_OWN_MSGS is set & CAN_RAW_RECV_HOST_MSGS is cleared?
Yep. That was also my thought. And putting CAN_RAW_RECV_OWN_MSGS into the new
sockopt in some way is misleading too.
Your original proposal to use the per-socket CAN-ID filters that are already
in place seems the appropriate solution for Maheshs request.
Regards,
Oliver
prev parent reply other threads:[~2012-08-24 4:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 10:58 loopback problem with BCM, RAW using, Daniele Venzano Mahesh.Maharjan-EXT
2012-08-17 12:13 ` Oliver Hartkopp
2012-08-22 8:57 ` Kurt Van Dijck
2012-08-23 8:40 ` receiving CAN from remote hosts only Kurt Van Dijck
2012-08-23 18:35 ` loopback problem with BCM, RAW using, Daniele Venzano Oliver Hartkopp
2012-08-24 4:47 ` Kurt Van Dijck
2012-08-24 4:58 ` Oliver Hartkopp [this message]
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=50370A12.2030001@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=Mahesh.Maharjan-EXT@continental-corporation.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 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.