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 CE5B2A034E; Wed, 9 Feb 2022 04:03:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FBA7411C3; Wed, 9 Feb 2022 04:02:59 +0100 (CET) Received: from out203-205-221-247.mail.qq.com (out203-205-221-247.mail.qq.com [203.205.221.247]) by mails.dpdk.org (Postfix) with ESMTP id 1B09441144 for ; Wed, 9 Feb 2022 04:02:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1644375770; bh=6rdjKrz3gI+aPHzmeXVGOY0AhaC/LVAhE/La7QBwY/0=; h=From:To:Subject:Date:In-Reply-To:References; b=AaCIoialgGgZKu1LxUhEEnn190MbDTDeCICqjqNT5RGQkPVpcefGPtZpbSawaOehF nuxRrpuFpCJsx57aahyvfT7z5W52Bn69jTpCldf4XBbThxGKcdxFrNbUseXMArpeF8 mnm116CY3QwZvdZ6w/1sGaymLBKHZCgR5f7sPic0= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrszb7.qq.com (NewEsmtp) with SMTP id 98A6079; Wed, 09 Feb 2022 11:02:24 +0800 X-QQ-mid: xmsmtpt1644375769tzjf4mbfu Message-ID: X-QQ-XMAILINFO: NOIkHYnr7VzdqSWhUDe6uWqxDIGDgwA6CbHzoeNJxaVP5/+eee7xhX1LMFaeAi Y7Kz1wxLADupUlsvtxgaTuHekAX9yl0uokA+NMLlf4Pq9feH4dIDWnEvdmYZlg69BaqPbViDYYmu Ey5rTne4CNvD1laWuzrU89P8DnvsIn873N3sxY0DtXwVCzOGIsEkRQq/X3EYt4TXZ/AQo0D8XYN0 Ehsp72PWqCrAVgYIfJbCFUCORX36jUVlfW0bQEygyfa8qSqJxNHSos+qmqSBA+G6ncfRovkcrwCp /MQSVNQ0byi+q0wjVsG5I6gMDieprGa7niZBhRJS/9Fgf2zYRQDbLwemXNcRficfcb3c11MXnT7r iGQfn6C9idx1bFlW5KP7u3j+cPknMZMy8PIHCCoBwk4gvIB0K7Slc8xnEuVkcRJtXB41+k2fv0HK k686DqRIRDV/jnihqluQh+ZFUbRDIbJGXthHSgbAIkYeYzJfU3dQFCwYYjUZqKomgDhHDgS6KIXH 0HFrCy9Q52p2VHNnwGHU0XmagfHSeGfyrbDDiuERhG0spR5PoBDk3VKqSF/GoE3rjgDcfaCZAJF/ 3gJptUBfxfwBjqdnOC7phc9fsFWGcirYOq0VcBT3AYNyg7QD2Dc7RDVlMd7cobut+b7JiL7q88AN XLlrU1mRMAE+u+CMtDfJhzTsmRMNl6Y78IM46MVIrWFIc532F5Pz8/Cjx0s3iHGPU70Yu4m5IOM6 LmuyJY/XSjKsK4VPXlLmcMVmYmZA8ttcOFDVyR3bKFMcOngvW6yAyvRRFR/H8tGfi1tzeFw2k5Vl LkSI9u3Wx+1qVBKt+4r90+j+0oHMqkjNY/enNKH5x4eHCt7OFB46aZZbEfocAq6AkRpCFlK4gmlo R+XGuexfI6CWNcpucuFFiiyJ8rtBb3YKfdZSOlWxgzkb2bh1s67KClCKpEudJFnqaxohdl/lFCet gK0DpVm2I= X-QQ-SPAM: true From: Weiguo Li To: dev@dpdk.org Subject: [PATCH v2 11/16] kni: add define guards to avoid multi-inclusion Date: Wed, 9 Feb 2022 11:02:19 +0800 X-OQ-MSGID: <9f64bdde3f088b3130729c1c9c35aa139b0a5b9f.1644374873.git.liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- kernel/linux/kni/compat.h | 5 +++++ lib/kni/rte_kni_fifo.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 664785674f..f15c66df26 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -3,6 +3,9 @@ * Minimal wrappers to allow compiling kni on older kernels. */ +#ifndef KNI_COMPAT_H +#define KNI_COMPAT_H + #include #ifndef RHEL_RELEASE_VERSION @@ -141,3 +144,5 @@ #if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE #define HAVE_TSK_IN_GUP #endif + +#endif /* KNI_COMPAT_H */ 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 /** * @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 */ -- 2.25.1