All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: alexander.h.duyck@intel.com, netdev@vger.kernel.org
Subject: Re: [RFC] move dma_head/dma_maps out of skb_shared_info and into sk_buff
Date: Thu, 05 Nov 2009 19:00:52 -0800	[thread overview]
Message-ID: <1257476452.14523.10.camel@localhost> (raw)
In-Reply-To: <20091105.174024.105269738.davem@davemloft.net>

On Thu, 2009-11-05 at 17:40 -0800, David Miller wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
> Date: Thu, 05 Nov 2009 16:54:33 -0800
> 
> > During testing we found issues with the use of skb_dma_map/unmap on
> > systems that had iommu enabled and were configured to use a bridge.
> > The
> > issue is that if two ports are members of the same bridge, and a
> > broadcast packet is sent out on the bridge skb_clone will be used to
> > send a copy to all ports, but the clones run into issues because the
> > dma mappings for the cloned skbs all share the shared_info structure
> > where the dma mappings are stored.
> > 
> > To resolve that this patch moves those dma mappings out of the
> > shared_info structure and into the sk_buff itself.  This allows cloned
> > skbs to be mapped separately without causing dma unmapping errors.
> > 
> > Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> 
> DMA mappings are a property of the data not the SKB.
> 
> And the DMA mappings are in the shared area exactly so that
> we don't eat the space for every clone of the data.
> 
> We need another way around this problem and I'll just as
> soon remove the DMA mapping bits entirely from SKBs before
> I'll put them into struct sk_buff

We may need to pull the dma mapping bits entirely then since we end up
effectively needing to store a copy of the dma mapping every time
dma_map_single/page is called w/ iommu enabled, otherwise we can only
map the data portion of the skb once without leaking dma mappings.

Would there be any complaint if I were to submit a patch that removed
skb_dma_map/unmap?

Thanks,

Alex


  reply	other threads:[~2009-11-06  3:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06  0:54 [RFC] move dma_head/dma_maps out of skb_shared_info and into sk_buff Alexander Duyck
2009-11-06  1:40 ` David Miller
2009-11-06  3:00   ` Alexander Duyck [this message]
2009-11-06  9:58     ` David Miller
2009-11-06  2:14 ` Eric Dumazet
2009-11-06  3:24   ` Alexander Duyck

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=1257476452.14523.10.camel@localhost \
    --to=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --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 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.