From: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
To: Steffen Rose <ro-2q5hN/w50hk@public.gmane.org>
Cc: socketcan-users-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
"linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: increase buffer size
Date: Tue, 24 Jan 2012 13:01:45 +0100 [thread overview]
Message-ID: <4F1E9DA9.9060804@hartkopp.net> (raw)
In-Reply-To: <1567213.2GCzMlGyKY@lisa>
Hi Steffen,
On 24.01.2012 12:18, Steffen Rose wrote:
> I want to increase the transmit quere of a can device.
You can do this with ifconfig or the 'ip' tool from the iproute2 package.
Examples:
ifconfig can0 txqueuelen 1000
or
ip link set can0 txqueuelen 1000
>
> As I understand, the virtual devices don't have a quere. Is it right?
>
Generally yes. A vcan is a software device like the 'lo' interface for IP.
Both (vcan & lo) transfer the packets directly back to the rx queue instantly.
But you can create vcans having a tx-queue len:
Here i created a virtual CAN interface 'xxx' with a txqueuelen of 10:
root# ip link add xxx type vcan
root# ip link set xxx txqueuelen 10
root# ip link set xxx up
root# ip link show xxx
10: xxx: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
root#
But this has no effect as long as you do not add some kind of queueing
discipline that throttles the bandwidth on the specific interface.
> As I understand, for physical devices the transmit quere is located within the
> sockets, not in the can device driver. Is it right?
The tx buffers of the sockets are not really used e.g. for CAN_RAW sockets.
The tx queue len of the CAN network interface are relevant for you.
>
> Do you have an small code snippet for the changing of the quere size?
Better use the tools stated above.
But you can (as root) modify these values e.g. with netlink sockets.
Regards,
Oliver
ps.
please do not use this mailing list any longer but send your questions
to the new "linux-can" mailing list address "linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org".
For subscription or mailing list archives please have a look to:
http://vger.kernel.org/vger-lists.html#linux-can
Mail archives of the new linux-can mailing list can be found at:
http://dir.gmane.org/gmane.linux.can
http://marc.info/?l=linux-can&r=1&w=2
next parent reply other threads:[~2012-01-24 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1567213.2GCzMlGyKY@lisa>
2012-01-24 12:01 ` Oliver Hartkopp [this message]
2012-01-24 15:42 ` [Socketcan-users] increase buffer size Steffen Rose
2012-01-24 16:17 ` Oliver Hartkopp
2012-01-24 17:12 ` About PCAN-USB issues Stephane Grosjean
2012-01-25 10:25 ` Wolfgang Grandegger
2012-01-31 17:58 ` Marc Kleine-Budde
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=4F1E9DA9.9060804@hartkopp.net \
--to=socketcan-fj+pqtutwrtk1umjsbkqmq@public.gmane.org \
--cc=linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ro-2q5hN/w50hk@public.gmane.org \
--cc=socketcan-users-0fE9KPoRgkgATYTw5x5z8w@public.gmane.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).