From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Michael Haberler <mail17@mah.priv.at>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] packet_mmap raw socket usable from Xenomai?
Date: Sun, 02 Feb 2014 22:50:31 +0100 [thread overview]
Message-ID: <52EEBDA7.2000102@xenomai.org> (raw)
In-Reply-To: <6E05996E-AC72-4B77-88D1-A4BBC57C9827@mah.priv.at>
On 02/01/2014 06:58 PM, Michael Haberler wrote:
> I am looking into ethernet I/O from a RT thread, but am willing to
> tradeoff some latency against using stock linux drivers
The tradeoff is not about latency. It is about determinism. You can not
expected bounded latencies when in secondary mode and without preempt_rt.
>
> also I'd like to use a common method across RT-PREEMPT and Xenomai
> thread styles to keep the number of moving parts low
>
> One method which looks promising is the PACKET_TX_RING/PACKET_RX_RING
> methods of the packet_mmap raw sockets; it seems packet read is
> possible with only shared memory r/w and a transmit entails a
> sendto() socket call passing a reference to the packet in the
> transmit ring (so skbufs arent used except in the driver per se) - I
> do assume though that sendto() will cause a domain switch even if it
> is just a notification to the driver
>
> am I blundering down a dead end? Is RTnet my only option even if I
> dont need the IP and above stack, and the low latency RTnet
> provides?
RTnet will allow you to use send/recv service without leaving primary
mode, any other method based on Linux system calls will cause a thread
to switch to secondary mode, and loose determinism.
>
> if not - is it conceivable to handle this sendto() driver
> notification via an RTDM driver? I dont need RX notification because
> the shm test is cheap and threads are cyclic anyway
I do not think RTnet implement packets mapped in user-space. That said,
user-space mapped packets are useful for a high throughput, if you only
care about having bounded latencies, packets copied from user-space to
kernel-space do just fine (they have a higher latency due to the copy,
but the latency remains bounded).
Regards.
--
Gilles.
prev parent reply other threads:[~2014-02-02 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-01 17:58 [Xenomai] packet_mmap raw socket usable from Xenomai? Michael Haberler
2014-02-02 21:50 ` Gilles Chanteperdrix [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=52EEBDA7.2000102@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=mail17@mah.priv.at \
--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.