All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Umair Ali <ali.umair@tut.fi>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Loose determinism when reading pcap and sending as raw ethernet packets
Date: Fri, 11 Dec 2015 15:59:29 +0100	[thread overview]
Message-ID: <20151211145929.GC24775@hermes.click-hack.org> (raw)
In-Reply-To: <2396B4D2166B62479FBBE370D4A7C1F30A710FEB@mb2010-1.intra.tut.fi>

On Thu, Dec 10, 2015 at 05:25:41PM +0000, Umair Ali wrote:
> Hello,
> 
> > >
> > >  what you observe is the jitter, you can measure the timer
> > interrupt jitter with the "latency" test, but I bet that maybe the
> > latency may be higher than 5us;
> > - if you really really need to reduce the jitter, then using kernel
> > timers instead of sleeping in a user-space thread is recommended,
> >
> > Yes, you are right that what i have observed is the jitter. I have
> > gone through the links which you have provided me in the last
> > email. I am building my application using POSIX skin. In the
> > links, they have used the rtdm_timer_start(). Now my question is
> > that can i use the rtdm functions in the application compiling
> > with posix skin, if yes then how. Do i have to change the skin for
> > comilation in order to use the rtdm functions. Please refer me
> > some guide for using the Xenomai Kernel timers with posix skin in
> > order to avoid the jitter. Last thing do i need to made a kernel
> > module in order to use the kernel timers. I am confused. Please
> > guide me.
> 
> > If you want to use kernel-space, you need to write a driver,
> > running in kernel spaces, and drivers use the RTDM API. The POSIX
> > API is for the application.
> 
> As i need to send raw Ethernet packets therefore i am using rtnet
> driver for this purpose. Do you mean that i have to write my own
> driver for ethernet card. Or should i have to write an rtdm driver
> that uses rtnet drivers for sending the raw ethernet. Or is there
> a way i can change the rtnet drivers according to my need.

I mean that if you want to send a packet every 5us with very low
jitter, you should not send the packets from a user-space thread,
but pass them to a driver which sends them based on an RTDM timer. I
would not recommend doing that, because you would have to modify
rtnet to do it: the rtnet stack send path may use a mutex, so can
not be called from a timer handler.

-- 
					    Gilles.
https://click-hack.org


      reply	other threads:[~2015-12-11 14:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 17:25 [Xenomai] Loose determinism when reading pcap and sending as raw ethernet packets Umair Ali
2015-12-08 20:13 ` Gilles Chanteperdrix
2015-12-10 13:20   ` Umair Ali
2015-12-10 15:01     ` Gilles Chanteperdrix
2015-12-10 17:25       ` Umair Ali
2015-12-11 14:59         ` 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=20151211145929.GC24775@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=ali.umair@tut.fi \
    --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.