From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C6C86A04B1; Tue, 29 Sep 2020 15:51:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 311221B6BD; Tue, 29 Sep 2020 15:51:37 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id B6FF21B68E for ; Tue, 29 Sep 2020 15:51:34 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601387493; 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=Xq4oRBPfvan6pBUYIfeBmhgPA2OAokgiZDrURBwlv0Q=; b=JYm1DfyPl7uksw8c9v0f/UTfQTa227QtUvqip8wlDuiUDEiSDgYLwvXoLudOLqxfBg5bVF LjTP4B2rJXqJ6ArnNHlAQa7auy97TXizsSa+3+9lGuQMcOOLL+lZG+2s5rwgQH7DOuFm1c Ck2rVPEVW2oCLK0sgo6zVyxBI+YzItg= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-593-q9u3U6lEPNKppbumQZzg4A-1; Tue, 29 Sep 2020 09:51:31 -0400 X-MC-Unique: q9u3U6lEPNKppbumQZzg4A-1 Received: by mail-vk1-f200.google.com with SMTP id x17so741990vke.5 for ; Tue, 29 Sep 2020 06:51:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Xq4oRBPfvan6pBUYIfeBmhgPA2OAokgiZDrURBwlv0Q=; b=jWbW8v+CZcATLg0rKvpw0QUXijTzSom7Gb3vlB73cd3v6efjCIlG0LXLwLSp9r1KtT Ptatj9X2gskHhoOViVTLQ7ZLSIRFdmfW9cQJWQTtyeQYvhefUIlTHY9G6g/PeIF1B167 f6qHcEYEmGQkAY9sRfT7iXQtuFRwOwO9xPNyIvYYbHcZ/ksDDdHrqJaSetxH+ILUOT2d nZaTq/PO5YfMBIRxTb9WnafLyl7UsrrB1e45IlNBFUtdnImcszicvhiFzJ3peIoAOd97 He9wxJjCUH4Bzoht/PwY3oiByDwbIM8xabJhAVvY6rbOK9MPaIMFuphw2wSUFV9rDWHU EH+g== X-Gm-Message-State: AOAM531LmaLsf6qdNb2FvsiFFnULXMKEpbLfTJz3eL6VC/4QdVVGOR/H bIF0CWTrv/FyFQskQsMJA2Mr0DcWX8Fe407QLUR9+zQt0XTErVax+YBt+ZPqHnZh87y/PFqCo4B 8jFJQ7og62RWHn8hS3sA= X-Received: by 2002:a05:6102:3029:: with SMTP id v9mr3021837vsa.5.1601387490458; Tue, 29 Sep 2020 06:51:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx086f1+YHdDT7kUy0e9Y3Wolro15ziDiUmC5P7Jh5NKAcbSjaVcdBEvgzK7VvlemnePF9/+WgB2Z/NkYPNV3g= X-Received: by 2002:a05:6102:3029:: with SMTP id v9mr3021821vsa.5.1601387490005; Tue, 29 Sep 2020 06:51:30 -0700 (PDT) MIME-Version: 1.0 References: <20200910152645.9342-2-cristian.dumitrescu@intel.com> <20200923180645.55852-1-cristian.dumitrescu@intel.com> <20200923180645.55852-37-cristian.dumitrescu@intel.com> In-Reply-To: <20200923180645.55852-37-cristian.dumitrescu@intel.com> From: David Marchand Date: Tue, 29 Sep 2020 15:51:18 +0200 Message-ID: To: Cristian Dumitrescu Cc: dev , Thomas Monjalon Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v5 36/41] examples/pipeline: add new example application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Sep 23, 2020 at 8:07 PM Cristian Dumitrescu wrote: > > Add new example application to showcase the API of the newly > introduced SWX pipeline type. > > Signed-off-by: Cristian Dumitrescu > --- > MAINTAINERS | 1 + > examples/meson.build | 1 + > examples/pipeline/Makefile | 51 ++++ > examples/pipeline/main.c | 50 ++++ > examples/pipeline/meson.build | 16 + > examples/pipeline/obj.c | 470 +++++++++++++++++++++++++++++ > examples/pipeline/obj.h | 131 ++++++++ > examples/pipeline/thread.c | 549 ++++++++++++++++++++++++++++++++++ > examples/pipeline/thread.h | 28 ++ > 9 files changed, 1297 insertions(+) > create mode 100644 examples/pipeline/Makefile > create mode 100644 examples/pipeline/main.c > create mode 100644 examples/pipeline/meson.build > create mode 100644 examples/pipeline/obj.c > create mode 100644 examples/pipeline/obj.h > create mode 100644 examples/pipeline/thread.c > create mode 100644 examples/pipeline/thread.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index 3b16d7a4b..ba8d55c22 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1332,6 +1332,7 @@ F: app/test/test_table* > F: app/test-pipeline/ > F: doc/guides/sample_app_ug/test_pipeline.rst > F: examples/ip_pipeline/ > +F: examples/pipeline/ Not really happy to see a new example which seems a clone of the old exampl= e. > F: doc/guides/sample_app_ug/ip_pipeline.rst > > > diff --git a/examples/meson.build b/examples/meson.build > index eb13e8210..245d98575 100644 > --- a/examples/meson.build > +++ b/examples/meson.build > @@ -33,6 +33,7 @@ all_examples =3D [ > 'ntb', 'packet_ordering', > 'performance-thread/l3fwd-thread', > 'performance-thread/pthread_shim', > + 'pipeline', > 'ptpclient', > 'qos_meter', 'qos_sched', > 'rxtx_callbacks', > diff --git a/examples/pipeline/Makefile b/examples/pipeline/Makefile > new file mode 100644 > index 000000000..8d01fbfed > --- /dev/null > +++ b/examples/pipeline/Makefile > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2010-2020 Intel Corporation Copyright 2020. > + > +# binary name > +APP =3D pipeline > + > +# all source are stored in SRCS-y > +SRCS-y +=3D main.c > +SRCS-y +=3D obj.c > +SRCS-y +=3D thread.c > + > +# Build using pkg-config variables if possible > +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) > +$(error "no installation of DPDK found") > +endif > + > +all: shared > +.PHONY: shared static > +shared: build/$(APP)-shared > + ln -sf $(APP)-shared build/$(APP) > +static: build/$(APP)-static > + ln -sf $(APP)-static build/$(APP) > + > +PKGCONF ?=3D pkg-config > + > +PC_FILE :=3D $(shell $(PKGCONF) --path libdpdk 2>/dev/null) > +CFLAGS +=3D -O3 $(shell $(PKGCONF) --cflags libdpdk) I did not catch it on the first pass, but now looking deeper, this example uses experimental APIs and its makefile should contain the -DALLOW_EXPERIMENTAL_API cflag to indicate acceptance. This triggers build warnings (or errors with -Werror), when compiled as an external example. obj.c: In function =E2=80=98pipeline_create=E2=80=99: obj.c:381:2: warning: =E2=80=98rte_swx_pipeline_config=E2=80=99 is deprecat= ed: Symbol is not yet part of stable ABI [-Wdeprecated-declarations] 381 | status =3D rte_swx_pipeline_config(&p, numa_node); | ^~~~~~ etc... > +LDFLAGS_SHARED =3D $(shell $(PKGCONF) --libs libdpdk) > +LDFLAGS_STATIC =3D -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdp= dk) Copied/pasted from older Makefiles ? I get a: ln -sf pipeline-shared build/pipeline cc build/main.o build/obj.o build/thread.o -o build/pipeline-static -L/home/dmarchan/intel-ipsec-mb/install/lib -Wl,-Bstatic -Wl,--whole-archive -L/home/dmarchan/builds/build-x86-default/install/usr/local/lib -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_octeontx.a -l:librte_common_octeontx2.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_octeontx2.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_pmd_af_packet.a -l:librte_pmd_af_xdp.a -l:librte_pmd_ark.a -l:librte_pmd_atlantic.a -l:librte_pmd_avp.a -l:librte_pmd_axgbe.a -l:librte_pmd_bond.a -l:librte_pmd_bnx2x.a -l:librte_pmd_bnxt.a -l:librte_pmd_cxgbe.a -l:librte_pmd_dpaa.a -l:librte_pmd_dpaa2.a -l:librte_pmd_e1000.a -l:librte_pmd_ena.a -l:librte_pmd_enetc.a -l:librte_pmd_enic.a -l:librte_pmd_failsafe.a -l:librte_pmd_fm10k.a -l:librte_pmd_i40e.a -l:librte_pmd_hinic.a -l:librte_pmd_hns3.a -l:librte_pmd_iavf.a -l:librte_pmd_ice.a -l:librte_pmd_igc.a -l:librte_pmd_ipn3ke.a -l:librte_pmd_ixgbe.a -l:librte_pmd_kni.a -l:librte_pmd_liquidio.a -l:librte_pmd_memif.a -l:librte_pmd_mlx4.a -l:librte_pmd_mlx5.a -l:librte_pmd_netvsc.a -l:librte_pmd_nfp.a -l:librte_pmd_null.a -l:librte_pmd_octeontx.a -l:librte_pmd_octeontx2.a -l:librte_pmd_pcap.a -l:librte_pmd_pfe.a -l:librte_pmd_qede.a -l:librte_pmd_ring.a -l:librte_pmd_sfc.a -l:librte_pmd_softnic.a -l:librte_pmd_szedata2.a -l:librte_pmd_tap.a -l:librte_pmd_thunderx.a -l:librte_pmd_vdev_netvsc.a -l:librte_pmd_vhost.a -l:librte_pmd_virtio.a -l:librte_pmd_vmxnet3.a -l:librte_rawdev_dpaa2_cmdif.a -l:librte_rawdev_dpaa2_qdma.a -l:librte_rawdev_ifpga.a -l:librte_rawdev_ioat.a -l:librte_rawdev_ntb.a -l:librte_rawdev_octeontx2_dma.a -l:librte_rawdev_octeontx2_ep.a -l:librte_rawdev_skeleton.a -l:librte_pmd_aesni_gcm.a -l:librte_pmd_aesni_mb.a -l:librte_pmd_caam_jr.a -l:librte_pmd_ccp.a -l:librte_pmd_dpaa_sec.a -l:librte_pmd_dpaa2_sec.a -l:librte_pmd_kasumi.a -l:librte_pmd_nitrox.a -l:librte_pmd_null_crypto.a -l:librte_pmd_octeontx_crypto.a -l:librte_pmd_octeontx2_crypto.a -l:librte_pmd_openssl.a -l:librte_pmd_crypto_scheduler.a -l:librte_pmd_snow3g.a -l:librte_pmd_virtio_crypto.a -l:librte_pmd_zuc.a -l:librte_pmd_isal.a -l:librte_pmd_octeontx_compress.a -l:librte_pmd_qat.a -l:librte_pmd_zlib.a -l:librte_pmd_mlx5_regex.a -l:librte_pmd_ifc.a -l:librte_pmd_mlx5_vdpa.a -l:librte_pmd_dpaa_event.a -l:librte_pmd_dpaa2_event.a -l:librte_pmd_octeontx2_event.a -l:librte_pmd_opdl_event.a -l:librte_pmd_skeleton_event.a -l:librte_pmd_sw_event.a -l:librte_pmd_dsw_event.a -l:librte_pmd_octeontx_event.a -l:librte_pmd_bbdev_null.a -l:librte_pmd_bbdev_turbo_sw.a -l:librte_pmd_bbdev_fpga_lte_fec.a -l:librte_pmd_bbdev_fpga_5gnr_fec.a -l:librte_node.a -l:librte_graph.a -l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:librte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a -l:librte_power.a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:librte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive -lpcap -lIPSec_MB -Wl,--as-needed -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -pthread -lm -ldl -lnuma -lfdt -lpcap -lbsd -L/usr/usr/lib64 -lmlx5 -lpthread -L/usr/usr/lib64 -lpthread -libverbs -lpthread -lbpf -lz -lmlx4 -lpthread -L/usr/usr/lib64 -libverbs -lpthread -Wl,-R/usr/lib64 -lsze2 -lcrypto -lz -ldl -pthread -L/opt/isa-l/lib -lisal -lelf -lz -ljansson /usr/bin/ld: cannot find -lpcap Probably because of -Wl,-Bstatic. I suppose you must align with Bruce previous work: 8549295db07b ("build/pkg-config: improve static linking flags") (note for self, l3fwd-graph has to be looked at again.. suspect the same is= sue). > + > +CFLAGS +=3D -I. > + > +OBJS :=3D $(patsubst %.c,build/%.o,$(SRCS-y)) > + > +build/%.o: %.c Makefile $(PC_FILE) | build > + $(CC) $(CFLAGS) -c $< -o $@ > + > +build/$(APP)-shared: $(OBJS) > + $(CC) $(OBJS) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) > + > +build/$(APP)-static: $(OBJS) > + $(CC) $(OBJS) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) > + > +build: > + @mkdir -p $@ > + > +.PHONY: clean > +clean: > + rm -f build/$(APP)* build/*.o > + test -d build && rmdir -p build || true > + Unneeded empty line. --=20 David Marchand