All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
To: Giuseppe Longo <giuseppelng@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] iptables-nftables: function nft_chain_zero_counters added.
Date: Tue, 18 Jun 2013 07:50:14 +0300	[thread overview]
Message-ID: <51BFE706.6010109@linux.intel.com> (raw)
In-Reply-To: <CAFpD06T49mEBTQHey2CungHn5ew-ohgaSOAZyai2EzsSSqJ5CA@mail.gmail.com>

Hi Giuseppe,

>> I guess you don't want to continue looping after you found your chain. On
>> success, make it break.
> Looking the code, in other functions like nft_chain_user_del,
> i guess that the loop continue after found the chain.
> Am i wrong?

Looks like you found an optimization patch to make in that function.

>> And on error your function should return the error code.
> return ret == 0 ? 1 : 0;
> is it ok this code?
>

Sound fine to me in that particular case.


Tomasz


      reply	other threads:[~2013-06-18  4:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17  9:26 [PATCH v3 1/2] iptables-nftables: function nft_chain_zero_counters added Giuseppe Longo
2013-06-17  9:26 ` [PATCH v3 2/2] xtables: function zero_entries removed Giuseppe Longo
2013-06-17 10:13 ` [PATCH v3 1/2] iptables-nftables: function nft_chain_zero_counters added Tomasz Bursztyka
2013-06-17 11:29   ` Pablo Neira Ayuso
2013-06-17 12:22     ` Giuseppe Longo
2013-06-17 12:41       ` Tomasz Bursztyka
2013-06-17 13:17   ` Giuseppe Longo
2013-06-18  4:50     ` Tomasz Bursztyka [this message]

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=51BFE706.6010109@linux.intel.com \
    --to=tomasz.bursztyka@linux.intel.com \
    --cc=giuseppelng@gmail.com \
    --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 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.