From patchwork Sun Aug 13 16:48:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13352185 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A4296FB6 for ; Sun, 13 Aug 2023 16:49:42 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2073.outbound.protection.outlook.com [40.107.244.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EDB5129 for ; Sun, 13 Aug 2023 09:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRlMS3mAbB+HzyOKapd1513r49KAsZtlqqH/cvMiUWKNKFIwAQhXnvvk7+/aLFEiiTRA74sNg3zabvdvESinO+NKty4sqUbhXJMNEWRndAnfyUaIiomejEyXvPbYP3myd4e46yYgyVwY+usmWP348UIpTCpN/Q3+Y5ZLmnZa4lr/lW4NLtz4uHTwcVsNW7EbY1jVEXe4lR9JPxMPBWLesfbxqZsEb6XtDuJy9R2tWdp8FbravYcpvYXRcs3CDs/RaJFr8arGmmASIQLvy87VIsJv5kN6Yaf6Idm4AUFXCmnO+kmBATq6qqwJ6aDTAUFtSPLGg0K/qgBbPwxBdEbTzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wo0RegdHl8+3FeFDq7X6+lWoeQG3vZ3reXPOX6GRfYA=; b=DeN+ITsW4N5dKTv6gVMg723VF/ubJG1l5WMidZTG9f+hRypCE14Ijc7spuhSv+H7YXdSRjujB3jPpXj3BDMhLa0unp34IGsTwgXPbxeErTn1koOBz+wfyzJGtfdIM3PyJoJ8Nf2kaNM0qkY8+CaX3uOB0RX8wTvryEoQAktg84eR6+1XEv7xKeMv95TOWHyG2/9b4PAy7+XMBvteGoYHp9TX1D7lSXi+SXFFnH9P7VwxYsIOCfu0O08k+286NoR2JDSolTiQOFGjC8divalP7C3SMS0e0t5qO8AKRvmCmS3JmaBRZfGG+Cx/LG3CyF7MZZo6Gdb/fXo07zhcv95y0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wo0RegdHl8+3FeFDq7X6+lWoeQG3vZ3reXPOX6GRfYA=; b=FM0kzUJPDNVxkCzO5pDshNB9XLNscds/GXTuwo9wvDTHMv1K7qx7eGAFnuZS2OCUw1gR5YXrsjGYvzZvO44Hse/ISFjA9NEtMK+wdDf2rlye219V3HDaDGGqeh7YMckBLiWpURGPtYRNBA7xBAHA5NNuYrlHdZUhUEsjOKTtF/dTuS8FgD6tQmfKPQ22q7TE7A+8MlJ/rMFI5zidUrY79fyzLBUiQ4kJR7LC4sU+JunreOblHS6jjmOSIyu8PTUveXFouU0aLmnfw7yTck3PUh8EvtdGpolY486RpEAsLtAcqBKwqNJ6l/DCU0+unUbSKITOEuq3DjORkiOJNVCdQQ== Received: from MW4PR04CA0314.namprd04.prod.outlook.com (2603:10b6:303:82::19) by PH7PR12MB7841.namprd12.prod.outlook.com (2603:10b6:510:273::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.22; Sun, 13 Aug 2023 16:49:36 +0000 Received: from MWH0EPF000971E8.namprd02.prod.outlook.com (2603:10b6:303:82:cafe::41) by MW4PR04CA0314.outlook.office365.com (2603:10b6:303:82::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Sun, 13 Aug 2023 16:49:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E8.mail.protection.outlook.com (10.167.243.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.12 via Frontend Transport; Sun, 13 Aug 2023 16:49:36 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 13 Aug 2023 09:49:27 -0700 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 13 Aug 2023 09:49:24 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 1/2] nexthop: Simplify nexthop bucket dump Date: Sun, 13 Aug 2023 19:48:55 +0300 Message-ID: <20230813164856.2379822-2-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230813164856.2379822-1-idosch@nvidia.com> References: <20230813164856.2379822-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E8:EE_|PH7PR12MB7841:EE_ X-MS-Office365-Filtering-Correlation-Id: 18f77933-9256-4a57-90a9-08db9c1d473d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9zLDzTAhnxudOdtGh9J2v03LKT3ZLYzM3ZfP5p0RhBgxwhfvJkfEE6ppf7IISQlLf1XFqghAWTnqV0D6wRtGJQjuQ2h32Lx5KE+Vti9mq+4m1HmDIinxqFn8NxX2oFTHRfUDK6DAjIpLMpFff/Glv0MyFI7yKtRzwfaxBVoicqWwpzf+XHQBwCgiuEJWlJeyakMnERPeUhP0cHP5t43o2ko7tFDdRx65oqqk9F5BtqlWgPGT4OXwvdw4R5vZ1q39HI8Io0cZwa6iWrkVHGfKiYsPUxg1D5wL7a1m4FA08mVDvLOHkFh0lNyiYJUmykC4bBWMacOgyjkL9xhy5yRXlCLBfhGayHrloPDIowHMeZOqS0AmGiody0ej4XJpsNp6kZAxD+QhXS/PP2iyM6YknIx/rmTmChundR8ceKsCrS79qGaZ89neyfagkN/LgHVn+HKXGyVWTycA+iDPdU0mFpqGdjGiWuzbalnXogZoZcTWW+4sFHqsEfe12d4iW1N8wDzhzrarb4EO8UHX8bDiEteZ76lyURqbPbRfErJ3dwRLLJbcRz7s5e0GeNuRZCPOOREmFy8Mx256yxonQnBbKQsV+Bdfszr/nS+wsRenf2KebUQMxmGwdfYyqPywZZAYK4/hvlCcptw6DZkpQb7vv5dFUr2thxXVk9AD8Bd/gT1AwU+Lzn/fQXX2O6IqQyuHQINVQEmepmePjWg5tqQOTsM/n8Q1ZnzixfbebqkziRqXSk1qT2eh3qpnAo+dt/El X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(39860400002)(396003)(136003)(376002)(186006)(1800799006)(82310400008)(451199021)(40470700004)(46966006)(36840700001)(66899021)(6666004)(36756003)(54906003)(82740400003)(7636003)(356005)(86362001)(47076005)(83380400001)(36860700001)(1076003)(336012)(107886003)(2906002)(40480700001)(478600001)(2616005)(426003)(16526019)(26005)(70586007)(41300700001)(40460700003)(8936002)(8676002)(5660300002)(4326008)(70206006)(316002)(6916009);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2023 16:49:36.5321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18f77933-9256-4a57-90a9-08db9c1d473d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7841 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Before commit f10d3d9df49d ("nexthop: Make nexthop bucket dump more efficient"), rtm_dump_nexthop_bucket_nh() returned a non-zero return code for each resilient nexthop group whose buckets it dumped, regardless if it encountered an error or not. This meant that the sentinel ('dd->ctx->nh.idx') used by the function that walked the different nexthops could not be used as a sentinel for the bucket dump, as otherwise buckets from the same group would be dumped over and over again. This was dealt with by adding another sentinel ('dd->ctx->done_nh_idx') that was incremented by rtm_dump_nexthop_bucket_nh() after successfully dumping all the buckets from a given group. After the previously mentioned commit this sentinel is no longer necessary since the function no longer returns a non-zero return code when successfully dumping all the buckets from a given group. Remove this sentinel and simplify the code. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern --- net/ipv4/nexthop.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 09d36bcbd7d4..7e8bb85e9dcb 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -3337,7 +3337,6 @@ static int nh_valid_dump_bucket_req(const struct nlmsghdr *nlh, struct rtm_dump_res_bucket_ctx { struct rtm_dump_nh_ctx nh; u16 bucket_index; - u32 done_nh_idx; /* 1 + the index of the last fully processed NH. */ }; static struct rtm_dump_res_bucket_ctx * @@ -3366,9 +3365,6 @@ static int rtm_dump_nexthop_bucket_nh(struct sk_buff *skb, u16 bucket_index; int err; - if (dd->ctx->nh.idx < dd->ctx->done_nh_idx) - return 0; - nhg = rtnl_dereference(nh->nh_grp); res_table = rtnl_dereference(nhg->res_table); for (bucket_index = dd->ctx->bucket_index; @@ -3395,7 +3391,6 @@ static int rtm_dump_nexthop_bucket_nh(struct sk_buff *skb, return err; } - dd->ctx->done_nh_idx = dd->ctx->nh.idx + 1; dd->ctx->bucket_index = 0; return 0; From patchwork Sun Aug 13 16:48:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13352186 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09C199440 for ; Sun, 13 Aug 2023 16:49:43 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20606.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::606]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65DAE91 for ; Sun, 13 Aug 2023 09:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uj6IbsotqbtSIP9qGgcuCu+KjrUR4dnq68L/yw1lXghF+yaTsOE3kOJ8/i6EzDdX5/n5wGE6psymyiOOXYymeHMSG1hkKJseEGZgvrnI3vPmEiv8f7VEKdHG2RBp6odocervUXm/gStbn508tEV1++NupRS+8EHOuhHI8llSocMpXA3XCdxzBoQvrcUTx8r1hsWEs0ytASknpxO/t0BWm2I2VeosbrkK7oez5nIwDORDcRcc2fuBrh4hcFQEKOs4p1X2m2yVG8C+y0+GSsucIFKE3w5IUi/piULnOqQ0aMFM2gMfUk27F6Qspt4Zik3qwOG1ccgTXHE8q0+SpijCTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YB1oMeL1Gxgbna9b8vmvmlHbkpPiLgZA/Snnst1pDjw=; b=gSpAnmeG0hm2k/dWTqLjLTozIXVYZC7z6ebQSXYdlmb8k6gi50AnIJlAWsDcbS0Ru+nD3HZuNCsUAkioSIGyKpqIlrfN/Z8ZVRfUag71YAOabnolOcpw069QgqnnZhM2ioHaaThtN0J4TXjO+bi/BYYeth9BXw8yQbkHJ7YMPzX5L8HKQZwSzjreAjRrD2hlW5lLmZPG4VdR31oHrBeqRK0q16KqSLJJdUD1mx18amSikv1y5i6RfL+eCm/D28RRKarV05IUa2y2SF/EAHsm9JmY6pixCu1/ByYv9ORZQv0p+6TBmR8hN9mIOyTOGgphXIXCb5v24i0D6/OMvbh6rA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YB1oMeL1Gxgbna9b8vmvmlHbkpPiLgZA/Snnst1pDjw=; b=XXiZ77R30PD39ko1BuLBoqbOuyQMoloycmx9+95JSicwxGT2LYYtzVyqyBDvRHmzEp0HlDTuoQDSNAjQgxvMHg8WWlMQCk5CXA48YbI/18XFG4M0fGQCo9RQ3CEyvmuVo5pxIF32xmAVhU6wPdxSqldXc2jRm3YKWLdPyzHOTZgm58kglfOhurcBN7B0PR5u0+DxDvhhPYQnMSxEuhXivRaKwEbX48fx/oyqMF2kVYL+FQj0mmvt6TvxC8lROvZgowMwv1mPsmYFLCWEkia/B5uQoBpV9gqwe94Ot5CpbZ9FOIcNT1ptR+yx+pJZxhiIOvvuBJma19W7MpecMNQHMg== Received: from DM6PR07CA0115.namprd07.prod.outlook.com (2603:10b6:5:330::6) by CH3PR12MB8754.namprd12.prod.outlook.com (2603:10b6:610:170::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Sun, 13 Aug 2023 16:49:38 +0000 Received: from CY4PEPF0000EDD0.namprd03.prod.outlook.com (2603:10b6:5:330:cafe::1) by DM6PR07CA0115.outlook.office365.com (2603:10b6:5:330::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Sun, 13 Aug 2023 16:49:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EDD0.mail.protection.outlook.com (10.167.241.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.12 via Frontend Transport; Sun, 13 Aug 2023 16:49:38 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 13 Aug 2023 09:49:30 -0700 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 13 Aug 2023 09:49:27 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 2/2] nexthop: Do not increment dump sentinel at the end of the dump Date: Sun, 13 Aug 2023 19:48:56 +0300 Message-ID: <20230813164856.2379822-3-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230813164856.2379822-1-idosch@nvidia.com> References: <20230813164856.2379822-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD0:EE_|CH3PR12MB8754:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ebb311d-2cda-461c-5226-08db9c1d4884 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qm/+JHqXGqJcMd9UIzDIRdFr5AzuuBcetuRsrKayJJC09iDdvVHd8NF7GQAkbwZboa833ZNAFeiYutik2q30WgryTpZB18MmhyKeZa4JFqA5HgJtOi++19lIh8i7D8uQBziZW3dUZAOl/S04cOM4jDoy0rMMbaLMwuxrVKpMq9gbKnm8xWR5jEzjn63rymBryjh4jNtQGLQO4cT2rKA8Or5DajwB31fBkH7JjYW2sf0H2K/W9IsUHcA+4DFmN6FUtzvRMG+dyeAALuObw1BrztQLkqExYfXYS3zZlTV4QExeDbyBN0MEvkrNfujO+EOAq7IVjBMsFKQeJfQhMtHthE22HJ9EQ8313bxuOIeW8dNdmz5rpZykl1zgjTYUW7+Gaf8QAq7hIfuWdqaivznxBHg+ERGqwgnJpE9g8xk6ggXE92K/hMUwXPlfJAjmW9VlP16FUc5HINfkgNSzAIFLTsBMywaPEpYfagovC3RNdhYg7Ryih5P6TH7DYkKm2RBE8LbCFz+GPzGTgJAFbXC9xcC1uVCOS7y+u07bt3cK8R5pRt84CAZeiDULyCjhAeevPiZX/O8SaWEPyo7pTgLs4kjb7KnEJFrbe7/s0zR3JzVlhIzJ8iDL4huwb29/vlhf1FwqymJdZzKXeFi/+8If+vOKYRXmxNppNH/HhuVqAvofCYWIHGRAUJmI+JDFPH2TAc76whKMQfU7sTB+1HXRPLQcO5ADByqkOdacv1ppP+GfUqpjZD328aEUFwAFCHNR X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(376002)(346002)(396003)(451199021)(82310400008)(186006)(1800799006)(40470700004)(46966006)(36840700001)(2906002)(4744005)(40480700001)(41300700001)(5660300002)(6916009)(316002)(4326008)(70586007)(70206006)(8676002)(8936002)(40460700003)(36860700001)(36756003)(83380400001)(16526019)(1076003)(107886003)(336012)(26005)(426003)(2616005)(47076005)(86362001)(82740400003)(7636003)(356005)(54906003)(478600001)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2023 16:49:38.6266 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ebb311d-2cda-461c-5226-08db9c1d4884 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD0.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8754 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The nexthop and nexthop bucket dump callbacks previously returned a positive return code even when the dump was complete, prompting the core netlink code to invoke the callback again, until returning zero. Zero was only returned by these callbacks when no information was filled in the provided skb, which was achieved by incrementing the dump sentinel at the end of the dump beyond the ID of the last nexthop. This is no longer necessary as when the dump is complete these callbacks return zero. Remove the unnecessary increment. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern --- net/ipv4/nexthop.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 7e8bb85e9dcb..bbff68b5b5d4 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -3209,7 +3209,6 @@ static int rtm_dump_walk_nexthops(struct sk_buff *skb, return err; } - ctx->idx++; return 0; }