From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Roi Dayan <roid@mellanox.com>
Cc: netdev@vger.kernel.org, Paul Blakey <paulb@mellanox.com>,
Oz Shlomo <ozsh@mellanox.com>,
Marcelo Ricardo Leitner <mleitner@redhat.com>
Subject: Re: [PATCH net v2 1/2] netfilter: conntrack: Move nf_ct_offload_timeout to header file
Date: Mon, 3 Aug 2020 13:03:17 +0200 [thread overview]
Message-ID: <20200803103916.GB2903@salvia> (raw)
In-Reply-To: <20200803073305.702079-2-roid@mellanox.com>
On Mon, Aug 03, 2020 at 10:33:04AM +0300, Roi Dayan wrote:
> To be used by callers from other modules.
>
> Signed-off-by: Roi Dayan <roid@mellanox.com>
> Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
> ---
> include/net/netfilter/nf_conntrack.h | 12 ++++++++++++
> net/netfilter/nf_conntrack_core.c | 12 ------------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
> index 90690e37a56f..8481819ff632 100644
> --- a/include/net/netfilter/nf_conntrack.h
> +++ b/include/net/netfilter/nf_conntrack.h
> @@ -279,6 +279,18 @@ static inline bool nf_ct_should_gc(const struct nf_conn *ct)
> !nf_ct_is_dying(ct);
> }
>
> +#define DAY (86400 * HZ)
> +
> +/* Set an arbitrary timeout large enough not to ever expire, this save
> + * us a check for the IPS_OFFLOAD_BIT from the packet path via
> + * nf_ct_is_expired().
> + */
> +static inline void nf_ct_offload_timeout(struct nf_conn *ct)
> +{
> + if (nf_ct_expires(ct) < DAY / 2)
> + ct->timeout = nfct_time_stamp + DAY;
> +}
> +
> struct kernel_param;
>
For the record: I have renamed DAY to NF_CT_DAY to avoid a possible
symbol name clash. No need to resend, I applied this small change
before applying.
next prev parent reply other threads:[~2020-08-03 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 7:33 [PATCH net v2 0/2] netfilter: conntrack: Fix CT offload timeout on heavily loaded systems Roi Dayan
2020-08-03 7:33 ` [PATCH net v2 1/2] netfilter: conntrack: Move nf_ct_offload_timeout to header file Roi Dayan
2020-08-03 11:03 ` Pablo Neira Ayuso [this message]
2020-08-03 13:15 ` Roi Dayan
2020-08-03 7:33 ` [PATCH net v2 2/2] netfilter: flowtable: Set offload timeout when adding flow Roi Dayan
2020-08-03 10:33 ` [PATCH net v2 0/2] netfilter: conntrack: Fix CT offload timeout on heavily loaded systems 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=20200803103916.GB2903@salvia \
--to=pablo@netfilter.org \
--cc=mleitner@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=ozsh@mellanox.com \
--cc=paulb@mellanox.com \
--cc=roid@mellanox.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 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).