Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5248134pxv; Wed, 21 Jul 2021 00:29:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+rZNjEfzeQRbW7mKMf2zy4dRnlwGEdKWsHzK30VGN5gGaJiP0bYZ4MWQuUF2ZEJ1XzEZ2 X-Received: by 2002:a05:6402:5170:: with SMTP id d16mr46054477ede.300.1626852541718; Wed, 21 Jul 2021 00:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626852541; cv=none; d=google.com; s=arc-20160816; b=T7/j5mX1Axqx4UBu0mf9txnBIZalVGgy4PWu3eMjyAcTgcsDYqAxnlx/kZtJvYBF1H 9k7jVpn0AkDF9GqiE9hPInI5nFcQ65kf1Dp8JHg1dQCf74IcbEX4sAjdm7PkGDI8nkh+ oS8hbr8jWjTOEo3T6ya87Z1ksvIokRwtB6ZCg/fDdzAO1V7EqABp0AwN2h7Do3RhPjAM OlHeYy8Fpnp90hmzyYst8yXddCZhZdQVI0QHv5Sf1coy5VApyaqmgl6cf6qfNvtYimtF yTwnYoZXvBkLAoLe5UI3FHgGSz7+PYhGbdqQIaNsByS/CpQxoPR9GAGU6AqoQb6KI9Qy 9NSg== 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=jvEUbpJ8TCtLelW8CVjzfn7aO1stF0egZ5Xqu/e2sSA=; b=H0arFYUtks4Q1mc+RSt/h2JyXCnmnyJ5yfiOFz4kguTzIFtUrRC4g5/EOL6eRU73lN wiGyYhUErBTyUHk6HHZbdoWoCagDdeZcmvV3gy1oiWWxtAxILUKoVn/P9w9z6tQe5ADr 96cZfSddmOD1PVyHU70qJzQSDCYREYtXOz3kwCtXV+OxGw096PrZ7m9j5u87+kDW9LU0 OTerFhSNasoKXXC0oTm9iMOlG8MIpQ3X44WgeKMqhkk/Cb9qC328UnRG6iMwcMdyWvX7 gs5q3OLPsfgR5lOyEQggocAr2s9v6UPeAjg78mSewt09V4dVsbtzBKdBofMsusA/6fOj xsBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qW8hShGi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si29721475ejx.753.2021.07.21.00.28.38; Wed, 21 Jul 2021 00:29:01 -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=@infradead.org header.s=casper.20170209 header.b=qW8hShGi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235504AbhGUGqB (ORCPT + 99 others); Wed, 21 Jul 2021 02:46:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235476AbhGUGku (ORCPT ); Wed, 21 Jul 2021 02:40:50 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80B7FC061762; Wed, 21 Jul 2021 00:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jvEUbpJ8TCtLelW8CVjzfn7aO1stF0egZ5Xqu/e2sSA=; b=qW8hShGi6jgJH5/3/w00cESqOZ t/EtXpoZ7FlwX8rNh/oNFITrVQgdktxf1T0t+3EKBYq8y7m6Kzi2VIxre6PLdyb++1y3p/74Ae8Dp VnFvL62/825cINrbM+26Y1U69gx23Q/32BJ7LLiYeWz7mEuxUpIrdsp/EmBDKPB4Bi3ZU4uPkRUuL Ew9IrnvrdFbzACea+L7Mr7uqf0IvEzLEJMCIdQGhM0o6Nni9SAPF8Zr1hyLxg7rWegM37AvJMmyf4 OFDqe5De4c91xLXRYpyYMw1+XMbJNDUgtmm3sTgCOeClrLQdRCi76DAXj2D6vp+QznCEYpv7GUx4H 9KjoVjVA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m66XB-008v47-0p; Wed, 21 Jul 2021 07:20:55 +0000 Date: Wed, 21 Jul 2021 08:20:49 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , 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: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.