From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: David Laight <David.Laight@ACULAB.COM>,
David Miller <davem@davemloft.net>
Cc: "mitsuhiro.kimura.kc@renesas.com"
<mitsuhiro.kimura.kc@renesas.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"pawel.moll@arm.com" <pawel.moll@arm.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"galak@codeaurora.org" <galak@codeaurora.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"richardcochran@gmail.com" <richardcochran@gmail.com>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"masaru.nagai.vx@renesas.com" <masaru.nagai.vx@renesas.com>
Subject: Re: [PATCH v3] Renesas Ethernet AVB driver
Date: Fri, 24 Apr 2015 21:27:03 +0300 [thread overview]
Message-ID: <553A8AF7.2020206@cogentembedded.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB24BB5@AcuExch.aculab.com>
On 04/24/2015 12:03 PM, David Laight wrote:
>> Sent: 22 April 2015 22:39
>> On 04/22/2015 11:42 PM, David Miller wrote:
>>>> Hmm, I've been digging in the net core, and was unable to see where TX
>>>> skb's get their NET_IP_ALIGN bytes reserved. Have I missed something?
>>>> Probably need to print out skb's fields...
>>> NET_IP_ALIGN is for receive, not transmit.
>> But when I print 'skb->data' from the ndo_start_xmit() method (in the
>> 'sh_eth' driver), all addresses end with 2, so it looks like NET_IP_ALIGN gets
>> added somewhere...
> For a locally generated message:
> The TCP userdata is likely to be 4 byte aligned.
> The TCP and IP headers are multiples of 4 bytes.
> The MAC header is 14 bytes.
> So you end up with a buffer that starts on a 4n+2 boundary or an initial
> short fragment that is 4n+2 bytes long.
> If a message is being forwarded the alignment probably depends on where
> it came from.
Thanks for the detailed reply, though it came a bit late. :-)
> If you have ethernet hardware that requires tx or rx buffers to be on
The RX buffers can be adjusted with skb_resrerve(), it's only the TX
buffers that need to be copied...
> 4n boundaries you should send it back as 'not fit for purpose'.
I'm afraid we can't. :-)
However, my colleague has suggested a scheme minimizing the copying:
only up to 3 first bytes need to be copied to the driver's internal buffers,
the rest can be sent from an skb itself. That would require substantial
changes to the driver though...
> David
WBR, Sergei
next prev parent reply other threads:[~2015-04-24 18:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 22:07 [PATCH v3] Renesas Ethernet AVB driver Sergei Shtylyov
2015-04-13 22:38 ` Florian Fainelli
2015-04-14 21:37 ` Sergei Shtylyov
2015-04-22 5:04 ` MITSUHIRO KIMURA
2015-04-22 15:36 ` David Miller
2015-04-22 20:30 ` Sergei Shtylyov
2015-04-22 20:42 ` David Miller
2015-04-22 20:46 ` Sergei Shtylyov
2015-04-22 22:17 ` David Miller
2015-04-22 21:38 ` Sergei Shtylyov
2015-04-22 22:18 ` David Miller
2015-04-22 22:34 ` Sergei Shtylyov
2015-04-22 22:41 ` David Miller
2015-04-22 22:50 ` Sergei Shtylyov
2015-04-24 9:03 ` David Laight
2015-04-24 18:27 ` Sergei Shtylyov [this message]
2015-04-27 9:22 ` David Laight
2015-04-22 23:22 ` Florian Fainelli
2015-04-24 18:53 ` Sergei Shtylyov
2015-04-28 17:09 ` Ben Hutchings
2015-05-07 21:10 ` Sergei Shtylyov
2015-05-07 21:25 ` Sergei Shtylyov
2015-04-14 0:49 ` Lino Sanfilippo
2015-04-14 11:31 ` David Laight
2015-04-19 22:10 ` Sergei Shtylyov
2015-04-19 23:45 ` Lino Sanfilippo
2015-04-19 9:19 ` Richard Cochran
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=553A8AF7.2020206@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-sh@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=masaru.nagai.vx@renesas.com \
--cc=mitsuhiro.kimura.kc@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@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).