Skip to contentSkip to conversation

rtnet: Porting e1000e from mainline 4.14.128

PATCH In review [email protected] 2 participants 5 messages Jun 29, 2019 – Jul 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtnet: Porting e1000e from mainline 4.14.128

Hi,

I ported the e1000e driver from linux-4.14.128 to the Xenomai next branch.
It runs nice on my setup, an Intel NUC i3 with an Intel I219-V Ethernet Controller wired to a Beckhoff IO island.

If someone else wants to give the driver a try, please find attached the patches.

They applied both clean to the master as well as the next branch.

Best Regards,

Gino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Providing-rtnetdev_alloc_rtskb_ip_align.patch
Type: text/x-patch
Size: 3139 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Porting-e1000e-from-mainline-4.14.128.patch
Type: text/x-patch
Size: 823903 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment-0001.bin>

#1 lore raw
Quoted 4 lines · G.Strobbe via Xenomai

Hi,

I ported the e1000e driver from linux-4.14.128 to the Xenomai next branch.
It runs nice on my setup, an Intel NUC i3 with an Intel I219-V Ethernet Controller wired to a Beckhoff IO island.

Thanks for updating!

Quoted 7 lines

If someone else wants to give the driver a try, please find attached the patches.

They applied both clean to the master as well as the next branch.

Best Regards,

Quoted 8 lines

Gino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Providing-rtnetdev_alloc_rtskb_ip_align.patch
Type: text/x-patch
Size: 3139 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment.bin>

Lifting inline:

Review

Quoted 9 lines
(quoted diff) +9 -0
+static inline struct rtskb *rtnetdev_alloc_rtskb_ip_align(struct rtnet_device *rtdev,
+		unsigned int length, gfp_t gfp)
+{
+	struct rtskb *rtskb = rtnetdev_alloc_rtskb(rtdev, length + NET_IP_ALIGN);
+
+	if (NET_IP_ALIGN && rtskb)
+		rtskb_reserve(rtskb, NET_IP_ALIGN);
+	return rtskb;
+}

This should probably become a non-inline service in rtdev.c.

Eventually, it would be good to clean up existing users of this pattern as well.

Quoted 8 lines

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Porting-e1000e-from-mainline-4.14.128.patch
Type: text/x-patch
Size: 823903 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment-0001.bin>

What was the reason for picking 4.14 as baseline? Did you check if older (minimum would be 4.4.) or newer kernels (4.19 ATM) build as well?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#2 lore raw
Quoted 8 lines · ----- On Jul 2, 2019, at 4:08 PM, Jan Kiszka [email protected] wrote:
Quoted 5 lines · G.Strobbe via Xenomai

Hi,

I ported the e1000e driver from linux-4.14.128 to the Xenomai next branch. It runs nice on my setup, an Intel NUC i3 with an Intel I219-V Ethernet Controller wired to a Beckhoff IO island.

Thanks for updating!

My pleasure. I learned lots of things new to me along the way.

Quoted 21 lines
Quoted 9 lines

If someone else wants to give the driver a try, please find attached the patches.

They applied both clean to the master as well as the next branch.

Best Regards,

Quoted 9 lines

Gino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Providing-rtnetdev_alloc_rtskb_ip_align.patch
Type: text/x-patch
Size: 3139 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment.bin>

Lifting inline:

Quoted 12 lines

Review

Quoted 10 lines

+static inline struct rtskb *rtnetdev_alloc_rtskb_ip_align(struct rtnet_device *rtdev,

(quoted diff) +8 -0
+		unsigned int length, gfp_t gfp)
+{
+	struct rtskb *rtskb = rtnetdev_alloc_rtskb(rtdev, length + NET_IP_ALIGN);
+
+	if (NET_IP_ALIGN && rtskb)
+		rtskb_reserve(rtskb, NET_IP_ALIGN);
+	return rtskb;
+}

This should probably become a non-inline service in rtdev.c.

I will give that a try.

Quoted 2 lines

Eventually, it would be good to clean up existing users of this pattern as well.

You mean other drivers?

Quoted 11 lines
Quoted 10 lines

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Porting-e1000e-from-mainline-4.14.128.patch
Type: text/x-patch
Size: 823903 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment-0001.bin>

Quoted 1 line

What was the reason for picking 4.14 as baseline?

No particular reason.
As long as I did not have build problems I always used the latest non wip marked ipipe patch when working on the driver. When I thought it was in a state to offer it to others to try it, I happened to be on 4.14

Quoted 1 line

Did you check if older (minimum would be 4.4.) or newer kernels (4.19 ATM) build as well?

I just checked 4.4.y-cip, 4.9.y and 4.19.y
None of them build but nothing looks complicated to solve.

So you actually would prefer too see the big patch appliable to 4.4.y-cip and then smaller patches as needed moving towards 4.19.y?

Quoted 6 lines

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

Gino

#3 lore raw
Quoted 49 lines · On 06.07.19 11:12, [email protected] wrote:
Quoted 8 lines · ----- On Jul 2, 2019, at 4:08 PM, Jan Kiszka [email protected] wrote:
Quoted 5 lines · G.Strobbe via Xenomai

Hi,

I ported the e1000e driver from linux-4.14.128 to the Xenomai next branch. It runs nice on my setup, an Intel NUC i3 with an Intel I219-V Ethernet Controller wired to a Beckhoff IO island.

Thanks for updating!

My pleasure. I learned lots of things new to me along the way.

Quoted 21 lines
Quoted 9 lines

If someone else wants to give the driver a try, please find attached the patches.

