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 2777AA0508; Wed, 6 Apr 2022 17:13:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 102C6428EE; Wed, 6 Apr 2022 17:11:33 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id D970C428C0 for ; Wed, 6 Apr 2022 17:11:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 39B22184FE8; Wed, 6 Apr 2022 17:11:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Nt55Q2iC3Mp; Wed, 6 Apr 2022 17:11:27 +0200 (CEST) Received: from entguard.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id CE56C16BC0E; Wed, 6 Apr 2022 17:11:13 +0200 (CEST) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu, lijuan.tu@intel.com Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [RFC PATCH v1 14/24] dts: merge DTS doc/dts_gsg/usr_guide/igb_uio.rst to DPDK Date: Wed, 6 Apr 2022 15:10:56 +0000 Message-Id: <20220406151106.2915304-15-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220406151106.2915304-1-juraj.linkes@pantheon.tech> References: <20220406151106.2915304-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- dts/doc/dts_gsg/usr_guide/igb_uio.rst | 102 ++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 dts/doc/dts_gsg/usr_guide/igb_uio.rst diff --git a/dts/doc/dts_gsg/usr_guide/igb_uio.rst b/dts/doc/dts_gsg/usr_guide/igb_uio.rst new file mode 100644 index 0000000000..13648cd028 --- /dev/null +++ b/dts/doc/dts_gsg/usr_guide/igb_uio.rst @@ -0,0 +1,102 @@ +Practice for 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` -- 2.20.1