All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Andre Naujoks <nautsch2@gmail.com>, linux-can@vger.kernel.org
Subject: Re: [PATCH] can: add new socket option CAN_RAW_FILTER_UNIQUE to eliminate duplicate matches
Date: Tue, 17 Mar 2015 16:49:51 +0100	[thread overview]
Message-ID: <55084D1F.3080001@hartkopp.net> (raw)
In-Reply-To: <550849E6.7040104@gmail.com>

On 17.03.2015 16:36, Andre Naujoks wrote:
> On 17.03.2015 13:58, Oliver Hartkopp wrote:
>> The CAN_RAW socket can set multiple CAN identifier specific filters that lead
>> to multiple filters in the af_can.c filter processing. These filters are
>> indenpendent from each other which leads to logical OR'ed filters when applied.
>>
>> Especially when the filter is intended to notch single CAN IDs or CAN ID ranges
>> a problem emerges when using more than just one filter: The notched CAN IDs
>> will be delivered once while the other CAN IDs will be delivered twice.
>>
>> This patch implements a new option to make sure that every CAN frame which is
>> filtered for a specific socket is only delivered once to the user space.
>> This is independent from the number of matching CAN filters of this socket.
>
> Hi Oliver.
>
> I don't think this should be an option. A CAN-frame should never be
> delivered more than once even if multiple filters match.
>
> In my eyes this is a long standing bug ;-), which would get an
> off-switch this way.

https://www.youtube.com/watch?v=4JgxDxwf7RU

:-))

So you think the 'unifying option' should be enabled by default!?!
Would you assume this to break any user space apps?

Btw. what's your opinion about

http://marc.info/?l=linux-can&m=142660595731528&w=2

??

Regards,
Oliver

  reply	other threads:[~2015-03-17 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 12:58 [PATCH] can: add new socket option CAN_RAW_FILTER_UNIQUE to eliminate duplicate matches Oliver Hartkopp
2015-03-17 13:23 ` Oliver Hartkopp
2015-03-17 15:25   ` Oliver Hartkopp
2015-03-17 15:40     ` Andre Naujoks
2015-03-17 15:36 ` Andre Naujoks
2015-03-17 15:49   ` Oliver Hartkopp [this message]
2015-03-17 15:58     ` Andre Naujoks

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=55084D1F.3080001@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=nautsch2@gmail.com \
    /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.