From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0046.outbound.protection.outlook.com [104.47.40.46]) by dpdk.org (Postfix) with ESMTP id 06E731B6B3 for ; Wed, 16 May 2018 07:05:28 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=5oN+L98ndI6HaAOeE44KNMflx2NQVYeSw7dtfVinO60=; b=NqtjAl8cwPex5T0j4cfsZ/1reL8ratmlVXb2QK3AsxoSvclpS6jQCWMd0NQTR4MzK3hFWRtQ1PMWIvl4BB5+6Z87JaJqfiKkGLNC33JHH3YtolzKfPKrKsnTncTVIVNciAwArnglQRHfJ+z35DDaYFR+TW1ssHB6WHLaObvWiFQ= Received: from jerin (122.178.202.31) by SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Wed, 16 May 2018 05:05:25 +0000 Date: Wed, 16 May 2018 10:35:06 +0530 From: Jerin Jacob To: Gavin Hu Cc: "dev@dpdk.org" , "Jacob, Jerin" Message-ID: <20180516050505.GA16248@jerin> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-Originating-IP: [122.178.202.31] X-ClientProxiedBy: MAXPR0101CA0059.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::21) To SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 3:t1yvmrOejEayAlK3j5DZZdCoOWoDEnz5oLqWd2ddNGBoauVO3h3W5FW6EBvCtOn17+TS/ZqRLq6p7cLZZFUE14Gh1tpLFtFf5XPtwHdd1/jVD7UX2PZieNspIgMiZZK/v3UwSqoD6xGiI/fpqeaOcwTS78RqaXp6c1S11QX8hN0LoC0GwwJ+1GamDKOisdLsvnmR1RdbJ3S5UbKkCC80Pr6OL6+b33jIG7kKXO9ucd1s1QsWU/XuUxFDKXXaAJb0; 25:DqwfTHAGx8RZx/FGgA4ywaQb78FNnj1oQf/7TroKdoqbkTtV6KpTO0z4mj1eYutuzFAc9Ce41kgap/5j1zt6tmw07NgW7tN2M9JvgQsdwu1JtZwXldHOm2rum2Vqzb2PGFwVmgtEjhoFWvdqxXiD7eFrBDtKchux1YOnbyd0I1DoWAyRN2pZn6pEW2SUOQELDh1YFrNRe7DVpJjYoksHbJrKnnHjF32xS9S6osEwKhDTM4gW05AFMoujG92xoDsYRjfBq9yhNv22WDHMV0CRkAMiYGIrN2pj4ZcPn0eBhoFHtIY6v4B7Dlx1JrTHl0+K7eZO+4ZEQRlEOot8n82qug==; 31:ANvXaksnUYvsl4zco2wKsW6RYTnNcFbd+X3Igcgs9Xc4E4G1OPkQIgRWVBjmPar9nBJZmxlUKhhq+a9NJM90uQM+U3WzzX9B999Uatd2L8VZJUQuufo2oT/j13cGR10sdKvbsWHurAmfitKtPkqLHjOJJ8suaXCfBsRPKk+53mr0vNrH5GHuNtVSVv6jTPLwEgChTjktK6GvstxKFST2CQpULNuuU1MBo9c1uB4Vf3w= X-MS-TrafficTypeDiagnostic: SN2PR07MB2525: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 20:POYbOC1cFZA0zie+uiqFvX8i4d0d64m5bl+7WoUH0s8zKdMFFDGgF0Wy9OSGGLeHtIhegsqE5s3S3nd3HzUy0r4nD9wKYV8Us9h4ZyuccoarWqorCmMWJDqkD1AgHRA+4q3Ga587n85I/EXOCAen8Ta9Bcjh+XXj87HkO+7B4znmb3i1YmlPNB9u0WfhBXEDjPVvXHGW7R+piV5g83FOsXwwSgbtulZZSKdVf4eQgNGs+JJ4u0BolWMTy008uhlnDjgUQRijjOTyFv2IHLDdwxZwMNAN8f+5ucpPWOQerbOGP6kcVkzw53UqF0BTzWDy37HZovMumFzYPv+ii1gaQXSgb0yDHfX45MfVQ2oOYSYIlZPQon+O9WqpMFy32YzqvBpDUCaKry18w1a6eFwtsMrx8pEMWRJ6hKAt54Su3V6ydpAkzTBaYtvyNMvaB0R+jsSeSsQ8xzfugBQys36IbrP/8Q6DVyF4PsUQzf9K58rpldF90vAuqiWKJXW6RDbtFV6XCkQLSO4MQ08LUrgPAW2a/pjcPNvCxXrO0G0tFfCosDwM35OmsmobPdCicvG2YSujdKrBTLccKwjjYmvTFVMAg6JC4BvzCmCO4yrYBrk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(262104967686372); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231254)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:SN2PR07MB2525; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 4:3yaAUoe40/bbzJ7vrQHHx1YV6c7euVY89uDU94twXYqA2f3gOMztN6u4n+foEGFmcnVQ9nFHUHhNzYTL7K3WCiu5KtjwYoOwvA3WEo3egqo6X4aO1IFG4ELdHHADmqUEcgfR2huW6Wk+MuXmgLGJyTqygDsV04kDrFiCDCU3OHVxtwbJAHLc69mDzP24pQRA8s1Erm2O7N7kwkSXrk5hG+gepcduMfWmphSj9jszTfGohGzdpNEjGVMS8yo9fRhxQjQinKM2kdX7Zjn913Q3syB6S9AapcmeD+7/pkweMfZwMtiQG/zCXpJJCQ9u7LCRKpUKe8GkQI2d5qDOFGJN39Kwfqptuq+0Puorw8skSRU= X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(396003)(39860400002)(39380400002)(346002)(18543002)(189003)(199004)(5403001)(13464003)(10533003)(42882007)(478600001)(229853002)(54906003)(58126008)(72206003)(4326008)(53936002)(25786009)(52116002)(6496006)(476003)(11346002)(446003)(956004)(316002)(486006)(106356001)(55016002)(9686003)(6306002)(5660300001)(44832011)(966005)(16586007)(105586002)(97736004)(305945005)(6666003)(33656002)(8676002)(6246003)(53546011)(81156014)(81166006)(68736007)(107886003)(50466002)(7736002)(8936002)(6116002)(6916009)(33716001)(23726003)(16526019)(66066001)(47776003)(1076002)(76176011)(386003)(2906002)(186003)(33896004)(3846002)(26005)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2525; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2525; 23:ovDmAL1i8ddUq3xKa5eXxgY9IGNjik4INJMAz/+xS?= =?us-ascii?Q?RfOvvoA1557x+nyKpsRHRIyT8g6SXImTcEin83AF7N+qNLcYQzzUDM7RpF9g?= =?us-ascii?Q?Gcy3Js8OILCjaXjDNjXBS/FvYS+EOJfs1E2U2oPESAGYCcfDRGHRBBLTasN0?= =?us-ascii?Q?m4SiBqspaeS+F5d1WZptBeJ8VWs68HaIf8Tnpzpn/UXhSkrfktXfbUNT1SpJ?= =?us-ascii?Q?1siqwS+2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bdU+jXtl?= =?us-ascii?Q?MM/DCAWXIXeoDA75C6TR/p4Z/enSVuxAXkMSwm9xAmf6eeKhJVRUA4QlJIf4?= =?us-ascii?Q?T3sJbvXrJUtrYyK+/amue3LPEV4Diy/1W70Nw4X6hV2VmUWaV6O5k5z0l7tz?= =?us-ascii?Q?k5wMDNuiZt8f+Nf5W0HzZOP154m/fNn6z/FzqMlRG/9jvAxZD07YqcusImPr?= =?us-ascii?Q?HbAGOVM3UAoJZ00J3vny0dSQJL5xmUkLRm9YAzCylKQHjJ+vMyyp5k7lj0dZ?= =?us-ascii?Q?a9/ZW4ZyD3uDcCVQ17JIyo5FOfOzfkyHRLhFNNTBwcDum4/dKQudwiAw5CA9?= =?us-ascii?Q?j3KObbe9APNjhyn0vgcN7YAWrBt0xW4911tuY0IgXvUeaNUOueZJbh11xuIE?= =?us-ascii?Q?uQFN0VdNtcsxg=3D=3D?= X-Microsoft-Antispam-Message-Info: aZFZ2rhANlEp5aKj5edWdyowOr01u2JkosdmMuEriN9MOr75oXgQPefq8hxZOaEZHv5e/sMui3TNanjV94SPkwPizypMwjVPlL9H8ZUi45bKzXm5GNYVbAVYqn90BIxvA9Uh4xinHQKg660lvK+R/+LADU8A0rMXCm9GCV0wrkKWaUDhUsIZr1akOHtiQFra X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 6:jT1y05nrNi7UDpF1zQBY5s64XhaGGW0gEeCODoJHEwruzWDdaascRJUAoum6bmJByDQhNSFv4b5ujI/kLokwFCBjctbavxutL1/onDPo6Nz7xO2AT+4bcm2VijvQRfdC+4sGIFu3QKV8ayFhbLL6nHI3hxGBHfZIjNFAJ5B8B2DdXTDBTtVVK5V9b4yESM0p7cj33MC0RxVrOLjRMqFljlao37dTlgK5XfFZIc0w4qXrEG32TuP/TpTZHGT+dFFUJK1olNlcoLO646pRA+FfJW/YBo7OvmYvm/MC8CW/kNdLAOLnmB/x/jRHi1/IXDvSMSyDHlH2190893OcOCZxa1/X3npZ+vG4apClXkQJeSgg01YUhNKAZxBcuKvLefazXlGdzV5s0V0LghP8mSLn5GVTsa96l1WEsYXK4KlYfrdoGeLsBw9rGHQcKdgSpczOmlZ3UgA25ZPYDKxYseGY+A==; 5:yYZckbZfV1Y4PlRoqF6quohloy/huvlXPcvbE476yYBzU3wOCApugwE+cRD8VISPzsFF8+fUs9gGaBfk1g88kEArNXfATOjGSmknWbpn6/XhvNskogyGMkZdXc2wtSWl8Y2M9+tR4l+X/0I+yu9KLYZw2kOv50I1BL/4HR9RQ30=; 24:pqz0TLssel3TrmZS4EEu/nQq73pCbhpkBQtKUUnzuu+ZSitxqciDN7AlfstkO5DS0AxrWlD3cNbmJo8m7au6/uONBscunHaRJ+WjXBO6oVo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 7:e4b83vnlFjjGfBUJavzDuGOTyXeU7/O+g56viEhL1JfDT40y1XRo+fR5BSIw1PUl82lZw1EpQZX+AuhixhubewllQdVd3Xr/3qk3UJy2Qjg6C4relp1cZ/31Y0n/A0D498ZdUbT26GZultUxdTiIm7/74k5vW3O3JClaIlkYFyQ7p9mI2/6ws7thHKMV0mPIyTczgiNGTOM71eB9Kfc32d7//NUUkRlVWGc9mhx1jc8gFBU51ZnFNMKUVXJtZvlW X-MS-Office365-Filtering-Correlation-Id: e6372e1a-65c6-4179-d6ab-08d5baeaa33b X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 05:05:25.0576 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6372e1a-65c6-4179-d6ab-08d5baeaa33b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2525 Subject: Re: [dpdk-dev] dev Digest, Vol 195, Issue 45 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, 16 May 2018 05:05:29 -0000 -----Original Message----- > Date: Wed, 16 May 2018 02:08:48 +0000 > From: Gavin Hu > To: "dev@dpdk.org" , "Jacob, Jerin" > > Subject: Re: [dpdk-dev] dev Digest, Vol 195, Issue 45 > > > > > For ARM64 platform, libdpdk.a includes the > > librte_pmd_octeontx_ssovf.a, which requires the libatomic.a > > support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked. > > For more details, please refer to > > https://clang.llvm.org/docs/Toolchain.html > > > > ~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst': > > timvf_worker.c:(.text+0x80): undefined reference to `__atomic_fetch_add_8' > > /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_arm_burst_sp': > > timvf_worker.c:(.text+0x200): undefined reference to `__atomic_fetch_add_8' > > timvf_worker.c:(.text+0x244): undefined reference to `__atomic_store_2' > > timvf_worker.c:(.text+0x278): undefined reference to `__atomic_fetch_add_4' > > timvf_worker.c:(.text+0x30c): undefined reference to `__atomic_store_2' > > > > Signed-off-by: Gavin Hu > > Reviewed-by: Honnappa Nagarahalli > > > > Following patch is part of upstream. Are you testing with following patch/upstream. > > With this patch from Nikhilesh, this __ atomic__ compiling issue was gone. > The two patches fix the same issue. > Should I abandon my patch? The root cause is analyzed, the -latomic needs only when atomic operations on variable are not aligned. The fix added to align variable where it was not correct.This fix the performance issue as well, adding -latomic will simply hide the problem by not letting to know the alignment/performance issue. IMO, If there is no dependency with -latomic in current code base then we should NOT add new dependency. > > I see this note on: https://clang.llvm.org/docs/Toolchain.html > Note > Clang does not currently automatically link against libatomic when using libgcc_s. You may need to manually add -latomic to support this configuration when using non-native atomic operations (if you see link errors referring to __atomic_* functions). > > commit 55fbc92d7800100628579643c9ee2770614fef10 > Author: Pavan Nikhilesh > Date: Wed May 9 02:56:00 2018 +0530 > > event/octeontx: fix build with clang 6 > > Clang 6 & 7 fail to naturally align packed structs due to this clang > can't use 8byte atomic primitives and splits them into lesser atomic > primitives. To use lesser atomic primitives we need to link libatomic > (-latomic), instead supply alignment attribute to the compiler. > > timvf_worker.c:(.text+0x498): undefined reference to `__atomic_fetch_add_8' > timvf_worker.c:(.text+0x525): undefined reference to `__atomic_store_2' > timvf_worker.c:(.text+0x557): undefined reference to `__atomic_fetch_add_4' > timvf_worker.c:(.text+0x5de): undefined reference to `__atomic_store_2' > > Fixes: f874c1eb1519 ("event/octeontx: create and free timer > adapter") > > Reported-by: Andrew Rybchenko > Signed-off-by: Pavan Nikhilesh > Acked-by: Jerin Jacob