From: Sven Van Asbroeck <thesven73@gmail.com>
To: Julian Wiedmann <jwi@linux.ibm.com>
Cc: Bryan Whitehead <bryan.whitehead@microchip.com>,
David S Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
George McCollister <george.mccollister@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
netdev <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue
Date: Wed, 14 Apr 2021 09:19:59 -0400 [thread overview]
Message-ID: <CAGngYiXyQEui8+OiVQXe1UeypQvny_hr=qtuOri7r2guxVDm9g@mail.gmail.com> (raw)
In-Reply-To: <0bf00feb-a588-12e1-d606-4a5d7d45e0b3@linux.ibm.com>
Hi Julian,
On Wed, Apr 14, 2021 at 8:53 AM Julian Wiedmann <jwi@linux.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
next prev parent reply other threads:[~2021-04-14 13:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 0:39 [PATCH net v1] lan743x: fix ethernet frame cutoff issue Sven Van Asbroeck
2021-04-09 1:02 ` Andrew Lunn
2021-04-09 1:13 ` Sven Van Asbroeck
2021-04-09 14:12 ` George McCollister
2021-04-09 14:38 ` Sven Van Asbroeck
2021-04-09 20:00 ` patchwork-bot+netdevbpf
2021-04-14 12:53 ` Julian Wiedmann
2021-04-14 13:19 ` Sven Van Asbroeck [this message]
2021-04-14 13:33 ` Julian Wiedmann
2021-04-14 13:40 ` Sven Van Asbroeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGngYiXyQEui8+OiVQXe1UeypQvny_hr=qtuOri7r2guxVDm9g@mail.gmail.com' \
--to=thesven73@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=george.mccollister@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jwi@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).