From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20057.outbound.protection.outlook.com [40.107.2.57]) by dpdk.org (Postfix) with ESMTP id A73D5A84F for ; Tue, 16 Jan 2018 02:12:35 +0100 (CET) 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; bh=bhYfG5UyYaeRSVX9AOxgk5u6nSebBNMH6eGtHDD/Fro=; b=TXQ7GuVfZzCIfY+beaXZJERAK55ab4P+A4lu/D1KdXfuyVm3VJ5I1+CbNR/YywrXQSSO93FSOuq2lbe62Hhbv4jtoEFi2Db+6v7LIVMTI7sy+DXG26QvJKBudRL700n0oo9Mv6TEU25ZGWJyeUgd3Rjp+KsQ1m0URN72n1zzuno= Received: from mellanox.com (209.116.155.178) by DB6PR0501MB2040.eurprd05.prod.outlook.com (2603:10a6:4:6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 01:12:32 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, jerin.jacob@caviumnetworks.com, jianbo.liu@arm.com Cc: dev@dpdk.org, Yongseok Koh Date: Mon, 15 Jan 2018 17:10:49 -0800 Message-Id: <20180116011050.18866-8-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180116011050.18866-1-yskoh@mellanox.com> References: <20171227042824.33373-1-yskoh@mellanox.com> <20180116011050.18866-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CO2PR05CA0073.namprd05.prod.outlook.com (2603:10b6:102:2::41) To DB6PR0501MB2040.eurprd05.prod.outlook.com (2603:10a6:4:6::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef4b3d0c-7356-4687-9dfd-08d55c7e3909 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:DB6PR0501MB2040; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 3:v4sUwBTRuBffun/Zq3kmuCnJmaTktVCXGf1dtn67nrZgTVOx6pUWNKmxeFBdQRcsLBXYYluKV9ylmxXffolalyNcaUGlag2NpZLtwLMge7zU6HmS/j79AKIrir3BeO+8p2Ep/5QSdYZyrCZhJCKsFv0qkTii2oPs14xYKuvg+rxZUSq3ePsRP0O9n9hA3A979N265c/5eZ9/QizdEzkWOJWUUlrby+kFXvpXT+ApyeP1HoamD7EK07GQ7GXF2YwT; 25:NrhaBkic5m8Mc2CnURb6zL3gHyYNzsO6vBSWrmDM01K1bzVh6QthBK2blrvDz12yyKw4iIeVZl3YEgPGgOmI+hvguFJjCQYa10oqqls0yHldRhE7sfmKpTorYZubUkitkK/xgG9uUNOBiUjGf03R94wXNoBD1pnCYxV468Upc8AtQTOXQFZWOr8uqBqqlcNCIjHIN1LHjWThVHyuOSynv0vcXf59bvlpbP0j2yrUa30m3KZCCjb24bxSgnQNikM4uXl9QyBax6zPj3EfAP3dRfCE+2+1BfaUNIHnVrUESMexYUb9P2fQDfvqbCeEo8717D0N54Zqco0bSu7c/UmITw==; 31:jmBRdUKb/0aHWBLoVd35OznH4KIzjvCFFSZ6fC6XccWrRmDFdIenHiWlf6Sgwn1N7B+KmcOZuMPlk2mkBHUYgmW5vzfg75ZXJHOfZM8/RQtW8OtrVcoTazeCkuVOQmnFRh+qa5fkOf98gn0q2+X+s4OVSTww4vCi7mhDr7nKkSn3uMB3TZHiIfB5v6et4a6hWNa5bnCHp7VpBy8cN4vfB30TqNhk5Ct5PCFGTCkTIHg= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2040: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 20:a2dC5qHtyxeGnHIMLI9zkun6XhudTtUf4iTPx7KSqaeXdGH2w1zYTgMg/bltUNmGIdacSjZLT3laPjLa3o9LfC8yUnv4RlJ3Od+K0dmjntd5vGVAAWIMubHiK8SW3CfJU70IkWDjv+K7EI6PvVC5CQptBLQ7EwlM9FsCzzeZCp4z/vlBl90jV0zTZX31s/NtxhnQAFeeuACoHel4klpCHfSOqmjaSXW83aExHRbZbv5ZwhLokvA7V2nK6o/nSt87fz06aImm0AVHzKJi6EYKJLk5lBnGO+MjpZs54KqTFipX8XSA9HCGF6tt+htTMecCEOlRQqFY8Md74D6UH4CanYLNg4yrlrrTQkxA+XiOgKLr8wUWwjU8IUmzXSASGQL5964jRdn9QYXLKe+l36EkhEAR0D+peUtkPmqUHJs0eaGWyISOD0+pR7zMLJ9TvhozyI2LeVRw9pJ2ohlykhRkfaAgycNKswY9s5adY6bgxoxmMlLhe6Q6/roZjAwtBN8O; 4:gYePDkdSR5yZ/L6n7VPzacEFvu9rxIxeq4Mwn+oAehEbB2kSRB/EYdo9XklJQ5xYa82kdYaVRz9lgcFWML8keXHnSYMxYhMO6IaMm//ZhOIp33ZnvB+oc93dcHBkCeE1kzFp1Zk0uvllIJXf93G49RmAQjRxvPyA4OBaHjnCXvUdxMo2jJqp+tXEdkaOKAkKqRqp0OyhVPKTU/H/wIjmD0BlmA0rYh50vngfBRA2ozONeC5g5OV+mIy+kLU0zt62k02q2Lf9nIA2F/7YTjAu5pBo8m9QnmlC93F70QGksxAqJ7yXXChTHNFDaUA3TiRZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231023)(944501161)(6055026)(6041268)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB6PR0501MB2040; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DB6PR0501MB2040; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39380400002)(366004)(39860400002)(346002)(396003)(189003)(199004)(66066001)(105586002)(106356001)(86362001)(97736004)(21086003)(316002)(5660300001)(2950100002)(6666003)(16526018)(47776003)(16586007)(76176011)(7696005)(478600001)(81156014)(25786009)(51416003)(81166006)(52116002)(4326008)(8676002)(36756003)(386003)(107886003)(8936002)(59450400001)(69596002)(55016002)(1076002)(53936002)(305945005)(50226002)(7736002)(2906002)(3846002)(6116002)(48376002)(50466002)(68736007)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2040; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2040; 23:e2PjtA69RYGhaawpwyny5p+VQcc4DJOEPYfmj7F?= =?us-ascii?Q?8SLe6jNqc6GQE8LKt1ZWdLJAbUuEz7HfaozxsuVjJdbxbjVayiutMTfXDi2z?= =?us-ascii?Q?1YrPu1IxGYAlxETNDFhQVDth8IZfT9FKRbaJpVvYhglJFlfn4MQD7Zuzgtit?= =?us-ascii?Q?vaXZrFE644PVUUyvoULI8gE7zDlP7OlD+/vLpLpLBQFKageeRFUB+pFUl6+L?= =?us-ascii?Q?zJiRA04GlCXqfor0QXmeWlkHk24egqIZsRYkC/TfNB7rzAH855yYZi6Gch9f?= =?us-ascii?Q?gGyBgirsDI+EbUaalact3m9uLB6C0/zj6GwNN/8430jHbepKZebC9TXfrh/B?= =?us-ascii?Q?AePMRp9HP0aWRS623t98eWG0X74rlElqKaElwTuG+nqM1KN+dMWXrezIapDa?= =?us-ascii?Q?2Oxj26FSCI3bxxjnaYu2fN0Yv4HVMcBtYl1GNMAY6A+iDcTR/zUKCX0kkidM?= =?us-ascii?Q?ayBAoOIPwANgFIyiBQlSZMw5tf8i40yEC9in6abVGz5dVi+YdZZcTG78GTD0?= =?us-ascii?Q?adq2Edcf2bvl1gl85Hy6TWSbr2OZE/x1JqCjBmjGpubMJECCyxTcblrIyd/r?= =?us-ascii?Q?1X8Xtoa5sRcLXDQ2JViazkqJ+i/Yv7Q0HMHZ6hebFvszt4glQLwW3gWuCEbX?= =?us-ascii?Q?Jzd2xVXgO6Y8GB2js5GfCgLk0+PiTuznI7YwEEl/WaIr13UtWdLhFC9szLyA?= =?us-ascii?Q?Ib6yVvo6JFLWMCH3tuM2m3kgUkdNItGHF/rb1MHYT1+rlFibf5aHQx6oxFxs?= =?us-ascii?Q?Q/mVEF9mWyifrwBpAnM+fATi183viq5FBj1P4Vmg6efmNvNwGqu+kR4EvoUm?= =?us-ascii?Q?ZkClR1uKuAqW+aoxRGyDwG2JcWLRqUgpIqkTqKWoCRusCMdcIjX42D4OTBg4?= =?us-ascii?Q?bFW/+nXXjbmPWtagH9hgjbc7O1ziVxHFeyKCztnDH1fl/bVzufDxAYcfmMK+?= =?us-ascii?Q?M1US5YPDm7o6J1OoaGHYp67Fn56oA5ByHNhOOuUsHHMH4xN8J73eYxPcj51h?= =?us-ascii?Q?OIQAJBEMNc0oMCg8WsB9tekT8ADw1uase9IXHlu8bpd2/LZmQH3USxmICsic?= =?us-ascii?Q?1ThlpUDhSksrlT3PIA5S24Fxd2eMaQfgfIDbJxcSFp5EixWLabGw32HJDooZ?= =?us-ascii?Q?jHA/oZQx2xqDxwW02zxq78kWOSCxuOgT1EdLkrGlli0apcuyehgVsTg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 6:+uWrfsfkAWWQorc6Jtvm3AI/vNyToXwmugmteIOSeIr1+iCPXh7cirl6eqMvisiijsqhd2JfPW/HjskBBaomKCjTQB/hDs2nQt+P/lk5Nzi+JfQno2PL5wbRsrm3DxKBkIsHP2XDHM10aLFtzxbwbbWUrC8WTFx7EQiTQEwaKj9yBkOlUQD3/P32jRx6JpYDaAI3+8uA2rcZ/WV8G0vR7JW14uvSHGeDJgWDBNbupSfO2NKV4XqBZHHMmhwS2sXtuzXvofalNUmo0+EDal9azHe7vxlLmTTTXMh62d8dzOuS19IcfNJRyNdBd1/xAuuF8WI5VNmqMqZyxakzk0HZhgBXYYRp68z/S6GD2wUXCUg=; 5:+ml/PZkB8TLu9lci1zH+p5BH7MXwRTco9WgzQMYNzquQXvTa+wuQ8YhR/Zj91DginBzAtGYxr01q6qNF0NOrlyEboBwcuyhGdpdHrURfkuH1J1939DKMo9WjnB6iNPyzpJpONmszCRmKXySIqyuyVHcipWKGkf6p1gEZiAwNI0I=; 24:aX5yeo8earV3TijcBdiRunLiDl+IRqhVxfMbsOhjsb7uDZATlufORaECjIE5+nwh/UpXKUT/o7o/R5EmawLSh8wjTk4aD5EXu5i04c4Sp6U=; 7:KTKaQRqA80D2eBzoVrzkPME6FJFOOgXMKOY91MCSn76ztNEQlxa0GakcUr7WsfbWVu7TS/29aCahWQAs2DWRO1yyiTfFy1Mu3e3zgLXpAvjCI+XUKB13ysX4ivRxtohZwPEb7QCjIpJHotZl4GoeC3Tw2bEQfoSCnKXbf3A7yeq2ixPPOA6oYZcbGeltK5eHgEwBnNBKKmyhwdmaF37M4Ac4ROgMD0OVR9sYosK3CnFPIztCbgIHOcivmr3oAYLj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 01:12:32.2546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef4b3d0c-7356-4687-9dfd-08d55c7e3909 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2040 Subject: [dpdk-dev] [PATCH v2 7/8] net/mlx5: replace IO memory barrier with DMA memory barrier 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: Tue, 16 Jan 2018 01:12:36 -0000 Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers/net/mlx5/mlx5_rxtx_vec.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 3b8f71c28..99a5f8681 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -1898,9 +1898,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) return 0; /* Update the consumer index. */ rxq->rq_ci = rq_ci >> sges_n; - rte_io_wmb(); + rte_dma_wmb(); *rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci); - rte_io_wmb(); + rte_dma_wmb(); *rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci); #ifdef MLX5_PMD_SOFT_COUNTERS /* Increment packets counter. */ diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index a239642ac..480653f34 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -598,7 +598,7 @@ mlx5_tx_dbrec_cond_wmb(struct mlx5_txq_data *txq, volatile struct mlx5_wqe *wqe, uint64_t *dst = (uint64_t *)((uintptr_t)txq->bf_reg); volatile uint64_t *src = ((volatile uint64_t *)wqe); - rte_io_wmb(); + rte_dma_wmb(); *txq->qp_db = rte_cpu_to_be_32(txq->wqe_ci); /* Ensure ordering between DB record and BF copy. */ rte_wmb(); diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h index 7d7f016f1..9db1dddbe 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec.h @@ -135,7 +135,7 @@ mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n) elts_idx = rxq->rq_ci & q_mask; for (i = 0; i < MLX5_VPMD_DESCS_PER_LOOP; ++i) (*rxq->elts)[elts_idx + i] = &rxq->fake_mbuf; - rte_io_wmb(); + rte_dma_wmb(); *rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci); } -- 2.11.0