From: Florian Westphal <fw@strlen.de>
To: Nishit Shah <nsshah.82@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 14/14] nfnetlink: add support for memory mapped netlink
Date: Wed, 24 Apr 2013 17:15:39 +0200 [thread overview]
Message-ID: <20130424151539.GA32324@breakpoint.cc> (raw)
In-Reply-To: <CAED+v=bdjZE=CKMvKfmE_Z=57K-K6xy_EeLMCU8xsokq4Kc6ZA@mail.gmail.com>
Nishit Shah <nsshah.82@gmail.com> wrote:
> On Wed, Apr 17, 2013 at 10:17 PM, Patrick McHardy <kaber@trash.net> wrote:
> >
> > Signed-off-by: Patrick McHardy <kaber@trash.net>
[..]
> > diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
> > index 5e280b3..ef3cdb4 100644
> > --- a/net/netfilter/nfnetlink_queue_core.c
> > +++ b/net/netfilter/nfnetlink_queue_core.c
> > @@ -339,7 +339,8 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
> > if (queue->flags & NFQA_CFG_F_CONNTRACK)
> > ct = nfqnl_ct_get(entskb, &size, &ctinfo);
> >
> > - skb = alloc_skb(size, GFP_ATOMIC);
> > + skb = nfnetlink_alloc_skb(&init_net, size, queue->peer_portid,
> > + GFP_ATOMIC);
> > if (!skb)
> > return NULL;
> >
>
> does this mean that we have a true zero copy support with Eric D's
> patch (nfnetlink_queue: zero-copy support) and this patch ?
No. In both socket and mmap case there is one copy involved.
Before Erics patch, there were two:
first copy: skb_copy_bits() that copies to packet payload into the
netlink message
second copy: copy to userspace when recv() is called
Patricks mmap patch removes the second copy; as the netlink
message is already allocated in userspace memory (the mmap ring).
Erics patch avoids the first copy by only copying fragments'
addresses instead of the payload.
next prev parent reply other threads:[~2013-04-24 15:15 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 16:46 [PATCH 00/14]: netlink: memory mapped I/O Patrick McHardy
2013-04-17 16:46 ` [PATCH 01/14] netlink: add symbolic value for congested state Patrick McHardy
2013-04-19 13:24 ` Sergei Shtylyov
2013-04-17 16:46 ` [PATCH 02/14] netlink: rename ssk to sk in struct netlink_skb_params Patrick McHardy
2013-04-17 16:46 ` [PATCH 03/14] net: add function to allocate sk_buff head without data area Patrick McHardy
2013-04-17 16:46 ` [PATCH 04/14] netlink: don't orphan skb in netlink_trim() Patrick McHardy
2013-04-17 16:47 ` [PATCH 05/14] netlink: add netlink_skb_set_owner_r() Patrick McHardy
2013-04-17 16:47 ` [PATCH 06/14] netlink: mmaped netlink: ring setup Patrick McHardy
2013-04-17 16:47 ` [PATCH 07/14] netlink: add mmap'ed netlink helper functions Patrick McHardy
2013-04-17 16:47 ` [PATCH 08/14] netlink: implement memory mapped sendmsg() Patrick McHardy
2013-04-17 22:57 ` Ben Hutchings
2013-04-18 10:31 ` Patrick McHardy
2013-04-18 16:26 ` Ben Hutchings
2013-04-19 11:04 ` Patrick McHardy
2013-04-17 16:47 ` [PATCH 09/14] netlink: implement memory mapped recvmsg() Patrick McHardy
2013-04-17 16:47 ` [PATCH 10/14] netlink: add flow control for memory mapped I/O Patrick McHardy
2013-04-17 16:47 ` [PATCH 11/14] netlink: add RX/TX-ring support to netlink diag Patrick McHardy
2013-04-23 18:28 ` Christoph Paasch
2013-04-23 19:23 ` David Miller
2013-04-23 19:43 ` Christoph Paasch
2013-04-17 16:47 ` [PATCH 12/14] netlink: add documentation for memory mapped I/O Patrick McHardy
2013-04-17 17:51 ` Daniel Borkmann
2013-04-17 18:08 ` Patrick McHardy
2013-04-17 18:56 ` Daniel Borkmann
2013-04-22 18:28 ` Andi Kleen
2013-04-17 16:47 ` [PATCH 13/14] netfilter: rename netlink related "pid" variables to "portid" Patrick McHardy
2013-04-17 16:47 ` [PATCH 14/14] nfnetlink: add support for memory mapped netlink Patrick McHardy
[not found] ` <CAED+v=bCkEa8gOO9pu62hmj_H9WXz4+OBiCeyxBUO10L9EdDkA@mail.gmail.com>
2013-04-24 14:44 ` Nishit Shah
2013-04-24 15:15 ` Florian Westphal [this message]
2013-04-17 19:40 ` [PATCH 00/14]: netlink: memory mapped I/O Florian Westphal
2013-04-18 10:27 ` Patrick McHardy
2013-04-18 11:01 ` Florian Westphal
2013-04-18 11:11 ` Patrick McHardy
2013-04-18 14:57 ` Eric Dumazet
2013-04-19 19:51 ` 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=20130424151539.GA32324@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=nsshah.82@gmail.com \
/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).