They applied both clean to the master as well as the next branch.

Best Regards,

Quoted 9 lines

Gino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Providing-rtnetdev_alloc_rtskb_ip_align.patch
Type: text/x-patch
Size: 3139 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment.bin>

Lifting inline:

Quoted 12 lines

Review

Quoted 10 lines

+static inline struct rtskb *rtnetdev_alloc_rtskb_ip_align(struct rtnet_device *rtdev,

(quoted diff) +8 -0
+		unsigned int length, gfp_t gfp)
+{
+	struct rtskb *rtskb = rtnetdev_alloc_rtskb(rtdev, length + NET_IP_ALIGN);
+
+	if (NET_IP_ALIGN && rtskb)
+		rtskb_reserve(rtskb, NET_IP_ALIGN);
+	return rtskb;
+}

This should probably become a non-inline service in rtdev.c.

Quoted 6 lines

I will give that a try.

Quoted 2 lines

Eventually, it would be good to clean up existing users of this pattern as well.

You mean other drivers?

Yes. More nice-to-have, though.

Quoted 18 lines
Quoted 12 lines
Quoted 11 lines

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Porting-e1000e-from-mainline-4.14.128.patch
Type: text/x-patch
Size: 823903 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment-0001.bin>

Quoted 1 line

What was the reason for picking 4.14 as baseline?

No particular reason.
As long as I did not have build problems I always used the latest non wip marked ipipe patch when working on the driver. When I thought it was in a state to offer it to others to try it, I happened to be on 4.14

Quoted 7 lines
Quoted 1 line

Did you check if older (minimum would be 4.4.) or newer kernels (4.19 ATM) build as well?

I just checked 4.4.y-cip, 4.9.y and 4.19.y
None of them build but nothing looks complicated to solve.

So you actually would prefer too see the big patch appliable to 4.4.y-cip and then smaller patches as needed moving towards 4.19.y?

I mean, if you want your updated driver to become Xenomai mainline, we would need it to build against those kernels as well. It needs to be back- and forward-compatible when living in the Xenomai tree.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#4 lore raw
Quoted 50 lines · ----- On Jul 8, 2019, at 5:43 PM, Jan Kiszka [email protected] wrote:
Quoted 49 lines · On 06.07.19 11:12, [email protected] wrote:
Quoted 8 lines · ----- On Jul 2, 2019, at 4:08 PM, Jan Kiszka [email protected] wrote:
Quoted 5 lines · G.Strobbe via Xenomai

Hi,

I ported the e1000e driver from linux-4.14.128 to the Xenomai next branch. It runs nice on my setup, an Intel NUC i3 with an Intel I219-V Ethernet Controller wired to a Beckhoff IO island.

Thanks for updating!

My pleasure. I learned lots of things new to me along the way.

Quoted 33 lines
Quoted 9 lines

If someone else wants to give the driver a try, please find attached the patches.

They applied both clean to the master as well as the next branch.

Best Regards,

Quoted 9 lines

Gino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Providing-rtnetdev_alloc_rtskb_ip_align.patch
Type: text/x-patch
Size: 3139 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment.bin>

Lifting inline:

Review

Quoted 10 lines

+static inline struct rtskb *rtnetdev_alloc_rtskb_ip_align(struct rtnet_device *rtdev,

(quoted diff) +8 -0
+		unsigned int length, gfp_t gfp)
+{
+	struct rtskb *rtskb = rtnetdev_alloc_rtskb(rtdev, length + NET_IP_ALIGN);
+
+	if (NET_IP_ALIGN && rtskb)
+		rtskb_reserve(rtskb, NET_IP_ALIGN);
+	return rtskb;
+}

This should probably become a non-inline service in rtdev.c.

Quoted 1 line
Quoted 1 line

I will give that a try.

Done, please find it attached.

Quoted 42 lines
Quoted 5 lines
Quoted 3 lines

Eventually, it would be good to clean up existing users of this pattern as well.

You mean other drivers?

Yes. More nice-to-have, though.

Quoted 20 lines
Quoted 12 lines
Quoted 11 lines

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Porting-e1000e-from-mainline-4.14.128.patch
Type: text/x-patch
Size: 823903 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20190629/0a820ef7/attachment-0001.bin>

Quoted 1 line

What was the reason for picking 4.14 as baseline?

No particular reason.
As long as I did not have build problems I always used the latest non wip marked ipipe patch when working on the driver.
When I thought it was in a state to offer it to others to try it, I happened to be on 4.14

Quoted 9 lines
Quoted 2 lines

Did you check if older (minimum would be 4.4.) or newer kernels (4.19 ATM) build as well?

I just checked 4.4.y-cip, 4.9.y and 4.19.y
None of them build but nothing looks complicated to solve.

So you actually would prefer too see the big patch appliable to 4.4.y-cip and then smaller patches as needed moving towards 4.19.y?

I mean, if you want your updated driver to become Xenomai mainline, we would need it to build against those kernels as well. It needs to be back- and forward-compatible when living in the Xenomai tree.

Quoted 5 lines

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

The attached revised patches build against 4.4, 4.9, 4.14 and 4.19
I tested the driver with the Xenomai next branch on all 4 kernels and all runs with my setup.

Gino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Porting-e1000e-from-mainline-4.19.57.patch
Type: text/x-patch
Size: 808604 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190722/761641b4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtnet-Providing-rtnetdev_alloc_rtskb_ip_align.patch
Type: text/x-patch
Size: 3772 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190722/761641b4/attachment-0001.bin>