From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84BBBA034F; Wed, 28 Jul 2021 09:22:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 648BB40E64; Wed, 28 Jul 2021 09:22:19 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2066.outbound.protection.outlook.com [40.107.243.66]) by mails.dpdk.org (Postfix) with ESMTP id 1FA4040142; Wed, 28 Jul 2021 09:22:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nC3JpbRl4F9UjFldPzyyJAUDTBZoe+6gwQlrONX8iLlK/T4uy9bXoGXCZyWGEn72jr0vq6/fT86Y0u8KvG8mQozCVvJ5605uTYLzUPdxuz/iNt4RCgdZbtgmrED2jfgNaAZLQyA20c2i0TSjdWEl3BTUwNQAxZMfXNfixAqUqgrCzaQ2W8deIls4BywLzi5ciYM/s2RXwQBEnDcbDCMPOazeDKH/yzF7ukX2eH/zkWgrhWdeRXKnO9vu3IZ+XWIMsQk6l5vYH/E1/yYf4SeOaTgh0Ti7t/KqKG8GkaansAAogQhNdKhXCu4d3zbebmu4GR/7X0GyKKZQrAuveZ9uNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tjE0gYZDepYg8m5ngxZUpTo3FkeM5OnCx7fl6k7cnPk=; b=bMlroxuj6jlp+2SY7xSBtMJS8IHvKNtjf60GoIOOYm0eG96+ABL4X23DvIqGzy1cGP0v4pAy6pOMo0NT01aw7qiVnPDukDaMb75znk6txXbN74X/5UUWewn0dIzIQyp1l/L/Z+alpXkgM3/1ym1+QPMTfNVuRtpTb9oeAcE6FXc9vodJioVyVZ95hFaWS9YdSIVnOz2EgDyWGmxktcXyDFJhE4QZRwQ54pX9objcWe1ZmCLNihPzmV0Tp/BYjeyzCMsNKDv3Tx7U8eaRW1egAzz6imx7bkJATwHKKZOq3rDpx4iYoPmDp0BIVO12j/9cj9gSfODLF1viDeS5OVJuBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tjE0gYZDepYg8m5ngxZUpTo3FkeM5OnCx7fl6k7cnPk=; b=PrnEZPAHtZqRGl6VJUtKWvtPxsL+gpCQOUg18AIcHh/07RhfJpIR+lVLQGk+zXtDb9LgkvvGu6gIWs4m8B31NekDpwKnm5U7wY3L2Gtqb6joeHf3qO++as7BZwaZtOLNTNoubfx8WSpMY1fASP2qiXZQ0t5vWwl/eAwjv1EyC64VXiWPkSQzAVM/TtiXwBBYRXtE/zR42/ThJ8EVGg+eElK6KgDw/cfQZBej5VbLtZb1j2PMipFg60S5bh8SEBqJ+BHF5I7pdBYEU3pawmwSnd2ZAAtPF+DvuPX+tqZAUcmR8F7eJh1+7/FD8VMVk4CnTnEhEbysMjn1a/O4dEAY+A== Received: from CH0PR12MB5043.namprd12.prod.outlook.com (2603:10b6:610:e2::20) by CH0PR12MB5370.namprd12.prod.outlook.com (2603:10b6:610:d5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.19; Wed, 28 Jul 2021 07:22:16 +0000 Received: from CH0PR12MB5043.namprd12.prod.outlook.com ([fe80::893e:2586:cb76:8603]) by CH0PR12MB5043.namprd12.prod.outlook.com ([fe80::893e:2586:cb76:8603%3]) with mapi id 15.20.4352.032; Wed, 28 Jul 2021 07:22:16 +0000 From: Raslan Darawsheh To: Bing Zhao , Slava Ovsiienko , Matan Azrad CC: "dev@dpdk.org" , Ori Kam , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix queue leaking in hairpin auto bind checking Thread-Index: AQHXgI+oJjQXEUBXIkuSMN0ors1ZW6tYAVTg Date: Wed, 28 Jul 2021 07:22:16 +0000 Message-ID: References: <20210724132711.90109-1-bingz@nvidia.com> In-Reply-To: <20210724132711.90109-1-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 752bfe37-c601-4f79-4641-08d951986dce x-ms-traffictypediagnostic: CH0PR12MB5370: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3gdr0UtxNHVexpCF9Xn1e+3HPgFwwRj9a7LZV0RgMDd1kbhc9C825wlAMpPyylJzmg36nwvWWn21omKe0oLPh13QrZBhxnBWoGCqGVUqX43OXBUzbPeLjMTcpygq5GnlmCmV1j9uK/7+S77+z5Xo0CnSf+god+1cTWtcxmVyqMvuuXwdkcjWwEmFUNsTfu8B4FR53K2Z0SzfwLdWu6YALGTF3a+OWcykYJ6R9OjeuKqD5hIGd82BZOpXD/wstPqPoITxupNPT2t1crkxdBYEjOwV5hcz0vu1ehK4rTd0lLq+zcc5Sr/ssRxY9lynokCUdrOuSlQLSoM9DE0AjDmRPsEz/mt+Ie+8yZjV6Ip2mN/Q7CYRdS2VuTJadsGyQMMoIJUXPolj/h35xgcC4TVMd+FYIw68rnvdmQh2JX3X6afDrBpc6kByTkRBwlgyu4JLJEFpkn6ygQ3MI65O+aJ8GpLy440JP3MXpTU93zOry0K1PFSEUcHralKOWw/ynf0lDIYYHXQImugNFJskojn9UWtLxx15dp7rG/ONKxczt45rFVLGdZ5qrTAzRRyxyjuQoxmHRfuDv7wFFDGU+e4Hz2ekSphpMUVEPQK0SbesLTgdt3iEMOp3D9Qv3m01e+h4BvIVPR3na0IO73x4nIeo8BgsaqNNEeuCBc2+EW4qxUWc9iww/tLFjlS8fHWZoKaIX+LTMYtuSb7LCaEyqEaeCA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR12MB5043.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(366004)(376002)(39860400002)(396003)(33656002)(38100700002)(122000001)(86362001)(6636002)(6506007)(26005)(71200400001)(53546011)(186003)(38070700005)(55016002)(8936002)(8676002)(9686003)(4326008)(450100002)(478600001)(316002)(110136005)(5660300002)(54906003)(7696005)(52536014)(2906002)(66946007)(76116006)(83380400001)(66476007)(66556008)(64756008)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?n/lRVd5+N3gEuVSRMfItWjpgLCpQ+kylSO31wNaZpZOBiexT+LaaFW5RQGES?= =?us-ascii?Q?YxqdO+IcdoDr/xmg4bjCcecLndxQHjDaU6DJVPdSFzZHv7TO2sI9x9vFe93n?= =?us-ascii?Q?rH9KdK9j5YeIqFfP12f2f74PRLeFG+X5agdNnsdY7X2KCsEMRoJsCbwee0cw?= =?us-ascii?Q?AGE/7AOwEfRZI+oe8h5tTmfx/WhdAbqn7ukRzmB/dsY4vfWt73KXXRA2yJbA?= =?us-ascii?Q?csVHRwf/QwKS+AWxE72fjFM4+6pCMbwVnlAq/W08qAGRWIc1YKiTcQe5asdO?= =?us-ascii?Q?LHBep++VfD/Xm+zdOoEaWSGUCTQrFsYpqdSboYfpeCRBNyaJ4b86HMWu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pOUP+Rhe9L/lDuiv5gecpG36EPf9772GuXDS2YOLBOno0S?= =?us-ascii?Q?rF2I93tYf+i81Ue40aCKCXhcHJApawSQJjE0XOd4YbqO/m3UoAxrya+UFWW/?= =?us-ascii?Q?t+5OQezBCwUuVocyiciW7Fn+?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR12MB5043.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 752bfe37-c601-4f79-4641-08d951986dce X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2021 07:22:16.7325 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uIpD6h2oqUktHpgqZkfep2UeP2LFoVV/xSqQxqNTRLEwuxotBsUY3KU0deB5FDLd4TBDjhjkREFoVijihCWDzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5370 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix queue leaking in hairpin auto bind checking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: Bing Zhao > Sent: Saturday, July 24, 2021 4:27 PM > To: Slava Ovsiienko ; Matan Azrad > > Cc: dev@dpdk.org; Ori Kam ; Raslan Darawsheh > ; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix queue leaking in hairpin auto bind checkin= g >=20 > During the start up stage, the hairpin auto bind was executed for > each port. All the Tx and Rx queues configured for this port should > be checked to confirm if the auto bind of hairpin is needed. > 1. The queue is hairpin queue. > 2. The peer port is the same one and the peer queue should also be > with hairpin type. > 3. The manual bind attribute is not set for this queue. >=20 > If the queue is not a hairpin queue or it doesn't need to be bound > automatically, the reference count should be decreased by 1 since > the count was increased when calling the mlx5_*xq_get(). > When the peer port is not the same, it means that no auto bind is > supported and the mlx5_*xq_release() was missed in the current > implementation. >=20 > By calling the release function before continue, the count is > correct when calling the device close. >=20 > Fixes: aa8bea0e3455 ("net/mlx5: add conditional hairpin auto bind") > Cc: stable@dpdk.org >=20 > Signed-off-by: Bing Zhao > Acked-by: Viacheslav Ovsiienko Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh