All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to enable rt Can devices and non-rt Can devices at the same time on the  Linux+Xenomai platform?
@ 2020-11-09  1:35 孙世龙 sunshilong
  2020-11-09  9:22 ` Per Oberg
  0 siblings, 1 reply; 4+ messages in thread
From: 孙世龙 sunshilong @ 2020-11-09  1:35 UTC (permalink / raw)
  To: xenomai

Hi, list

Is it possible to enable rt Can devices and non-rt Can devices at the
same time on the  Linux+Xenomai platform?

What about ethernet devices?

Thank you for your attention to my question.
Best regards.
Sunshilong


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible to enable rt Can devices and non-rt Can devices at the same time on the  Linux+Xenomai platform?
  2020-11-09  1:35 Is it possible to enable rt Can devices and non-rt Can devices at the same time on the Linux+Xenomai platform? 孙世龙 sunshilong
@ 2020-11-09  9:22 ` Per Oberg
  2020-11-09 11:46   ` 孙世龙 sunshilong
  0 siblings, 1 reply; 4+ messages in thread
From: Per Oberg @ 2020-11-09  9:22 UTC (permalink / raw)
  To: xenomai


----- Den 9 nov 2020, på kl 2:35, xenomai xenomai@xenomai.org skrev:

> Hi, list

> Is it possible to enable rt Can devices and non-rt Can devices at the
> same time on the Linux+Xenomai platform?

> What about ethernet devices?

I Can't see any reason why this shouldn't work, so YES!

If you are using the POSIX skin and you want to access both variants in the same code-base there may be some quirks you need to work around (i.e. picking the right one to open). And if you access them both in the same thread you will break real time constraints but that hardly needs saying. 

However, if you are using the same brand of devices for both cases you need to make sure the driver only initializes the hardware you want it to initialize. E.g. if you load the regular linux igb ethernet driver it will initialize all igb compatible hardware to be non realtime. 

For some drivers, you can pass options to make it only initialize some of the devices. The modinfo command will give you a parameter list for each driver.  If you need to play around with it you can blacklist the relevant drivers by putting stuff in the modprobe.d directory. You can then load the drivers manually using the regular modprobe cmd.

> Thank you for your attention to my question.
> Best regards.
> Sunshilong

Per Öberg 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible to enable rt Can devices and non-rt Can devices at the same time on the Linux+Xenomai platform?
  2020-11-09  9:22 ` Per Oberg
@ 2020-11-09 11:46   ` 孙世龙 sunshilong
  2020-11-09 15:28     ` Per Oberg
  0 siblings, 1 reply; 4+ messages in thread
From: 孙世龙 sunshilong @ 2020-11-09 11:46 UTC (permalink / raw)
  To: Per Oberg; +Cc: xenomai

There are two user application programs on the Linux+Xenomai platform.
I want that one program uses a rt Can device and the other one uses a
non-rt Can device.

On Mon, Nov 9, 2020 at 5:22 PM Per Oberg via Xenomai
<xenomai@xenomai.org> wrote:
>
>
> ----- Den 9 nov 2020, på kl 2:35, xenomai xenomai@xenomai.org skrev:
>
> > Hi, list
>
> > Is it possible to enable rt Can devices and non-rt Can devices at the
> > same time on the Linux+Xenomai platform?
>
> > What about ethernet devices?
>
> I Can't see any reason why this shouldn't work, so YES!
>
> If you are using the POSIX skin and you want to access both variants in the same code-base there may be some quirks you need to work around (i.e. picking the right one to open). And if you access them both in the same thread you will break real time constraints but that hardly needs saying.
>
> However, if you are using the same brand of devices for both cases you need to make sure the driver only initializes the hardware you want it to initialize. E.g. if you load the regular linux igb ethernet driver it will initialize all igb compatible hardware to be non realtime.
>
> For some drivers, you can pass options to make it only initialize some of the devices. The modinfo command will give you a parameter list for each driver.  If you need to play around with it you can blacklist the relevant drivers by putting stuff in the modprobe.d directory. You can then load the drivers manually using the regular modprobe cmd.
>
> > Thank you for your attention to my question.
> > Best regards.
> > Sunshilong
>
> Per Öberg
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible to enable rt Can devices and non-rt Can devices at the same time on the Linux+Xenomai platform?
  2020-11-09 11:46   ` 孙世龙 sunshilong
@ 2020-11-09 15:28     ` Per Oberg
  0 siblings, 0 replies; 4+ messages in thread
From: Per Oberg @ 2020-11-09 15:28 UTC (permalink / raw)
  To: 孙世龙 sunshilong; +Cc: xenomai

----- Den 9 nov 2020, på kl 12:46, 孙世龙 sunshilong sunshilong369@gmail.com skrev:

> There are two user application programs on the Linux+Xenomai platform.
> I want that one program uses a rt Can device and the other one uses a
> non-rt Can device.

Then it all comes down to the actual choice of hardware. For ethernet many motherboards with dual ports come with different NICs for the different ports. This simplifies it a bit because you can easily choose what drivers to load. For CAN i have only tried with different versions of PEAK hardware and that has worked well. In my case though I had USB devices for the non RT part, and the RT driver completely ignores the USB hardware so it worked straight out of the box.

> On Mon, Nov 9, 2020 at 5:22 PM Per Oberg via Xenomai
> <xenomai@xenomai.org> wrote:


> > ----- Den 9 nov 2020, på kl 2:35, xenomai xenomai@xenomai.org skrev:

> > > Hi, list

> > > Is it possible to enable rt Can devices and non-rt Can devices at the
> > > same time on the Linux+Xenomai platform?

> > > What about ethernet devices?

> > I Can't see any reason why this shouldn't work, so YES!

>> If you are using the POSIX skin and you want to access both variants in the same
>> code-base there may be some quirks you need to work around (i.e. picking the
>> right one to open). And if you access them both in the same thread you will
> > break real time constraints but that hardly needs saying.

>> However, if you are using the same brand of devices for both cases you need to
>> make sure the driver only initializes the hardware you want it to initialize.
>> E.g. if you load the regular linux igb ethernet driver it will initialize all
> > igb compatible hardware to be non realtime.

>> For some drivers, you can pass options to make it only initialize some of the
>> devices. The modinfo command will give you a parameter list for each driver. If
>> you need to play around with it you can blacklist the relevant drivers by
>> putting stuff in the modprobe.d directory. You can then load the drivers
> > manually using the regular modprobe cmd.

> > > Thank you for your attention to my question.
> > > Best regards.
> > > Sunshilong

> > Per Öberg

Best regards
Per Öberg


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-09 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09  1:35 Is it possible to enable rt Can devices and non-rt Can devices at the same time on the Linux+Xenomai platform? 孙世龙 sunshilong
2020-11-09  9:22 ` Per Oberg
2020-11-09 11:46   ` 孙世龙 sunshilong
2020-11-09 15:28     ` Per Oberg

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.