From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74DE1C77B73 for ; Thu, 20 Apr 2023 14:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjDTO3Y (ORCPT ); Thu, 20 Apr 2023 10:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjDTO3S (ORCPT ); Thu, 20 Apr 2023 10:29:18 -0400 Received: from out-30.mta0.migadu.com (out-30.mta0.migadu.com [91.218.175.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 539112D78 for ; Thu, 20 Apr 2023 07:29:13 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682000950; h=from:from: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; bh=k7NjeuOrzXsyKXKq3bVHuxMShaNaz429aFeukD1YjvU=; b=Rozfqwj+zNgYyF4174o5S3m4FsESK9y58V6AMBfe+3lx8QNRdj/bIZwXuTxgDievbmOsAn 6JEYpKq/WxkIzq4Ym2QcBa9iBxK63W7RTkhNO6iiqudvuIuR+0q0PY1U7aWYFsRXQ/CZXa RU5HhvWUJidSoiDt9XqgquEJX0eM9vY= Date: Thu, 20 Apr 2023 22:28:59 +0800 MIME-Version: 1.0 Subject: Re: [PATCHv3 0/8] Fix the problem that rxe can not work in net namespace To: Mark Lehrer Cc: Parav Pandit , Zhu Yanjun , "jgg@ziepe.ca" , "leon@kernel.org" , "zyjzyj2000@gmail.com" , "linux-rdma@vger.kernel.org" References: <20230214060634.427162-1-yanjun.zhu@intel.com> <29e1ed5a-091a-1560-19e5-05c3aefb764b@linux.dev> <17efd2ea-d0f9-a95c-a593-b989d8a45434@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zhu Yanjun In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 在 2023/4/20 2:01, Mark Lehrer 写道: >> TCP without net ns notifier missed the net ns delete scenario results in a use after free bug, that should be fixed first as its critical. >> >> Sure. I also confronted this mentioned problem. If I remember correctly, >> a net ns callback can fix this problem. > I'm not sure if the bug fix will be this in depth, but I have a > related question. What is the proper way for the kernel nvme > initiator code to know which netns context to use? e.g. should we > take the pid of the process that opened /dev/nvme-fabrics and look it > up (presumaly this will be nvme-cli), and will this method give us > enough details for both tcp & rdma? Please check the netns callback functions. You will find all the answers to your questions. Zhu Yanjun > > Mark > > > On Tue, Apr 18, 2023 at 10:19 PM Zhu Yanjun wrote: >> >> 在 2023/4/19 8:43, Parav Pandit 写道: >>>> From: Mark Lehrer >>>> Sent: Friday, April 14, 2023 12:24 PM >>>> I'm going to try making the nvme-fabrics set of modules use the network >>>> namespace properly with RoCEv2. TCP seems to work properly already, so this >>>> should be more of a "port" than real development. >>> TCP without net ns notifier missed the net ns delete scenario results in a use after free bug, that should be fixed first as its critical. >> Sure. I also confronted this mentioned problem. If I remember correctly, >> a net ns callback can fix this problem. >> >> Zhu Yanjun >> >>>> Are you (or anyone else) interested in working on this too? I'm more familiar >>>> with the video frame buffer area of the kernel, so first I'm familiarizing myself >>>> with how nvme-fabrics works with TCP & netns. >>>> >>>> Thanks, >>>> Mark