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 A2060A034E; Sun, 6 Feb 2022 04:59:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C24141184; Sun, 6 Feb 2022 04:59:12 +0100 (CET) Received: from out162-62-57-49.mail.qq.com (out162-62-57-49.mail.qq.com [162.62.57.49]) by mails.dpdk.org (Postfix) with ESMTP id 0C46A41151 for ; Sun, 6 Feb 2022 04:59:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1644119943; bh=mqeh2FL94eOWTphP1tzB0H4Y+7HPNSQlusKBsaB16Ho=; h=From:To:Subject:Date:In-Reply-To:References; b=s8OJhj7ePhnTc/Bdgp5zwIVHvFNv/Y0AjAPcxO7AwvMp5aYn++uPMX0dxpv9IX8OW knB7HRcLmvwIOCt8bjaswh1AO+LGaJK8CCDS52W4nNsUhlsaF56G00q/YI2iQEYb1g 1YJNbSGN7qPggjStGgVjoGS0EAv4iTQGJNS8HOTM= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrszc10.qq.com (NewEsmtp) with SMTP id EAE16474; Sun, 06 Feb 2022 11:58:46 +0800 X-QQ-mid: xmsmtpt1644119942te7msvrlr Message-ID: X-QQ-XMAILINFO: MrfJYRspGRl/IdzhPhwtjkCw/8w11XbgNNAr07YtCGLa6mO4F7EasZcadiKjVW DhTjE+y1Q7/Q6B1pWhrEvigl8Wd3p/IfDNppGzIdmCCWG3nlNbucSPjwWq5hI0ILnbjCOXGFCG8G 1T5NOz3OeSAAo6g9muTXL03YbUrk7v1DdeuTWhjgRJilK2j1EwZIVTloS7J2Eh8JCqwpftynLhvL jYAHakNwiKTnZ4+ybslrHO3K1eujkLmutMNHdGj+wCgmTxtir7exBm0OHmwRRH0TVatoNBCYveW9 me1LjVKVMWdNSnpwWUBJKC44nlCiOFdSe/MJuNLzWcIyZiRqxsWUG7LCCcsRYIH0Bnm5BFQOklHW 9+eQHUmxT8tYptqlTtbJxUIc64uKuen6QpBFA+g13lWc1cpn57GrXwoGRNjDrICmAixbAzIf+CWm kzDCPQsg8tNRpk+/4BaR5HkUXpRG6rqrXqWuO/UFkarFBkBJe5AUMi91KME5RGEtCaiC626z0+IP +PLpRN9joS9Zp2HNDkoIMYwdwkWXCepmocBrS6wdgHLyxQ3tklLM3hcaCcI/U/YEvSReNiMb4Yaz W8kdrCVw8WIhZdbvB2L8SyCllKWbQ6Mc2UWdLCb/C2KPrMTv7VqaTGzoyEySpbMi2z7QsAJHPhuP 5kdLI7IlRMGW5cvU9p+Ft/9qmRpJjdJnwfseGPVFo3xtestazn8SQSJv+EpHQead2aFJINnCIPlm DzKJi0ZencC7LssmwNZMmxnqgOYMXi7cA5UHhEujov+v3NAI5056psZ3G3eryTof1UGSjni5RvBU G2lZXSqqzDFS0o0U4QKlnzDnncDwEafKHbl1RgXQ5VdWaGfaQmPMAPnI+HIIuqIQfJTpcSJni47m U+L5etJqPh From: Weiguo Li To: dev@dpdk.org Subject: [PATCH 11/16] kni: add define guards to avoid multi-inclusion Date: Sun, 6 Feb 2022 11:58:41 +0800 X-OQ-MSGID: <20220206035846.2840462-11-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220206035846.2840462-1-liwg06@foxmail.com> References: <20220206035846.2840462-1-liwg06@foxmail.com> 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..0879a7666e 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..73d70c9bda 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