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 9214BC433EF for ; Thu, 21 Jul 2022 18:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbiGUSc3 (ORCPT ); Thu, 21 Jul 2022 14:32:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbiGUSc1 (ORCPT ); Thu, 21 Jul 2022 14:32:27 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D82B8C8D4 for ; Thu, 21 Jul 2022 11:32:24 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id o21so1945421qkm.10 for ; Thu, 21 Jul 2022 11:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=plZzkE3sVJKPIrG+ZssvH+Pp4Zt1kfvaJE33dQ+szwk=; b=kelmMZW70rspOZ4ve+QL9+UhpuyK/YdrSv3cPlIuZOxR9jxM5vhORgz4O4xPUbp6bE kPxLkzJykdA3Uf2YNnBjgGnMvYWVXVxOdHrVdg+bli6CbYeQGRUwerzigJKzzbqXr/Kt Sfxy7DfhUTZo7rMVkVUQZyqF++d/QmdP5Ydupe2pptjiCmmeOP2UtJ9g6CyiWcIzlg7A 5FEo8pauRnJhoqtiEdCdpEsRGrpdN1rGCLVvkS7jU4Yu65aDLKGiMXVjt6A2Mbvb8OVD x5o1Cb+v+Zn1Q4D6ygzzCrIaM4oalDcJXqu2V1Az1f/robb6Flr1boURvNHtiXzjlbgp YrVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=plZzkE3sVJKPIrG+ZssvH+Pp4Zt1kfvaJE33dQ+szwk=; b=eRu3CBaqxQ3nIv2KnMWeT7bftPJAfsex4GjBqziUTBrQIaRf/zteNfm2LbGc9dVwoE QnfDsg7bQ4/n9m76wMBLUkzHk2fyUgHJvndgd9LEQa1jEY5+iTKITEjrtNlMPdHZRzBd aUbEJ0URSTAN4Nf6JbgOqNVFrxYd4QTFFlQcn9SYPlejyuLoFXrspnejg2LeQMtB838F b3q0b+NsTdDVLuv2svq+QRX8yGF6I+STywpHY55ydLZP8XFPYR1OiJeBXicZQ8GeQcVa H4JF6nqLgvHHQItclZVtR6hr6n7F4NHVK/ggBzhIc0M6HEC1iPulCBjYUV/pubYlNRkK g98A== X-Gm-Message-State: AJIora9Mh78wjaXLxYNRGUg/tUbtsysW2KMtnyV5PFzlD3+H+Qsb3V1t a4Fhd6xsxmLwMhDM5GOpGoTk0w== X-Google-Smtp-Source: AGRyM1s1wf2DBh3Ac0CPp9laGRqI69nIHRBtdNRfhtHYjDGfIYlEXSQlXkbTE8vdWpZMN7KD7Xh3KQ== X-Received: by 2002:ae9:eb88:0:b0:6b5:cc0f:1a54 with SMTP id b130-20020ae9eb88000000b006b5cc0f1a54mr23562612qkg.330.1658428343710; Thu, 21 Jul 2022 11:32:23 -0700 (PDT) Received: from ziepe.ca ([142.177.133.130]) by smtp.gmail.com with ESMTPSA id l9-20020a37f909000000b006b59eacba61sm1853932qkj.75.2022.07.21.11.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 11:32:21 -0700 (PDT) Received: from jgg by jggl with local (Exim 4.94) (envelope-from ) id 1oEayB-0001np-Q0; Thu, 21 Jul 2022 15:32:19 -0300 Date: Thu, 21 Jul 2022 15:32:19 -0300 From: Jason Gunthorpe To: Long Li Cc: Dexuan Cui , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Leon Romanovsky , "edumazet@google.com" , "shiraz.saleem@intel.com" , Ajay Sharma , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" Subject: Re: [Patch v4 03/12] net: mana: Handle vport sharing between devices Message-ID: <20220721183219.GA6833@ziepe.ca> References: <1655345240-26411-1-git-send-email-longli@linuxonhyperv.com> <1655345240-26411-4-git-send-email-longli@linuxonhyperv.com> <20220720234209.GP5049@ziepe.ca> <20220721143858.GV5049@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2022 at 05:58:39PM +0000, Long Li wrote: > > > "vport" is a hardware resource that can either be used by an Ethernet > > > device, or an RDMA device. But it can't be used by both at the same > > > time. The "vport" is associated with a protection domain and doorbell, > > > it's programmed in the hardware. Outgoing traffic is enforced on this > > > vport based on how it is programmed. > > > > Sure, but how is the users problem to "get this configured right" and what > > exactly is the user supposed to do? > > > > I would expect the allocation of HW resources to be completely transparent > > to the user. Why is it not? > > > > In the hardware, RDMA RAW_QP shares the same hardware resource (in > this case, the vPort in hardware table) with the ethernet NIC. When > an RDMA user creates a RAW_QP, we can't just shut down the > ethernet. The user is required to make sure the ethernet is not in > used when he creates this QP type. You haven't answered my question - how is the user supposed to achieve this? And now I also want to know why the ethernet device and rdma device can even be loaded together if they cannot share the physical port? Exclusivity is not a sharing model that any driver today implements. Jason