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 CA552A052A; Wed, 23 Dec 2020 08:55:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A03C0CA39; Wed, 23 Dec 2020 08:55:42 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2B30ACA37 for ; Wed, 23 Dec 2020 08:55:39 +0100 (CET) IronPort-SDR: qvgb4dOZ0U15ejjGUWCBWVFswNQHltLKmKVvBzjptfHOswBvvwHmAhuLWFkwyPNLjVgOVNSU1i t4mF+qLOkwOA== X-IronPort-AV: E=McAfee;i="6000,8403,9843"; a="175203029" X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="175203029" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 23:55:38 -0800 IronPort-SDR: EB3u82PVtuFn2rSHRgrrly7sDWu3jbVxxiy71tvYVjY99Y5C1QmTVe+lua7YB4wYOh2pBTZ3e5 egH/CjViJ+ZQ== X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="344948368" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 23:55:36 -0800 From: Haiyang Zhao To: lijuan.tu@intel.com, dts@dpdk.org Cc: Haiyang Zhao Date: Wed, 23 Dec 2020 15:49:21 +0800 Message-Id: <20201223074921.4951-1-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] doc/dts_gsg: add support_igb_uio X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" this doc is to guide user to enable testing DPDK with igb_uio. Signed-off-by: Haiyang Zhao --- doc/dts_gsg/index.rst | 1 + doc/dts_gsg/support_igb_uio.rst | 102 ++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 doc/dts_gsg/support_igb_uio.rst diff --git a/doc/dts_gsg/index.rst b/doc/dts_gsg/index.rst index 16da30e3..0c84f466 100644 --- a/doc/dts_gsg/index.rst +++ b/doc/dts_gsg/index.rst @@ -48,3 +48,4 @@ Getting Started Guide trex trex_known_issue usage_of_create_eal_and_start_testpmd + support_igb_uio diff --git a/doc/dts_gsg/support_igb_uio.rst b/doc/dts_gsg/support_igb_uio.rst new file mode 100644 index 00000000..ca48a8f9 --- /dev/null +++ b/doc/dts_gsg/support_igb_uio.rst @@ -0,0 +1,102 @@ +Test DPDK based on igb_uio +========================== + +The kernel module igb_uio is moved to the dpdk-kmods repository in the +/linux/igb_uio/ directory snice DPDK 20.11 (commit: 56bb5841fd06). +The most easy way to test DPDK in DTS based on igb_uio is to add igb_uio +source code back to dpdk. + + +Get Source Code +--------------- + +Get DPDK:: + + git clone git://dpdk.org/dpdk + git clone http://dpdk.org/git/dpdk + +Get igb_uio:: + + git clone http://dpdk.org/git/dpdk-kmods + git clone git://dpdk.org/dpdk-kmods + +Integrate igb_uio into DPDK +--------------------------- + +Assume you have cloned the dpdk and dpdk-kmods source code +in ./dpdk and ./dpdk-kmods. + +#. Copy dpdk-kmods/linux/igb_uio/ to dpdk/kernel/linux/:: + + [root@dts linux]# cp -r ./dpdk-kmods/linux/igb_uio /root/dpdk/kernel/linux/ + [root@dts linux]# ls ./dpdk/kernel/linux/ + igb_uio kni meson.build + +#. enable igb_uio build in meson: + +* add igb_uio in dpdk/kernel/linux/meson.build subdirs as below:: + + subdirs = ['kni', 'igb_uio'] + +.. note:: + + igb_uio will be added into compile list when it is added in subdirs. + + +* create a file of meson.build in dpdk/kernel/linux/igb_uio/ as below:: + + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2017 Intel Corporation + + mkfile = custom_target('igb_uio_makefile', + output: 'Makefile', + command: ['touch', '@OUTPUT@']) + + custom_target('igb_uio', + input: ['igb_uio.c', 'Kbuild'], + output: 'igb_uio.ko', + command: ['make', '-C', kernel_dir + '/build', + 'M=' + meson.current_build_dir(), + 'src=' + meson.current_source_dir(), + 'EXTRA_CFLAGS=-I' + meson.current_source_dir() + + '/../../../lib/librte_eal/include', + 'modules'], + depends: mkfile, + install: true, + install_dir: kernel_dir + '/extra/dpdk', + build_by_default: get_option('enable_kmods')) + +.. note:: + + DPDK is using meson build, create meson.build so that igb_uio can be built. + +DTS configuration +----------------- + +#. Pack the dpdk into dpdk.tar.gz and copy into dts/dep:: + + tar -zcvf dpdk.tar.gz dpdk + cp dpdk.tar.gz ~/dts/dep + + +#. config drivername=igb_uio in execution.cfg:: + + [Execution1] + crbs=127.0.0.1 + drivername=igb_uio + build_type=meson + test_suites= + checksum_offload, + targets= + x86_64-native-linuxapp-gcc + parameters=nic_type=cfg:func=true + +#. configure dts with other requirements (not mentioned here) and now start dts:: + + ./dts + +.. note .. + + dts parameter "-s" means skip setup, it won't unpack dep/dpdk.tar.gz + to the default directory `/root/dpdk`, but use dpdk already there. + so copy the integrated dpdk to `/root/dpdk` if with `-s` \ No newline at end of file -- 2.17.1