Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5252298pxv; Wed, 21 Jul 2021 00:36:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEMBBxpFCBeo4CMl9ToC8yqOgLP+X2s7IVEQQyaJPcGqQQ0KdJYrJ2Gyu8r/5jnpZcVXLY X-Received: by 2002:aa7:cd5a:: with SMTP id v26mr45777446edw.287.1626853016988; Wed, 21 Jul 2021 00:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626853016; cv=none; d=google.com; s=arc-20160816; b=hR27wt1MuWB1XZdKEHfKdBsRYf9RfTUV2QQkChV12jFQdD4faM26DU3nTAQ9/bRNVT G+0Ia/4iqCriqRIxaZHE7unLSKeqD5II8j1OChIYt4+hKuG+LIw/XOzhFW1k6j/N3tN5 51euiaGs8Ay+6rWJ0RsSwVjHvsD6srKf0qUcLzu/rLDc47xwCVvI7KUMaRPv0RMfbxNJ yaLHzXxWueWdDQ0SC8LuHI+pCGd8lj30xRlHb6u/D6w1/OlGiwMC4kwdwyW9PHUtf3j+ LwbPOSrZGjjxM+89AZB30hRTAV6oocqvBCjVHySyvVb82G7cmip4fTG5K7AG38bo9CVu LoIw== 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=O4oTaYnfC8yC8u5xVcdJY0AUTjlzhM8LhSXGel+cRQw=; b=KnGBwl+jqNOdn9qVNUfEvhDC5vjckKXGDf+9ntnKDJwR73x4O0/bHoHugxfbkMS6EW o0t8r+ScUgA7CpYqUAFiqc4RO5uhYULGi/tA4X8XbS2nqHhbUN/m6pdtU7LNjmu8TIbv Bnq2QRXwC23y0IcFXDKyZUNK9PGyU/rOFafVfBFI7mbrfBpQS9eDETujU6CDsPBaaonm gKD4NcZTmporvJl3mIFt6RpIQJk1XUSP2qqlI8MqDYXyrJHci8aaajDMO3xmwTbZfiAH AkQQ7Yd6yRAFxEguiBNyyIjCU8VCaG2qp834STRNVuHTgP2ZstN2ORlBY0L77E7o2B5Y Xgdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WK0GEeAw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a26si8681979edr.155.2021.07.21.00.36.31; Wed, 21 Jul 2021 00:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WK0GEeAw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235310AbhGUGxN (ORCPT + 99 others); Wed, 21 Jul 2021 02:53:13 -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