From patchwork Wed Nov 27 11:26:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 148904 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ED01F45DB6; Wed, 27 Nov 2024 12:27:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99E1E402C2; Wed, 27 Nov 2024 12:27:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 32475402BB for ; Wed, 27 Nov 2024 12:27:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732706819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ArKzgiyNtDggXHbLnUE6hhN6j1FRn3X8WPESaMD4LRc=; b=XmV7myi3GswUTW700QFyV/Eb1A6g4+qx6sCpKY0rXsT0J1dsl2XsMGP8CFFB2uEgUiaryz PeBC5RyqDv79WmrQxuE25EfZ8zYEPKu8Li2EpqNfGgr1I4zmpMOVHXqDKNmzM9228Jkp8z tv1eM8EYiKvh/0vkKeoQs2BmjUKUZAY= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-599-ev-93AKCPvu1U4wkWHqGOA-1; Wed, 27 Nov 2024 06:26:56 -0500 X-MC-Unique: ev-93AKCPvu1U4wkWHqGOA-1 X-Mimecast-MFC-AGG-ID: ev-93AKCPvu1U4wkWHqGOA Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3A9BD197731B; Wed, 27 Nov 2024 11:26:55 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CE36B1955F57; Wed, 27 Nov 2024 11:26:52 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Nicolas Chautru , Maxime Coquelin Subject: [RFC 1/6] baseband/acc: fix exported header Date: Wed, 27 Nov 2024 12:26:11 +0100 Message-ID: <20241127112617.1331125-2-david.marchand@redhat.com> In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -urz3nxdKd0NtDIsDE3D9ZB-_z9ALu7Rx0Mag3bK1FQ_1732706815 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 rte_acc_cfg.h relies on rte_acc_common_cfg.h. Fixes: 32e8b7ea35dd ("baseband/acc100: refactor to segregate common code") Signed-off-by: David Marchand --- drivers/baseband/acc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/baseband/acc/meson.build b/drivers/baseband/acc/meson.build index 64fcf1537a..d9fb947eaa 100644 --- a/drivers/baseband/acc/meson.build +++ b/drivers/baseband/acc/meson.build @@ -26,4 +26,4 @@ deps += ['bus_pci'] sources = files('acc_common.c', 'rte_acc100_pmd.c', 'rte_vrb_pmd.c') -headers = files('rte_acc_cfg.h') +headers = files('rte_acc_cfg.h', 'rte_acc_common_cfg.h') From patchwork Wed Nov 27 11:26:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 148905 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 091C145DB6; Wed, 27 Nov 2024 12:27:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB118402E8; Wed, 27 Nov 2024 12:27:10 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 9A8F5402E4 for ; Wed, 27 Nov 2024 12:27:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732706829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uJF+9kTW+z3cKGqomeLwi0c8nSFiUYgNUyEcboCcMig=; b=eL/z8+j2YyOAfr2cKanO4vKMj3+7EBRRBlloJbApc/uHLTggvr5qDgYeqaoRBsx7pCQHGp KNreTXmf254eWckuIx4hDwZ2Wu+ZYelfrQC1NHKn3inSd2CoFGIgs9m6mCNWRyDt98bl+g kkR2IgNZQjjF78hiKZm2Om9rGN9acu8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-KwDIlGtuPVSkmrDix-C3OQ-1; Wed, 27 Nov 2024 06:27:03 -0500 X-MC-Unique: KwDIlGtuPVSkmrDix-C3OQ-1 X-Mimecast-MFC-AGG-ID: KwDIlGtuPVSkmrDix-C3OQ Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2D7C5195604F; Wed, 27 Nov 2024 11:27:02 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2D92D300019E; Wed, 27 Nov 2024 11:26:57 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Nicolas Chautru , Ferruh Yigit , Andrew Rybchenko , Srikanth Yalavarthi , Sachin Saxena , Hemant Agrawal , Ori Kam , Akhil Goyal , Anoob Joseph Subject: [RFC 2/6] drivers: drop export of driver headers Date: Wed, 27 Nov 2024 12:26:12 +0100 Message-ID: <20241127112617.1331125-3-david.marchand@redhat.com> In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1ovTW6PBKwwoP7c4qoGU8vxBdKuVcnWZutccYCYxY70_1732706822 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 Many classes are exposing driver only headers as public headers. Move them to the driver_sdk_headers list. Signed-off-by: David Marchand --- lib/bbdev/meson.build | 5 ++--- lib/ethdev/meson.build | 6 +++--- lib/mldev/meson.build | 5 +---- lib/rawdev/meson.build | 3 ++- lib/regexdev/meson.build | 3 ++- lib/security/meson.build | 3 ++- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/bbdev/meson.build b/lib/bbdev/meson.build index 07685e7578..7d035065f1 100644 --- a/lib/bbdev/meson.build +++ b/lib/bbdev/meson.build @@ -8,7 +8,6 @@ if is_windows endif sources = files('rte_bbdev.c') -headers = files('rte_bbdev.h', - 'rte_bbdev_pmd.h', - 'rte_bbdev_op.h') +headers = files('rte_bbdev.h', 'rte_bbdev_op.h') +driver_sdk_headers = files('rte_bbdev_pmd.h') deps += ['mbuf'] diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index f1d2586591..8ba6c708a2 100644 --- a/lib/ethdev/meson.build +++ b/lib/ethdev/meson.build @@ -26,11 +26,8 @@ headers = files( 'rte_ethdev_trace_fp.h', 'rte_dev_info.h', 'rte_flow.h', - 'rte_flow_driver.h', 'rte_mtr.h', - 'rte_mtr_driver.h', 'rte_tm.h', - 'rte_tm_driver.h', ) indirect_headers += files( @@ -42,6 +39,9 @@ driver_sdk_headers += files( 'ethdev_driver.h', 'ethdev_pci.h', 'ethdev_vdev.h', + 'rte_flow_driver.h', + 'rte_mtr_driver.h', + 'rte_tm_driver.h', ) if is_linux diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build index 2c933baad6..efc3edd288 100644 --- a/lib/mldev/meson.build +++ b/lib/mldev/meson.build @@ -32,11 +32,8 @@ headers = files( 'rte_mldev.h', ) -indirect_headers += files( - 'rte_mldev_core.h', -) - driver_sdk_headers += files( + 'rte_mldev_core.h', 'rte_mldev_pmd.h', 'mldev_utils.h', ) diff --git a/lib/rawdev/meson.build b/lib/rawdev/meson.build index 7dfc3d5cf9..ccfd922fda 100644 --- a/lib/rawdev/meson.build +++ b/lib/rawdev/meson.build @@ -8,6 +8,7 @@ if is_windows endif sources = files('rte_rawdev.c') -headers = files('rte_rawdev.h', 'rte_rawdev_pmd.h') +headers = files('rte_rawdev.h') +driver_sdk_headers = files('rte_rawdev_pmd.h') deps += ['telemetry'] diff --git a/lib/regexdev/meson.build b/lib/regexdev/meson.build index 426e764ece..05040051c5 100644 --- a/lib/regexdev/meson.build +++ b/lib/regexdev/meson.build @@ -8,6 +8,7 @@ if is_windows endif sources = files('rte_regexdev.c') -headers = files('rte_regexdev.h', 'rte_regexdev_driver.h') +headers = files('rte_regexdev.h') indirect_headers += files('rte_regexdev_core.h') +driver_sdk_headers = files('rte_regexdev_driver.h') deps += ['mbuf'] diff --git a/lib/security/meson.build b/lib/security/meson.build index 1034a7a299..d5431d472c 100644 --- a/lib/security/meson.build +++ b/lib/security/meson.build @@ -2,5 +2,6 @@ # Copyright(c) 2017-2019 Intel Corporation sources = files('rte_security.c') -headers = files('rte_security.h', 'rte_security_driver.h') +headers = files('rte_security.h') +driver_sdk_headers = files('rte_security_driver.h') deps += ['mempool', 'cryptodev', 'net'] From patchwork Wed Nov 27 11:26:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 148906 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4345445DB6; Wed, 27 Nov 2024 12:27:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0802A4064C; Wed, 27 Nov 2024 12:27:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5D1D640612 for ; Wed, 27 Nov 2024 12:27:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732706832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zIX5EQuxcXgQS8shkb2waXRMmh9r/Si6LFwN20R0usg=; b=Z/eN4B0Sl0L7ARCTSwL0CYCfvvbABKreDdwW7hkjeg0Io04U71m3MckB0JdMKZsYDBxUHE 0KtkftxrqO7QilXbsJNhQf//sltFxKc0jB6cj3ws2b9Yxp/ZRujT+OT3azgK4NfV4ZRYgt Wymi0wPvXzf8Rm/bJUmxnmTXV13EgD8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-628-Rts8utHaOs2d2Zy9rPq20Q-1; Wed, 27 Nov 2024 06:27:08 -0500 X-MC-Unique: Rts8utHaOs2d2Zy9rPq20Q-1 X-Mimecast-MFC-AGG-ID: Rts8utHaOs2d2Zy9rPq20Q Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 64A2A1955E9A; Wed, 27 Nov 2024 11:27:07 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1B6A11956054; Wed, 27 Nov 2024 11:27:04 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Amit Prakash Shukla , Jerin Jacob Subject: [RFC 3/6] eventdev: do not include driver header in DMA adapter Date: Wed, 27 Nov 2024 12:26:13 +0100 Message-ID: <20241127112617.1331125-4-david.marchand@redhat.com> In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 5S_sJuzLJgUCawK-BPThC77neBfINfaX4QoUzDc_oDg_1732706827 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 The dma adapter header does not require including rte_dmadev_pmd.h which is a driver header. Fixes: 66a30a29387a ("eventdev/dma: introduce DMA adapter") Signed-off-by: David Marchand Acked-by: Amit Prakash Shukla --- lib/eventdev/rte_event_dma_adapter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eventdev/rte_event_dma_adapter.h b/lib/eventdev/rte_event_dma_adapter.h index 5c480b82ff..34142f26db 100644 --- a/lib/eventdev/rte_event_dma_adapter.h +++ b/lib/eventdev/rte_event_dma_adapter.h @@ -144,7 +144,7 @@ #include #include -#include +#include #include #ifdef __cplusplus From patchwork Wed Nov 27 11:26:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 148907 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8B0645DB6; Wed, 27 Nov 2024 12:27:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A40C2402B7; Wed, 27 Nov 2024 12:27:26 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 499B14060A for ; Wed, 27 Nov 2024 12:27:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732706844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0nRFfogw3WrElOhb9/f9383X5e8Gu3bp2zuShXuQhmk=; b=ZJ6126s/bofaYNM9JEzNd0A4BvnwTQQGP6IV+IoUmARJTDPfuD3P1mU3kdb6YZznA1tlJE 3HP7LD7PoxFM4ecTfMoAbw1tVE6gswZ215bPUaqMHH+N0HyFdVg4Nfmmrmoz058UJg2eo3 PK1DEMTH3Xc0i8s9T7fgImOIrLvK1CA= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-374-Q0xs8kQZO3O9mm_dAabdGQ-1; Wed, 27 Nov 2024 06:27:23 -0500 X-MC-Unique: Q0xs8kQZO3O9mm_dAabdGQ-1 X-Mimecast-MFC-AGG-ID: Q0xs8kQZO3O9mm_dAabdGQ Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 43FFE1956064; Wed, 27 Nov 2024 11:27:19 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6198A300019E; Wed, 27 Nov 2024 11:27:10 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Long Li , Wei Hu , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , Hemant Agrawal , Sachin Saxena , Vladimir Medvedkin , Ian Stokes , Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Jakub Palider , Tomasz Duszynski , Gagandeep Singh , Jingjing Wu , Stephen Hemminger , Akhil Goyal , Haiyue Wang , Jeff Guo , Michael Baum , Jerin Jacob , Nipun Gupta , Shreyansh Jain , Xiaoyun Li Subject: [RFC 4/6] drivers: fix exported headers Date: Wed, 27 Nov 2024 12:26:14 +0100 Message-ID: <20241127112617.1331125-5-david.marchand@redhat.com> In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 28N9wqHyLM3YuBRY353LLWU0cyTJA4xE3cak-WHR9ig_1732706839 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 Those headers could not be included individually as they were not including their dependencies, or were subject to some build warnings. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Fixes: 5b2a1a02dcaf ("crypto/cnxk: fix experimental version for PMD API") Fixes: e5abbeeeefa5 ("crypto/cnxk: add PMD API for getting CPTR") Fixes: 3ca607402c4d ("crypto/cnxk: add PMD API to flush CTX") Fixes: 8c3495f5d2dd ("net/dpaa: support loopback API") Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction") Fixes: 23f627e0ed28 ("net/mlx5: add flow sync API") Fixes: f5177bdc8b76 ("net/mlx5: add GENEVE TLV options parser API") Fixes: 7cf197684589 ("raw/cnxk_bphy: support interrupt init and cleanup") Fixes: 633dae698070 ("raw/cnxk_gpio: add standard GPIO operations") Fixes: 53c71586c789 ("raw/dpaa2_cmdif: support enqueue/dequeue operations") Fixes: c39d1e082a4b ("raw/ntb: setup queues") Signed-off-by: David Marchand --- drivers/bus/vmbus/rte_vmbus_reg.h | 6 ++++++ drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h | 4 ++++ drivers/net/dpaa/rte_pmd_dpaa.h | 2 ++ drivers/net/iavf/rte_pmd_iavf.h | 6 ++++++ drivers/net/mlx5/rte_pmd_mlx5.h | 3 +++ drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 16 ++++++++++++++++ drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h | 3 +++ drivers/raw/dpaa2_cmdif/rte_pmd_dpaa2_cmdif.h | 2 ++ drivers/raw/ntb/rte_pmd_ntb.h | 2 ++ 9 files changed, 44 insertions(+) diff --git a/drivers/bus/vmbus/rte_vmbus_reg.h b/drivers/bus/vmbus/rte_vmbus_reg.h index e3299aa871..95c8eb29b4 100644 --- a/drivers/bus/vmbus/rte_vmbus_reg.h +++ b/drivers/bus/vmbus/rte_vmbus_reg.h @@ -6,6 +6,12 @@ #ifndef _VMBUS_REG_H_ #define _VMBUS_REG_H_ +#include + +#include +#include +#include + /* * Hyper-V SynIC message format. */ diff --git a/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h b/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h index 02278605a2..2bb0ff9e95 100644 --- a/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h +++ b/drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h @@ -11,8 +11,12 @@ #ifndef _PMD_CNXK_CRYPTO_H_ #define _PMD_CNXK_CRYPTO_H_ +#include #include +#include +#include + /* Forward declarations */ /** diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h index ec45633ba2..0a57e2097a 100644 --- a/drivers/net/dpaa/rte_pmd_dpaa.h +++ b/drivers/net/dpaa/rte_pmd_dpaa.h @@ -5,6 +5,8 @@ #ifndef _PMD_DPAA_H_ #define _PMD_DPAA_H_ +#include + /** * @file rte_pmd_dpaa.h * diff --git a/drivers/net/iavf/rte_pmd_iavf.h b/drivers/net/iavf/rte_pmd_iavf.h index 56d453fc4c..04b86a5dd7 100644 --- a/drivers/net/iavf/rte_pmd_iavf.h +++ b/drivers/net/iavf/rte_pmd_iavf.h @@ -15,6 +15,7 @@ */ #include + #include #include #include @@ -184,6 +185,7 @@ __rte_experimental static inline void rte_pmd_ifd_dump_proto_xtr_metadata(struct rte_mbuf *m) { +#ifdef ALLOW_EXPERIMENTAL_API union rte_pmd_ifd_proto_xtr_metadata data; if (!rte_pmd_ifd_dynf_proto_xtr_metadata_avail()) @@ -243,6 +245,10 @@ rte_pmd_ifd_dump_proto_xtr_metadata(struct rte_mbuf *m) else if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_PROTO_XTR_IP_OFFSET) printf(" - Flexible descriptor's Extraction: ip_offset=%u", data.ip_ofs); +#else + RTE_SET_USED(m); + RTE_VERIFY(false); +#endif } #ifdef __cplusplus diff --git a/drivers/net/mlx5/rte_pmd_mlx5.h b/drivers/net/mlx5/rte_pmd_mlx5.h index fdd2f65888..f2c6aebe0b 100644 --- a/drivers/net/mlx5/rte_pmd_mlx5.h +++ b/drivers/net/mlx5/rte_pmd_mlx5.h @@ -5,6 +5,9 @@ #ifndef RTE_PMD_PRIVATE_MLX5_H_ #define RTE_PMD_PRIVATE_MLX5_H_ +#include + +#include #include /** diff --git a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h index f668e6ea82..c200c935ff 100644 --- a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h +++ b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h @@ -391,6 +391,7 @@ rte_pmd_bphy_intr_init(uint16_t dev_id) { struct cnxk_bphy_irq_msg msg = { .type = CNXK_BPHY_IRQ_MSG_TYPE_INIT, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, CNXK_BPHY_DEF_QUEUE, &msg, @@ -411,6 +412,7 @@ rte_pmd_bphy_intr_fini(uint16_t dev_id) { struct cnxk_bphy_irq_msg msg = { .type = CNXK_BPHY_IRQ_MSG_TYPE_FINI, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, CNXK_BPHY_DEF_QUEUE, &msg, @@ -470,6 +472,9 @@ rte_pmd_bphy_intr_unregister(uint16_t dev_id, int irq_num) { struct cnxk_bphy_irq_info info = { .irq_num = irq_num, + .handler = NULL, + .data = NULL, + .cpu = -1, }; struct cnxk_bphy_irq_msg msg = { .type = CNXK_BPHY_IRQ_MSG_TYPE_UNREGISTER, @@ -496,6 +501,7 @@ rte_pmd_bphy_intr_mem_get(uint16_t dev_id, struct cnxk_bphy_mem *mem) { struct cnxk_bphy_irq_msg msg = { .type = CNXK_BPHY_IRQ_MSG_TYPE_MEM_GET, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, CNXK_BPHY_DEF_QUEUE, &msg, @@ -518,6 +524,7 @@ rte_pmd_bphy_npa_pf_func_get(uint16_t dev_id, uint16_t *pf_func) { struct cnxk_bphy_irq_msg msg = { .type = CNXK_BPHY_MSG_TYPE_NPA_PF_FUNC, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, CNXK_BPHY_DEF_QUEUE, &msg, @@ -540,6 +547,7 @@ rte_pmd_bphy_sso_pf_func_get(uint16_t dev_id, uint16_t *pf_func) { struct cnxk_bphy_irq_msg msg = { .type = CNXK_BPHY_MSG_TYPE_SSO_PF_FUNC, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, CNXK_BPHY_DEF_QUEUE, &msg, @@ -565,6 +573,7 @@ rte_pmd_bphy_cgx_get_link_info(uint16_t dev_id, uint16_t lmac, { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_GET_LINKINFO, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, info, sizeof(*info)); @@ -586,6 +595,7 @@ rte_pmd_bphy_cgx_intlbk_disable(uint16_t dev_id, uint16_t lmac) { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_INTLBK_DISABLE, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); @@ -607,6 +617,7 @@ rte_pmd_bphy_cgx_intlbk_enable(uint16_t dev_id, uint16_t lmac) { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_INTLBK_ENABLE, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); @@ -628,6 +639,7 @@ rte_pmd_bphy_cgx_ptp_rx_disable(uint16_t dev_id, uint16_t lmac) { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_PTP_RX_DISABLE, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); @@ -649,6 +661,7 @@ rte_pmd_bphy_cgx_ptp_rx_enable(uint16_t dev_id, uint16_t lmac) { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_PTP_RX_ENABLE, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); @@ -720,6 +733,7 @@ rte_pmd_bphy_cgx_start_rxtx(uint16_t dev_id, uint16_t lmac) { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_START_RXTX, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); @@ -741,6 +755,7 @@ rte_pmd_bphy_cgx_stop_rxtx(uint16_t dev_id, uint16_t lmac) { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_STOP_RXTX, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); @@ -765,6 +780,7 @@ rte_pmd_bphy_cgx_get_supported_fec(uint16_t dev_id, uint16_t lmac, { struct cnxk_bphy_cgx_msg msg = { .type = CNXK_BPHY_CGX_MSG_TYPE_GET_SUPPORTED_FEC, + .data = NULL, }; return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, fec, sizeof(*fec)); diff --git a/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h b/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h index 80a37be9c7..72d138ab1d 100644 --- a/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h +++ b/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h @@ -261,6 +261,7 @@ rte_pmd_gpio_get_pin_value(uint16_t dev_id, int gpio, int *val) { struct cnxk_gpio_msg msg = { .type = CNXK_GPIO_MSG_TYPE_GET_PIN_VALUE, + .data = NULL, }; return __rte_pmd_gpio_enq_deq(dev_id, gpio, &msg, val, sizeof(*val)); @@ -285,6 +286,7 @@ rte_pmd_gpio_get_pin_edge(uint16_t dev_id, int gpio, { struct cnxk_gpio_msg msg = { .type = CNXK_GPIO_MSG_TYPE_GET_PIN_EDGE, + .data = NULL, }; return __rte_pmd_gpio_enq_deq(dev_id, gpio, &msg, edge, sizeof(*edge)); @@ -308,6 +310,7 @@ rte_pmd_gpio_get_pin_dir(uint16_t dev_id, int gpio, enum cnxk_gpio_pin_dir *dir) { struct cnxk_gpio_msg msg = { .type = CNXK_GPIO_MSG_TYPE_GET_PIN_DIR, + .data = NULL, }; return __rte_pmd_gpio_enq_deq(dev_id, gpio, &msg, dir, sizeof(*dir)); diff --git a/drivers/raw/dpaa2_cmdif/rte_pmd_dpaa2_cmdif.h b/drivers/raw/dpaa2_cmdif/rte_pmd_dpaa2_cmdif.h index 483b66eaae..7731fc6363 100644 --- a/drivers/raw/dpaa2_cmdif/rte_pmd_dpaa2_cmdif.h +++ b/drivers/raw/dpaa2_cmdif/rte_pmd_dpaa2_cmdif.h @@ -12,6 +12,8 @@ * */ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/drivers/raw/ntb/rte_pmd_ntb.h b/drivers/raw/ntb/rte_pmd_ntb.h index 6591ce7931..76da3be026 100644 --- a/drivers/raw/ntb/rte_pmd_ntb.h +++ b/drivers/raw/ntb/rte_pmd_ntb.h @@ -5,6 +5,8 @@ #ifndef _RTE_PMD_NTB_H_ #define _RTE_PMD_NTB_H_ +#include + /* App needs to set/get these attrs */ #define NTB_QUEUE_SZ_NAME "queue_size" #define NTB_QUEUE_NUM_NAME "queue_num" From patchwork Wed Nov 27 11:26:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 148908 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE54745DB6; Wed, 27 Nov 2024 12:27:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDD964060A; Wed, 27 Nov 2024 12:27:28 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 085C140662 for ; Wed, 27 Nov 2024 12:27:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732706846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z3lWC15ZvNxOLMUbQP3r6ZRlPrOQU7kVISnGg4jLKXs=; b=ZmWXYYGRQVs0JpyfY0RSm64OPuysJYih3wQ7hFdvVjPlr2ZkN2FTeRqYEiieMlGwHtezKt eer7drwxTWDRHH2xfQUrZ8ESVWJBY30DSY3/fwtHjM7LOvZuc5IgqogNSzUpuxxmQxyaoN MFK3btI5l5PIs23V1yMnYAGe6klrhzE= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-92-xBvRv7jvPGqPAUAJ6XG-pg-1; Wed, 27 Nov 2024 06:27:25 -0500 X-MC-Unique: xBvRv7jvPGqPAUAJ6XG-pg-1 X-Mimecast-MFC-AGG-ID: xBvRv7jvPGqPAUAJ6XG-pg Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 084A81956077; Wed, 27 Nov 2024 11:27:24 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 291291955F40; Wed, 27 Nov 2024 11:27:21 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Konstantin Ananyev Subject: [RFC 5/6] build: install indirect headers to a dedicated directory Date: Wed, 27 Nov 2024 12:26:15 +0100 Message-ID: <20241127112617.1331125-6-david.marchand@redhat.com> In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: R6enF5Ph8rmSiMa3ZCdjDoqVI6lQDjcHmxvoGhUlnCI_1732706844 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 The headers check currently skips "indirect" headers as instrusted via the indirect_headers meson variable. This headers check has some limitation that will be addressed in a next change by inspected all exported headers. However, exported headers lack the information about "indirect" quality. Separate "indirect" headers by exporting them in a internal/ sub directory. This also makes it more obvious which headers are not to be directly used by an application. Signed-off-by: David Marchand --- buildtools/pkg-config/meson.build | 8 +++++++- lib/eal/x86/include/meson.build | 3 ++- lib/meson.build | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build index b36add17e3..809706fe3e 100644 --- a/buildtools/pkg-config/meson.build +++ b/buildtools/pkg-config/meson.build @@ -27,12 +27,18 @@ endif # are skipped in the case of static linkage thanks to the flag --as-needed. +subdirs = [ '.', 'internal' ] +if get_option('include_subdir_arch') != '' + subdirs = [ subdirs, get_option('include_subdir_arch') ] + subdirs = [ subdirs, join_paths(get_option('include_subdir_arch'), 'internal')] +endif + pkg.generate(name: 'dpdk-libs', filebase: 'libdpdk-libs', description: '''Internal-only DPDK pkgconfig file. Not for direct use. Use libdpdk.pc instead of this file to query DPDK compile/link arguments''', version: meson.project_version(), - subdirs: [get_option('include_subdir_arch'), '.'], + subdirs: subdirs, extra_cflags: pkg_extra_cflags, libraries: ['-Wl,--as-needed'] + dpdk_libraries, libraries_private: dpdk_extra_ldflags) diff --git a/lib/eal/x86/include/meson.build b/lib/eal/x86/include/meson.build index 52d2f8e969..a100330208 100644 --- a/lib/eal/x86/include/meson.build +++ b/lib/eal/x86/include/meson.build @@ -22,5 +22,6 @@ arch_indirect_headers = files( 'rte_byteorder_32.h', 'rte_byteorder_64.h', ) -install_headers(arch_headers + arch_indirect_headers, subdir: get_option('include_subdir_arch')) +install_headers(arch_headers, subdir: get_option('include_subdir_arch')) +install_headers(arch_indirect_headers, subdir: join_paths(get_option('include_subdir_arch'), 'internal')) dpdk_chkinc_headers += arch_headers diff --git a/lib/meson.build b/lib/meson.build index ce92cb5537..78ada7782e 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -202,7 +202,7 @@ foreach l:libraries dpdk_libs_enabled += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) - install_headers(indirect_headers) + install_headers(indirect_headers, subdir: 'internal') if get_option('enable_driver_sdk') install_headers(driver_sdk_headers) endif From patchwork Wed Nov 27 11:26:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 148909 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E6C1045DB6; Wed, 27 Nov 2024 12:27:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 030C54042C; Wed, 27 Nov 2024 12:27:35 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9F4DC40666 for ; Wed, 27 Nov 2024 12:27:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732706853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1PL+plvyxXjW40hzPZLa7TAWnh/z0Aai4uJ5uZGcDus=; b=icEjUG7IRv0Kf3TTreMRZ/QjBp4oHIv4IOVag710hDU/8sJzMHta4O3cFnrQZMMyYgOJwG CxWyswgAsdIwympSTdiIcksz66dDgzEq8FHWqjvXsEpWKdxtvzHPW/KCAmaAHO6KVpLzQO 1n8WtDmlt31jjBcaEVLK+z0jAr4+V50= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-654-0aL5FMZcMwmM0GcHdWCwmg-1; Wed, 27 Nov 2024 06:27:29 -0500 X-MC-Unique: 0aL5FMZcMwmM0GcHdWCwmg-1 X-Mimecast-MFC-AGG-ID: 0aL5FMZcMwmM0GcHdWCwmg Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C41E71956077; Wed, 27 Nov 2024 11:27:28 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E0B2B1956054; Wed, 27 Nov 2024 11:27:26 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Aaron Conole , Michael Santana Subject: [RFC 6/6] buildtools: externally check exported headers Date: Wed, 27 Nov 2024 12:26:16 +0100 Message-ID: <20241127112617.1331125-7-david.marchand@redhat.com> In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com> References: <20241127112617.1331125-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: cBz5KEwE_pUj7p5D-f1hetc5w6Fs7240GQf6bZPnsu0_1732706848 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 At the moment, the headers check (triggered via the check_includes meson option) is run "internally", iow with compilation flags and include path coming from the meson components. One issue is that both internal and public headers are usually stored in a single directory in the DPDK components. If a lib/foo library exports a header rte_foo.h (iow rte_foo.h is part of the headers list in lib/foo/meson.build) and this rte_foo.h includes an internal header foo_internal.h, then the headers check won't detect such an issue as rte_foo.h is compiled with -Ilib/foo. Reimplement the headers check by inspecting (compiling) all DPDK headers installed in a staging directory. To identify the directory where DPDK headers are, this check relies on pkg-config and skips EAL generic/ and internal/ headers. The existing headers check (though less accurate) is kept as is, as it provides a first level of check and may have existing users. Signed-off-by: David Marchand --- .ci/linux-build.sh | 7 ++-- buildtools/chkincs/Makefile | 77 +++++++++++++++++++++++++++++++++++ devtools/test-meson-builds.sh | 6 ++- 3 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 buildtools/chkincs/Makefile diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index fdb5787621..3146d9ccd8 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -95,8 +95,6 @@ OPTS="$OPTS -Ddefault_library=$DEF_LIB" OPTS="$OPTS -Dbuildtype=$buildtype" if [ "$STDATOMIC" = "true" ]; then OPTS="$OPTS -Denable_stdatomic=true" -else - OPTS="$OPTS -Dcheck_includes=true" fi if [ "$MINI" = "true" ]; then OPTS="$OPTS -Denable_drivers=net/null" @@ -176,13 +174,16 @@ if [ "$RUN_TESTS" = "true" ]; then [ "$failed" != "true" ] fi -# Test examples compilation with an installed dpdk +# Test headers and examples compilation with an installed dpdk if [ "$BUILD_EXAMPLES" = "true" ]; then [ -d install ] || DESTDIR=$(pwd)/install meson install -C build export LD_LIBRARY_PATH=$(dirname $(find $(pwd)/install -name librte_eal.so)):$LD_LIBRARY_PATH export PATH=$(dirname $(find $(pwd)/install -name dpdk-devbind.py)):$PATH export PKG_CONFIG_PATH=$(dirname $(find $(pwd)/install -name libdpdk.pc)):$PKG_CONFIG_PATH export PKGCONF="pkg-config --define-prefix" + + make -C buildtools/chkincs O=build/buildtools/chkincs + find build/examples -maxdepth 1 -type f -name "dpdk-*" | while read target; do target=${target%%:*} diff --git a/buildtools/chkincs/Makefile b/buildtools/chkincs/Makefile new file mode 100644 index 0000000000..838819c617 --- /dev/null +++ b/buildtools/chkincs/Makefile @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2024 Red Hat, Inc. + +ifeq ($(V),) +Q ?= @ +else +Q = +endif + +O ?= build + +PKGCONF ?= pkg-config + +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) +$(error "no installation of DPDK found") +endif + +ifeq ($(I),) + +.PHONY: headers_list +.ONESHELL: +headers_list: + $(Q)for dir in $$($(PKGCONF) --cflags-only-I libdpdk); do + dir=$${dir##-I} + [ -e $$dir/rte_build_config.h ] || continue + $(MAKE) I="$$dir" O="$(O)" + break + done +else + +HEADERS := $(shell find $(I) -name "*.h" | grep -vE $(I)'/(generic|internal)/') +SRCS := $(patsubst $(I)/%.h, $(O)/%.c, $(HEADERS)) +.PRECIOUS: $(SRCS) + +PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) +CFLAGS = $(shell $(PKGCONF) --cflags libdpdk) -Wall -Wextra -Werror +LDFLAGS = $(shell $(PKGCONF) --libs libdpdk) + +OBJS := $(patsubst $(I)/%.h, $(O)/%.o, $(HEADERS)) +OBJS_EXP := $(patsubst $(I)/%.h, $(O)/%+exp.o, $(HEADERS)) +OBJS_ALL := $(patsubst $(I)/%.h, $(O)/%+all.o, $(HEADERS)) + +all: $(OBJS) $(OBJS_EXP) $(OBJS_ALL) + +$(O): + $(Q)mkdir -p $@ + +$(O)/%.c: $(I)/%.h $(O) gen_c_file_for_header.py Makefile + $(Q)python3 gen_c_file_for_header.py $< $@ + +$(O)/%.o: $(O)/%.c Makefile $(PC_FILE) + $(Q)$(CC) $(CFLAGS) -o $@ -c $< + +$(O)/%+exp.o: $(O)/%.c Makefile $(PC_FILE) + $(Q)$(CC) $(CFLAGS) -DALLOW_EXPERIMENTAL_API -o $@ -c $< + +$(O)/%+all.o: $(O)/%.c Makefile $(PC_FILE) + $(Q)$(CC) $(CFLAGS) -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -o $@ -c $< + +CXXFLAGS = $(shell $(PKGCONF) --cflags libdpdk) -Wall -Wextra -Werror + +OBJS_CPP := $(patsubst $(I)/%.h, $(O)/%.cpp.o, $(HEADERS)) +OBJS_CPP_EXP := $(patsubst $(I)/%.h, $(O)/%.cpp+exp.o, $(HEADERS)) +OBJS_CPP_ALL := $(patsubst $(I)/%.h, $(O)/%.cpp+all.o, $(HEADERS)) + +all: $(OBJS_CPP) $(OBJS_CPP_EXP) $(OBJS_CPP_ALL) + +$(O)/%.cpp.o: $(O)/%.c Makefile $(PC_FILE) + $(Q)$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(O)/%.cpp+exp.o: $(O)/%.c Makefile $(PC_FILE) + $(Q)$(CXX) $(CXXFLAGS) -DALLOW_EXPERIMENTAL_API -o $@ -c $< + +$(O)/%.cpp+all.o: $(O)/%.c Makefile $(PC_FILE) + $(Q)$(CXX) $(CXXFLAGS) -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -o $@ -c $< + +endif diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 4fff1f7177..c3cebead70 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -248,7 +248,7 @@ generic_isa='nehalem' if ! check_cc_flags "-march=$generic_isa" ; then generic_isa='corei7' fi -build build-x86-generic cc skipABI -Dcheck_includes=true \ +build build-x86-generic cc skipABI \ -Dlibdir=lib -Dcpu_instruction_set=$generic_isa $use_shared # 32-bit with default compiler @@ -318,9 +318,11 @@ if [ "$examples" = 'all' ]; then done | sort -u | tr '\n' ' ') fi -# if pkg-config defines the necessary flags, test building some examples +# if pkg-config defines the necessary flags, check headers and test building some examples if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then export PKGCONF="pkg-config --define-prefix" + echo "## Checking exported headers" + $MAKE -C buildtools/chkincs O=$build_path/buildtools/chkincs -j for example in $examples; do echo "## Building $example" [ $example = helloworld ] && static=static || static= # save disk space