From: Daniel Squires <dan@engineeredarts.co.uk>
To: linux-can@vger.kernel.org
Subject: socket can receive order
Date: Tue, 08 Sep 2015 10:42:37 +0100 [thread overview]
Message-ID: <55EEAD8D.3070603@engineeredarts.co.uk> (raw)
Hi all,
new to this list.
Just a quick question at present, when using recv on a socket that is
bound to a can interface, should the packets be received in the order
they came off the wire? or is this not guaranteed?
for example, is this valid or an error in some part of the system?
candump can3 -tz
<snip>
(003.088648) can3 043 [8] F7 2D 00 00 00 00 00 00
(003.089149) can3 045 [8] F9 2D 00 00 00 00 00 00
(003.088897) can3 044 [8] F8 2D 00 00 00 00 00 00
The packets were sent to the wire in order, the CAN ID is incremented
with each send to ensure mailbox/arbitration details dont mess up the
order on to the wire, the packets were seen coming off the wire over USB
in wireshark in the correct order, but my test utility which aborts when
something unexpected happens and candump both see this out of sequence
result. Note that the timestamps confirm that something saw them in the
correct order, but recv returns them out of order.
Another identical receiver with another instance of candump sees the
packets in the expected order, but sees other packets at other times out
of order, i.e. it appears random.
Thanks
--
Dan Squires
Engineered Arts Ltd.
next reply other threads:[~2015-09-08 9:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 9:42 Daniel Squires [this message]
2015-09-08 10:01 ` socket can receive order Marc Kleine-Budde
2015-09-08 10:41 ` Daniel Squires
2015-09-08 11:13 ` Marc Kleine-Budde
2015-09-08 11:17 ` Daniel Squires
2015-09-08 11:20 ` Marc Kleine-Budde
2015-09-08 11:37 ` Daniel Squires
2015-09-08 16:56 ` Oliver Hartkopp
2015-09-09 2:30 ` Austin Schuh
2015-09-09 3:10 ` Brian Silverman
2015-09-09 16:23 ` Oliver Hartkopp
2015-09-09 12:05 ` Daniel Squires
2015-09-09 16:14 ` Daniel Squires
2015-09-09 16:31 ` Oliver Hartkopp
2015-09-17 19:18 ` Oliver Hartkopp
2015-09-08 11:46 ` Wolfgang Grandegger
2015-09-08 11:49 ` Daniel Squires
2015-09-08 11:56 ` Marc Kleine-Budde
2015-09-10 2:29 ` Tom Evans
2015-09-10 8:08 ` Daniel Squires
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=55EEAD8D.3070603@engineeredarts.co.uk \
--to=dan@engineeredarts.co.uk \
--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).