From: Markus Uhle <markus.uhle@synergetik.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Marc Kleine-Budde <mkl@pengutronix.de>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: Hilfe - Wohin Anfragen bezügl. SocketCAN/FlexCAN
Date: Wed, 15 Apr 2015 14:49:50 +0200 [thread overview]
Message-ID: <552E5E6E.408@synergetik.de> (raw)
In-Reply-To: <552E5D58.8030906@hartkopp.net>
Thanks for your suggestions.
I will try to increase txqeuelen first and write the result in the
mailing list.
Am 15.04.2015 um 14:45 schrieb Oliver Hartkopp:
> On 15.04.2015 14:30, Marc Kleine-Budde wrote:
>> On 04/15/2015 02:23 PM, Marc Kleine-Budde wrote:
>>> Das ist richtig, diesen Rückgabewert gibt es nicht, da der Treiber
>>> seine
>>> TX-Queue anhält, falls er keine Pakete mehr aufnehmen kann. Zur Zeit
>>> ist
>>> im Flexcan Treiber nur eine Queue mit der Tiefe von einem Paket
>>> implementiert. Die Länge der Queue ist per default 10 Pakete. Das
>>> könnte
>>> Ihre Beobachtung erklären. Vielleicht ist der BCM nicht darauf
>>> ausgelegt, dass nicht alle Pakete in der Queue laden.
>>>
>>> Ich schlage vor, dass Sie Ihre Problembeschreibung auf die Liste posten
>>> und wir dort weiter diskutieren.
>>
>> Doh! Since I put the mailinglist by accident on Cc I'll recap the
>> problem for the audience.
>
> :-)
>
>>
>> Markus is using the flexcan on a imx53. He encounters a problem with the
>> broadcast manager. When registering more than 12 messages (to be send
>> every 100ms) at the BCM, the 13th message delayed and only send every 1
>> to 10 seconds.
>>
>> I suspect the problem may be related with the default queue length of 10
>> CAN frames per interface. The BCM might not handle -ENOBUFS correctly.
>>
>> Markus, try to increase the TX queue length by:
>>
>> ifconfig can0 txqueuelen 100
>>
>> or 1000.
>
> This would be my suggestion too.
>
> The BCM tries to fulfill the TX cycle as precise as possible.
> When Markus adds 12/13 TX jobs at a time these jobs are very close to
> each other from CAN frame duration perspective. So the jobs trigger
> nearly at the same time, generate a pile-up in the tx queue and the tx
> frames get dropped.
>
> So you can try to stretch the BCM setup in the way that you don't get
> pileups:
>
> - at creation time (wait between syscalls)
> - by using the two timer values and switch after one frame to the
> wanted cycle
>
> Or increase the txqueuelen - but you would still have a pile-up of
> frames which is probably not wanted at the receiver too (processing
> time issues).
>
> Regards,
> Oliver
>
>>
>> Marc
>>
>
prev parent reply other threads:[~2015-04-15 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <552E55ED.7080904@synergetik.de>
2015-04-15 12:23 ` Hilfe - Wohin Anfragen bezügl. SocketCAN/FlexCAN Marc Kleine-Budde
2015-04-15 12:30 ` Marc Kleine-Budde
2015-04-15 12:45 ` Oliver Hartkopp
2015-04-15 12:49 ` Markus Uhle [this message]
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=552E5E6E.408@synergetik.de \
--to=markus.uhle@synergetik.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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.