netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Duncan Roe <duncan_roe@optusnet.com.au>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH RFC libnetfilter_queue] src: Simplify struct pkt_buff
Date: Fri, 10 Jan 2020 12:12:18 +0100	[thread overview]
Message-ID: <20200110111218.rd5c7basrv24jxqg@salvia> (raw)
In-Reply-To: <20200110040925.16124-1-duncan_roe@optusnet.com.au>

On Fri, Jan 10, 2020 at 03:09:25PM +1100, Duncan Roe wrote:
> In struct pkt_buff:
> - We only ever needed any 2 of len, data and tail.

You can remove ->tail.

>   This has caused bugs in the past, e.g. commit 8a4316f31.
>   Delete len, and where the value of pktb->len was required,
>   use new PKTB_LEN macro.

I would leave pktb->len in please, it keeps things simple. Otherwise,
I would suggest to remove pktb->data_len, keep pktb->len in place and
reallocate the data buffer only in case of mangling.

> - head and data always had the same value.
>   head was in the minority, so replace with data where it was used.

This item above also looks fine.

Probably you can split this in several patches, one for each item.

Thanks.

  reply	other threads:[~2020-01-10 11:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  4:09 [PATCH RFC libnetfilter_queue] src: Simplify struct pkt_buff Duncan Roe
2020-01-10 11:12 ` Pablo Neira Ayuso [this message]
2020-01-17 11:32   ` [PATCH libnetfilter_queue] src: Simplify struct pkt_buff: remove head Duncan Roe
2020-01-17 14:09     ` [PATCH libnetfilter_queue] src: Simplify struct pkt_buff: remove tail Duncan Roe
2020-01-18 20:43       ` Pablo Neira Ayuso
2020-01-26  4:02         ` [PATCH libnetfilter_queue v2 0/1] " Duncan Roe
2020-01-26  4:02         ` [PATCH libnetfilter_queue v2 1/1] " Duncan Roe
2020-01-29 17:39           ` Pablo Neira Ayuso
2020-01-18 20:40     ` [PATCH libnetfilter_queue] src: Simplify struct pkt_buff: remove head Pablo Neira Ayuso

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=20200110111218.rd5c7basrv24jxqg@salvia \
    --to=pablo@netfilter.org \
    --cc=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).