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 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A06B0C07E9B for ; Wed, 21 Jul 2021 07:34:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81C7E606A5 for ; Wed, 21 Jul 2021 07:34:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235456AbhGUGxU (ORCPT ); Wed, 21 Jul 2021 02:53:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:33690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235270AbhGUGuo (ORCPT ); Wed, 21 Jul 2021 02:50:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8C6160FEA; Wed, 21 Jul 2021 07:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626852671; bh=wWQxKLbViMQ6IioJwrIW6WryLEBn92ln/LclVS/TIuo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WK0GEeAwPG2IcBNUfqoYtOlPZJ+Jfdv8Na3BIvlnR8R8bcjmvmAwEzU+h01OBrmG7 vOYbyxJhrBfCD8Lo72NkyNGNX9Qd9nTedaSbsG4JjblG4r742i1xDPR/LFlnjEetn5 NQbv2VhXIYHebsKJkRRdEXHFQAgge5QCi3OA80ZQun96ryEgjpHF2dDyUML1Sb2dsY rKG/uhf8rAQgMHNoMKFGnjpsMPF91TJsLUZdkAqSUo/B7LpJ0S37WY/qQNADQyHR9Z oSOq3Sa+Mvu2VZLt1wIAg1lQJvl47sovB87grKHRen9KrQAM37Io6skRofd9AxhbN4 ZrRYlwOTrjxuw== Date: Wed, 21 Jul 2021 10:31:08 +0300 From: Leon Romanovsky To: Christoph Hellwig Cc: Doug Ledford , Jason Gunthorpe , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Mark Zhang Subject: Re: [PATCH rdma-next 7/7] RDMA/core: Create clean QP creations interface for uverbs Message-ID: References: <8eaf125d3bfb463e1641b6f2794203cc93d76c90.1626846795.git.leonro@nvidia.com> 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 Wed, Jul 21, 2021 at 08:20:49AM +0100, Christoph Hellwig wrote: > On Wed, Jul 21, 2021 at 08:12:35AM +0100, Christoph Hellwig wrote: > > On Wed, Jul 21, 2021 at 10:06:06AM +0300, Leon Romanovsky wrote: > > > You will need to add some sort of "if qp tpye" for ib_create_qp_uverbs() callers, > > > because they always provide udata != NULL. > > > > > > After this series, the callers look like this: > > > > > > 1438 qp = ib_create_qp_uverbs(device, pd, &attr, &attrs->driver_udata, obj); > > > ^^^^^^^^^ not NULL > > > > > > So instead of bothering callers, I implemented it here with one "if". > > > > Sorry if my mail was confusing. I don't want it in the callers, I > > want it as deep down in the stack as possible instead of having the > > strange wrapper. > > In fact ib_create_qp_user already sets udata to NULL for IB_QPT_XRC_TGT, > and _ib_create_qp/create_qp ignores the caller if the udata is NULL. > So I think you can just remove the wrapper and we're already fine. Yeah, thanks