From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 74497A0350; Mon, 11 May 2020 15:59:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C4441C1A9; Mon, 11 May 2020 15:59:00 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2053.outbound.protection.outlook.com [40.107.20.53]) by dpdk.org (Postfix) with ESMTP id 3F5BB1C19B; Mon, 11 May 2020 15:58:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZrI8vudkwx/LnjO6mtjuIQtjYAkrJVBF1YFWrEv+lq2lJoEopMBUx7tGKZEif1kxbr0+JXeNjxIfxu8qponJoufn89xotrwlP0pvjmExWgliKUQYP28pVYxU6iY6C3E/2P4ycut78VTEb66VDtPbIOtTjLL3P3N/5iR36/uBIlD1H8WVHeq45UhBKQrl58Jj0KUZ7TynvWxy0vVIVCkT3dieiE9y4CIhUy8EZOsitdTAu5ATKNlFYcKwmnsqibkW+P/+5RO2CQU/WQwnLNuRlfWzS0seYe/N0QDI/5m/fZZcBX2z/NQPvE8m2T1ZAN8UjwLoO8nw+BV4YvUSBteejQ== 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=Yg5WHYvrV7zQbTSqFGqfP9gLvMD+JqUoBruw6Rh8pqI=; b=emtAoVEU2HW1gNNenoZa5+kmDNSoGzlTQYIhtsQ6dQyY69vVDNHbsNzSVXvP23cRIVAhxio30aurbrYKi3MHwtanaSBnxeW5utF5LjnhVWxSUIRLGdytJY3/ZFuOVYfwNiAC+tvvgcIYXJlwuCmwJ41zshzv4iHLbWOnqOMGArU388gKrh5zNCcRppOUkJPpWLjjBraD5WnscobcX+8umSYY4KyVN+bMJXrz251G5x6/+5r7qhKO1wjlrUAiZ4cXKRMW3zEAw92xuXQuEt+qESaj5VoxL+CjBL2V40rEYoejwe0syqdwx8MnpTxsMENiZD94CJpPiXLBh+CiLEruTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=Yg5WHYvrV7zQbTSqFGqfP9gLvMD+JqUoBruw6Rh8pqI=; b=CXGSwj6tBGe+ZmdSjOUnfnRR7McUq69N8NzTdIcZBXIqs2g3slAFjHhfsUiXLRQxvUeHFv1uUI3XOSCAKB2r4A4iJC0kGu3VuDRb6l+g3aZxuO0xCaQao3nImjrIBFF1BmO6MbyRmCuPbnkhjpyyLKEAF+RCUCGKwqdrocqbdnY= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB5857.eurprd05.prod.outlook.com (2603:10a6:208:128::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 13:58:58 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 13:58:58 +0000 From: Raslan Darawsheh To: Alexander Kozyrev , "dev@dpdk.org" CC: "stable@dpdk.org" , Slava Ovsiienko , Matan Azrad Thread-Topic: [PATCH] net/mlx5: fix TxQ release debug log timing Thread-Index: AQHWI9G65X7CAaNJfkGMXTqCGw19Zaii8OUQ Date: Mon, 11 May 2020 13:58:58 +0000 Message-ID: References: <1588788659-25462-1-git-send-email-akozyrev@mellanox.com> In-Reply-To: <1588788659-25462-1-git-send-email-akozyrev@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [188.161.229.217] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 106ed106-b62c-4c20-7bb7-08d7f5b37387 x-ms-traffictypediagnostic: AM0PR05MB5857:|AM0PR05MB5857: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-forefront-prvs: 04004D94E2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9paVgXmy5yNzts8yctJ9DIJVKmqXDuZunnkPOROELNXXrCRrxtQteBkcXLAPHOTArw2JZBwZ9zmwumGWlBiUqSNxQ4cMsjQVLqPd6dWo4I02FA4+r1maWj/YcTDHGav7c0jgGjjKSjt1Hd0rq/YgsBgonpGFaAQdTXGT371ZFXPWOkkvKYLiGemwX8fz3hHHLom4Ah8ECyCwO3cqAQ0pEb5pWPbvwl4qVHVg/F7K8LNr4W9/ZS847/N/0vJCqxOKehvcAk3Bl7KAxn5VqDKUsBpDEAt51faq8CdMoubcY4JUHnYSJLm0zLyLKpn5WfSUAscmXBEmPh0kCIa+PfEP5ybyHOTautDpFHB3tIs5f25tkccM7exWcq+jMWXkvVqFW6SXAfc7FeayNTcHdWrr7r+UprclCgG7VJsgglKhbJR+QAzC0KNk6pNgZGWHxycmlK2w4vOlduoUcqpa5rE5OjavXriWjP1CnJ4Zg5RFbUwSQ0A2aiy6mVLxoK4H8vAm5TmObWb4bqBZ/6gFEiux/g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(346002)(366004)(376002)(396003)(136003)(33430700001)(33656002)(7696005)(33440700001)(55016002)(9686003)(71200400001)(86362001)(478600001)(4326008)(107886003)(450100002)(5660300002)(8676002)(2906002)(8936002)(186003)(52536014)(76116006)(66476007)(66556008)(64756008)(66946007)(6506007)(53546011)(66446008)(316002)(26005)(110136005)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ZOCfYJtVVdfjtLFxbYgDb0owkhucZxRW85NVOUiDVe6fnFNXauCN63e2Lwa9eUdLUd65PD2+kHY2YzKB0Lazr4wKFGLuUbrTrnFbFWRXjMZLYEB862GwmQEBGVMzJOlYzGDOESdMMaDjmiTbZQ6fXc+hnyXDiU5bgmYoHK39Cv1mGBKo6pcihFiZGfGGZinXXaHrdwpN4a4vZ6uQPsx2GOwvcaiDqyzUulOcCeLMvMbHOWxpElfdGEWB4T8SDt4dkFf5AFD25lPp/WyYrG1AgnoMuvOzU0HGarC0iXMAeKuXz+6IU1TZiMkWTRCYbepfewZWZy+rKiVmLKgN50pC69f1KNKzrNnPaZcTdGckttMDXxV3FHi4ekFEAhWETYot49Rpk1D0jOxLOo5WQEBgGYpmgwlpbsCjuKptpf5xA7X2dzuQJCFmublQIij2r9WcRwNK4VsPdHNFp3CUk0B6biCKvg4IU5XPnFGEzlyS6J1Ja+VVuqe01CWKp1T6c9XZ 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: 106ed106-b62c-4c20-7bb7-08d7f5b37387 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2020 13:58:58.0960 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Z556bEXw3RBr8N+XPpqqOkiJGTuwwQYOnxLi/ySSsHS+quVs/AvaiEU9ZY93pPML+ChJ+E9pwGrF71Gyd3AIvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5857 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix TxQ release debug log timing 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: Alexander Kozyrev > Sent: Wednesday, May 6, 2020 9:11 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Raslan Darawsheh ; Slava > Ovsiienko ; Matan Azrad > > Subject: [PATCH] net/mlx5: fix TxQ release debug log timing >=20 > Program received signal SIGSEGV, Segmentation fault. > 0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=3D0x17ce01680) at > drivers/net/mlx5/mlx5_txq.c:302 > 301 mlx5_txq_release(ETH_DEV(priv), i); > 302 DRV_LOG(DEBUG, "port %u removing Tx queue %u from list", > 303 PORT_ID(priv), txq->idx); > The problem is txq is freed inside the mlx5_txq_release() function > and no longer valid in the debug log right after this invocation. > Move the debug log before the mlx5_txq_release() function to fix this. >=20 > Fixes: a6d83b6a92 ("net/mlx5: standardize on negative errno values") > Cc: stable@dpdk.org >=20 > Signed-off-by: Alexander Kozyrev > Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5_txq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c > index 29e5cab..a211fa9 100644 > --- a/drivers/net/mlx5/mlx5_txq.c > +++ b/drivers/net/mlx5/mlx5_txq.c > @@ -298,9 +298,9 @@ > priv =3D txq_ctrl->priv; > for (i =3D 0; (i !=3D priv->txqs_n); ++i) > if ((*priv->txqs)[i] =3D=3D txq) { > - mlx5_txq_release(ETH_DEV(priv), i); > DRV_LOG(DEBUG, "port %u removing Tx queue %u > from list", > PORT_ID(priv), txq->idx); > + mlx5_txq_release(ETH_DEV(priv), i); > break; > } > } > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh