From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0089.outbound.protection.outlook.com [104.47.41.89]) by dpdk.org (Postfix) with ESMTP id 8620A1B62B for ; Sat, 10 Feb 2018 10:43:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QhHh37BYBUhqjskJLSdqbUZId8NNSUCm5FiZ1Xsgs3M=; b=YznOa+HW6O87tBXpDdZIh4EOPZwJCyQbeglNKOIJUOPoqs7iZGGSY98z8Yi4R4E9eMNGAgi+/7E3OaZoPp5bnUFi+j/DNmu9IIH+DE4JdLFBSObScirj0NbtB95jL9V0qD6QK6oPjoWHx7xPvt/qOjzzQG3FO3nmNBpV532BmV8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from localhost.localdomain (223.227.37.230) by CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Sat, 10 Feb 2018 09:43:06 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: Jerin Jacob , Matan Azrad , Thomas Monjalon , Konstantin Ananyev , Pavan Nikhilesh Date: Sat, 10 Feb 2018 15:12:20 +0530 Message-Id: <20180210094220.16201-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [223.227.37.230] X-ClientProxiedBy: MAXPR0101CA0072.INDPRD01.PROD.OUTLOOK.COM (10.174.63.34) To CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 955ce27c-0c2b-4a32-94da-08d5706ab251 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 3:g4SwR+SRlzCjUBarW3LYs40yEuHuF0d6zOr2dxgr1tgj6ygIL4Q0t8z4yNtjnu/LktK3VLWKIQjJbIjaKceYI4BRlKsClMjtae8nyteSQho6d474IbmJ9bd7rmrJ0p+zYtlqbnQWL04cud4jcYB4U5gOQ18I161X/Zqp410grJJOi3xgnvXU99rEdvzj8WrsjYZaK6OcrI/eZAZNlNvQO62d+8ZtuhDvaKO+fj5Wd9g9UNrFphNHmRvQos1IsR2O; 25:hsyk5vmY8OLYZwBKW9E01IDi4iCXNsb+awljcsorLZFmpxYSx6m/CpilKhi6S4lcFH/wQvW5zp+wtuNgGTpmigDJBMGUPclQ6wKvRVJwjWXuaAmeNeifus+BbmO9BdyZOot3D8e8PrBDt7v+UdGSpHJHGXpo5qi7sfsJORm4BxQBDuW0Pm5UlLC06V+pgQ/H2/9+yOCA6hKphjOHlhLH2ndD+Vq3DRDRuMtgRUCGGDpCNJbBOWVxbxPa+y1cHiJ18XeQOhnwuhG3Xg5iJh5p4g6prfeIjJDrQ/hVedK+63tkAlFNtgAmU6dKurqYPVGlBOKHmf0Ovt8Wqm0vQVb32w==; 31:p8PerTaABzrZH8nmadAUcY2rKnDeKfhAh+VsX+9wM0EFBnpuiw92YCdLl2rRP9oshvbrLQPYJR4P7TxlCnv2AM3X3JNuz7HRhSfeUVQq10W70nXgV/c5MpSK4CWQ87vXX/xD+1rkvegy6uV90njz8VU5MFZ8bJdwQKAOLY0+VJtJr/oiuOZhQwrJVrbJj6TOZ42CmCx8+C1BBACLdrqfkqGRCALCN5JXd1P+I1LgNnM= X-MS-TrafficTypeDiagnostic: CY1PR07MB2522: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 20:9j/fRjicn0kLU8e0d9LyMh0ZLMTG7z5Y/0nUlgkbAYyB8krq1LyHArisf+v0AhE9PG7ZAWz564Mu13l82neFP/dUnX8BgGlq/Um20VjsXiZjzqAhzPZ5xlXJKmNmCf17bxBftiSERphtQcz/V7uu1l6srcDsizmsn6j49v0Bpk/t0pCa6k1nHxJ1jIy2XFwr9WIxpWcXxQtaooXQKfY6Z2+eMD1+xpZHKB3s+5X9gn3litcRV3CW1HzquUJnkE1Oh5+6pxxRZ3+aPN7437y0qRZuQh242zAs8fMu77qNfzSyCdcx/ZCSJvBxKjIcpXnjmplqL7uIE+MIU7gHnDvS5m5avY371L7wAXZaGTA8UsqgXEqdCNevMKI3ZL2s/PM1KZsypRr+hnXkHrQJDvdAMZqllBPnsnOCTP7lg2r0lNdL4t7lIevexvq3sBQ5LVB3s4R724Zfr5UoIhLJATklFo6vIOzrmtqyR+PWnBdwQ3fU6pIM3dHomMX9OP9xmshIGEHh0CO0Ui23xyk3IXFyjmf52aoG/uCReH8s6s+v4XBIUAkccWcAVRrY9Z1wqQnJMkdFVhFA5xycbjrWKvZFQ0e8M9aBsaOdZA79TuwadhI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(131327999870524)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(2400082)(944501161)(3002001)(93006095)(6041288)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR07MB2522; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 4:6pc5Jrb6CAImCmQqGL/TBuCTsAMflIMtilLvDPqbXnbDhSJuVzIy36ltqDwFDi+rJk9zsldOetGya7JnPJteaRDvlztvFAlttdOpxP/Mfa74SrwEkv2cTwMDhLabPYXsHgP0g9OF3y9BwMdIvOMk11Bj80FuEIIx2LhfnfVmY2sl07gDTXEjFY60rnsINGfhttl95fv/D7bTcMB4anEYbimhaFOsUzymcFwWjMYCcuExcFf1yB69xmddfZGEw62Bg4eZIjyPHyCpVf8eeK1+YuesupE2TKH2yI7c2J4jApQO0QAw0ZKqAFWpO0EQA/+a8EyiSe7V/IEyzDEtrTtGrzDokPZboujO7UkHrXD9mMuV4SBC6QNe7xtVL0fFgmYC X-Forefront-PRVS: 057906460E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(366004)(376002)(346002)(39860400002)(39380400002)(199004)(189003)(1857600001)(478600001)(2906002)(72206003)(48376002)(6486002)(36756003)(107886003)(4326008)(51416003)(53936002)(6512007)(52116002)(50466002)(16586007)(54906003)(6506007)(68736007)(6916009)(6666003)(42882006)(316002)(386003)(59450400001)(25786009)(8676002)(66066001)(5660300001)(81156014)(81166006)(55236004)(105586002)(7736002)(305945005)(26005)(1076002)(186003)(16526019)(50226002)(106356001)(8936002)(2351001)(97736004)(2361001)(47776003)(6116002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2522; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2522; 23:fKjlfxD/7pGzGBgG0aUU1zOZF+H3O8fZ3ENG1Ugm7?= =?us-ascii?Q?4WnqR7bpnaNk+1c55uvPXqzyxz3xPhLFRlUQaReQx+2RwzyAYDqMG3/CJWqv?= =?us-ascii?Q?HIbuGl6BZg1wB5nu4Q5oHSvj4E//CDBt5rWJv08S2N5YAP1bRdXZ5IPMlEdL?= =?us-ascii?Q?3WtT8+5iPzghgxnoY9bGmo8tzjHiWTiP8uFPpOy/JGZNqh8OwrJT/odr4gFM?= =?us-ascii?Q?YwxJ/Fhlc94Iu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rAPHdO7uDnV5wUJy9xZousrcrWpCRD3+kE68UQ+2zNt1E/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2018 09:43:06.8953 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 955ce27c-0c2b-4a32-94da-08d5706ab251 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2522 Subject: [dpdk-dev] [PATCH] ethdev: fix a regression due to cache alignment issue 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: Sat, 10 Feb 2018 09:43:13 -0000 Prior to "ethdev: add port ownership" change, the fast path structure struct rte_eth_dev->data was cache aligned due to the fact that eth_dev_data was allocated from rte_malloc with cache aligned attribute. "ethdev: add port ownership" change set introduced a rte_eth_dev_shared_data container for port ownership change, This resulted in rte_eth_dev->data memory as cache unaligned. Added a compiler alignment attribute to make sure rte_eth_dev->data always cache aligned and hence compiler can load/store the elements in struct rte_eth_dev_data as naturally aligned. Some platform like thunderx + l3fwd showed 1% regression in the performance with the offending changeset. Fixes: 5b7ba31148a8 ("ethdev: add port ownership") Cc: Matan Azrad Cc: Thomas Monjalon Cc: Konstantin Ananyev Signed-off-by: Jerin Jacob Signed-off-by: Pavan Nikhilesh --- lib/librte_ether/rte_ethdev_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev_core.h b/lib/librte_ether/rte_ethdev_core.h index 315b31723..e5681e466 100644 --- a/lib/librte_ether/rte_ethdev_core.h +++ b/lib/librte_ether/rte_ethdev_core.h @@ -601,7 +601,7 @@ struct rte_eth_dev_data { struct rte_vlan_filter_conf vlan_filter_conf; /**< VLAN filter configuration. */ struct rte_eth_dev_owner owner; /**< The port owner. */ -}; +} __rte_cache_aligned; /** * @internal -- 2.16.1