Date: Sat, 6 Jul 2019 11:12:24 +0200 (CEST) From: g.strobbe@telenet.be Message-ID: <1481907847.150013779.1562404344423.JavaMail.zimbra@telenet.be> In-Reply-To: <1cda53e1-323a-add9-0a21-d6b843fb21c5@siemens.com> References: <1852590607.83031740.1561824852049.JavaMail.zimbra@telenet.be> <1cda53e1-323a-add9-0a21-d6b843fb21c5@siemens.com> Subject: Re: [PATCH] rtnet: Porting e1000e from mainline 4.14.128 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai ----- On Jul 2, 2019, at 4:08 PM, Jan Kiszka jan.kiszka@siemens.com wrote: > On 29.06.19 18:14, G.Strobbe via Xenomai wrote: >> 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. > >> >> 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: >> > > Lifting inline: > >> +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. I will give that a try. > > Eventually, it would be good to clean up existing users of this pattern as well. You mean other drivers? > >> -------------- 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: >> >> > > 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 > 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? > > Jan > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux Gino