All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shirley Ma <mashirle@us.ibm.com>
To: Zan Lynx <zlynx@acm.org>
Cc: David Miller <davem@davemloft.net>,
	mst@redhat.com, netdev@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers
Date: Wed, 06 Jul 2011 16:24:14 -0700	[thread overview]
Message-ID: <1309994654.10209.29.camel@localhost.localdomain> (raw)
In-Reply-To: <4E14E939.5040904@acm.org>

On Wed, 2011-07-06 at 17:01 -0600, Zan Lynx wrote:
> On 7/6/2011 4:22 PM, Shirley Ma wrote:
> > This patch adds userspace buffers support in skb shared info. A new 
> > struct skb_ubuf_info is needed to maintain the userspace buffers
> > argument and index, a callback is used to notify userspace to
> release
> > the buffers once lower device has done DMA (Last reference to that
> skb
> > has gone).
> > 
> > If there is any userspace apps to reference these userspace buffers,
> > then these userspaces buffers will be copied into kernel. This way
> we
> > can prevent userspace apps from holding these userspace buffers too
> long.
> > 
> > Use destructor_arg to point to the userspace buffer info; a new tx
> flags
> > SKBTX_DEV_ZEROCOPY is added for zero-copy buffer check.
> > 
> > Signed-off-by: Shirley Ma <xma@...ibm.com>
> 
> I was just reading this patch and noticed that you check if
> uarg->callback is set before calling it in skb_release_data, but you
> do
> not check before calling it in skb_copy_ubufs.
> 
> I was only skimming so I have probably missed something...

It is a redundant check. The userspace buffer info always has a callback
to release the buffers. I should have removed it after using tx_flags.

Thanks
Shirley


  reply	other threads:[~2011-07-06 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 22:22 [PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers Shirley Ma
2011-07-06 23:01 ` Zan Lynx
2011-07-06 23:24   ` Shirley Ma [this message]
2011-07-07 11:01 ` David Miller
2011-07-07 18:32   ` Shirley Ma
2011-07-07 18:39     ` David Miller

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=1309994654.10209.29.camel@localhost.localdomain \
    --to=mashirle@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=zlynx@acm.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.