All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] iptables: use skb->len for accounting
Date: Fri, 23 Jul 2010 13:49:11 +0200	[thread overview]
Message-ID: <4C4981B7.2090101@trash.net> (raw)
In-Reply-To: <1279868302.2482.113.camel@edumazet-laptop>

On 23.07.2010 08:58, Eric Dumazet wrote:
> Le vendredi 23 juillet 2010 à 14:47 +0800, Changli Gao a écrit :
>> On Fri, Jul 23, 2010 at 2:29 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>> Le vendredi 23 juillet 2010 à 11:34 +0800, Changli Gao a écrit :
>>>> iptables: use skb->len for accounting
>>>>
>>>> use skb->len for accounting as xt_quota does.
>>>>
>>>
>>> Why ?
>>>
>>> This is a gratuitous change, unless you have very strong arguments.
>>>
>>> xt_quota is an exception, dont change all others because of it !
>>
>> exception ? Why ?
> 
> Because it handles all protocols...
> 
> So skb->len is a shortcut, an approximation if you want.
> 
> At IPV4 level, ip->tot_len is an exact value.

Actually skb->len is also exact at the IPv4 level. I'm inclined
to apply this patch for consistency with ip6_tables, where using
skb->len fixes jumbo frame accounting.


  reply	other threads:[~2010-07-23 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23  3:34 [PATCH] iptables: use skb->len for accounting Changli Gao
2010-07-23  6:29 ` Eric Dumazet
2010-07-23  6:47   ` Changli Gao
2010-07-23  6:58     ` Eric Dumazet
2010-07-23 11:49       ` Patrick McHardy [this message]
2010-07-23 12:14         ` Eric Dumazet
2010-07-23 14:25 ` Patrick McHardy

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=4C4981B7.2090101@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=xiaosuo@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 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.