[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/21] netfilter: conntrack: Cleanup timeout definitions
- To: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxx>, Julia Lawall <Julia.Lawall@xxxxxxxx>, Nicolas Palix <nicolas.palix@xxxxxxx>, Daniel Mack <daniel@xxxxxxxxxx>, Haojian Zhuang <haojian.zhuang@xxxxxxxxx>, Robert Jarzmik <robert.jarzmik@xxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Vasily Gorbik <gor@xxxxxxxxxxxxx>, Alexander Gordeev <agordeev@xxxxxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxx>, Ofir Bitton <obitton@xxxxxxxxx>, Oded Gabbay <ogabbay@xxxxxxxxxx>, Lucas De Marchi <lucas.demarchi@xxxxxxxxx>, Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>, Jeroen de Borst <jeroendb@xxxxxxxxxx>, Praveen Kaligineedi <pkaligineedi@xxxxxxxxxx>, Shailend Chand <shailend@xxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>, James Smart <james.smart@xxxxxxxxxxxx>, Dick Kennedy <dick.kennedy@xxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Kalle Valo <kvalo@xxxxxxxxxx>, Jeff Johnson <jjohnson@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>, Marcel Holtmann <marcel@xxxxxxxxxxxx>, Johan Hedberg <johan.hedberg@xxxxxxxxx>, Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>, Ray Jui <rjui@xxxxxxxxxxxx>, Scott Branden <sbranden@xxxxxxxxxxxx>, Broadcom internal kernel review list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Xiubo Li <xiubli@xxxxxxxxxx>, Ilya Dryomov <idryomov@xxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Miroslav Benes <mbenes@xxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, Joe Lawrence <joe.lawrence@xxxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, Russell King <linux+etnaviv@xxxxxxxxxxxxxxx>, Christian Gmeiner <christian.gmeiner@xxxxxxxxx>, Louis Peens <louis.peens@xxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, Naveen N Rao <naveen@xxxxxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>
- From: Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Nov 2024 21:26:18 +0000
- Cc: netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, cocci@xxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, intel-xe@xxxxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, ath11k@xxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-bluetooth@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, live-patching@xxxxxxxxxxxxxxx, linux-sound@xxxxxxxxxxxxxxx, etnaviv@xxxxxxxxxxxxxxxxxxxxx, oss-drivers@xxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>, Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 15 Nov 2024 21:26:48 +0000
- Dkim-filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 33C45206BCF3
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
None of the higher order definitions are used anymore, so remove
definitions for minutes, hours, and days timeouts. Convert the seconds
denominated timeouts to secs_to_jiffies()
Signed-off-by: Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>
---
net/netfilter/nf_conntrack_proto_sctp.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c
b/net/netfilter/nf_conntrack_proto_sctp.c
index
4cc97f971264ed779434ab4597dd0162586b3736..6c95ac96fa42a39acafb5b88a7cf8898010e911c
100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -39,20 +39,15 @@ static const char *const sctp_conntrack_names[] = {
[SCTP_CONNTRACK_HEARTBEAT_SENT] = "HEARTBEAT_SENT",
};
-#define SECS * HZ
-#define MINS * 60 SECS
-#define HOURS * 60 MINS
-#define DAYS * 24 HOURS
-
static const unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] = {
- [SCTP_CONNTRACK_CLOSED] = 10 SECS,
- [SCTP_CONNTRACK_COOKIE_WAIT] = 3 SECS,
- [SCTP_CONNTRACK_COOKIE_ECHOED] = 3 SECS,
- [SCTP_CONNTRACK_ESTABLISHED] = 210 SECS,
- [SCTP_CONNTRACK_SHUTDOWN_SENT] = 3 SECS,
- [SCTP_CONNTRACK_SHUTDOWN_RECD] = 3 SECS,
- [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = 3 SECS,
- [SCTP_CONNTRACK_HEARTBEAT_SENT] = 30 SECS,
+ [SCTP_CONNTRACK_CLOSED] = secs_to_jiffies(10),
+ [SCTP_CONNTRACK_COOKIE_WAIT] = secs_to_jiffies(3),
+ [SCTP_CONNTRACK_COOKIE_ECHOED] = secs_to_jiffies(3),
+ [SCTP_CONNTRACK_ESTABLISHED] = secs_to_jiffies(210),
+ [SCTP_CONNTRACK_SHUTDOWN_SENT] = secs_to_jiffies(3),
+ [SCTP_CONNTRACK_SHUTDOWN_RECD] = secs_to_jiffies(3),
+ [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = secs_to_jiffies(3),
+ [SCTP_CONNTRACK_HEARTBEAT_SENT] = secs_to_jiffies(3),
};
#define SCTP_FLAG_HEARTBEAT_VTAG_FAILED 1
--
2.34.1
|