All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Perevalov <a.perevalov@samsung.com>
To: pablo@netfilter.org
Cc: Alexey Perevalov <a.perevalov@samsung.com>,
	kyungmin.park@samsung.com, hs81.go@samsung.com,
	netfilter-devel@vger.kernel.org, alexey.perevalov@hotmail.com,
	mathieu.poirier@linaro.org
Subject: [PATCH] reset nfacct counters
Date: Mon, 28 Jul 2014 21:57:50 +0400	[thread overview]
Message-ID: <1406570272-3704-1-git-send-email-a.perevalov@samsung.com> (raw)
In-Reply-To: <20140725160123.GA20548@salvia>

Hello Pablo,
I used you guidance on flags usage for separate counters reset.
If no flags were specified we'll have old behaviour. I wanted to remove
NFNL_MSG_ACCT_GET_CTRZERO and use combination of (NFACCT_F_RESET_COUNTERS |
NFACCT_F_RESET_QUOTAS). But in this case I didn't find how to solve backward
compatibility issue.

You proposed to allocate memory for filter entity to use it with
netlink_dump_control, but netlink_dump_start is synchronous all the way,
and stack variable could be used there. But I could be wrong here and
there is a use case where netlink_dump_control's callback is calling from
another thread.

Due nfnetlink_acct header was modified, I think I need to send additional patches
for nfacct and libnetfilter_acct git reposotories. I saw such practice,
nfnetlink_acct.h duplicates in these repositories.

This patch was made for git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
repository, on top of 633594bb2d3890711a887897f2003f41735f0dfa commit.

Do you need a patch for nfacct command line tool to support following behaviour:
nfacct list reset [counter|quota] ?

Alexey Perevalov (1):
  netfilter: nfnetlink_acct: use flag to reset counters

 include/uapi/linux/netfilter/nfnetlink_acct.h |    2 ++
 net/netfilter/nfnetlink_acct.c                |   30 ++++++++++++++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)

-- 
1.7.9.5


  parent reply	other threads:[~2014-07-28 17:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  8:05 reset nfacct counters Alexey Perevalov
2014-07-25 16:01 ` Pablo Neira Ayuso
2014-07-25 16:39   ` Alexey Perevalov
2014-07-28 17:57   ` Alexey Perevalov [this message]
2014-07-28 22:03     ` [PATCH] " Pablo Neira Ayuso
2014-07-28 17:57   ` [PATCH] netfilter: nfnetlink_acct: use flag to reset counters Alexey Perevalov
2014-07-28 21:53     ` Pablo Neira Ayuso
2014-07-29 11:46       ` Alexey Perevalov
2014-07-29 16:32         ` Pablo Neira Ayuso
2014-07-29 21:00           ` Alexey Perevalov
2014-08-04 15:52           ` [PATCH] netfilter: nfnetlink_acct: add filter support to nfacct counter list/reset Alexey Perevalov
2014-08-04 15:52           ` Alexey Perevalov
2014-08-05 15:51             ` Pablo Neira Ayuso
2014-08-06 10:41               ` [PATCH v2] " Alexey Perevalov
2014-08-20 13:34                 ` Pablo Neira Ayuso
2014-08-20 18:03                   ` [[PATCH v3]] " Alexey Perevalov
2014-08-24 13:15                     ` Pablo Neira Ayuso
2014-08-26 19:15                       ` Alexey Perevalov
2014-08-26 19:38                         ` Pablo Neira Ayuso
2014-08-26 19:24                       ` Alexey Perevalov
2014-08-06 10:50               ` [PATCH] " Alexey Perevalov

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=1406570272-3704-1-git-send-email-a.perevalov@samsung.com \
    --to=a.perevalov@samsung.com \
    --cc=alexey.perevalov@hotmail.com \
    --cc=hs81.go@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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.