From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17B38A04A5; Wed, 9 Feb 2022 14:52:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A589141143; Wed, 9 Feb 2022 14:52:51 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id AF87540140 for ; Wed, 9 Feb 2022 14:52:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644414769; x=1675950769; h=message-id:date:to:references:from:cc:subject: in-reply-to:content-transfer-encoding:mime-version; bh=GmaJbViQx8I/CL2fqfpHtHuOkFeQXqxXYvlDy8EbXNc=; b=D1KF76UPh+L3SRK3E3OOmGrujvoYH0WjLmXbKxermfRmdQrejGIj7jAE S273AyaBkCixaA7ClQdTxHnV3UTV1f5u8YZcm6BlW997jqupgiQDE/M5x wAV2bpWR0hyeIJ0VpaYQ3sf21Juosw+yQic+JfbSJL00nhe+FMI7SG0dQ mgk+2LgwbPK4sTQlWXAHwFxrPt8av/+3Atb4pLqHYGVGsSotZUM8FQ/jP THjwqSts2gYTkQJchzp46cpdViE13p+EMTxcxRRHua+kW1n8shgocjtsL Sr5vd76L3hMSaG9q3fWp3YNiGdVBJoeAWIbHdg0dC1RKrBYTXXPSK9pSB Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10252"; a="236613128" X-IronPort-AV: E=Sophos;i="5.88,355,1635231600"; d="scan'208";a="236613128" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 05:52:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,355,1635231600"; d="scan'208";a="622280291" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by FMSMGA003.fm.intel.com with ESMTP; 09 Feb 2022 05:52:48 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 05:52:47 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 9 Feb 2022 05:52:47 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 9 Feb 2022 05:52:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GJmsE8gJWwUSwMgT550d4IyKg/+PcSo/CY423hJTDfmCuTpmVRH4hnTatYmWKWUAc+m4PpRwvGcnCo/WzTfZcXLSKM/A2da/Au/CmMFOBypD40/zqEKXi98Z6fGW2u+NOT5Bzv1NMGjKZR+o8JvqGDaA6tPf8ENibbykNwJXL6z8Y83VsMGNS3oKC//NqceY7+vShLAY2UDS2FosskX2Ol0clQGMF80AuGmwHpB5+O0L3J7WIMnTig36Atm+PPhYlJJTlPQm/255FRxA4nFkfLffvMDwo6Lmy1dLZIax81icoj7uP/GPZWkJfc1nW93iFDXaaLVoQUYLWYJeTqAYvg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OxFqZg3KW3G4Wf4yycIYgFbsj+2mMQkx6t0tsedToUs=; b=Z5ACuiQ/LqeAj8UhVlGm1AhqmZoDjhUQD3Pg2r+N5Th/YKi/3JD3RCRmXkvPgBn5RtQYuUUmhwQrJOL9PWe+lUZYTG/S2auGTkD/vPGFWxpiotxYo7JArLBcyemFazGVrLVRevv6zJbOTHYHOIYcXMz9aKYFkGDz9sVl99t5Hox8/n2/0ZCB3dbg5fhaxoj6cSnGJ+gaUIJ91jxtoLcUqY25zFPFN2NS0Oe6g3Br6y9TUJNg4h2dUPiD+5PFCcXRr1x9GPjybftWwHd2OzsrSbEDNsMrMidT7paeiZn7dLXQA+375IlAfFMqZuP1VXZEJZ6e8U2Q9mlcqn6KUXOsiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN8PR11MB3569.namprd11.prod.outlook.com (2603:10b6:408:85::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 9 Feb 2022 13:52:46 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Wed, 9 Feb 2022 13:52:46 +0000 Message-ID: <552086d6-dfa9-de92-8e97-92543ac0e722@intel.com> Date: Wed, 9 Feb 2022 13:52:37 +0000 Content-Language: en-US To: Weiguo Li References: From: Ferruh Yigit CC: Subject: Re: [PATCH v3 1/4] kni: add define guards to avoid multi-inclusion X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0142.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:193::21) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3912e8a-6479-4e07-fc97-08d9ebd3739e X-MS-TrafficTypeDiagnostic: BN8PR11MB3569:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2043; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fHt0ZnOdXlh8Xk+w3H7VpvnLVby3K4BG2xXxl/iN4sqKXpYCozulFXbH+YaKVOBXl/lJgM2E96vKxH10//zjEvuFC2f9jLxLdssQEJO0V1Pcq0hUEMjLPh9vqtVlVNqcry17uC+hc3R8WcR6fQVE8SnSqv0M5y2/iWecycEy8aEKSwd/iNFOuwfU4Wht34tH/bp9UoDUgGQkRu8R0Ak3v1bqFYwebjQQ7FkzmMKzkNEfDJr66ac3EKKFPaf10tz7AVDDxz5j6DJ2J4RztRZCKO0syjPn246S9XMgyD9U/9J0gsut2Me04PAfGmDU/xk5yxPQWRBb0HZKGqbWqwQas65XjV+YPiPwiLiT0q2cfQlYceXBCTTDJWgyjDlE/xJch3eUM0PHUnQ7EXvZyqxFtraAj4W9N8OuH8U8Koy/Y3GsnqFcoErw2GIPVDiY5f843tYODbIkgAEe0U9J/7HGL2PgyiyAMVvhIkB1D6YowfS2yB8RHkn8Z1K5kksKa1AH5yGEWeEA2IOkUjHJS0Yi3hsW1fm/PRkCUzvpWGnKZfe6jAYe8JweVJn7hwgq2/VEIP9zMmS5mcy6f0d10f9iAQsMjlMXRLRbigccVcYxADPj5GeEJAcfE1PrR/gZMBHDeGN9AF/laceulWv4aPmdqlt4IXREP2jYY51xjNsp01xpiQhfMFSCJpkScFhNRuADjj0tvMgvWsk8z5fxP4JHWqb2CcLCH12Uk84zFoG8c8RAlPani5+YFpnrcdjhhzna X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(186003)(26005)(508600001)(2616005)(6486002)(53546011)(55236004)(6512007)(31696002)(6506007)(86362001)(6666004)(82960400001)(83380400001)(66476007)(66556008)(38100700002)(4326008)(8676002)(66946007)(316002)(6916009)(44832011)(36756003)(2906002)(31686004)(5660300002)(8936002)(48020200001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anNna0pONHYyZFp0SGRBVHAzeUR6WE15UkFuWGFwZzZyd3FiWG9JNFA4RkRK?= =?utf-8?B?T0ZEb21tUXA2N1I5dDYxeTZsVXdTVmhoQ0p5MmtDRThDOGJtV1dMT01QblUv?= =?utf-8?B?c2l4V2Z1VTE5WHprTDlDa2JSYzVJNlJWTWZReHhOY3JZNFFFd1kwMVFhZGhl?= =?utf-8?B?QjNBSjBwczMwUnViVU5hN3lEdU4rUDJ5UEZ4MUpIYklvNndKQitoU00wclRs?= =?utf-8?B?bTM1ZTk0bGNUSjJVdmRZM2hvL0g5Ylp6M3dKZjZmWDFtR0Z4bmMySGlmZzdL?= =?utf-8?B?VHZURFdzVXM3N3dqVGM5NEFsbDhMTEViWGxUM3NRT2Yxc0Zwdlp3azdmdEtH?= =?utf-8?B?aSs4TG02VWxZdUpUckIvTW9iZUxkVXA4UG0xbzI2dHFnVGl4ZDU0UWNZdm00?= =?utf-8?B?Q2Yrak15c3hsaS9USFV1VGxoVmYwbk5rYWZoaVdEc0ZjdTZIaWo5dWhYdXlM?= =?utf-8?B?ZEw5NnFMREdKRFlZY1Y3eTFXNHVLNHFTVFJhTEt6WWcwcE1HbGJJcHE1d0U0?= =?utf-8?B?WEVqL0Q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YrRkcyYzFreHZt?= =?utf-8?B?QkVtN2hka1BId0NPOTZBVG5OanVBK3J2U1NadFFGRjVkcUFUc2JtTHBUaVNW?= =?utf-8?B?UjB3Uk05WXZDSVIvWGF6NlE5RExMSmlDQ1BvYzhGRGxmdEk5aHlFa1ZGL1Nh?= =?utf-8?B?eVNab3ZQdHVDZThYWFdyN25mc044Qzl0anpBT0FFWU4xcXdXK2I3ZEFKejkw?= =?utf-8?B?Zlo4d2xNK25ZT0VPd0xxUkYyTkFrN1ZzMklydWQ4QytEalFpUWYvK0pzM0Ez?= =?utf-8?B?VTFGMkYrLzVHZnVGS2ZRNXhkZTE5eXFBdFFFaWJrNGRPMWFzckRRbVBsRVE1?= =?utf-8?B?anBWM0MybU54SnVCVmZWWU8rZm9zUHFxVThnYXpwdGdaSGw4SGxxTzdLWjJo?= =?utf-8?B?SDAwanpMM3Q3cUFEOG9zMWRpbThHNEdjdXltZmRjRlFiS01uOXFxU01yQmdV?= =?utf-8?B?bGdoUjZQTjdIWExvUWR4Q1R3Y1dVODJKR0FGQUYxbmdvUkUycFFTNGxiY1JZ?= =?utf-8?B?RllQUDdFMmZqVVBTYjhMRENHWi9DZUxCSlRMUzVzZURCWGZoTHlDcHRWanpC?= =?utf-8?B?b1UyNkZ1SzVhVXdYMXBvdkZhU3owU2g4aVcyUmNnbHdNendSdFhRQ21ZWXRv?= =?utf-8?B?YUJBQXR3bVhYWXROZUpydEsyU1BNSDlDa2ZoOGZpbVBMNVBTZ1UvWkRiYit2?= =?utf-8?B?K2Z6ZW1ITi9yYzNuelNWMllSN3JTc0FTd09teFArMUZkL0VGVEtsMW9WazBY?= =?utf-8?Q?5Dv60Fzj0ymGQh3SeWTyILo=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: c3912e8a-6479-4e07-fc97-08d9ebd3739e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 13:52:46.2248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QY9qnTVuT/JL1RVLYSHh2gph4Gegchj7SUqpk1KalEuUyiWLO9Yv1ytBpKTNOYxcPV2zMgNHaRWY4jHyPRX8Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3569 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2/9/2022 7:24 AM, Weiguo Li wrote: > Supplement define guards to prevent multiple inclusion. > It is kind of private header and only 'rte_kni.c' includes it, that is why missing guards doesn't cause trouble but no harm/objection to have them. > Signed-off-by: Weiguo Li Acked-by: Ferruh Yigit > --- > lib/kni/rte_kni_fifo.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/kni/rte_kni_fifo.h b/lib/kni/rte_kni_fifo.h > index d2ec82fe87..2ff71554c0 100644 > --- a/lib/kni/rte_kni_fifo.h > +++ b/lib/kni/rte_kni_fifo.h > @@ -2,7 +2,8 @@ > * Copyright(c) 2010-2014 Intel Corporation > */ > > - > +#ifndef RTE_KNI_FIFO_H > +#define RTE_KNI_FIFO_H It doesn't really differ much but other kni header guards wrapped with '_', I don't now why. If there will be a new version can you please apply the same here to have consistency, like: #ifndef _RTE_KNI_FIFO_H_ > > /** > * @internal when c11 memory model enabled use c11 atomic memory barrier. > @@ -115,3 +116,5 @@ kni_fifo_free_count(struct rte_kni_fifo *fifo) > uint32_t fifo_read = __KNI_LOAD_ACQUIRE(&fifo->read); > return (fifo_read - fifo_write - 1) & (fifo->len - 1); > } > + > +#endif /* RTE_KNI_FIFO_H */