Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5313660rwd; Mon, 12 Jun 2023 03:18:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7nVrksNj0YeaP+hBYMvHOf3V+DPdG7qLYshjD+W26jhrKGu7JzCw+YxYfeguc6ov1xf2ei X-Received: by 2002:a17:902:e5c5:b0:1a6:b23c:3bf2 with SMTP id u5-20020a170902e5c500b001a6b23c3bf2mr8302243plf.10.1686565117054; Mon, 12 Jun 2023 03:18:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686565117; cv=pass; d=google.com; s=arc-20160816; b=0nvaBpCYEfYSMGwR5QelJif2A4+RneHJPu9OmfxiWdkAtN7TXhrFG55cfwP/5o5HL3 1KDFRFkkxQOq3XdTN6kvuSTR0JpluYKg4JdQ1zuEOLufKNJhD8RmLOLM2iWVn5xeefu2 jxFDed40uc/gLI26qAtZIqrlctw9iF7X4m4GcOjic+whXmlYmYs1UAvihRttPKzs0/hH L8+7KiB9IEJN+DcjNTh7WhL+tYKWHWX0d9S5+eZsNL7Ycx7/Eep6LECIaponzG42pb1W wcXfRsD+ByRblneb8xQiJhnPb6g021L8o7oDgtnnRGVno0qNXIwaq0puFze81j7kB/aU OipQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y+qsI0/KbDSkBlqrT41X2UQPZ+jE42Injv9dBFiMUG8=; b=OYw6tG3sxS6e6ZAEcOhRoeNfu4g+5D8Kc5xTBuDwpCBX1zfdldTPF5Nnrs7g8UikAl nEHyfRsFdG0y1rqATdC2SiSDPrsx5eKDx70Q3UPB9nJgpdlgyKP0qU3xp7apJd9VknZW gsW4FfjWWc0t2fAwE30kPpQTRtU3XoY5LKqO4l1CPbdPL1x2zVy04EUxJZchd7G8dBwv k7u6qGUnDzwz/o0FvPXx0kdJ8+HG6gsvWgWO1v1yBzm6wCzrb2CbbMFkvm9Ph39Cnnlx 8Ka8tLmxvod2tie/HPZfSSHwQ9XeFtrg0tpsDIEk+erTOe5LE61uUuoD2W0QLadiWY7S y8RQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=tAEw5UUk; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a170902c20200b001b3bb856353si2560516pll.257.2023.06.12.03.18.25; Mon, 12 Jun 2023 03:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=tAEw5UUk; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236437AbjFLKKZ (ORCPT + 99 others); Mon, 12 Jun 2023 06:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239473AbjFLKJL (ORCPT ); Mon, 12 Jun 2023 06:09:11 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2125.outbound.protection.outlook.com [40.107.220.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED5759C5; Mon, 12 Jun 2023 02:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YXDoG7HgKZjECxQV+XD5foQD3O0b03gm0ijT+1jibS/VnqoC4mJrSZzhMKTtM4u8XjaXGTCCWioPdFH9MG5qkG8mQXjaOj6duoEa1HzWVAS9ylgdiRNTcQmgd8Did/lZzhXDiue486lks9O4Z3aHWGlYTVyYm1jhrC5ajV61H9PGhaNOdC57RSihBUXeKmraozuAl6QdJUjY01eVaqpOzTtiwT9x58k6zQJoaj3Ohc5b8ve2RqcLeyDH5n2s4q28aH+iD2hC4gBPgqcWzPMxhYLZoI1BFt4iIUa1LOGuaCmVy92w4Ld5faDULe8+iK9JT/vEWZNczk+nj5WnYOvZKQ== 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=y+qsI0/KbDSkBlqrT41X2UQPZ+jE42Injv9dBFiMUG8=; b=StBMPN4S9qn8G2/ezdk0/n0ma2Pj2onPOyZtAxi9ZRsysUHUdvPH6E26Y66+Vkgv5n6/U/SgBp7dMdcn0I39z3eg4ANYmnLLqWN2WB66vE3bndLYyzI9S519YGWKS87ssyKD3rGgBgSiDPVS+xSQH0mZxImjvrPBb1HdK3gQchgGxpdHboiQ/c9Os5DmwsOmrSJ5h6BWFSf9r7hdrcNu5v++bT0srMuUHEbmfMzLJIfSV0JGWXsbGWayVR009GKuVAz9CkC8QVgG3uiGbJHdHV1q8Q2XGoYqd6xmZWtYZvwASimgCfVaOr4MUR9m+9cfCJGZlOYmbw+3f7AbScatWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y+qsI0/KbDSkBlqrT41X2UQPZ+jE42Injv9dBFiMUG8=; b=tAEw5UUk6YX7vvhnwCzXrX4UjQ+5s8gUkjh13yW4zCiFhEdS6UZezpP30mSSZ3+09GMTOgQ7Wdjre/j+kA8cMbU4RGWUmh0ZsBt/R9RDgTcboNeMvAI6TrZmqZdM4t4Ao82hJfA+GVDEtMmRsm9SKy1oeHIGjrCSQzbsaOLSwl4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SJ0PR13MB5845.namprd13.prod.outlook.com (2603:10b6:a03:431::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Mon, 12 Jun 2023 09:50:06 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%4]) with mapi id 15.20.6477.028; Mon, 12 Jun 2023 09:50:06 +0000 Date: Mon, 12 Jun 2023 11:49:57 +0200 From: Simon Horman To: Bobby Eshleman Cc: Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Bryan Tan , Vishnu Dasa , VMware PV-Drivers Reviewers , Dan Carpenter , Krasnov Arseniy , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH RFC net-next v4 4/8] vsock: make vsock bind reusable Message-ID: References: <20230413-b4-vsock-dgram-v4-0-0cebbb2ae899@bytedance.com> <20230413-b4-vsock-dgram-v4-4-0cebbb2ae899@bytedance.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230413-b4-vsock-dgram-v4-4-0cebbb2ae899@bytedance.com> X-ClientProxiedBy: AS4P192CA0037.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::28) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SJ0PR13MB5845:EE_ X-MS-Office365-Filtering-Correlation-Id: 67ec92b3-8f45-44c1-052a-08db6b2a66c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nllal47Yx1/rCcD3jHKJEby+jGgsgJwAUOB2kAMH4XhRx41a9KlvxeBKJbfCBXYr7SI+C6r8qCh/FVmJ328LvS3G6TjFLdSP/wmVF2S1f2jXcq6Ch9XAZ+FAZuRjmi5pBIzG258kak+UsvPA6ziUs1XZYtN9SutGIW5tkXL+94sgqx0EyNo4U7kCAJxC7lYM/eM+iue/IZVCh24zsu2HEMsplqbzU82FhSunaWj/n6lFkF68c5ax6EzS1ufRvIk9TtUWtyMJmNOORus1RL1Ro/gdJyCD33ENQzOwFUm58lmAg71vmS8jLkVrJQTce61L0lEPNFh6y2aKdRQpxBnYM3Hs3+EZD0auOxeae04egsf+1ZT8bqnAWESqIw73zTUo3eFvHSRB+mQfw1wYXwksHhm8Qa+4xlPfbD8XBvkbRH7kGH44pt77Bq4vT8MomqckqftOJ1b22MiFlK1U6MVkOctE36G95W4Yq7cJqmj8RQBSFx2FSKTRYKui9CNeOikkoS0YGUvU2c1JWugl+6hb8ZJS1EE/YmiNc0GgdyBkfEzBPupX8R2QDmhsXHRzueaePr94Co4FClbTRHraqT8gutui0xdcOk5b2rGrFVtd9WE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(39830400003)(366004)(346002)(376002)(451199021)(86362001)(186003)(83380400001)(6512007)(6506007)(2616005)(6486002)(7416002)(6666004)(8676002)(8936002)(5660300002)(478600001)(36756003)(54906003)(2906002)(38100700002)(44832011)(4744005)(316002)(41300700001)(66556008)(66476007)(6916009)(66946007)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2lwW5HCcQLNa/S+M3zGbCXFxvCAKc2WDtM4e7Oc3qbySL/DEMqxFeg5EsTfM?= =?us-ascii?Q?dZaXTX57PRvNW7ftYHqZICb7hWUA5kC2VaCY/EPqrjL491QxUtaL1e/x82n3?= =?us-ascii?Q?9QB00BPIPW44D8BvFhFGoFAbctUkm+JOPCoGrLR6ZnZZeGeHR79mEs7wTg1J?= =?us-ascii?Q?ysxCriSpxUe5sbF/aRE+ZzmKxWJzMfJqOHEszo0Vhl/9nZvJ6RbP/TirQyMo?= =?us-ascii?Q?T7svj7gg0GcQcsasZKBkC37GzBTp3hPkLx/B66ohktROCmojwCHA2HYUBcpK?= =?us-ascii?Q?dAKCgAAvc/dqlfAEHQ1FIw8ERMDpFRMf+ycduwRhQWKrpEqPb2lKIWgjsZlM?= =?us-ascii?Q?qbEjs03XpTWyiT78w4RolGkNfPGEDdTCEpZQVxjMQ55bzzKOIB8v3glfi9BL?= =?us-ascii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QzZmn0kRflXr4nSQc1gwjVhrApVX?= =?us-ascii?Q?zvnpZOsPkyo6MB/tklapgzmOXoLYb8o4oKVNo6d2ZXZr38PGNkD0jvR3donr?= =?us-ascii?Q?WHA15kvbxcRaR0S00Gqsj/nVBcfDhSZiLCMnSpK118NBy06leLoPJ3eH+HRs?= =?us-ascii?Q?STwo/EfrmX4S1N/CrJcyXbUVhVXdC33Dzi8PknfY8LhzsaYXZwSrSS6bU2S5?= =?us-ascii?Q?J4TC2112IjdD/cvQF2H4i+D68VUD5hnNh1UN5cNXZDQOEXzp58R4o85u/a2C?= =?us-ascii?Q?zEYiSwRWVSGLPmKTA5e6PeYsQun2s1WXg7yK9UgKuI7Yxdj4fkyKGPe2BXTz?= =?us-ascii?Q?vrmxC2Q3WGXd8i7qeRDas5vsjfTC1HF7hbBguPIGh8I+cUhbUXPe8O11iXRi?= =?us-ascii?Q?xVthdQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67ec92b3-8f45-44c1-052a-08db6b2a66c6 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 09:50:06.3106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kCrVqd4eD7bpj6h6/LLn9SaROZmV06Cl5tDV8z3MZZCeAxg2evJ9uSB86bpYlfnHmF74o1GIP5CkBTZ6dp8kN0S7RHY3FoO/Y0uKtECJSTs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5845 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 10, 2023 at 12:58:31AM +0000, Bobby Eshleman wrote: > This commit makes the bind table management functions in vsock usable > for different bind tables. For use by datagrams in a future patch. > > Signed-off-by: Bobby Eshleman > --- > net/vmw_vsock/af_vsock.c | 33 ++++++++++++++++++++++++++------- > 1 file changed, 26 insertions(+), 7 deletions(-) > > diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c > index ef86765f3765..7a3ca4270446 100644 > --- a/net/vmw_vsock/af_vsock.c > +++ b/net/vmw_vsock/af_vsock.c > @@ -230,11 +230,12 @@ static void __vsock_remove_connected(struct vsock_sock *vsk) > sock_put(&vsk->sk); > } > > -static struct sock *__vsock_find_bound_socket(struct sockaddr_vm *addr) > +struct sock *vsock_find_bound_socket_common(struct sockaddr_vm *addr, > + struct list_head *bind_table) Hi Bobby, This function seems to only be used in this file. Should it be static?