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 92562A04F9; Fri, 10 Jan 2020 10:28:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AF2D1E965; Fri, 10 Jan 2020 10:28:43 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) by dpdk.org (Postfix) with ESMTP id 264321E95A for ; Fri, 10 Jan 2020 10:28:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nx0TZHj8cukuVcZWGOCwKgf4/wJeWjb5fYRVbKgMcqvfz5J+6utv2ChC4CjlhztHiVjDl+J2ES40AtWIcNmfJW2/p+vmLxZtQFhXTqM+yCsh1cK6utgX2luZVnyBHv+FlypTDJkCO2jT94a2PyoLRSOFLcqIDcC7I8jzwa753AyL/EzIZciZ+MJ9pN2GUcUeKV+vGPygHT+Yp8L4iyTlncu4DDNvoPodk2w6gHXKPCzAUlVjhtU5+VP4hYG90MNe70BfDD8xN2jUMSzZKvFQByb6cs+0DP+8SbojXTDtM6ur8di4dD0zdo8DVvJJW8M3fD3HMYqWGfJYNSKFXK+3kw== 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=5J/pfQJVWggKrPdJSKeHRgLMEAX2kj33w6510UcYco0=; b=Vwu62w4fK1VHnqseXd8CUXdBkMSZuUl5AQ5pscu7aS8pjCbclBuU1Nz02ZjcUxuNxEoniJkxlL/BquehBX/AxqLHB7O8BU/QnLLxnh+PUyCVIhUhGws0DfqZTiE4RAjk50ySOdaHIUub5gNJO+HEFFbbDgJfZpIMG/42EhjbC1HViEBgUIts4SD8x4BU3OifRHmhVXnyvDWKp4A4Tfg2QqVuh5HhhoZeJqMRkK6TyYil9W3OVGZqGoHqxEQAIwJJJx/D5+gAJZMek+RvZXwn+hF5oRqD+BQDYgNTUN/J9KFLsAtjygtY1pXQe5kG/md54uMUu0ZkTNX3lQTBLaIocw== 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=5J/pfQJVWggKrPdJSKeHRgLMEAX2kj33w6510UcYco0=; b=Thwjet7kakCRCcJM2+dx1FMXAS379nyX02OFwdvMJahzwSooKqENF5ihYtVv4FdnJ6FfHi44LkrSRyYdA/U/qaV7f/CIM5/+okaHo0IYR7YoCp4rCJmQSgtyJubso15ataQwxYlPl77EY/39x5Qo3pahgt/jgpzpr09n7S/BPiw= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3393.eurprd05.prod.outlook.com (10.171.189.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.10; Fri, 10 Jan 2020 09:28:41 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::68eb:ad79:71f4:110f]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::68eb:ad79:71f4:110f%3]) with mapi id 15.20.2623.013; Fri, 10 Jan 2020 09:28:40 +0000 From: Slava Ovsiienko To: Thomas Monjalon CC: Ferruh Yigit , "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , Ori Kam Thread-Topic: [dpdk-dev] [PATCH v2 4/4] net/mlx5: engage free on completion queue Thread-Index: AQHVxtuEBKQevEEzgk6qMuFtgoO8n6ficmyAgAABqCCAAAVjgIAAAF4AgAEjC4CAAADJIA== Date: Fri, 10 Jan 2020 09:28:39 +0000 Message-ID: References: <1578500161-20156-1-git-send-email-viacheslavo@mellanox.com> <35082105.XM6RcZxFsP@xps> In-Reply-To: <35082105.XM6RcZxFsP@xps> 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=viacheslavo@mellanox.com; x-originating-ip: [77.75.144.194] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b2c5fd8d-3403-488f-4f67-08d795af7ac1 x-ms-traffictypediagnostic: AM4PR05MB3393:|AM4PR05MB3393: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 02788FF38E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(376002)(346002)(136003)(396003)(39840400004)(199004)(189003)(13464003)(52536014)(55016002)(7696005)(9686003)(33656002)(54906003)(8936002)(71200400001)(6916009)(478600001)(81156014)(5660300002)(8676002)(4326008)(316002)(2906002)(76116006)(107886003)(86362001)(81166006)(66446008)(26005)(6506007)(53546011)(186003)(64756008)(66476007)(66946007)(66556008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3393; H:AM4PR05MB3265.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: grKOYMDwdSuPKm4NroSLQUJdKbCz1o8mNZvI+hYXTqFmr8J8eBpF1X23cFYogpfgxW0dKEhjuiUUuDtRY4UGToh6iJ/4NwT0JcFPXmgdC5R7cEkwbBYAFH8DYhDPkGtYebC0CTxgTKfB3MWj5CJ4sF6vND3xSTx5uN97XCKk4L82GtceaziDwAlK27j62ZAvVErmhOghCW+3bjLS54VQpuy5+mV1f+VJhMl3V7Jn/FGrF3whYhRDsl/0QoiBYHefKoNFgDQ++HkHGr3x8IQ0HT5o5xAFMe+n6zsVR8p730d6tNRtA4mtN10AKJLkQnjxmjgPTeVIN7PsyXjYAfCDZHDuGjEKguogfTry4EY7nt1PNNAv9smLGzBtTCIIJFiF8emVgYOHAW6fE6NM1FQqe/EDs+7JYd9IJx2AJ5O5rwpaULVBQbpAY25wHWFFbUYE4Wy5u9L6SPJVGPTgmzHkLOjIgZYHDdQO8vkmzZbHAxKyI5JagWLd9s2PKaazqta1 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: b2c5fd8d-3403-488f-4f67-08d795af7ac1 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jan 2020 09:28:40.5530 (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: BERAdF69Hv/ZRKT5NHhNaQYCGgkH/dKyjQiotfb7Iscu2W5F8ASrOfFIMHnYRSzwbx9jKZk073QS9u0B/O7iTDy8C6zmd0BSiwF0wetmegQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3393 Subject: Re: [dpdk-dev] [PATCH v2 4/4] net/mlx5: engage free on completion queue 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Friday, January 10, 2020 11:07 > To: Slava Ovsiienko > Cc: Ferruh Yigit ; dev@dpdk.org; Matan Azrad > ; Raslan Darawsheh ; Ori > Kam > Subject: Re: [dpdk-dev] [PATCH v2 4/4] net/mlx5: engage free on completio= n > queue >=20 > 09/01/2020 17:22, Slava Ovsiienko: > > From: Ferruh Yigit > > > On 1/9/2020 3:27 PM, Slava Ovsiienko wrote: > > > > From: Ferruh Yigit > > > >> On 1/9/2020 10:56 AM, Viacheslav Ovsiienko wrote: > > > >>> + assert(ci !=3D txq->cq_pi); > > > >>> + assert((txq->fcqs[ci & txq->cqe_m] >> 16) =3D=3D cqe- > > > >>> wqe_counter); > > > >> > > > >> And same comments on these as previous patches, we spend some > > > >> effort to remove the 'rte_panic' from drivers, this is almost same= thing. > > > >> > > > >> I think a driver shouldn't decide to exit whole application, it's > > > >> effect should be limited to the driver. > > > >> > > > >> Assert is useful for debug and during development, but not sure > > > >> having them in the production code. > > > > > > > > IIRC, "assert" is standard C function. Compiled only if there is > > > > no NDEBUG > > > defined. > > > > So, assert does exactly what you are saying - provide the debug > > > > break not allowing the bug to evolve. And no this break in producti= on > code. > > > > > > > > > > Since mlx driver is using NDEBUG defined, what you said is right > > > indeed. But why not using RTE_ASSERT to be consistent with rest. > > > There is a specific config option to control assert > > > (RTE_ENABLE_ASSERT) and anyone using it will get different behavior w= ith > mlx5. > > > > We have the dedicated option to control mlx5 debug: > > CONFIG_RTE_ENABLE_ASSERT controls the whole DPDK. >=20 > No, it controls the whole DPDK except mlx PMDs. >=20 > > CONFIG_RTE_LIBRTE_MLX5_DEBUG controls NDEBUG for mlx5 > > > > From my practice - I switch the mlx5 debug option (in the process of > > the debugging/testing datapath and checking the resulting performance, > > by directly defining NDEBUG in mlx5.h and not reconfiguring/rebuilding = the > entire DPDK), this fine grained option seems to be useful. >=20 > I don't like having mlx PMDs behave differently. > It make things difficult for newcomers. > And with meson, such options are cleaned up. Do you mean we should eliminate NDEBUG usage and convert it to some explici= t "MLX5_NDEBUG" (and convert "assert" to "MLX5_ASSERT") ?=20 With best regards, Slava