Received: by 10.213.65.68 with SMTP id h4csp2112096imn; Sun, 8 Apr 2018 20:01:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/YiegLY6iYQ3xUkLvXVS9VAt8EIDTKnE07HrhjPzhiO8IU+LdFxGQfn8iDt5EyAXftP6HM X-Received: by 10.99.149.83 with SMTP id t19mr23758918pgn.433.1523242901213; Sun, 08 Apr 2018 20:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523242901; cv=none; d=google.com; s=arc-20160816; b=O93YEdPJEy+AwxKJ6v2kLjZ6CFTgi89UOtCBgHPpKiAal3QY1TuHYig96Ix48U//8O GMCjYGeMC9I+q97ACuFmTwNyRcSuDW2aeIQSUCRAJUM/CgbStGrg40+6OG7xSQlMWKqO 47hM4AuVZ9wqfT5N6zqK1i8uxxLNAYJO+atdpkb9jc4jJesL0E53cP12Hry3qztwG5M6 vRpbxjvLL1i5rH90gx5rc6bOHwW5hV5cuAANANDDB3VNo0qDPv15/rmlLr1yCCvkXud4 uqN1i5ebjztEtGNtOSrcFG4PaZDEeKCbCqavzlA5VjZaJ9HZnK9ws9Cvw5ujrZr/EEDC xxUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=DBgz58YiBpm94d6sjbuup15R1ZuMvhomyz8bdvpP+wo=; b=i9Qjdg2+Oj07g5uzazYPsaYGeRTssAP1SG7sOZzoZFuIwz3OqiwhQsE81fZZLDbcRG t8TVJNRKkiELhwnKczQvElV7XqH8c87a4vB5YF/Vu16APE8h6Se16/13YrAQ8dg0G5jL IVYHP3ARfMN+YA687lp2ZufQn/gIBPC7fJMpPA9jBvqUKmReebCZ3p5QXQHyGM5C3flN SbovzVQ01uu+qgF4SzmM6qC0FCcZtTmA9Z4Eq5wd674wXBlk7M89qlcK6plBm/MDP5X7 0EaHBbydIKLnlu3QC68FJBJWz8gQ678BZuWQ78eVLknZ1oREHYRGAonzQ9MjFUhQTXQs n47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lTRJ6wg4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22si10258396pgv.684.2018.04.08.20.01.04; Sun, 08 Apr 2018 20:01:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lTRJ6wg4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754681AbeDIAWP (ORCPT + 99 others); Sun, 8 Apr 2018 20:22:15 -0400 Received: from mail-sn1nam01on0118.outbound.protection.outlook.com ([104.47.32.118]:31261 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754656AbeDIAWL (ORCPT ); Sun, 8 Apr 2018 20:22:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DBgz58YiBpm94d6sjbuup15R1ZuMvhomyz8bdvpP+wo=; b=lTRJ6wg4G5BEsZr9gRsUnGK5mXff/RS48yawen9RiQpoAbkdUZ3rkppQEdbq8cP9tHk80QtcihEyC+QRpz3krmrm97sER/sJXbeZ5VekOMnmxv8EXvlCu77xAOxLYWJ5RLeffMsOJ1GbTJPgHLqrEZYRr80J4eLby0j0tEAowLY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0966.namprd21.prod.outlook.com (52.132.133.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:22:07 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:22:07 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Mustafa Ismail , Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 021/161] i40iw: Free IEQ resources Thread-Topic: [PATCH AUTOSEL for 4.14 021/161] i40iw: Free IEQ resources Thread-Index: AQHTz5h+HvcEtPQ3pkqPkluDE3p5zQ== Date: Mon, 9 Apr 2018 00:19:58 +0000 Message-ID: <20180409001936.162706-21-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0966;7:TitWfRybo3tqfFZ/EEYkx3p+f2MHH0dCyqGAb9S1Dslzsy9vXBMt72kpOBL61IKrewKPCHkCM9PwPgj/Nm0p5WrtJL19D1ETMGDHmoznfxBKf7T2+QqrfQEdzMEdMJdozWQTLf7FBN8+FdpDTV0Gaqq7lAevm+VaDSUsHFJh6q35edB1PyxEItDBQcblZzE7OWYGwsIKiQ6eJgCHwEg3rekWS68Kxq6HljaU+qfC5rgFNUtwZQE5KLQkBIwd9EM5;20:5pKOVmScr1s/l04agDkor3krHoT2GiEk+BvW6+v+uRYQWWGJZukuoLxTa6uwmYOkSBr514xD/Z7jGyMq4imFva3fEjkNGMKn1DKfz8gFdmPgXv/v3ktgEZQ386d4yAOvMUajnHIhh6KrotesO7kbyidzoSGGedQcOORoOHokrB8= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 99c18996-5bcf-49a3-6559-08d59dafedf2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0966; x-ms-traffictypediagnostic: DM5PR2101MB0966: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB0966;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0966; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(39860400002)(39380400002)(396003)(366004)(199004)(189003)(6512007)(316002)(59450400001)(6436002)(186003)(6666003)(2900100001)(8936002)(486006)(6486002)(6506007)(10290500003)(81166006)(22452003)(25786009)(1076002)(81156014)(53936002)(106356001)(10090500001)(5250100002)(107886003)(102836004)(76176011)(8676002)(66066001)(2501003)(446003)(476003)(36756003)(99286004)(575784001)(478600001)(86362001)(72206003)(2616005)(68736007)(5660300001)(305945005)(3846002)(6116002)(26005)(86612001)(14454004)(97736004)(3660700001)(4326008)(2906002)(110136005)(54906003)(3280700002)(105586002)(7736002)(11346002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0966;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: G9MXybc/vP1kTsAM1doChu5HJQwpf3+7Y5VZ5q4Rsf1LrQq4fVEw71TjbK6hPMm1go+cY5DpAh8thhlQ1ZDRdLG4sPcZTwS8yeuXwZ7a/A7+JOuq0E0aBeodd4+m6VgG9/fEx0EL0BVuIBbFJdxN/kY0zZyUcglu31nPyZ3oC12ox7ulPZUsxPhSmMqY1ylWMxZnxz1jPUXC7SL4zOZp8Y7HW7ZTQnnv0PKAjGsjePJUyr786DkkLrn8DTcHqLAm9zeXyjNvplhnfDnDklPi2Dk4ZVJxmLuEf0z2Kdoh48bbQpoXacAu9A5LPgvyUpwu5sjVSyRyOti05rB+gjwOqae6qioRtRRyPxoop9uq2wP7IPBw++uXzIsrySSabY0LGYL9+R3OG4o20uiBm1w10xTHK4BFxS2yathLCE/YHyo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99c18996-5bcf-49a3-6559-08d59dafedf2 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:19:58.2543 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0966 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mustafa Ismail [ Upstream commit f20d429511affab6a2a9129f46042f43e6ffe396 ] The iWARP Exception Queue (IEQ) resources are not freed when a QP is destroyed. Fix this by freeing IEQ resources when freeing QP resources. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/i40iw/i40iw_puda.c | 3 +-- drivers/infiniband/hw/i40iw/i40iw_puda.h | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/= hw/i40iw/i40iw_puda.c index 59f70676f0e0..74c7f6879084 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_puda.c +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c @@ -48,7 +48,6 @@ static void i40iw_ieq_tx_compl(struct i40iw_sc_vsi *vsi, = void *sqwrid); static void i40iw_ilq_putback_rcvbuf(struct i40iw_sc_qp *qp, u32 wqe_idx); static enum i40iw_status_code i40iw_puda_replenish_rq(struct i40iw_puda_rs= rc *rsrc, bool initial); -static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw= _sc_qp *qp); /** * i40iw_puda_get_listbuf - get buffer from puda list * @list: list to use for buffers (ILQ or IEQ) @@ -1480,7 +1479,7 @@ static void i40iw_ieq_tx_compl(struct i40iw_sc_vsi *v= si, void *sqwrid) * @ieq: ieq resource * @qp: all pending fpdu buffers */ -static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw= _sc_qp *qp) +void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp = *qp) { struct i40iw_puda_buf *buf; struct i40iw_pfpdu *pfpdu =3D &qp->pfpdu; diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.h b/drivers/infiniband/= hw/i40iw/i40iw_puda.h index dba05ce7d392..ebe37f157d90 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_puda.h +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.h @@ -186,4 +186,5 @@ enum i40iw_status_code i40iw_cqp_qp_create_cmd(struct i= 40iw_sc_dev *dev, struct enum i40iw_status_code i40iw_cqp_cq_create_cmd(struct i40iw_sc_dev *dev, s= truct i40iw_sc_cq *cq); void i40iw_cqp_qp_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_qp= *qp); void i40iw_cqp_cq_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq= *cq); +void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp = *qp); #endif diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband= /hw/i40iw/i40iw_verbs.c index 62be0a41ad0b..9e7ae7161d2f 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -428,6 +428,7 @@ void i40iw_free_qp_resources(struct i40iw_device *iwdev= , { struct i40iw_pbl *iwpbl =3D &iwqp->iwpbl; =20 + i40iw_ieq_cleanup_qp(iwdev->vsi.ieq, &iwqp->sc_qp); i40iw_dealloc_push_page(iwdev, &iwqp->sc_qp); if (qp_num) i40iw_free_resource(iwdev, iwdev->allocated_qps, qp_num); --=20 2.15.1