From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dharmesh Mehta Subject: Re: [dpdk-users] how to build 'example' folder in dpdk-2.2.0? Date: Fri, 9 Jun 2017 07:01:11 +0000 (UTC) Message-ID: <714096167.5158706.1496991671422@mail.yahoo.com> References: Reply-To: Dharmesh Mehta Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "users@dpdk.org" , "dev@dpdk.org" To: Shyam Shrivastav , Sam Return-path: Received: from sonic305-4.consmr.mail.bf2.yahoo.com (sonic305-4.consmr.mail.bf2.yahoo.com [74.6.133.43]) by dpdk.org (Postfix) with ESMTP id 19E362BA1 for ; Fri, 9 Jun 2017 09:01:28 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Following is my makefile. I hope this will help.copy following content in "= Makefile" and just run 1) make=C2=A0download_and_extract2) make HOME_DIR =3D $(shell pwd)DPDK_VERSION=3D17.05PKTGEN_VERSION=3D3.2.10#######= #############################################DPDK_PACKAGE_NAME=3Ddpdk-$(DPD= K_VERSION)DPDK_TAR_FILE_NAME=3D$(DPDK_PACKAGE_NAME).tar.xz#################= ###################################PKTGEN_PACKAGE_NAME=3Dpktgen-$(PKTGEN_VE= RSION)PKTGEN_TAR_FILE_NAME=3D$(PKTGEN_PACKAGE_NAME).tar.xz#################= ###################################DPDK_SOURCE_CODE_URL=3Dhttp://fast.dpdk.= org/rel/$(DPDK_TAR_FILE_NAME)PKTGEN_SOURCE_CODE_URL=3Dhttp://dpdk.org/brows= e/apps/pktgen-dpdk/snapshot/$(PKTGEN_TAR_FILE_NAME)########################= ############################export RTE_SDK=3D$(HOME_DIR)/$(DPDK_PACKAGE_NAM= E)export RTE_TARGET=3Dx86_64-native-linuxapp-gcc###########################= #########################export PKTGEN_PATH=3D$(HOME_DIR)/$(PKTGEN_PACKAGE_= NAME)#################################################### PATH_TO_DPDK_PACKAGE =3D $(HOME_DIR)/packages/$(DPDK_TAR_FILE_NAME)ifneq ("= $(wildcard $(PATH_TO_DPDK_PACKAGE))","") export DPDK_PACKAGE_FILE_EXISTS = =3D 1else export DPDK_PACKAGE_FILE_EXISTS =3D 0endif PATH_TO_PKTGEN_PACKAGE =3D $(HOME_DIR)/packages/$(PKTGEN_TAR_FILE_NAME)ifne= q ("$(wildcard $(PATH_TO_PKTGEN_PACKAGE))","") export PKTGEN_PACKAGE_FILE_E= XISTS =3D 1else export PKTGEN_PACKAGE_FILE_EXISTS =3D 0endif #################################################### all: banner make build_dpdk make build_dpdk_all_examples make load_module #################################################### download_and_extract: banner make download make extract download: bannerifeq ($(DPDK_PACKAGE_FILE_EXISTS),1) cp $(HOME_DIR)/package= s/$(DPDK_TAR_FILE_NAME) =C2=A0$(HOME_DIR)else rm -rf $(DPDK_TAR_FILE_NAME) = wget $(DPDK_SOURCE_CODE_URL) mkdir -p $(HOME_DIR)/packages cp $(HOME_DIR)/$= (DPDK_TAR_FILE_NAME) $(HOME_DIR)/packagesendif####ifeq ($(PKTGEN_PACKAGE_FI= LE_EXISTS),1) cp $(HOME_DIR)/packages/$(PKTGEN_TAR_FILE_NAME) =C2=A0$(HOME_= DIR)else rm -rf $(PKTGEN_TAR_FILE_NAME) wget $(PKTGEN_SOURCE_CODE_URL) mkdi= r -p $(HOME_DIR)/packages cp $(HOME_DIR)/$(PKTGEN_TAR_FILE_NAME) $(HOME_DIR= )/packagesendif #################################################### extract: tar -xJf $(DPDK_TAR_FILE_NAME) tar -xJf $(PKTGEN_TAR_FILE_NAME) #################################################### build_dpdk: cd $(RTE_SDK) && mkdir -p $(RTE_SDK)/$(RTE_TARGET) cd $(RTE_SDK= ) && make config T=3D$(RTE_TARGET)#cd $(RTE_SDK) && sed -ri 's,(PMD_PCAP=3D= ).*,\1y,' build/.config cd $(RTE_SDK) && make T=3D$(RTE_TARGET) cd $(RTE_SD= K) && sudo make install cd $(RTE_SDK) && cp $(RTE_SDK)/build/.config =C2=A0= =C2=A0$(RTE_SDK)/$(RTE_TARGET) cd $(RTE_SDK) && cp -r $(RTE_SDK)/build/inc= lude $(RTE_SDK)/$(RTE_TARGET) #################################################### load_module: @echo "Loading module uio_pci_generic" sudo modprobe uio_pci_g= eneric sudo modprobe uio -sudo insmod $(RTE_SDK)/build/kmod/igb_uio.ko sudo= modprobe vfio-pci #################################################### clean: =C2=A0banner rm -rf $(RTE_SDK) rm -rf $(PKTGEN_PATH) #################################################### clean_all: banner rm -rf $(RTE_SDK) rm -rf $(DPDK_TAR_FILE_NAME) rm -rf $(P= KTGEN_TAR_FILE_NAME) ####################################################example_helloworld: cd = $(RTE_SDK)/examples/helloworld && make example_cmdline: cd $(RTE_SDK)/examples/cmdline && make example_vhost: cd $(RTE_SDK)/examples/vhost && make example_exception_path: cd $(RTE_SDK)/examples/exception_path && make example_bond: cd $(RTE_SDK)/examples/bond && make example_ethtool: cd $(RTE_SDK)/examples/ethtool && make example_ip_pipeline: cd $(RTE_SDK)/examples/ip_pipeline && make example_kni: cd $(RTE_SDK)/examples/kni && make example_l2fwd-jobstats: cd $(RTE_SDK)/examples/l2fwd-jobstats && make example_l3fwd-power: cd $(RTE_SDK)/examples/l3fwd-power && make example_performance-thread: cd $(RTE_SDK)/examples/performance-thread && ma= ke example_quota_watermark: cd $(RTE_SDK)/examples/quota_watermark && make example_tep_termination: cd $(RTE_SDK)/examples/tep_termination && make example_vmdq: cd $(RTE_SDK)/examples/vmdq && make example_ip_reassembly: cd $(RTE_SDK)/examples/ip_reassembly && make example_l2fwd: cd $(RTE_SDK)/examples/l2fwd && make example_l2fwd-keepalive: cd $(RTE_SDK)/examples/l2fwd-keepalive && make example_l3fwd-vf: cd $(RTE_SDK)/examples/l3fwd-vf && make example_multi_process: cd $(RTE_SDK)/examples/multi_process && make example_ptpclient: cd $(RTE_SDK)/examples/ptpclient && make example_rxtx_callbacks: cd $(RTE_SDK)/examples/rxtx_callbacks && make example_timer: cd $(RTE_SDK)/examples/timer && make example_vmdq_dcb: cd $(RTE_SDK)/examples/vmdq_dcb && make example_distributor: cd $(RTE_SDK)/examples/distributor && make example_ipsec-secgw: cd $(RTE_SDK)/examples/ipsec-secgw && make example_l2fwd-cat: cd $(RTE_SDK)/examples/l2fwd-cat && make example_l3fwd: cd $(RTE_SDK)/examples/l3fwd && make example_link_status_interrupt: cd $(RTE_SDK)/examples/link_status_interrupt= && make example_netmap_compat: cd $(RTE_SDK)/examples/netmap_compat && make example_qos_meter: cd $(RTE_SDK)/examples/qos_meter && make example_server_node_efd: cd $(RTE_SDK)/examples/server_node_efd && make example_vm_power_manager: cd $(RTE_SDK)/examples/vm_power_manager && make example_dpdk_qat: cd $(RTE_SDK)/examples/dpdk_qat && make example_ip_fragmentation: cd $(RTE_SDK)/examples/ip_fragmentation && make example_ipv4_multicast: cd $(RTE_SDK)/examples/ipv4_multicast && make example_l2fwd-crypto: cd $(RTE_SDK)/examples/l2fwd-crypto && make example_l3fwd-acl: cd $(RTE_SDK)/examples/l3fwd-acl && make example_load_balancer: cd $(RTE_SDK)/examples/load_balancer && make example_packet_ordering: cd $(RTE_SDK)/examples/packet_ordering && make example_qos_sched: cd $(RTE_SDK)/examples/qos_sched && make example_skeleton: cd $(RTE_SDK)/examples/skeleton && make example_vhost_xen: cd $(RTE_SDK)/examples/vhost_xen && make #################################################### build_dpdk_all_examples: banner make example_vhost make example_helloworld = make example_cmdline make example_exception_path make example_bond make exa= mple_ethtool make example_ip_pipeline make example_kni make example_l2fwd-j= obstats make example_l3fwd-power make example_performance-thread make examp= le_quota_watermark make example_tep_termination make example_vmdq make exam= ple_ip_reassembly make example_l2fwd make example_l2fwd-keepalive make exam= ple_l3fwd-vf make example_multi_process make example_ptpclient make example= _rxtx_callbacks make example_timer make example_vmdq_dcb make example_distr= ibutor make example_ipsec-secgw make example_l3fwd make example_link_status= _interrupt make example_netmap_compat make example_qos_meter make example_s= erver_node_efd make example_ip_fragmentation make example_ipv4_multicast ma= ke example_l2fwd-crypto make example_l3fwd-acl make example_load_balancer m= ake example_packet_ordering make example_qos_sched make example_skeleton #m= ake example_l2fwd-cat #make example_vm_power_manager #make example_dpdk_qat= #make example_vhost_xen #################################################### banner: @echo "" @echo "**************************************************"= @echo "HOME_DIR=3D$(HOME_DIR)" @echo "DPDK_VERSION=3D$(DPDK_VERSION)" @ech= o "DPDK_PACKAGE_NAME=3D$(DPDK_PACKAGE_NAME)" @echo "DPDK_TAR_FILE_NAME=3D$(= DPDK_TAR_FILE_NAME)" @echo "DPDK_SOURCE_CODE_URL=3D$(DPDK_SOURCE_CODE_URL)"= @echo "RTE_SDK=3D$(RTE_SDK)" @echo "RTE_TARGET=3D$(RTE_TARGET)" @echo "PKT= GEN_PACKAGE_NAME=3D$(PKTGEN_PACKAGE_NAME)" @echo "PKTGEN_TAR_FILE_NAME=3D$(= PKTGEN_TAR_FILE_NAME)" @echo "PKTGEN_SOURCE_CODE_URL=3D$(PKTGEN_SOURCE_CODE= _URL)" @echo "**************************************************" @echo "" #################################################### From: Shyam Shrivastav To: Sam =20 Cc: users@dpdk.org; dev@dpdk.org Sent: Thursday, June 8, 2017 11:43 PM Subject: Re: [dpdk-users] [dpdk-dev] how to build 'example' folder in dpdk= -2.2.0? =20 For linux http://dpdk.org/doc/guides/linux_gsg/index.html http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html http://dpdk.org/doc/guides/linux_gsg/build_sample_apps.html On Fri, Jun 9, 2017 at 8:31 AM, Sam wrote: > hi all, > > I want to build example(DPDK_HOME/example/*) in dpdk, and to have a look = at > vhost demo. But I can't find guide in dpdk home page or document. > > So is there some document to tell me HOWTO? > =20