From patchwork Tue Dec 10 22:02:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13902166 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A2B6E7717F for ; Tue, 10 Dec 2024 22:02:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2AAD6B0096; Tue, 10 Dec 2024 17:02:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CAE6E6B008C; Tue, 10 Dec 2024 17:02:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B24916B0093; Tue, 10 Dec 2024 17:02:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 91C756B0089 for ; Tue, 10 Dec 2024 17:02:40 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 38D11A0FA2 for ; Tue, 10 Dec 2024 22:02:40 +0000 (UTC) X-FDA: 82880423472.01.EE6EF2E Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf07.hostedemail.com (Postfix) with ESMTP id 10AC040010 for ; Tue, 10 Dec 2024 22:02:14 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=U3VeWMEj; spf=pass (imf07.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868143; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=oAoRcxFx6r3qiWDnRBBsiLzbuwo4yEAyTzO1K822O7I=; b=TMvexKHqmjPsqXJ1oHC6tULEF3WUkJxSbCSlNsIqDl+GeOquCM5bZhO2TCpb/ixObl6SOj jgBDZfTBbkWEhQv9DAqO62cOU5k39y7ZFq/8SA2piZlAFIp36GQ3GSXOuUeZQzTQD4VBmc 19Y9X9N6PSrFv/UyTrVt8Jxxbl31oTY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868143; a=rsa-sha256; cv=none; b=w+9Q4DjyTG787wQp8C2BQk5oB9KiMVjqVTR4xdt17zbCO2Z2LHGdBgLSexC4BF2u4Vkldh DiitY4lzIRUbF61zfzQuqSYPUrACZLA0sunz7jfJizvfRTadHaDjw2WReu+2OGq/tE6tTY CTfOD0VMr1p4eh2rB095y7fqaKc46FU= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=U3VeWMEj; spf=pass (imf07.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 8EC1F2047228; Tue, 10 Dec 2024 14:02:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8EC1F2047228 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868156; bh=oAoRcxFx6r3qiWDnRBBsiLzbuwo4yEAyTzO1K822O7I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U3VeWMEj1NoccyfU44IlXr+eH+dIb+Y1FX88FHYXU4q03PECflKzMMc2KhmQfWdxA 2LtcSsTBowp5J1k4JjK8tQOvB5yIwMjDbVNHxvHTREwcCEJZMCYyv+0rZVYLLCY+lW lVwyzMWVt2MunqqkcT6KDTr1TpTutKDRbWdkcUjw= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:32 +0000 Subject: [PATCH v3 01/19] netfilter: conntrack: Cleanup timeout definitions MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-1-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 10AC040010 X-Stat-Signature: 83u1j7fdfrk3oyz7eqssi67x7pbuemea X-Rspam-User: X-HE-Tag: 1733868134-612507 X-HE-Meta: U2FsdGVkX191eFiTwUXTJnDIYfAm1ELryF6sAq57kYuBJogDpWCuWzmDO1fNkEV6mf77sYm+yO//8TuE4qRX6KWtI0SZWq6nMXftExk5QEL+rHreKJRl4e5OC/DTip3X0rcK5jCg1TFlj3O/9cySn304SFua40wwtW0Id5CT5a00FZqdvJQGuRhUjUQom2FkANRmMz/XY/oh5MPHPANwcfANuNAHCXWCawOTJC9PlhiltQa9StcucqgQ6RoekRYeSmjgt4EUphTzaPm1PG3MEjuWxNUe2Y2PfAlW4pIBGAQLHaPWk7WJqov3q+0qKZyUg33zDC8X0jlo1WUsdswK7Hd80vPAatd21TOMS+Jr+1jYmibUAno/kJW0CG5J8G3VPKz6xRFsrVAE6OpfqwyZdkYzABKWYW+gY9Kv3ajausa6SgZCmYbPmLpNhqriGfRtpAp9DoiEIvGYJemOf7ks/+Kh8+HAbjPUmJAqlMEoHAFim2ihcisqzWvgI53rhYUPU5WD1u31enTKBSaSmk8w6+o4wzsX47CNfIRitWz5f4AjqQTnLlWrBWjVHHRrm3+z8QinN9H6PgNciD3v5D0MBgVN5mxoMNoG+iIcCjTUI6vHKgEhz9ZmeHdFXQtvWM9dX+F/ZEy+TW6IqV4/r00ZI3KzYT31q05IW5oTbXPclu811iyMD3IeHgQW4U8mYDR/yD8jwen25JF2U698kU2H4jE25tg4OuTyoY9OBXdhZ8oZDhGalPPNGIEei5TXEeciMQFK/WbWje9cmSQdVjJibbXkXlIj9u1iXYEKkWuCghi0snZijTRKkd0ylhOWP7iAIS/QrkDjrUOMQKtCP6g/EBQ92IIBRCGYG3rzxeaD/kKbhUvSSMrPnlf8qybEInvooD2gQ3mMR3VtpQz756AETxO6b+318tIzS9e8aELqKyiwVTcgg2+nQRwwzNKhjRXwyftPrQ1MM/TGeS7P4MT 3DkjoE3+ OLPjIZSwf+lsQdOZLfMQujENmV68zq0RCtdwWG+5wrbDPNxtTS9MZlE7LyAsY2OwK05954bTWPh6TcyHg1abi09/otzRJ/bYrv6Cv52XyaYGDT086JCexSlKyGfHrdNFlZuKBP3EYQnvMgVtoUOWTfrNWtPetya3jeai4BLr5a2AQPaoQrZIYEaL5x0YZdBwkTeYZQjnc86/wYeq0V5x2fVarGbTE5tAb2awbb/NekUt2zViDH6cz6/dkrlaelF+4SDOSMZwYjHM1RKtApge7SSVdD2FhctdOyo1/vhcqFM647X3ZSrqdOS6oMhYmiYDPAZqHMmW/uyfM7UeteA3PB63PWw/KCA9oS9UPr+IQQY2Tu1eCHTp7BPEhCgiJ2BWMXN2R X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 --- 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..7c6f7c9f73320dd208bd0940f539bd9e662e62d0 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(30), }; #define SCTP_FLAG_HEARTBEAT_VTAG_FAILED 1