From: matthieu.castet@parrot.com (Matthieu CASTET)
To: linux-arm-kernel@lists.infradead.org
Subject: Problem with non aligned DMA in usbnet on ARM
Date: Wed, 11 Aug 2010 11:59:21 +0200 [thread overview]
Message-ID: <4C627479.4060400@parrot.com> (raw)
In-Reply-To: <AANLkTi=ycg=adcizNWKMCb7EdfDANM=6Es7r_gF1LbhV@mail.gmail.com>
Hi,
Martin Fuzzey a ?crit :
> Hi all,
> So what is the correct fix for this problem?
> The options seem to be:
> 1) Remove skb_reserve() from usbnet
> But this will cause the ip header to be non aligned on platforms that
> don't have the DMA alignment requirement.
And cause lot's of unaligned access for the IP stack. This will slow
down arm platform...
>
> 2) Define NET_IP_ALIGN to 0 for ARM
> Seems a bit intrusive to me.
Again this will generate lot's of unaligned access.
>
> 3) Change the HCD to copy if not aligned
> I'd like to avoid that.
>
> 4) Change usbnet to use seperate buffers for the usb side and skb.
> Copy between them so both remain aligned
> Seems unlikely that the gain further up the stack from ensuring the ip
> header is aligned will offset the cost of the copy.
>
> Any ideas?
I got the same problem on the gadget side :
http://article.gmane.org/gmane.linux.usb.general/28700
A solution could be the hcd driver to tell it doesn't support unaligned
transfert and in this case the usb stack/usb driver align it.
It is best to solve in usb driver, because for example in Asix case the
driver already do copy (see asix_rx_fixup/asix_tx_fixup).
Matthieu
PS : what hcd driver do you use ?
WARNING: multiple messages have this Message-ID (diff)
From: Matthieu CASTET <matthieu.castet-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org>
To: Martin Fuzzey <mfuzzey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-usb <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: Problem with non aligned DMA in usbnet on ARM
Date: Wed, 11 Aug 2010 11:59:21 +0200 [thread overview]
Message-ID: <4C627479.4060400@parrot.com> (raw)
In-Reply-To: <AANLkTi=ycg=adcizNWKMCb7EdfDANM=6Es7r_gF1LbhV-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi,
Martin Fuzzey a écrit :
> Hi all,
> So what is the correct fix for this problem?
> The options seem to be:
> 1) Remove skb_reserve() from usbnet
> But this will cause the ip header to be non aligned on platforms that
> don't have the DMA alignment requirement.
And cause lot's of unaligned access for the IP stack. This will slow
down arm platform...
>
> 2) Define NET_IP_ALIGN to 0 for ARM
> Seems a bit intrusive to me.
Again this will generate lot's of unaligned access.
>
> 3) Change the HCD to copy if not aligned
> I'd like to avoid that.
>
> 4) Change usbnet to use seperate buffers for the usb side and skb.
> Copy between them so both remain aligned
> Seems unlikely that the gain further up the stack from ensuring the ip
> header is aligned will offset the cost of the copy.
>
> Any ideas?
I got the same problem on the gadget side :
http://article.gmane.org/gmane.linux.usb.general/28700
A solution could be the hcd driver to tell it doesn't support unaligned
transfert and in this case the usb stack/usb driver align it.
It is best to solve in usb driver, because for example in Asix case the
driver already do copy (see asix_rx_fixup/asix_tx_fixup).
Matthieu
PS : what hcd driver do you use ?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-08-11 9:59 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 9:41 Problem with non aligned DMA in usbnet on ARM Martin Fuzzey
2010-08-11 9:41 ` Martin Fuzzey
2010-08-11 9:54 ` Russell King - ARM Linux
2010-08-11 9:54 ` Russell King - ARM Linux
2010-08-11 10:11 ` Martin Fuzzey
2010-08-11 10:11 ` Martin Fuzzey
2010-08-11 15:04 ` Greg KH
2010-08-11 15:04 ` Greg KH
2010-08-11 16:08 ` Martin Fuzzey
2010-08-11 16:08 ` Martin Fuzzey
2010-08-11 17:42 ` Greg KH
2010-08-11 17:42 ` Greg KH
2010-08-11 19:07 ` Martin Fuzzey
2010-08-11 19:07 ` Martin Fuzzey
2010-08-11 20:13 ` Greg KH
2010-08-11 20:13 ` Greg KH
2010-08-11 22:31 ` Martin Fuzzey
2010-08-11 22:31 ` Martin Fuzzey
2010-08-12 17:01 ` Matthieu CASTET
2010-08-12 17:01 ` Matthieu CASTET
2010-08-11 19:10 ` Oliver Neukum
2010-08-11 19:10 ` Oliver Neukum
2010-08-11 9:59 ` Matthieu CASTET [this message]
2010-08-11 9:59 ` Matthieu CASTET
2010-08-11 11:38 ` Martin Fuzzey
2010-08-11 11:38 ` Martin Fuzzey
2010-08-11 15:54 ` Gary King
2010-08-11 20:35 ` Russell King - ARM Linux
2010-08-11 22:20 ` Martin Fuzzey
2010-08-11 22:20 ` Martin Fuzzey
2010-08-11 22:47 ` Russell King - ARM Linux
2010-08-11 22:47 ` Russell King - ARM Linux
2010-08-12 17:08 ` Matthieu CASTET
2010-08-12 17:08 ` Matthieu CASTET
2010-08-13 10:06 ` Martin Fuzzey
2010-08-13 10:06 ` Martin Fuzzey
2010-08-13 10:58 ` Oliver Neukum
2010-08-13 10:58 ` Oliver Neukum
2010-08-13 13:42 ` David Brownell
2010-08-13 13:42 ` David Brownell
2010-08-13 13:53 ` Oliver Neukum
2010-08-13 13:53 ` Oliver Neukum
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=4C627479.4060400@parrot.com \
--to=matthieu.castet@parrot.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.