Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-14 Thread Sven Van Asbroeck
Hi Julian, On Wed, Apr 14, 2021 at 9:33 AM Julian Wiedmann wrote: > > __netdev_alloc_skb_ip_align() already reserves the NET_IP_ALIGN part. > So when the NIC stores into the dma-mapped skb->data parts, each > fragment will automatically have the required alignment - even when > you only care

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-14 Thread Julian Wiedmann
On 14.04.21 15:19, Sven Van Asbroeck wrote: > Hi Julian, > > On Wed, Apr 14, 2021 at 8:53 AM Julian Wiedmann wrote: >> >> On a cursory glance, using __netdev_alloc_skb_ip_align() here should >> allow you to get rid of all the RX_HEAD_PADDING gymnastics. >> >> And also avoid the need for setting

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-14 Thread Sven Van Asbroeck
Hi Julian, On Wed, Apr 14, 2021 at 8:53 AM Julian Wiedmann wrote: > > On a cursory glance, using __netdev_alloc_skb_ip_align() here should > allow you to get rid of all the RX_HEAD_PADDING gymnastics. > > And also avoid the need for setting RX_CFG_B_RX_PAD_2_, as the > NET_IP_ALIGN part would no

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-14 Thread Julian Wiedmann
On 09.04.21 02:39, Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > The ethernet frame length is calculated incorrectly. Depending on > the value of RX_HEAD_PADDING, this may result in ethernet frames > that are too short (cut off at the end), or too long (garbage added > to the end). > >

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-09 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 8 Apr 2021 20:39:04 -0400 you wrote: > From: Sven Van Asbroeck > > The ethernet frame length is calculated incorrectly. Depending on > the value of RX_HEAD_PADDING, this may result in ethernet frames > that are too

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-09 Thread Sven Van Asbroeck
Hi George, On Fri, Apr 9, 2021 at 10:12 AM George McCollister wrote: > > I'm glad everyone was able to work together to get this fixed properly > without any figure pointing or mud slinging! Kudos everyone. Same, this is what the kernel community is supposed to be all about. And thank you for

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-09 Thread George McCollister
On Thu, Apr 8, 2021 at 7:39 PM Sven Van Asbroeck wrote: > > From: Sven Van Asbroeck > > The ethernet frame length is calculated incorrectly. Depending on > the value of RX_HEAD_PADDING, this may result in ethernet frames > that are too short (cut off at the end), or too long (garbage added > to

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-08 Thread Sven Van Asbroeck
Hi Andrew, On Thu, Apr 8, 2021 at 9:02 PM Andrew Lunn wrote: > > Adding a Suggested-by: would be good. And it might sometime help > Johnathan Corbet extract some interesting statistics from the commit > messages if everybody uses the same format. Thank you for the suggestion. I'll definitely

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-08 Thread Andrew Lunn
Hi Sven > Many thanks to Heiner Kallweit for suggesting this solution. Adding a Suggested-by: would be good. And it might sometime help Johnathan Corbet extract some interesting statistics from the commit messages if everybody uses the same format. Andrew

[PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-08 Thread Sven Van Asbroeck
From: Sven Van Asbroeck The ethernet frame length is calculated incorrectly. Depending on the value of RX_HEAD_PADDING, this may result in ethernet frames that are too short (cut off at the end), or too long (garbage added to the end). Fix by calculating the ethernet frame length correctly. For