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 DC6C342CA4; Tue, 13 Jun 2023 10:18:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F74942C4D; Tue, 13 Jun 2023 10:18:00 +0200 (CEST) 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 5613542D0C for ; Tue, 13 Jun 2023 10:17:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686644277; 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=QwEpOmLLS/u3VX5k2LlhqCuMahOhJbg7bx48K9sHAxQ=; b=X24hFfTYLRD3SEPhSjH1BYSHk4KwcLJ5eMyqIu5AfOtTuGDgaNvpN0gO0Mykl00tutbm1l CkQ6fPUwvkOZfKUZ+W4cG0hH2PRhf67ZwtAdEmZhY2503bm9gPAK1KBafdGR2dbgdu3pUF mWawP1leNwdgPL5rmNlWbEFARbGqn3g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-221-y4jZ5VB6Mr-5GV-MJ0E9KA-1; Tue, 13 Jun 2023 04:17:54 -0400 X-MC-Unique: y4jZ5VB6Mr-5GV-MJ0E9KA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4056C101AA42; Tue, 13 Jun 2023 08:17:54 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33450492CAE; Tue, 13 Jun 2023 08:17:53 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Byron Marohn , Yipeng Wang Subject: [PATCH 2/4] examples/server_node_efd: simplify build configuration Date: Tue, 13 Jun 2023 10:17:39 +0200 Message-Id: <20230613081741.4083273-3-david.marchand@redhat.com> In-Reply-To: <20230613081741.4083273-1-david.marchand@redhat.com> References: <20230613081741.4083273-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit 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 Rename sub directories in this example. This removes the only special case in examples and will ease a next change. Signed-off-by: David Marchand --- doc/guides/sample_app_ug/server_node_efd.rst | 14 +++++++------- examples/meson.build | 4 ++-- examples/server_node_efd/Makefile | 2 +- .../server_node_efd/{node => efd_node}/Makefile | 0 .../server_node_efd/{node => efd_node}/meson.build | 2 -- examples/server_node_efd/{node => efd_node}/node.c | 0 .../{server => efd_server}/Makefile | 0 .../server_node_efd/{server => efd_server}/args.c | 0 .../server_node_efd/{server => efd_server}/args.h | 0 .../server_node_efd/{server => efd_server}/init.c | 0 .../server_node_efd/{server => efd_server}/init.h | 0 .../server_node_efd/{server => efd_server}/main.c | 0 .../{server => efd_server}/meson.build | 2 -- 13 files changed, 10 insertions(+), 14 deletions(-) rename examples/server_node_efd/{node => efd_node}/Makefile (100%) rename examples/server_node_efd/{node => efd_node}/meson.build (95%) rename examples/server_node_efd/{node => efd_node}/node.c (100%) rename examples/server_node_efd/{server => efd_server}/Makefile (100%) rename examples/server_node_efd/{server => efd_server}/args.c (100%) rename examples/server_node_efd/{server => efd_server}/args.h (100%) rename examples/server_node_efd/{server => efd_server}/init.c (100%) rename examples/server_node_efd/{server => efd_server}/init.h (100%) rename examples/server_node_efd/{server => efd_server}/main.c (100%) rename examples/server_node_efd/{server => efd_server}/meson.build (94%) diff --git a/doc/guides/sample_app_ug/server_node_efd.rst b/doc/guides/sample_app_ug/server_node_efd.rst index c6cbc3def6..7253b38da7 100644 --- a/doc/guides/sample_app_ug/server_node_efd.rst +++ b/doc/guides/sample_app_ug/server_node_efd.rst @@ -137,7 +137,7 @@ which is used to distribute packets to nodes, which the number of flows specified in the command line (1 million, by default). -.. literalinclude:: ../../../examples/server_node_efd/server/init.c +.. literalinclude:: ../../../examples/server_node_efd/efd_server/init.c :language: c :start-after: Create EFD table. 8< :end-before: >8 End of creation EFD table. @@ -146,7 +146,7 @@ After initialization, packets are received from the enabled ports, and the IPv4 address from the packets is used as a key to look up in the EFD table, which tells the node where the packet has to be distributed. -.. literalinclude:: ../../../examples/server_node_efd/server/main.c +.. literalinclude:: ../../../examples/server_node_efd/efd_server/main.c :language: c :start-after: Processing packets. 8< :end-before: >8 End of process_packets. @@ -156,7 +156,7 @@ and enqueued in the shared ring between the server and the node. After this, a new burst of packets is received and this process is repeated infinitely. -.. literalinclude:: ../../../examples/server_node_efd/server/main.c +.. literalinclude:: ../../../examples/server_node_efd/efd_server/main.c :language: c :start-after: Flush rx queue. 8< :end-before: >8 End of sending a burst of traffic to a node. @@ -167,7 +167,7 @@ ring with the server and send them out, if they belong to the node. At initialization, it attaches to the server process memory, to have access to the shared ring, parameters and statistics. -.. literalinclude:: ../../../examples/server_node_efd/node/node.c +.. literalinclude:: ../../../examples/server_node_efd/efd_node/node.c :language: c :start-after: Attaching to the server process memory. 8< :end-before: >8 End of attaching to the server process memory. @@ -176,7 +176,7 @@ access to the shared ring, parameters and statistics. Then, the hash table that contains the flows that will be handled by the node is created and populated. -.. literalinclude:: ../../../examples/server_node_efd/node/node.c +.. literalinclude:: ../../../examples/server_node_efd/efd_node/node.c :language: c :start-after: Creation of hash table. 8< :end-before: >8 End of creation of hash table. @@ -188,7 +188,7 @@ If there is a hit, packet is stored in a buffer, to be eventually transmitted in one of the enabled ports. If key is not there, packet is dropped, since the flow is not handled by the node. -.. literalinclude:: ../../../examples/server_node_efd/node/node.c +.. literalinclude:: ../../../examples/server_node_efd/efd_node/node.c :language: c :start-after: Packets dequeued from the shared ring. 8< :end-before: >8 End of packets dequeuing. @@ -196,7 +196,7 @@ flow is not handled by the node. Finally, note that both processes updates statistics, such as transmitted, received and dropped packets, which are shown and refreshed by the server app. -.. literalinclude:: ../../../examples/server_node_efd/server/main.c +.. literalinclude:: ../../../examples/server_node_efd/efd_server/main.c :language: c :start-after: Display recorded statistics. 8< :end-before: >8 End of displaying the recorded statistics. diff --git a/examples/meson.build b/examples/meson.build index 6968c09252..55ba8847a0 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -46,8 +46,8 @@ all_examples = [ 'qos_meter', 'qos_sched', 'rxtx_callbacks', - 'server_node_efd/node', - 'server_node_efd/server', + 'server_node_efd/efd_node', + 'server_node_efd/efd_server', 'service_cores', 'skeleton', 'timer', diff --git a/examples/server_node_efd/Makefile b/examples/server_node_efd/Makefile index e4a4a94a79..6d61c93dac 100644 --- a/examples/server_node_efd/Makefile +++ b/examples/server_node_efd/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016-2020 Intel Corporation -subdirs := node server +subdirs := efd_node efd_server .PHONY: all static shared clean $(subdirs) all static shared clean: $(subdirs) diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/efd_node/Makefile similarity index 100% rename from examples/server_node_efd/node/Makefile rename to examples/server_node_efd/efd_node/Makefile diff --git a/examples/server_node_efd/node/meson.build b/examples/server_node_efd/efd_node/meson.build similarity index 95% rename from examples/server_node_efd/node/meson.build rename to examples/server_node_efd/efd_node/meson.build index 1c720968af..b03e65f266 100644 --- a/examples/server_node_efd/node/meson.build +++ b/examples/server_node_efd/efd_node/meson.build @@ -6,8 +6,6 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' -name = 'efd_node' - allow_experimental_apis = true deps += ['hash'] sources += files('node.c') diff --git a/examples/server_node_efd/node/node.c b/examples/server_node_efd/efd_node/node.c similarity index 100% rename from examples/server_node_efd/node/node.c rename to examples/server_node_efd/efd_node/node.c diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/efd_server/Makefile similarity index 100% rename from examples/server_node_efd/server/Makefile rename to examples/server_node_efd/efd_server/Makefile diff --git a/examples/server_node_efd/server/args.c b/examples/server_node_efd/efd_server/args.c similarity index 100% rename from examples/server_node_efd/server/args.c rename to examples/server_node_efd/efd_server/args.c diff --git a/examples/server_node_efd/server/args.h b/examples/server_node_efd/efd_server/args.h similarity index 100% rename from examples/server_node_efd/server/args.h rename to examples/server_node_efd/efd_server/args.h diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/efd_server/init.c similarity index 100% rename from examples/server_node_efd/server/init.c rename to examples/server_node_efd/efd_server/init.c diff --git a/examples/server_node_efd/server/init.h b/examples/server_node_efd/efd_server/init.h similarity index 100% rename from examples/server_node_efd/server/init.h rename to examples/server_node_efd/efd_server/init.h diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/efd_server/main.c similarity index 100% rename from examples/server_node_efd/server/main.c rename to examples/server_node_efd/efd_server/main.c diff --git a/examples/server_node_efd/server/meson.build b/examples/server_node_efd/efd_server/meson.build similarity index 94% rename from examples/server_node_efd/server/meson.build rename to examples/server_node_efd/efd_server/meson.build index 7abc333e1d..f1a6616738 100644 --- a/examples/server_node_efd/server/meson.build +++ b/examples/server_node_efd/efd_server/meson.build @@ -6,8 +6,6 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' -name = 'efd_server' - allow_experimental_apis = true deps += 'efd' sources += files('args.c', 'init.c', 'main.c') -- 2.40.1