From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0048.outbound.protection.outlook.com [104.47.41.48]) by dpdk.org (Postfix) with ESMTP id 092922BD4 for ; Tue, 30 Aug 2016 06:28:05 +0200 (CEST) Received: from BN3PR0301CA0033.namprd03.prod.outlook.com (10.160.180.171) by MWHPR03MB2445.namprd03.prod.outlook.com (10.169.200.139) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13; Tue, 30 Aug 2016 04:28:02 +0000 Received: from BL2FFO11FD026.protection.gbl (2a01:111:f400:7c09::135) by BN3PR0301CA0033.outlook.office365.com (2a01:111:e400:4000::43) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9 via Frontend Transport; Tue, 30 Aug 2016 04:28:02 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD026.mail.protection.outlook.com (10.173.161.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Tue, 30 Aug 2016 04:28:02 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u7U4Rxv9008015; Mon, 29 Aug 2016 21:28:00 -0700 To: Ferruh Yigit , References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1472219823-29486-1-git-send-email-shreyansh.jain@nxp.com> <1472219823-29486-2-git-send-email-shreyansh.jain@nxp.com> <57C46637.3060707@intel.com> CC: , , , From: Shreyansh Jain Message-ID: Date: Tue, 30 Aug 2016 09:57:59 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <57C46637.3060707@intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131170048830960531; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(3190300001)(24454002)(189002)(199003)(377454003)(5660300001)(230700001)(92566002)(626004)(23746002)(105606002)(189998001)(76176999)(31696002)(97736004)(87936001)(11100500001)(5001770100001)(65826007)(68736007)(86362001)(50986999)(2906002)(93886004)(104016004)(33646002)(4001350100001)(50466002)(2950100001)(586003)(7846002)(8666005)(305945005)(106466001)(64126003)(77096005)(8676002)(81166006)(356003)(81156014)(19580395003)(54356999)(36756003)(4326007)(65956001)(65806001)(19580405001)(31686004)(83506001)(85426001)(47776003)(8936002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2445; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD026; 1:tYmWxZcKOqLsvkFShzywwSEnZphgBGjtpi12s1mLBYdp89awxlpHyMVAylizY/Ufl78HvNaTXmmPS2of0U0jFJ2tWLorSE1v7XPUEO37rraIcm2CjhycAglAWPCRKp1wc7gFY2dL+S1t4Iv4T5/LwHQHftASche4ixRwn8X/i+AxjNSmnr+MjInYL6GVQ9CcQccNW9Gjoewv9sZFOuYF1KNDv/rzvSYS0gQDfiCV4sv5MSsOnel/J7pLTFN3gV7C0YD9VIcFkchT7J56fuVhudK07SGKt55CCliELeNRM6U4KytUAM+8Zz9WkCoDzJi6To7VqyXVJyM1nQ44mpVQDAs0Lega9dDs1YBzxRRQEeKbygBqnMXwdwgvX+OAkENKa84oIKomt33NNOa2FbkK1uX8t82AwSQchDK3/Z8yu1nDeBpvRbIdkl0F7sIB5SH9IaMOhwJa/MeJ6uU+zWEE9JxV6E1FY0s4LoGCkXi9V87DN34iKQ8EFZL4QKEA4qxoFfj5PZOgNm60lnGoTO55T0eTwxsZZIIMOJT8lbHPEgUbrUH8qJWML0IiZfQzzH4Jg9hZb+TSsox2Sd773MzQBzPZvBib+ZAuG4EuuQanJdFKcumF/rNoM+YrLDv5rpeQ5S1DunNJVNeB2SMhreYVSQ== X-MS-Office365-Filtering-Correlation-Id: 4d509cec-2e3c-42f7-122b-08d3d08e0832 X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2445; 2:L3yvj7DOSb8DQKhnqcJPPgQ5a3cDyVzZfyzADgUgvCypPuDHFYVeq6TdfQ2YKoABbjRf0Rn5NmYDMN0Tb1NOvsed2A6c5Pf69s6mIXxAXmk8L/n3GHPYeAsO/LnHsrJl3j5ZIYKvqFindQ0PDC4FNCUMjoZCZmRkv63WASB7wES14DP+lLAfOXxfsm3BNHM1; 3:qnGjyiP8XBxJzvnDgsJTFMa40wtjEFM3J/+D6cBfIw4K+ovu8bOyriUuD3UNRxogm1S0TiFyBZ2mUtWTj8ofHUcTgBPpAKRvsvrndMt6ysQfqVgYF7fMBfL/pSbwgpvlmGj1BlL4jtfP2hYoM2r54xacKnxu3KpebfcTaw7IUUEEeFHNxfEX7wFbtoLxAraUZ5d3PUWY9QuE6iEx6DFLJ0ZnE3Qg/rRuTtXiwyp+UVw= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2445; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2445; 25:hgh2RMyW08/nYhD5xFetBtoFyDRtWCruQ2WlldZm+e65K1cDcMYurBSwECm6z7qbaPKmA+7xz6Bdgm+FsI2yP8ck74dE5nZspHOd5Gk/hpgM2BZk0N0KaIlmgw+2dwNEqbiYzV+ksJqbPubUmZ+/CwHf/swNvEKRAsID8ZTp1poxOGLE2K6HX/YLf2njlMrmxAv/4EjhJqnE5LQKaeg1xxfBbWqeyMDC97nVTkWru8s2yTN3Jm4YHMG+nSJllREQ75G0lGB2B65Ob2V+kyGvB0Lslez3EJP4wSPfggCPrYVDFYwIIFIA2PLTbIarW3onMK0pY7wds7nwjoKTK7/bIdH1q0qnStQ/MIn2UjZbvedmSX7FuRxgjaR1UwFpbjpo57zrunsNMsqHeR107XX5FqSdD6oiP+DPz+T20FZohaiEHyrf2IUBB+U5iSjHKVZ0P0vPtoyXJPjWSjMV0waYHq2qBn7/BXnAm/q+QZN7QNK5VQo3PmWWJHQ+dLU5Et8GaJedNTson5AaiaNxjhWvCT+Rl5obTHkDIXnxs7Y//qxav/6E6IaMLblgYZ774YoAaSA15HRAefAgYPqnk4QgmkgIwWwNvq6R9vBDd8wsDN7N4TkYN5kSonolk5qWBbKebCyzliKA+dbtgk9gExJEOdUMw21Gd1LiLGA5/W9tXN42kDysjTj8krZriHCbziW7WlZ3PmJEFx2tmGC5d4ppkQ==; 31:31L+HU5SpU12Wx2GVuwE0nmskZQXs5QLzJtTgbnCH/h0l8IA7VwmDBtr22LAsHyPtRBjT9BC1aiv5GHrq82kMAr2V1hxCtKiVce7TSlxUugDwtXNbD8BaDvysap3iaxbmfpL9M1SSTit28ERjAKXNngQcHSl5IhH3Rkr6xrZKPuub06pMr/ZQ2ocyEyLKZiajQ4BXxwxLyVXehXeOMZac54e7cLH5uLyD97rVsOzwxs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13017025)(8121501046)(5005006)(13015025)(13023025)(13024025)(13018025)(10201501046)(3002001)(6055026); SRVR:MWHPR03MB2445; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2445; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2445; 4:xWByw05aRsbbqanFN9s28v/t6Lc21CNIjz7NwlHLUcfCh4EJyoUpD5jyEvHy0hGpX/jhy1VwIZWzvRGtdCGjiDPvUeEJubsKYWceJ7SF5c8uut8D2DQLjcN9xhVRwyma8MQ7xiHg2UENSQvEbkiFKpBze8FxUZ+DSI+RCRlfpryO8Xsg8MfUFI5ydcPgh3Ju79Z/sR/Kdll5pPc8AOS9iMBhXSQclCLsTVk1kj0jd1xKcfUDJf+TXb+0dKueyAPzJ8SYZCeAJgFMVMsQSaDi03tuHRTdwv1/50ogGFAJ+VrGaG2jC9ASGlRxojDBrs+ClxkHUDLbMRzLnYbwL503RBmHowJ3jVwGTTn9AQtwm3YeE/ffgELbHrCXRQlZqNMPPNWrwN/KA8Dbh0cVfS411+wx8Q/u1ncaGX/61YLaMg9AjXLn21l151ZTE4uEWDdHoBS6Qb9lzJfU04cVHmrVt5mTgmQP02IoiajryCAxbdizh0QFYZwpcGlwot9Xd2hAT9KCfTBaSHF6XVopRYRhYSDmMdnv/Hw40Mng1P4WYFg= X-Forefront-PRVS: 0050CEFE70 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; MWHPR03MB2445; 23:r49Iyo1Mgwtf0xpOVf+eODmx1yZMwvXFeLZNC?= =?Windows-1252?Q?bF9Oew3UfxZyppx3F6n8vv6nzFs+bBFFehh6y9Jp0mVvFykJ0XIBqKWy?= =?Windows-1252?Q?F+4nVHGKlykhmgH0ACfgtiNBM1lKL3s/vY79fnF3UKxw3GrEc/oliJwD?= =?Windows-1252?Q?tstfe1Y7pjVahalFW32PhZW7IIXIRIJdcNP6QRV+sSdcOfhCfofdTFWM?= =?Windows-1252?Q?ehmaP7/7byDN1I10JiyIY7sjDzhUOArP2lYvbqz/1fMi/pXGPHu49sEi?= =?Windows-1252?Q?FM2uBkPaQPergXKhkioyx8rNZa1Het849xVYtKSi63xwRAn1FMhUc5+0?= =?Windows-1252?Q?rpFY3s73zHg5hyzS/WsAnWPDcdLSLFfRNJ8Vfv9bYtOX0PbYwUDyb0IC?= =?Windows-1252?Q?2EtJrVvLyOpqKxPDGgYA2l1DvCwZ5wHhxT8llKJXMQLVcAPkD/qhP/3N?= =?Windows-1252?Q?ngWgruJHl1k+8To1MT944XpVT7I3w0hQMzXtDxn9Sj1e1jmVrCZPHLyq?= =?Windows-1252?Q?QvW0pkHoARlnkZUdwe8JPbXQoLtLAhHhjAYHKN5oXoecdLU+a1yRaPeY?= =?Windows-1252?Q?Cn7UEiCXW9HA+i4UWrwUSy9KlLbsKjYCKAMkg7PaD0VhmQs1aqMqv0iy?= =?Windows-1252?Q?soe6XH7zp8G3zV0eZv3KEMdjoxvCe+1QmlIk9572G3g38F3nly3fOY3I?= =?Windows-1252?Q?RSwMfoXnLKAQjFsPlryzuAAXhEF3/L93h+rlzJkkkWDE0Y5ZJoyPRqZG?= =?Windows-1252?Q?Qsf1yVklr272QiZ39rgxwnUwUu02hzIamMqV3egVNifBbU3R7PyVfpcq?= =?Windows-1252?Q?fJh8i2Em15EZdknFPT/vfQN6SJiuvaltz8BCvNnhrzOpevGFEwKEXoF4?= =?Windows-1252?Q?R/+x5ySOc2leP6QUlFX2s8qSUJp+CHvTynzz33o7Yh3Q0gT/h/HV3f6a?= =?Windows-1252?Q?3IPk83XRrIV7HVeC7UiMPASaRBHyCR/EE52WCVWe9ei1Cj7/kAyyMBhd?= =?Windows-1252?Q?/2NVHyUdCrlIR3b1iO5gE5w3xQUbmPYu/P2Ztb6XJlq8LeCd43AEJFjb?= =?Windows-1252?Q?rDY9e4b6HwmH1nszwgcbxoJ/5pUeJU6TOKlxyAmRPwswGVZ1ZIKPD8Av?= =?Windows-1252?Q?W7to+XdZw033SxXEKCSisWWBeUHso4aaS+HVZtFlLetJjQcJ9ZmMkSDk?= =?Windows-1252?Q?mKVAJ7GDJVES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ofL3RY/RKMjL0NQ+Hr5chTN0FVpx2LiBcTS1F5Mw/w8kp/Hv3kVZaK44rxzRuyXhRgeGNBfA0dFth89cT3xKN8fjYlv+VmRVwriFjS7vHBhyJbfn28PDDKVQaWHaHugUpi7sGJ7vXnGJwofsEBy/92Vi0uP0+RWKvHzS4eRQHi/7V2FIT1FAAqx1NJxoiTk+owMZuBk+6XK/rzCX7RkEiZn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2016 04:28:02.9088 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2445 Subject: Re: [dpdk-dev] [PATCH v8 01/25] eal: define macro container_of X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2016 04:28:05 -0000 Hi Ferruh, On Monday 29 August 2016 10:13 PM, Ferruh Yigit wrote: > On 8/26/2016 2:56 PM, Shreyansh Jain wrote: >> Signed-off-by: Jan Viktorin >> Signed-off-by: Shreyansh Jain >> --- >> lib/librte_eal/common/include/rte_common.h | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h >> index 332f2a4..a9b6792 100644 >> --- a/lib/librte_eal/common/include/rte_common.h >> +++ b/lib/librte_eal/common/include/rte_common.h >> @@ -322,6 +322,22 @@ rte_bsf32(uint32_t v) >> #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) >> #endif >> >> +/** >> + * Return pointer to the wrapping struct instance. >> + * Example: >> + * >> + * struct wrapper { >> + * ... >> + * struct child c; >> + * ... >> + * }; >> + * >> + * struct child *x = obtain(...); >> + * struct wrapper *w = container_of(x, struct wrapper, c); >> + */ >> +#define container_of(p, type, member) \ >> + ((type *) (((char *) (p)) - offsetof(type, member))) >> + >> #define _RTE_STR(x) #x >> /** Take a macro value and get a string version of it */ >> #define RTE_STR(x) _RTE_STR(x) >> > > This gives compilation error for mlx5, because the libraries mlx depends > defines same macro: > ..../rte_common.h:338:9: error: 'container_of' macro redefined > /usr/include/infiniband/verbs.h:77:9: note: previous definition is here I thought testing with scripts/test-build.sh and default configuration would compile all drivers - I was wrong. I will retest the patches and release again. Is there a better way to test that no driver breaks? Any particular parameters I should use for test-build.sh? I used 'x86_64-native-linuxapp-gcc+default+debug+shared' for all patches. > > Does it make sense to protect macro with > #ifndef container_of > .... > #endif > > OR > > add a dpdk prefix? > > > Regards, > ferruh > - Shreyansh