[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGngYiXyQEui8+OiVQXe1UeypQvny_hr=qtuOri7r2guxVDm9g@mail.gmail.com>
Date: Wed, 14 Apr 2021 09:19:59 -0400
From: Sven Van Asbroeck <thesven73@...il.com>
To: Julian Wiedmann <jwi@...ux.ibm.com>
Cc: Bryan Whitehead <bryan.whitehead@...rochip.com>,
David S Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
George McCollister <george.mccollister@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
netdev <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue
Hi Julian,
On Wed, Apr 14, 2021 at 8:53 AM Julian Wiedmann <jwi@...ux.ibm.com> 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 longer get dma-mapped.
That's an excellent suggestion, and I'll definitely keep that in mind
for the future.
In this case, I'm not sure if it could work. This NIC has multi-buffer
frames. The dma-ed skbs represent frame fragments. A flag in the
descriptor ring indicates if an skb is "first". If first, we can
reserve the padding. Otherwise, we cannot. because that would corrupt
a fragment in the middle. At the time of skb allocation, we do not
know whether that skb will be "first".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/microchip/lan743x_main.c?h=v5.12-rc7#n2125
Maybe I'm missing a trick here? Feel free to suggest improvements,
it's always much appreciated.
Sven
Powered by blists - more mailing lists