All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Perevalov <a.perevalov@samsung.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, mathieu.poirier@linaro.org
Cc: netfilter-devel@vger.kernel.org,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	alexey.perevalov@hotmail.com, '고현성' <hs81.go@samsung.com>
Subject: reset nfacct counters
Date: Fri, 25 Jul 2014 12:05:12 +0400	[thread overview]
Message-ID: <53D20FB8.9050606@samsung.com> (raw)

Hello Pablo and Mathieu.
I would like to thank you for quota with notification implementation in 
nfacct.

But also I want to discuss about resetting counters value. Right now 
nfacct has 2 way to get counter
NFNL_MSG_ACCT_GET and NFNL_MSG_ACCT_GET_CTRZERO, last one is intended to 
nullify accumulated counter.
It resets counters with and without populated quota value. After commit 
683399eddb nfacct really operates
with 2 different entities: pure counter and quota based counter. If so, 
why not to operate with it separately,
maybe by some filter (flag).

Also it was strange for me, why reset is not a command of command line 
tool nfacct, like get? Ok, if it's an argument of get, why not it's a 
flag (attribute) in netlink serialization?

Why I'm asking such questions. My use case requires periodic reset of 
the counters, also I have quota based counters and I don't want to reset 
them.
I could work around it from user space, for example, I could get quota 
based counter before I'm going to reset counters, delete it and key it 
in after counters reset. As you could see too much operations. Or I 
could could avoid reseting, but in this case I need to operates with 
deltas in user space and it's not robust in situation when my daemon is 
restarting. Every variant in user space leads to more run time complexity.

And my final question, will you accept a patch, which will move CTRZERO 
to netlink attribute and CTRZERO will be expanded to CTRZERO_OVERAL, 
CTRZERO_COUNTER and CTRZERO_QUOTA? For both kernel side and user space 
part (nfacct tool with libraries).


-- 
Best regards,
Alexey Perevalov

             reply	other threads:[~2014-07-25  8:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  8:05 Alexey Perevalov [this message]
2014-07-25 16:01 ` reset nfacct counters Pablo Neira Ayuso
2014-07-25 16:39   ` Alexey Perevalov
2014-07-28 17:57   ` [PATCH] " Alexey Perevalov
2014-07-28 22:03     ` 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=53D20FB8.9050606@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.