* [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header [not found] <patchbomb.1224031839@abulafia.goop.org> @ 2008-10-15 0:50 ` Jeremy Fitzhardinge 2008-10-16 9:12 ` Jeff Garzik 0 siblings, 1 reply; 2+ messages in thread From: Jeremy Fitzhardinge @ 2008-10-15 0:50 UTC (permalink / raw) To: Jeff Garzik; +Cc: linux-kernel, Isaku Yamahata, NetDev, Ingo Molnar From: Isaku Yamahata <yamahata@valinux.co.jp> Align ip header to a 16 byte boundary to avoid unaligned access like other drivers. Without this patch, xen-netfront doesn't work well on ia64. [ Jeff, this is the only patch in the series which is in your territory. -J ] Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> --- drivers/net/xen-netfront.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -239,10 +239,13 @@ */ batch_target = np->rx_target - (req_prod - np->rx.rsp_cons); for (i = skb_queue_len(&np->rx_batch); i < batch_target; i++) { - skb = __netdev_alloc_skb(dev, RX_COPY_THRESHOLD, + skb = __netdev_alloc_skb(dev, RX_COPY_THRESHOLD + NET_IP_ALIGN, GFP_ATOMIC | __GFP_NOWARN); if (unlikely(!skb)) goto no_skb; + + /* Align ip header to a 16 bytes boundary */ + skb_reserve(skb, NET_IP_ALIGN); page = alloc_page(GFP_ATOMIC | __GFP_NOWARN); if (!page) { ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header 2008-10-15 0:50 ` [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header Jeremy Fitzhardinge @ 2008-10-16 9:12 ` Jeff Garzik 0 siblings, 0 replies; 2+ messages in thread From: Jeff Garzik @ 2008-10-16 9:12 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: linux-kernel, Isaku Yamahata, NetDev, Ingo Molnar Jeremy Fitzhardinge wrote: > From: Isaku Yamahata <yamahata@valinux.co.jp> > > Align ip header to a 16 byte boundary to avoid unaligned > access like other drivers. > Without this patch, xen-netfront doesn't work well on ia64. > > [ Jeff, this is the only patch in the series which is in your > territory. -J ] > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> > Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> > --- > drivers/net/xen-netfront.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) applied ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-16 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <patchbomb.1224031839@abulafia.goop.org>
2008-10-15 0:50 ` [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header Jeremy Fitzhardinge
2008-10-16 9:12 ` Jeff Garzik
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).