netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan Roe <duncan_roe@optusnet.com.au>
To: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libnetfilter_queue 1/1] src: add pktb_alloc2() and pktb_head_size()
Date: Wed, 13 May 2020 16:49:40 +1000	[thread overview]
Message-ID: <20200513064941.28408-1-duncan_roe@optusnet.com.au> (raw)
In-Reply-To: <20200510151001.GA6216@salvia>

Hi Pablo,

On Sun, May 10, 2020 at 05:10:01PM +0200, Pablo Neira Ayuso wrote:
> On Sun, May 10, 2020 at 11:53:17PM +1000, Duncan Roe wrote:
> > pktb_alloc2() avoids the malloc/free overhead in pktb_alloc() and also
> > eliminates memcpy() of the payload except when mangling increases the
> > packet length.
> >
> >  - pktb_mangle() does the memcpy() if need be.
> >    Packet metadata is altered in this case
> >  - All the _mangle functions are altered to account for possible change tp
> >    packet metadata
> >  - Documentation is updated
>
> Many chunks of this patchset look very much the same I posted. I'll
> apply my patchset and please rebase any update on top of it.
>
> Thanks.

Apologies for the colourful language in the previous post. I could see
something was very wrong but was too tired to formulate a reasoned response.

My concern is with the calling sequence of pktb_setup().
There's a detailed explanation in one of the patch reviews I just posted.
As long as you're happy with that bit, commit what you like.
If it would save you time, the following patch applied on top of my initial
patch aligns with what you posted, after making the corrections in my reviews.
You might like to try them and see what you think.
Or, just apply yours and I'll rebase. But that *will* include changing the
calling sequence of pktb_setup().

Cheers ... Duncan.

Duncan Roe (1):
  src & doc: Rename pktb_alloc2 to pktb_setup

 fixmanpages.sh                       |  2 +-
 include/libnetfilter_queue/pktbuff.h |  4 +++-
 src/extra/pktbuff.c                  | 37 ++++++++++++++++++------------------
 src/nlmsg.c                          |  2 +-
 4 files changed, 23 insertions(+), 22 deletions(-)

--
2.14.5


  parent reply	other threads:[~2020-05-13  6:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 13:53 [PATCH libnetfilter_queue 0/1] pktb_alloc2() Duncan Roe
2020-05-10 13:53 ` [PATCH libnetfilter_queue 1/1] src: add pktb_alloc2() and pktb_head_size() Duncan Roe
2020-05-10 15:10   ` Pablo Neira Ayuso
2020-05-10 21:30     ` Duncan Roe
2020-05-13  6:49     ` Duncan Roe [this message]
2020-05-13  6:49     ` [PATCH libnetfilter_queue 1/1] src & doc: Rename pktb_alloc2 to pktb_setup Duncan Roe

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=20200513064941.28408-1-duncan_roe@optusnet.com.au \
    --to=duncan_roe@optusnet.com.au \
    --cc=netfilter-devel@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 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).