linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [RFC] Join CAN filters with CAN_RAW_JOIN_FILTERS sockopt is ready for testing
Date: Wed, 18 Mar 2015 08:13:55 +0100	[thread overview]
Message-ID: <550925B3.6010801@hartkopp.net> (raw)
In-Reply-To: <550883AF.7080703@hartkopp.net>

Here some tests with the V2 version:

Current mainline (no modifications)

$ candump vcan0,0:0,0:0
   vcan0  1C8   [8]  5C FE CC 4C E9 4F 4A 21
   vcan0  1C8   [8]  5C FE CC 4C E9 4F 4A 21
   vcan0  60D   [8]  BA 3B 6F 53 05 79 BE 4F
   vcan0  60D   [8]  BA 3B 6F 53 05 79 BE 4F
   vcan0  4BE   [8]  BF AA 6D 72 31 E0 E2 1C
   vcan0  4BE   [8]  BF AA 6D 72 31 E0 E2 1C
   vcan0  7DE   [7]  4A E0 8B 68 AC 6E 0F
   vcan0  7DE   [7]  4A E0 8B 68 AC 6E 0F

two filters for 'all' lead to two frames each.
(cangen vcan0 in separate terminal)

With patch1 (can: fix multiple delivery ...)

$ candump vcan0,0:0,0:0
   vcan0  78D   [8]  C0 71 65 56 23 16 95 6B
   vcan0  70E   [3]  01 D4 CC
   vcan0  749   [7]  A7 8D B3 43 75 C1 22
   vcan0  238   [2]  17 06
   vcan0  108   [4]  8C F7 79 03
   vcan0  190   [0]
   vcan0  25D   [1]  C2
   vcan0  4CE   [4]  6F 1A 50 38

eliminates the double reception.

Now testing patch2 (can: introduce new raw socket option ...)
Using 'cangen vcan0 -I i -n 6 -L 0' in separate terminal.

Current mainline (no modifications)

$ candump vcan0,001~7FF,003~7FF,004~7FF
   vcan0  000   [0]
   vcan0  000   [0]
   vcan0  000   [0]
   vcan0  001   [0]
   vcan0  001   [0]
   vcan0  002   [0]
   vcan0  002   [0]
   vcan0  002   [0]
   vcan0  003   [0]
   vcan0  003   [0]
   vcan0  004   [0]
   vcan0  004   [0]
   vcan0  005   [0]
   vcan0  005   [0]
   vcan0  005   [0]

With patch1 and patch2 but no joined filters:

$ candump vcan0,001~7FF,003~7FF,004~7FF
   vcan0  000   [0]
   vcan0  001   [0]
   vcan0  002   [0]
   vcan0  003   [0]
   vcan0  004   [0]
   vcan0  005   [0]

With patch1 and patch2 with joined filters:

$ candump vcan0,001~7FF,003~7FF,004~7FF,J
   vcan0  000   [0]
   vcan0  002   [0]
   vcan0  005   [0]


Hey - that rocks!


On 17.03.2015 20:42, Oliver Hartkopp wrote:
> Hi all,
>
> as discussed today I posted the patches to "fix the long standing bug" of
> getting duplicate CAN frames when having overlapping filters.
>
> The second patch (and the candump patch) is to test the functionality to
> implement joined filters which provides a logical AND for the given filters.
>
> Happy testing - feedback is welcome!
>
> Regards,
> Oliver
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-03-18  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 19:42 [RFC] Join CAN filters with CAN_RAW_JOIN_FILTERS sockopt is ready for testing Oliver Hartkopp
2015-03-18  7:13 ` Oliver Hartkopp [this message]
2015-03-18  7:48   ` Pankajkumar Misra (RBEI/EEA2)
2015-03-18  7:52     ` Oliver Hartkopp

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=550925B3.6010801@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --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).