From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20046.outbound.protection.outlook.com [40.107.2.46]) by dpdk.org (Postfix) with ESMTP id 22D742C52 for ; Sun, 21 Oct 2018 11:20:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9lIccNTrR87VaYH4fNtfIRg28CNXCgvk0sYHAVSYlZE=; b=iiom8NqbvID2+yp1VKmIATu0DJo8UJ5fim+8Ah+Ym7q2k+wshzjGrsYtK8V1hg5xTJI0JZm1+itEnCT6SWU7fy/kFoRI6S0jakX3NajOeow83RpG83wPVkGaPbX4felfcF88IN04qpP9UzUCDxv5Jgy2BnS0FALpEFjb/DgLfBA= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4891.eurprd05.prod.outlook.com (20.176.235.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.25; Sun, 21 Oct 2018 09:20:41 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::80e:e6b:baf2:d973]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::80e:e6b:baf2:d973%3]) with mapi id 15.20.1250.028; Sun, 21 Oct 2018 09:20:41 +0000 From: Shahaf Shuler To: Slava Ovsiienko , Yongseok Koh CC: "dev@dpdk.org" Thread-Topic: [PATCH v3 1/6] net/mlx5: flow counters object create function bugfix Thread-Index: AQHUZ79xKEcBifPz60aywXvBDU8CvqUpYEKA Date: Sun, 21 Oct 2018 09:20:40 +0000 Message-ID: References: <1539784438-29242-1-git-send-email-viacheslavo@mellanox.com> <1539962470-10950-1-git-send-email-viacheslavo@mellanox.com> <1539962470-10950-2-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1539962470-10950-2-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4891; 6:3sB6IHlO0KK5dmgDUPAvsX2KzfJrGlC0Wx9C800rd36jSgEpJxYfIU6uzuMLNtBrtHdty3PpWBTo5Ex0i8a78HwZ9sbLV7pMDdGj4RcpfFSsVP/rRBaZcQzEjUFXLKCBgXq6j0/VcXunmDtha3U2YBE8shigyqoYzttWKE4q9f9YeCpdLVcnY4AUPfuMumQpGKSyBxQJKKt7mkiUKPBgWmEP5tRuoFkQXv/jQk4lWvTU1ysAmYbA9QisGaVxkPCVQxcO5cQZ3OjzfZ38HWcXn4KkPjrb9jQ9eXZ2AZzT7fhcsRbhsKpPCBIipv/Y2PdBDfa8K14iRePS/fkkBNnzIvNcAF0USkG88KXVEy8RPYY4cx9pG6ZOrhQx5hQBwf2/SuKuwSSjDkQu3s1WrGqWxXMbJjfsZ2oziNxySMPQYlXHcIt84ca/SLsHgQco4sNaOoPlvC4APVgEB5+9M02igw==; 5:0bSbDNH+ck7iS1pKZS7nNcAH+26aFyx8wHVGjScgZvS0/gqhxWc/OiJa00uVOfl453DAnN5zN8WPVErk/Lr0e/O532kO5oqzXuBtiH4VL/GR935eHErxIMObINvKfdOIuwZGGbfpnP+2+nhtozYclTckkqgjD/0W90zose9xbDM=; 7:QDPvgSQB8jIflFW2Q5+ueKdu6ERL9jh8c6Px+0ejYpqjn5CtZY290hmgbVPb8vcNbvXLp7cCKczFErYIHaEItkUDiAJMJu6UNhwYCfcG8P2SXs700hmVmNg2JgPQ6JQYAEK13d+RGbKB07hqtLJLkgqC9U17H11Jspz2zFef26Z2puqUFpVAf7LoCairbibeA2aeMVCysYuF6oZNZPH5tRsLtZ9qUJGeVIuS7iGP/cDMj2fOGCFy6WQVRdO8C30+ x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 8b0361fa-f2a6-4666-4266-08d637367897 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4891; x-ms-traffictypediagnostic: DB7PR05MB4891: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DB7PR05MB4891; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4891; x-forefront-prvs: 083289FD26 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(376002)(39860400002)(346002)(199004)(189003)(33656002)(68736007)(74316002)(476003)(305945005)(81166006)(486006)(81156014)(2906002)(316002)(7736002)(97736004)(71200400001)(71190400001)(14454004)(6246003)(478600001)(6116002)(3846002)(5250100002)(2900100001)(14444005)(7696005)(5660300001)(26005)(9686003)(76176011)(66066001)(86362001)(186003)(25786009)(102836004)(55016002)(256004)(53936002)(4326008)(6636002)(99286004)(446003)(110136005)(106356001)(229853002)(8936002)(6506007)(8676002)(11346002)(6436002)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4891; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 9mgRxnwrMSqKOmnN0mozahnfCA+TA7nhONW2JdH906HGtGhmaxKKyd2WQsTg4eQXfqe4fmodMjiNUVeYI1M0RL62ahoKhixZKK3c6Ndi/+ovjssGB2IANT8rwIchfP1////lacKER48SSkDX5SCmYxGZUWEXcvzOnYL+w9oVYgJ4b2cm/grSkp4uObbDOv7MegBOEHKcXOZBbNw4m5DE4dhG5SGKfVE8r0XP5z/qbFOoeXj6VcRkFeSRDiQMB9UNSNTUH7uLBBDQjf/26Xtb+ZzYKGazsZqQsHEumIqASpsad8uz2MAwhD/d1emvG/BLEpJyaTTwtKTc6e9mcywBOpVgtAFG+tH4Vr+EQIgs9y8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b0361fa-f2a6-4666-4266-08d637367897 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2018 09:20:40.9133 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4891 Subject: Re: [dpdk-dev] [PATCH v3 1/6] net/mlx5: flow counters object create function bugfix X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2018 09:20:42 -0000 Friday, October 19, 2018 6:21 PM, Slava Ovsiienko: > Subject: [PATCH v3 1/6] net/mlx5: flow counters object create function > bugfix How about: "net/mlx5: fix flow counter creation" ? >=20 > The first part of patchset provides the separate commit for bugfix.=20 No need for this intro (exists on all patches). After the merge, in the git= log no one knows what is a "patch series".=20 Flow > counter object was not freed in case of memory allocation error. The call= of > counter Verbs object deallocating function is added. The initial value of > reference counter is set to one in order to provide the correct counter o= bject > freeing in the flow_verbs_counter_release() function. >=20 Missing Cc: stable Also missing the commit which introduced the issue. On your case need to ad= d: Fixes: 84c406e74524 ("net/mlx5: add flow translate function") > Signed-off-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow_verbs.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c > b/drivers/net/mlx5/mlx5_flow_verbs.c > index 4ae974b..6ddb13b 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -72,6 +72,7 @@ > }), > .hits =3D 0, > .bytes =3D 0, > + .ref_cnt =3D 1, > }; >=20 > if (!tmpl.cs) { > @@ -80,6 +81,7 @@ > } > cnt =3D rte_calloc(__func__, 1, sizeof(*cnt), 0); > if (!cnt) { > + claim_zero(mlx5_glue->destroy_counter_set(tmpl.cs)); > rte_errno =3D ENOMEM; > return NULL; > } > -- > 1.8.3.1