From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0076.outbound.protection.outlook.com [104.47.2.76]) by dpdk.org (Postfix) with ESMTP id BEB2637A2 for ; Wed, 30 May 2018 17:59:57 +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=m2LvCKjh7V8jdo8laCInrdfAEsUCg2eESiIavx9JW+A=; b=w6nNbYcLt+/rtaBZ2xMjhbhy3WBBCSnF1xm3NvSBPzChJ5J5owVfl1EFhQXPbBfHa8HLRWTZXOsqcGiUXttt/3wYo8pvno0CS9YPqCt08j8Sz8RbacV4YaFyD0mu1hbYVBvSkmGpy+L1AB9JhYegAXm38IkGHjPLQRZQERTegTQ= Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com (10.167.195.147) by VI1PR0501MB2192.eurprd05.prod.outlook.com (10.169.134.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Wed, 30 May 2018 15:59:55 +0000 Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::11b2:1e2d:709c:695d]) by VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::11b2:1e2d:709c:695d%13]) with mapi id 15.20.0797.018; Wed, 30 May 2018 15:59:55 +0000 From: Yongseok Koh To: David Marchand CC: "dev@dpdk.org" , Adrien Mazarguil , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , Thomas Monjalon , "Shahaf Shuler" Thread-Topic: [PATCH] net/mlx5: only register memory callback when probing a device Thread-Index: AQHT+CSHOBdkSbMNIUCz0h2CX91MoqRIbjYA Date: Wed, 30 May 2018 15:59:55 +0000 Message-ID: <73FA6D64-52F7-4273-971E-6A1579073631@mellanox.com> References: <20180530144253.8935-1-david.marchand@6wind.com> In-Reply-To: <20180530144253.8935-1-david.marchand@6wind.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=yskoh@mellanox.com; x-originating-ip: [73.222.116.174] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2192; 7:T4iTkt1W/tvW3VtoYS6+Mf/Q92qhCNiPtV3V4k5yl+LfgVoXfzjZFpAiACVZB88CzLZKi29272LbW1JTu4Y/LmMRO8KLo0Zwuhb2jBZ2FdRay8rXaYAXSlO8pE/0qvIHX1hO+6aR+/iaFe3rlKVebqg0pUu4dQopvEd1Zk+qrK8xRDIsZDbRB75qnGam0hua4BfICEatxEY9P+8/ipNxOhv70X8enMVRP2fdjfpmYuBzcFU+lXq/RacAi0A0k8mV x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2192; x-ms-traffictypediagnostic: VI1PR0501MB2192: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr 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)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2192; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2192; x-forefront-prvs: 0688BF9B46 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39380400002)(39860400002)(376002)(346002)(199004)(189003)(97736004)(2616005)(59450400001)(14454004)(7736002)(11346002)(83716003)(6506007)(106356001)(8936002)(476003)(486006)(6916009)(6246003)(4326008)(82746002)(6116002)(5250100002)(446003)(99286004)(5660300001)(68736007)(478600001)(86362001)(107886003)(6512007)(3846002)(186003)(53546011)(54906003)(2906002)(36756003)(6486002)(316002)(25786009)(2900100001)(6436002)(26005)(229853002)(66066001)(81166006)(105586002)(81156014)(3280700002)(3660700001)(102836004)(8676002)(33656002)(305945005)(76176011)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2192; H:VI1PR0501MB2045.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: BN01dQ9xj0EhBRT5pFhLwlychL54fDOzIE3grw+p9ihLeLJYnH/IHUa4h7UX82f/TYMP1h7vFRgdiFUPSywFTyyQyyF9XS1+hwonDbgzQhTY8rFdgDf91yBoBttIyqd3UYtWTdVZJPY9q0XceyBtF3QEdxDw3ouGFEWw/LoPpSyzCbpYO9ETalXNu34T5NYH spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a016bf4c-0f36-4c4a-1de5-08d5c646633c X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: a016bf4c-0f36-4c4a-1de5-08d5c646633c X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2018 15:59:55.5656 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2192 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: only register memory callback when probing a device 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: Wed, 30 May 2018 15:59:58 -0000 > On May 30, 2018, at 7:42 AM, David Marchand wr= ote: >=20 > The callback should be invoked only for memory that has been registered > in a device, hence, no need to track cleanup events if no device is > present. >=20 > Bugzilla-ID: 56 > Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support") >=20 > Signed-off-by: David Marchand > --- Good finding! Thank you so much for the patch. Patch is good. Just to be sure, I've run traffic with testpmd and also run multi-process test examples with traffic. It runs well. Acked-by: Yongseok Koh =20 Thanks > drivers/net/mlx5/mlx5.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index d77a20db4..601d03f71 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -138,6 +138,8 @@ mlx5_prepare_shared_data(void) > LIST_INIT(&mlx5_shared_data->mem_event_cb_list); > rte_rwlock_init(&mlx5_shared_data->mem_event_rwlock); > } > + rte_mem_event_callback_register("MLX5_MEM_EVENT_CB", > + mlx5_mr_mem_event_cb, NULL); > } > rte_spinlock_unlock(&mlx5_shared_data_lock); > } > @@ -1460,8 +1462,6 @@ rte_mlx5_pmd_init(void) > } > mlx5_glue->fork_init(); > rte_pci_register(&mlx5_driver); > - rte_mem_event_callback_register("MLX5_MEM_EVENT_CB", > - mlx5_mr_mem_event_cb, NULL); > } >=20 > RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__); > --=20 > 2.11.0 >=20