From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 3/4] echo: Fix for added delays in rule updates
Date: Tue, 15 Aug 2017 13:34:25 +0200 [thread overview]
Message-ID: <20170815113425.GZ16375@orbyte.nwl.cc> (raw)
In-Reply-To: <20170815112756.GY16375@orbyte.nwl.cc>
On Tue, Aug 15, 2017 at 01:27:56PM +0200, Phil Sutter wrote:
> On Tue, Aug 15, 2017 at 12:35:30PM +0200, Pablo Neira Ayuso wrote:
> > On Tue, Aug 15, 2017 at 01:43:04AM +0200, Phil Sutter wrote:
> [...]
> > > diff --git a/include/netlink.h b/include/netlink.h
> > > index 3726171424c33..e7e4bbcfc0f51 100644
> > > --- a/include/netlink.h
> > > +++ b/include/netlink.h
> > > @@ -119,10 +119,7 @@ extern int netlink_add_rule_batch(struct netlink_ctx *ctx,
> > > extern int netlink_del_rule_batch(struct netlink_ctx *ctx,
> > > const struct handle *h,
> > > const struct location *loc);
> > > -extern int netlink_replace_rule_batch(struct netlink_ctx *ctx,
> > > - const struct handle *h,
> > > - const struct rule *rule,
> > > - const struct location *loc);
> > > +extern int netlink_replace_rule_batch(struct netlink_ctx *ctx, struct cmd *cmd);
> >
> > This patch comes with an interesting cleanup, that is that you just
> > pass struct cmd as function parameter.
> >
> > Probably we can do this everywhere in the netlink.c code? I wonder if
> > it's better just to fix this without changing the function footprint.
> > Then, work a cleanup patch to update all netlink_* functions to pass
> > struct cmd as parameter.
> >
> > So we leave everything looking consistent.
>
> This change was necessary in order to pass the required parameters to
> cache_update(). Doing without, I would have to pass nf_sock, cache, obj
> and msgs fields additionally, and the number of parameters was already
> quite big.
ENOCOFFEE: Actually I only use obj field of struct cmd, and that should
be optional since I can also just use CMD_INVALID instead - so I'll drop
the signature changes in v2.
Thanks, Phil
next prev parent reply other threads:[~2017-08-15 11:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 23:43 [nft PATCH 0/4] A bunch of fixes for echo output Phil Sutter
2017-08-14 23:43 ` [nft PATCH 1/4] mnl: Drop --echo support for non-batch calls Phil Sutter
2017-08-15 10:25 ` Pablo Neira Ayuso
2017-08-15 11:05 ` Phil Sutter
2017-08-15 11:48 ` Pablo Neira Ayuso
2017-08-14 23:43 ` [nft PATCH 2/4] netlink: Fix segfault when using --echo flag Phil Sutter
2017-08-15 10:25 ` Pablo Neira Ayuso
2017-08-14 23:43 ` [nft PATCH 3/4] echo: Fix for added delays in rule updates Phil Sutter
2017-08-15 10:35 ` Pablo Neira Ayuso
2017-08-15 11:27 ` Phil Sutter
2017-08-15 11:34 ` Phil Sutter [this message]
2017-08-15 11:49 ` Pablo Neira Ayuso
2017-08-14 23:43 ` [nft PATCH 4/4] tests: Merge monitor and echo test suites Phil Sutter
2017-08-15 10:35 ` 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=20170815113425.GZ16375@orbyte.nwl.cc \
--to=phil@nwl.cc \
--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 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).