From: Wolfgang Grandegger <wg@domain.hid>
To: rolandtollenaar@domain.hid, xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] rtcan bufferoverflow but no evidence
Date: Mon, 13 Aug 2007 21:59:48 +0200 [thread overview]
Message-ID: <46C0B834.6080105@domain.hid> (raw)
In-Reply-To: <46C0B1DF.6090509@domain.hid>
Roland Tollenaar wrote:
> Hi Wolfgang,
>
>>> See below. This does not look good. Does it mean that I am only
>>> always reading out the last socket and the rest are having their
>>> buffers pumped full? Should I be unbinding somehow?
>>
>> Don't know, check your code ;-).
> Thanks that is exactly what I did because I thought I was unbinding.
> rt_dev_close () should do that for me correct? Its not. At least not
> reliably. :(
>
>>> 778518 1
>>
>> There is a default filter defined for all sockets. If you just want to
>> receive error frames, there is no need to bind the socket, IIRC.
>>
> I am lost here. I don;t want to receive ANY error frames. My sensor is
> working, I am getting the readings in rapicly and all these error frames
> which I cannot make visible anyhow are just causing grievance. I'd feel
> a lot happier if I knew where the rogue can messages were coming from
> that are overflowing the buffer. Mind you, if the Buf overflow count in
> /proc/rtcan/sockets is zero while the application is running (the latest
> socket will always have that) then syslog still gets messages saying
> buffer overflow. I'm doing something wrong and I don;t just want to turn
> off the messaging. If I can help it Id like to know what is wrong. Is
> there any manner in which I can make visible ANY message error or not
> that appears on the bus?
>
> Is there a possibility that there is some loopback route which gets
> messages intot he buffer which are NOT on the physical bus?
Yes, of course. You have enabled the TX loopback feature via kernel option:
config XENO_DRIVERS_CAN_TX_LOOPBACK
depends on XENO_DRIVERS_CAN
bool "Enable TX loopback to local sockets"
default n
help
This options adds support for TX loopback to local sockets.
Normally,
messages sent to the CAN bus are not visible to sockets
listening to
the same local device. When this option is enabled, TX messages are
looped back locally when the transmit has been done by default.
This
behaviour can be deactivated or reactivated with "setsockopt".
Enable
this option, if you want to have a "net-alike" behaviour.
From your output:
root@domain.hid# cat /proc/rtcan/sockets
fd Name___________ Filter ErrMask RX_Timeout_ns TX_Timeout_ns RX_BufFull
TX_Lo
7 rtcan2 1 0x00008 infinite infinite 0 1
TX_Lo tell you that TX messages are loopback to local sockets.
Wolfgang.
next prev parent reply other threads:[~2007-08-13 19:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 14:58 [Xenomai-help] rtcan bufferoverflow but no evidence Roland Tollenaar
2007-08-13 15:38 ` Wolfgang Grandegger
[not found] ` <46C07D73.7070302@domain.hid>
[not found] ` <46C080C8.10906@domain.hid>
[not found] ` <46C0835E.8010105@domain.hid>
[not found] ` <46C0B036.3030306@domain.hid>
[not found] ` <46C0B1DF.6090509@domain.hid>
2007-08-13 19:59 ` Wolfgang Grandegger [this message]
2007-08-13 20:20 ` Roland Tollenaar
2007-08-13 20:07 ` Wolfgang Grandegger
2007-08-13 22:09 ` Jan Kiszka
2007-08-14 5:20 ` Roland Tollenaar
2007-08-14 7:24 ` Jan Kiszka
2007-08-14 6:46 ` Wolfgang Grandegger
2007-08-14 7:41 ` Roland Tollenaar
2007-08-14 7:52 ` Jan Kiszka
2007-08-14 10:34 ` Roland Tollenaar
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=46C0B834.6080105@domain.hid \
--to=wg@domain.hid \
--cc=rolandtollenaar@domain.hid \
--cc=xenomai@xenomai.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.