Skip to contentSkip to conversation

Porting RT net driver to dovetail

DISCUSSION François Legal 4 participants 8 messages Jun 12, 2024 – Jun 24, 2024

lore
Share & tools
lore
#0 lore raw

Hello list,

could anybody point me to some example NIC driver for dovetail. I'm starting to transition from ipipe/rtdm to dovetail.

Thanks in advance

François

#1 lore raw
Quoted 11 lines

-----Original Message-----
From: François Legal <[email protected]>
Sent: Wednesday, June 12, 2024 3:08 PM
To: [email protected]
Subject: Porting RT net driver to dovetail

Hello list,

could anybody point me to some example NIC driver for dovetail. I'm starting

Theoretically, the existing NIC drivers in Xenomai 3.2 is compatible with Dovetail. The drivers works with I-PIPE still works with Dovetail. I just had tested rt_igb and rt_igc on limited NICs and platforms two years ago and cannot suggest more.

Regards

Hongzhan Chen

Quoted 6 lines

to transition from ipipe/rtdm to dovetail.

Thanks in advance

François

#2 lore raw

Thanks for the answer.

Maybe I mixed things up, but I thought that with dovetail, one would somehow use linux network stack with special OOB drivers, and have no more to rely on RTNET. Is that correct ?

François

Quoted 27 lines · Hongzhan
Quoted 11 lines

-----Original Message-----
From: François Legal <[email protected]>
Sent: Wednesday, June 12, 2024 3:08 PM
To: [email protected]
Subject: Porting RT net driver to dovetail

Hello list,

could anybody point me to some example NIC driver for dovetail. I'm starting

Theoretically, the existing NIC drivers in Xenomai 3.2 is compatible with Dovetail. The drivers works with I-PIPE still works with Dovetail. I just had tested rt_igb and rt_igc on limited NICs and platforms two years ago and cannot suggest more.

Regards

Hongzhan Chen

Quoted 6 lines

to transition from ipipe/rtdm to dovetail.

Thanks in advance

François

#3 lore raw
Quoted 4 lines · François Legal

Thanks for the answer.

Maybe I mixed things up, but I thought that with dovetail, one would somehow use linux network stack with special OOB drivers, and have no more to rely on RTNET. Is that correct ?

It depends on whether you want to use Xenomai or EVL.

Signature · 2 lines
Thanks,
//richard
#4 lore raw

Well, I'm not sure but last time I checked, RTNET would not be part of xenomai 4 IIRC. So I guess EVL is the way to go.

François

Quoted 11 lines · Richard Weinberger
Quoted 4 lines · François Legal

Thanks for the answer.

Maybe I mixed things up, but I thought that with dovetail, one would somehow use linux network stack with special OOB drivers, and have no more to rely on RTNET. Is that correct ?

It depends on whether you want to use Xenomai or EVL.

--
Thanks,
//richard

#5 lore raw
Quoted 2 lines · François Legal

Well, I'm not sure but last time I checked, RTNET would not be part of xenomai 4 IIRC. So I guess EVL is the way to go.

Correct, this is the one providing a real-time net stack based on the dovetail net services (which RTnet does not use). This work is ongoing (see the wip/net branch of the linux-evl tree). ETA: mid-july for a complete UDP stack. ATM, we only have a real-time capable raw socket interface.

Signature · 1 line
Philippe.
#6 lore raw

Thanks for the clarification.

I'm not sure I understand the sentence "ATM, we only have a real-time capable raw socket interface". In my application, we only use RTNET for level 2 communication. Is this already available.

And so, back to the original question, how do I transition from an RTNET/RTDM NIC to an EVL/??? one ?

Thanks in advance

François

Quoted 14 lines · Philippe Gerum
Quoted 2 lines · François Legal

Well, I'm not sure but last time I checked, RTNET would not be part of xenomai 4 IIRC. So I guess EVL is the way to go.

Correct, this is the one providing a real-time net stack based on the dovetail net services (which RTnet does not use). This work is ongoing (see the wip/net branch of the linux-evl tree). ETA: mid-july for a complete UDP stack. ATM, we only have a real-time capable raw socket interface.

--
Philippe.

#7 lore raw
Quoted 3 lines · François Legal

Thanks for the clarification.

I'm not sure I understand the sentence "ATM, we only have a real-time capable raw socket interface".

See https://source.denx.de/Xenomai/xenomai4/libevl/-/blob/master/tidbits/oob-net-icmp.c?ref_type=heads

Quoted 4 lines

In my application, we only use RTNET for level 2 communication. Is this already available.

And so, back to the original question, how do I transition from an RTNET/RTDM NIC to an EVL/??? one ?

When the upcoming EVL netstack is fully available (i.e. including the driver<->evl interface along with the UDP layer), you will add out-of-band support code to the vanilla driver directly. Typically, a couple of handlers added to struct net_device_ops, such as:

#ifdef CONFIG_NET_OOB
	int			(*ndo_enable_oob)(struct net_device *dev);
	void			(*ndo_disable_oob)(struct net_device *dev);
	struct sk_buff *	(*ndo_alloc_tx_oob)(struct net_device *ndev);

#endif

The idea is to reuse the vanilla infrastructure as much as possible instead of forking the driver code. There are a few techniques to have in mind for doing so while preventing too many merge conflicts whenever the upstream code changes, the netstack will come with the FEC driver adapted that way as an illustration.

ETA: end of july.

Signature · 1 line
Philippe.