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 11377A0561; Sun, 19 Apr 2020 13:06:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8A2071D649; Sun, 19 Apr 2020 13:06:14 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60089.outbound.protection.outlook.com [40.107.6.89]) by dpdk.org (Postfix) with ESMTP id 34D301D649 for ; Sun, 19 Apr 2020 13:06:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kP6LPSbWc/0zBO+2UslAn+t4N1Pj+7h0s4Z2JOcl65kke3eFTuG7mSEinu5KKf+AUFoSdrYdscs/edo0lVC4cQNSCU5t8UbtFKPv0GmhtYob6iOaYEO7At2/nm0f23e2vKL08n2uG6y4dO/YJM74WQ4jkXtmxf7VzxD5xSeUWSJrWjpGLm5W7JplY9iJ656SaUwuXRpGu3vvyMyAqI24ijOSPXr+UbkqpWT3mOMMxeT2VTyAFce3WFk3/hGbF8cN883+eRNjlczsc0bg6bcoQ6hOO3gFk3LCsLOmeXI/EUpBKv1ZGsG52v8vsaecumvMl1mvfWeFonNhzWdxUDCmhg== 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=gJkNviBXJUxZ424FTatG7mnIWRGNu/qdlGITkM8llkE=; b=GIi6OOuc5FuxCSK5VhGKFHjchgvFNwx9mZDZl8n0Vi9tJWFgmxe2RKeXWSNjFZ5mT0bi+vEXGvUjt4IuXPd6HNwnuy2qDyr+V4hlRxjP+ZndBVFpAHA83SDWegBTRIDR6tOKIo/GfnIaCQR1HGvNiQUHHb3JXMMPHVtm/lvulmpgj2nl23cm8besFoeUoinTFj7do9VnGZX5Ne5Ztshge4wKuKkgKHwj0hfLOfhRU1jKbl4g99FswSNwTcDVCKEzHvuC5JnOuCrbCz/qwUignNycU/ZVXINaFfeKCFOy1KtrLourCP+Xpd/+Pi3MLHhWag7Cz9j6jQ8rqzmPtm4rIA== 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=gJkNviBXJUxZ424FTatG7mnIWRGNu/qdlGITkM8llkE=; b=jgmmQJqmULJgI5c1iRhpO0hDjqkTT7QlyJKhkRYoRHC4qevPJtAbn1/Uq1NUQPUQljdepciPQz9PKFALIKN5kZHEKUDfSCIWGYrTrzWIJJ2pYGseIQu9oxNlrXzqatmoXS5CGOylwm4VzCJMLZXjVk8pT4YW+pc0+4x7Tm3QMxk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shirik@mellanox.com; Received: from AM0PR0502MB3874.eurprd05.prod.outlook.com (2603:10a6:208:1a::29) by AM0PR0502MB3714.eurprd05.prod.outlook.com (2603:10a6:208:26::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Sun, 19 Apr 2020 11:06:12 +0000 Received: from AM0PR0502MB3874.eurprd05.prod.outlook.com ([fe80::e1d9:634c:6a67:8d59]) by AM0PR0502MB3874.eurprd05.prod.outlook.com ([fe80::e1d9:634c:6a67:8d59%7]) with mapi id 15.20.2921.027; Sun, 19 Apr 2020 11:06:12 +0000 From: Shiri Kuzin To: dev@dpdk.org Cc: matan@mellanox.com, rasland@mellanox.com, viacheslavo@mellanox.com, asafp@mellanox.com Date: Sun, 19 Apr 2020 14:05:58 +0300 Message-Id: <1587294358-18557-1-git-send-email-shirik@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain X-ClientProxiedBy: AM3PR07CA0146.eurprd07.prod.outlook.com (2603:10a6:207:8::32) To AM0PR0502MB3874.eurprd05.prod.outlook.com (2603:10a6:208:1a::29) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (94.188.199.18) by AM3PR07CA0146.eurprd07.prod.outlook.com (2603:10a6:207:8::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.6 via Frontend Transport; Sun, 19 Apr 2020 11:06:11 +0000 X-Mailer: git-send-email 1.8.3.1 X-Originating-IP: [94.188.199.18] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 60d057d0-12ab-417e-bca4-08d7e451abb3 X-MS-TrafficTypeDiagnostic: AM0PR0502MB3714:|AM0PR0502MB3714: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0502MB3874.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(8936002)(8676002)(5660300002)(66946007)(66476007)(66556008)(81156014)(55016002)(478600001)(2906002)(36756003)(4326008)(6666004)(316002)(26005)(52116002)(8886007)(6916009)(107886003)(7696005)(956004)(86362001)(2616005)(16526019)(186003); DIR:OUT; SFP:1101; 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: qax9ntbVejcP7plF4ynMTFPUWSAt2S2of+jHLySzsmhXQFSlXHN22JIrERcxqq0ePwS0LnZqG0SHJsgpWBpstsq5M8CNPZLAjAnc3uYT+uGqzqwYJ+JSjX1c/JtII8gTt0sdZvZYWN4caaiQK6eDosnza7i5AIcEg4HuNqpHD7SWgYtySL7IlVoBllmnUFR9ox9CxgnMJ7Umxu3y6wZSfmAO0vBm29eNCNFR30NOxMrGVqjBunMnhBjfX7XwxnhIXwmJULzhSSPzHxSHgWjdXTZRHumrDqk5BRJFOwI2rUPBi19gAr5FttQCXR8/Tvr7nOtyHDvIfj64f0rUUSOY+wVj3i9H79R72UdR8TnrxfKyTQhAMfbG39cc4QGa/8M8udwihgCAfh6RXRPztTQkQN+sUBW/I1BwaN8ppZ9acR4yS5jKeXCZkrnl0mWZkEPj X-MS-Exchange-AntiSpam-MessageData: 1JouyN4vTib9IjRQWTHEUnQX/5n1k3KKSnTSaoX7gt98LHiBSvUxAS6NtIKfeyom3DXer7sq7R+WkCtDoxehh6Rb0tBVQmIY4THBUQG1wJ66GObCOcToOdzYK2+Dj9FKhWmd6PSptIrDdyQ2bXRHpg== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60d057d0-12ab-417e-bca4-08d7e451abb3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2020 11:06:12.2200 (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: 0rGesQLYrZKm7FABjmVqC3d9O7lYVh4faXTS0NeEwnBOO9C0s5u8dQUJncl15ph06+QPjDwdVczVFFE7cjTwVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3714 Subject: [dpdk-dev] [PATCH] common/mlx5: fix relaxed ordering optimization performance 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" Relaxed Ordering is a PCI optimization that allows reordering of reads/writes in order to improve performance. in order to support devices that don't enable this optimization we define IBV_ACCESS_RELAXED_ORDERING as 0. currently the optimization wasn't activated since we always defined IBV_ACCESS_RELAXED_ORDERING as 0. this issue is fixed by only setting IBV_ACCESS_RELAXED_ORDERING as 0 when the optimization is unsupported Fixes: 2c4a59c5789a ("net/mlx5: create relaxed ordering memory regions") Signed-off-by: Shiri Kuzin Reviewed-by: Asaf Penso --- drivers/common/mlx5/Makefile | 5 +++++ drivers/common/mlx5/meson.build | 2 ++ drivers/common/mlx5/mlx5_glue.h | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile index 26267c9..a5c9ed2 100644 --- a/drivers/common/mlx5/Makefile +++ b/drivers/common/mlx5/Makefile @@ -68,6 +68,11 @@ mlx5_autoconf.h.new: FORCE mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh $Q $(RM) -f -- '$@' $Q sh -- '$<' '$@' \ + HAVE_IBV_RELAXED_ORDERING \ + infiniband/verbs.h \ + enum IBV_ACCESS_RELAXED_ORDERING \ + $(AUTOCONF_OUTPUT) + $Q sh -- '$<' '$@' \ HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT \ infiniband/mlx5dv.h \ enum MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX \ diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build index 347d282..2ac159a 100644 --- a/drivers/common/mlx5/meson.build +++ b/drivers/common/mlx5/meson.build @@ -94,6 +94,8 @@ has_member_args = [ # [ "MACRO to define if found", "header for the search", # "symbol to search" ] has_sym_args = [ + [ 'HAVE_IBV_RELAXED_ORDERING', 'infiniband/verbs.h', + 'IBV_ACCESS_RELAXED_ORDERING ' ], [ 'HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT', 'infiniband/mlx5dv.h', 'MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX' ], [ 'HAVE_IBV_DEVICE_TUNNEL_SUPPORT', 'infiniband/mlx5dv.h', diff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h index 184c410..81d6a22 100644 --- a/drivers/common/mlx5/mlx5_glue.h +++ b/drivers/common/mlx5/mlx5_glue.h @@ -98,7 +98,7 @@ uint64_t comp_mask; }; #endif -#ifndef IBV_ACCESS_RELAXED_ORDERING +#ifndef HAVE_IBV_RELAXED_ORDERING #define IBV_ACCESS_RELAXED_ORDERING 0 #endif -- 1.8.3.1