Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2900947pxv; Sun, 18 Jul 2021 05:02:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUCUFXEnhwjLvrSlbdD8GZeSfiNsSLK/TamoiioB7u45QYjzESd02V6LhNmw1UthS/ZhOl X-Received: by 2002:a92:cf48:: with SMTP id c8mr4436035ilr.237.1626609743875; Sun, 18 Jul 2021 05:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626609743; cv=none; d=google.com; s=arc-20160816; b=UloW87tCZAdDheOta/iuKJR1KEqjKx7m3kOZMmZWpBZCzKPLM0fvrj1E7IMwJavLF1 2C3F4Zy6zL3f4OrPHupmqqPDoHcoszFMu9WmuC9u8d1eR19AUuOhSNtW++Wj0DDtES4q 6t0w2WR4/Kf3LAH3Lq060uWzmBKdoCix2NCo+3In/R62SkyRT+c1ii1ITs2Crbh2VSSR JfGz7VJSNoxeIO+J8vvtvgPnwwOx6mvtusDdiT4ViO86dvC3d/ismVjmr7fNGdxAzBs8 qEb5KaubszDrc0fgFOqsQ1mhlat7Lt8SW6oN1L/3QsdmnA22sG4ipuRK/Lqt7aK3qSkP Ad4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tKQcRfATi1/XA8rX+CfhLB1WwxvnF9m5kgkGfXKh4Bw=; b=tbTenB64irah5SkI2Le+9NLci9s0/Vis+wBntB4r36OrWNXAoqwjmV7z9k/rF3Y400 ZS+ec+x+H67CspYnZncx39hGYCREsB1VRx1GPmpxDQnlXAvYPX3JyOBw6G/wY5TeTd7o TGxFZdz38vmsNfjBWFUsf4EcixJu1lQ5NHrBtaubpRdAV1p10tAYu4/C3SB5Hp8Y4xgX YX806wBJLt4quYzXNMXyR9/U/FsFdM4JrAVuydFSGm7OVBusQcpuzv3tlrfUUDgQKRQ8 4KllclyspqRVtkvzM3wRLWxplwFaZcci/GUmzIJ5cl5eQrEhr+2bcTwJm51yeTv18TAq +gfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bZ5pskIi; 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 l17si7554699ilk.49.2021.07.18.05.02.12; Sun, 18 Jul 2021 05:02:23 -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=bZ5pskIi; 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 S233486AbhGRMEP (ORCPT + 99 others); Sun, 18 Jul 2021 08:04:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:43776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233207AbhGRMEJ (ORCPT ); Sun, 18 Jul 2021 08:04:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B30661040; Sun, 18 Jul 2021 12:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626609671; bh=GJuYpZMRTHfFLNa7JNXRDusueVpqq8y27R1sbmIH9FA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZ5pskIiwy0XBmI3ZM4T3/ZaEDaoRPcfq4decPldtSAUqxIcEIClJrI+NpEF9qosj 1jVcZmbcBH+YUJVxuBP4n3Ms8X7wqI8zXwg2QT6pIB1pfXmAwMR43rd9Et4f2bjP2L segjRptxmvUCYhcw9gwEnp83w0zOl1aM5UtCbbSpjqyI1+4AhiUeu2SSiIFigvNhbz CoI1anJRd1gcZSSQMi1ECnkBSjE4wgeURdIjDzm/OPEy05m/A8JdRWxjW6KJ19ImkI xY1ve2BaRKnkb5NWMjc6JbcA9Ia34i66v+G9Ayr3Srco4AJPhsKWy6wFms8q7kR6YL PAS0pGyGavtDQ== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , Adit Ranadive , Ariel Elior , Bernard Metzler , Christian Benvenuti , Dennis Dalessandro , Gal Pressman , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Michal Kalderon , Mike Marciniszyn , Mustafa Ismail , Naresh Kumar PBS , Nelson Escobar , Potnuri Bharat Teja , Selvin Xavier , Shiraz Saleem , Steve Wise , VMware PV-Drivers , Weihang Li , Wenpeng Liang , Yishai Hadas , Zhu Yanjun Subject: [PATCH rdma-next 2/9] RDMA/hns: Don't overwrite supplied QP attributes Date: Sun, 18 Jul 2021 15:00:52 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky QP attributes that were supplied by IB/core already have all parameters set when they are passed to the driver. The drivers are not supposed to change anything in struct ib_qp_init_attr. Fixes: 66d86e529dd5 ("RDMA/hns: Add UD support for HIP09") Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/hns/hns_roce_qp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index b101b7e578f2..c3e2fee16c0e 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -1171,14 +1171,8 @@ struct ib_qp *hns_roce_create_qp(struct ib_pd *pd, if (!hr_qp) return ERR_PTR(-ENOMEM); - if (init_attr->qp_type == IB_QPT_XRC_INI) - init_attr->recv_cq = NULL; - - if (init_attr->qp_type == IB_QPT_XRC_TGT) { + if (init_attr->qp_type == IB_QPT_XRC_TGT) hr_qp->xrcdn = to_hr_xrcd(init_attr->xrcd)->xrcdn; - init_attr->recv_cq = NULL; - init_attr->send_cq = NULL; - } if (init_attr->qp_type == IB_QPT_GSI) { hr_qp->port = init_attr->port_num - 1; -- 2.31.1