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 6D059A04C2; Thu, 14 Nov 2019 09:22:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D2E0D2C15; Thu, 14 Nov 2019 09:22:11 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140077.outbound.protection.outlook.com [40.107.14.77]) by dpdk.org (Postfix) with ESMTP id 1CB311F5 for ; Thu, 14 Nov 2019 09:22:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EouC4pkFS9aGu2NRqFyBq614CWspzh4ALK9Gsj6bMYBLQWsyFamvJlwz2Yly4v+BmKmIXe1TpAWAoschKwgdzO/D1+XFU1XV0NbxnBSnj4anBNj+8rLcekH342VcIiRcTh669kR5jRdj1VbLwQ5b/CACuSFAgfoYzK948MIKwWaRq/OaPGuK2EaJNa3otzAotMzeIGHdtjjGm71zFtfHNdYi6P2Kj6JUADZ3rJ7/Wj12iywzYLGnKZXJx26kqAv+B4JYdvmlf6cPp88oJbyVr8kNNhxHwb0aLgUcwUQUftQIGw+vf6flaCAsgV3LpvoMeXQ7xShc2EwtVesJKBuTog== 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=6yONxvJ+V2oqTqNRFJ3eC147MB4jG2lTgn/8HSHFXyQ=; b=S8A5OUwdh9fndpsmcE1i6VtIv2veN0vwVSpcoXvg5l7Nmew6x+WPMT2U7ouS20EUHs9yUy6OY4+ervWcVsQWB0keQnCMxScXkt5KKFO7nZMYi/lW/ZIWJrRH+z84zbCj/vJlZ7YPCvWbfd76amuW96gwc1rrTgFn9QhvyVG6q3ymJFJowMM90DTjJwQ1GlZ+T86LQKZBWLEgLL+nxyDfAo42P5JtrtTDdb/uZmRHz96CNLk+wuP0yoaqv+oAGbWb0XuBePvNN/k9U0AN232cZupf2c/4EU9Joe8SzDy8aOnu9KvVN8k6923R5nX2DDhVkL6aTaTe6V3MpB3SB5iG/A== 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=6yONxvJ+V2oqTqNRFJ3eC147MB4jG2lTgn/8HSHFXyQ=; b=Gj3lFip14v9C6YPAqudXF2Kb9MF6AaELl9kj2G7YkcyRUH2gmXJkKuv0dQn7woyKLAjsIA8NJrY/+amFG/ZCs678VBiHLVTzS+aXGOUQrZszo6j2F+VPkj7XBrWcW8YYyah34HKb7JgF2TOOsYId4t/r8wG2APCHSOcimD0s8Fo= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB3979.eurprd05.prod.outlook.com (52.134.67.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.22; Thu, 14 Nov 2019 08:22:09 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::a850:bac9:c90f:f2f5]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::a850:bac9:c90f:f2f5%6]) with mapi id 15.20.2430.027; Thu, 14 Nov 2019 08:22:09 +0000 From: Raslan Darawsheh To: Slava Ovsiienko , "dev@dpdk.org" CC: Matan Azrad , Ori Kam Thread-Topic: [PATCH] net/mlx5: fix environment variable recovery Thread-Index: AQHVmj7qse4dk3jt8UWzPDHJI0ckAaeKVKXA Date: Thu, 14 Nov 2019 08:22:09 +0000 Message-ID: References: <1573662290-23034-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1573662290-23034-1-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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7b6cb5d9-9e43-4508-860f-08d768dbbe0b x-ms-traffictypediagnostic: DB3PR0502MB3979:|DB3PR0502MB3979: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:151; x-forefront-prvs: 02213C82F8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39850400004)(346002)(366004)(396003)(376002)(13464003)(199004)(189003)(52536014)(102836004)(229853002)(6436002)(25786009)(53546011)(86362001)(81156014)(186003)(486006)(476003)(11346002)(26005)(8676002)(81166006)(66446008)(8936002)(76116006)(71190400001)(446003)(66946007)(4326008)(66556008)(71200400001)(7696005)(99286004)(64756008)(66476007)(9686003)(14444005)(2501003)(55016002)(6246003)(3846002)(2906002)(76176011)(6506007)(5660300002)(316002)(478600001)(33656002)(110136005)(7736002)(6116002)(54906003)(14454004)(305945005)(74316002)(66066001)(107886003)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3979; H:DB3PR0502MB3964.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9dILTx8uzlnO+noZzAsHvJAn8/ol6W7qJQM4zH5hOV4r3OGp8aAcYUO286k2oj6J8lheCvKnsehCRcV7OH7X1SVUKMZuq8GBBx1W3Ri4mwMFPGYPeKLLbNS7C0zO4lvgktk2F9oRRPobUfWWdL2Jt3LehwWTKLUsKhaYa3Tkj2CmBABGuxBrBghkCEFqVLuRpZptaiWe4rp9Byp1PJe39FgcCRe+H8KTm5JXm2arTwT/Ne2aF4JyN+o8a6eKtKU5azenBbSsJX3ucyRfehpEOdOhX4JJJbnT4JB3ZeNk5CRQCZuUKXzcA6uDXimrI3Q0x3swTQY30gBF64wqAinK5U+GEje0Zu9OTfqnqENEedqoo0/YiSNWwCxHLNfJ1syH8nfwAGsF4RiiAdb9bhjJnJTsluAYPjmqFGA1TtwtilqqvPuMNWSHWcTOBMcsYVgN 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: 7b6cb5d9-9e43-4508-860f-08d768dbbe0b X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2019 08:22:09.0887 (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: kdtn4cVmL/T7HVGOAOZtQL/f7z+qAGi9L8BooUuKF3csUDSzVxtg8rH5+Bsd84Kl5RB4q4xr2iIDpFL35V1cbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3979 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix environment variable recovery 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: Viacheslav Ovsiienko > Sent: Wednesday, November 13, 2019 6:25 PM > To: dev@dpdk.org > Cc: Matan Azrad ; Raslan Darawsheh > ; Ori Kam > Subject: [PATCH] net/mlx5: fix environment variable recovery >=20 > The state of environment variable MLX5_BF_SHUT_UP was not > recovered correctly if there was no tx_db_nc devarg specified. >=20 > Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mappin= g") >=20 > Signed-off-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index 6ffe951..bafc84c 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -448,12 +448,9 @@ struct mlx5_flow_id_pool * > } >=20 > static void > -mlx5_restore_doorbell_mapping_env(const struct mlx5_dev_config > *config, > - int value) > +mlx5_restore_doorbell_mapping_env(int value) > { > assert(rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY); > - if (config->dbnc =3D=3D MLX5_ARG_UNSET) > - return; > /* Restore the original environment variable state. */ > if (value =3D=3D MLX5_ARG_UNSET) > unsetenv(MLX5_SHUT_UP_BF); > @@ -530,7 +527,7 @@ struct mlx5_flow_id_pool * > sh->devx =3D 1; > DRV_LOG(DEBUG, "DevX is supported"); > /* The device is created, no need for environment. */ > - mlx5_restore_doorbell_mapping_env(config, dbmap_env); > + mlx5_restore_doorbell_mapping_env(dbmap_env); > } else { > /* The environment variable is still configured. */ > sh->ctx =3D mlx5_glue->open_device(spawn->ibv_dev); > @@ -539,10 +536,9 @@ struct mlx5_flow_id_pool * > * The environment variable is not needed anymore, > * all device creation attempts are completed. > */ > - mlx5_restore_doorbell_mapping_env(config, dbmap_env); > - if (!sh->ctx) { > + mlx5_restore_doorbell_mapping_env(dbmap_env); > + if (!sh->ctx) > goto error; > - } > DRV_LOG(DEBUG, "DevX is NOT supported"); > } > err =3D mlx5_glue->query_device_ex(sh->ctx, NULL, &sh- > >device_attr); > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh