From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Andrew Bell <andrew.bell.ia@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Full Buffers and the Passive bus
Date: Fri, 31 Aug 2012 18:49:02 +0200 [thread overview]
Message-ID: <5040EAFE.9000500@hartkopp.net> (raw)
In-Reply-To: <CACJ51z3wGmSnZ3U-qe_QLSPnNuRb54k5=5zuQ+DBQ0aFohcvVw@mail.gmail.com>
On 31.08.2012 18:36, Andrew Bell wrote:
> Is there some way within socket CAN to detect the state when no nodes
> are on the BUS? I do get CAN_ERR_TX_TIMEOUT error frames after some
> time, but I'm writing to the BUS faster than frames drain from the
> buffers, so eventually buffers fill up and writes start failing. In
> this case, write does return ENOBUFS. But I'd like to be able to
> differentiate between the case where buffers are full because of some
> transient condition (I'm writing too fast for the BUS) and the
> condition when nobody is home to receive anything at all.
>
> Suggestions appreciated.
Hello Andrew,
this first idea was to check, if the successful transmissions increase the tx
counter in the netdevice statistics. When there's no increasing value no
frames have been sent on the wire.
But maybe there's another suggestion out there ...
Regards,
Oliver
next prev parent reply other threads:[~2012-08-31 16:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 16:36 Full Buffers and the Passive bus Andrew Bell
2012-08-31 16:49 ` Oliver Hartkopp [this message]
2012-08-31 16:52 ` Andrew Bell
2012-08-31 16:53 ` Andrew Bell
2012-08-31 17:32 ` Oliver Hartkopp
2012-08-31 17:37 ` Kurt Van Dijck
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=5040EAFE.9000500@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=andrew.bell.ia@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