Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp831317imi; Thu, 21 Jul 2022 11:50:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sBR4FRVBHQ+ybEZKA3ZMAlYmvjV5fwE5tjCceZBkL7KQlcC17CMQX0m0UywYevZ5+tllMJ X-Received: by 2002:a17:907:2d86:b0:72b:4aee:7729 with SMTP id gt6-20020a1709072d8600b0072b4aee7729mr41554695ejc.143.1658429438582; Thu, 21 Jul 2022 11:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658429438; cv=none; d=google.com; s=arc-20160816; b=lfXylPmjXxEpn3pls4wjBnH1oO31pVjZ0SZleihzfOSyeNxcRSi9/IL8j2lACbxFfB YrH2G3NkwWEWC7ZWnw+kTsVP9aidbyt21lbVmokeUX+wDgkOOU/IybfZJz+eBPQ0eW4s 1b7IoVtLgoZYG2p6N1AXaoswgWGKVsJPMk7tbwNjExJmanpPxEXZfxSKN8FaB2v9zcha dv6zsbZVak/Ea+Zy2l06vZoXHPkh4HjfPB64w3JgJ5r5pcXdyj11OXVMiTwTsLvWt+tL XmGY0aoZIjnLU9sNvD3eMR4S1cj+JEj2Sj+Z9wiasOUu+KSlP0ql1syXTX3dHuijHtbq mggQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=plZzkE3sVJKPIrG+ZssvH+Pp4Zt1kfvaJE33dQ+szwk=; b=EYCVANzttbOmyHQkUR4/m3DiJqL++xI/F03eJttW8WROj60XCIfYtWAbV5IXnEX3kW gZwhyYY8Are1TMXIFVikB+hJ6vKmkfQI1MOjEpqd/Ucmq2WePPr9cEk/0X+eok8bEXz4 qFHy4TCIoF0LQEiN+/ID2ox1tC2XvmdcmXYBV5E7fxFP3oMtsWm0rDLQGyGdG5kNNjz/ FbEV8i1s21XClX/LvOb0U6z0E28+R6TjGiOUB13sLOQacCaxdqJFWIW7/vyF6n1AFm7j 9EPp5sAygmq+h7G//QbsPRgrHaxxqDu9z3ONz+gU1i/Pdq/VNHZayQ8e+hgfNBQccwLt rKOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=kelmMZW7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c2-20020a170906154200b007262b3cd387si2793313ejd.421.2022.07.21.11.50.13; Thu, 21 Jul 2022 11:50:38 -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=@ziepe.ca header.s=google header.b=kelmMZW7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbiGUSc2 (ORCPT + 99 others); Thu, 21 Jul 2022 14:32:28 -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-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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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