Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pci_dev in dpdk/device/cli.c for RTE_SCHED_COLLECT_STATS #11

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/build-config.mk
/build/external/*.tar.gz
/build/external/*.tar.xz
/build/external/vpp-*.rpm
/build/external/vpp-*.deb
/build/external/vpp-*.changes
/build/external/downloads/
Expand Down
33 changes: 22 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6 check
DEB_DEPENDS += libboost-all-dev libffi-dev python-ply libmbedtls-dev
DEB_DEPENDS += libboost-all-dev libffi-dev python3-ply libmbedtls-dev
DEB_DEPENDS += cmake ninja-build uuid-dev
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
Expand Down Expand Up @@ -95,15 +95,15 @@ ifeq ($(OS_ID),fedora)
RPM_DEPENDS += dnf-utils
RPM_DEPENDS += subunit subunit-devel
RPM_DEPENDS += compat-openssl10-devel
RPM_DEPENDS += python2-devel python2-ply
RPM_DEPENDS += python2-devel python34-ply
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS += mbedtls-devel
RPM_DEPENDS += cmake
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
else
RPM_DEPENDS += yum-utils
RPM_DEPENDS += openssl-devel
RPM_DEPENDS += python-devel python-ply
RPM_DEPENDS += python-devel python34-ply
RPM_DEPENDS += python-virtualenv
RPM_DEPENDS += devtoolset-7
RPM_DEPENDS += cmake3
Expand All @@ -117,7 +117,7 @@ RPM_DEPENDS += chrpath libffi-devel rpm-build
SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python-ply
RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply

RPM_SUSE_DEVEL_DEPS = glibc-devel-static java-1_8_0-openjdk-devel libnuma-devel
RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel libuuid-devel
Expand All @@ -130,11 +130,11 @@ RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
ifeq ($(OS_ID),opensuse)
ifeq ($(SUSE_NAME),Tumbleweed)
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
endif
ifeq ($(SUSE_ID),15.0)
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc6
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
else
RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
RPM_SUSE_PYTHON_DEPS += python-virtualenv
Expand All @@ -144,7 +144,7 @@ endif
ifeq ($(OS_ID),opensuse-leap)
ifeq ($(SUSE_ID),15.0)
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc6
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
endif
endif

Expand Down Expand Up @@ -204,6 +204,7 @@ help:
@echo " test-help - show help on test framework"
@echo " run-vat - run vpp-api-test tool"
@echo " pkg-deb - build DEB packages"
@echo " vom-pkg-deb - build vom DEB packages"
@echo " pkg-rpm - build RPM packages"
@echo " install-ext-deps - install external development dependencies"
@echo " ctags - (re)generate ctags database"
Expand Down Expand Up @@ -299,7 +300,7 @@ ifeq ($(OS_ID),rhel)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
else ifeq ($(OS_ID),centos)
@sudo -E yum install $(CONFIRM) centos-release-scl-rh
@sudo -E yum install $(CONFIRM) centos-release-scl-rh epel-release
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
Expand Down Expand Up @@ -434,6 +435,7 @@ test-wipe-doc:
@make -C test wipe-doc

test-cov:
@make -C $(BR) PLATFORM=vpp TAG=vpp_gcov vom-install japi-install
$(eval EXTENDED_TESTS=yes)
$(call test,vpp,vpp_gcov,cov)

Expand Down Expand Up @@ -492,7 +494,18 @@ run-vat:
@$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test

pkg-deb:
$(call make,$(PLATFORM),install-deb)
$(call make,$(PLATFORM),vpp-package-deb)

vom-pkg-deb:
$(call make,$(PLATFORM),vpp-package-deb)
$(call make,$(PLATFORM),vom-package-deb)

pkg-deb-debug:
$(call make,$(PLATFORM)_debug,vpp-package-deb)

vom-pkg-deb-debug:
$(call make,$(PLATFORM)_debug,vpp-package-deb)
$(call make,$(PLATFORM)_debug,vom-package-deb)

pkg-rpm: dist
make -C extras/rpm
Expand Down Expand Up @@ -578,5 +591,3 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-18.04)
$(call banner,"Running tests")
@make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
endif


4 changes: 4 additions & 0 deletions build-data/packages/vom.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ vom_configure = \
vom_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)

vom_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install

vom-package-deb: vom-install
@$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vom -- package
@find $(PACKAGE_BUILD_DIR)/vom -name '*.deb' -exec mv {} $(CURDIR) \;
7 changes: 7 additions & 0 deletions build-data/packages/vpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ vpp_configure = \
#vpp_make_args = --no-print-directory
vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR)
vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path'

vpp-package-deb: vpp-install
@$(CMAKE) --build $(PACKAGE_BUILD_DIR)/vpp -- package-deb
@find $(PACKAGE_BUILD_DIR) \
-maxdepth 1 \
\( -name '*.changes' -o -name '*.deb' -o -name '*.buildinfo' \) \
-exec mv {} $(CURDIR) \;
4 changes: 4 additions & 0 deletions build-root/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,10 @@ configure_check_timestamp = \
mkdir -p $(PACKAGE_INSTALL_DIR) ; \
conf="$(TIMESTAMP_DIR)/$(CONFIGURE_TIMESTAMP)" ; \
dirs="$(call package_mk_fn,$(PACKAGE)) \
$(SOURCE_PATH_BUILD_DATA_DIRS)/platforms/$(PLATFORM).mk \
$(wildcard $(call find_source_fn,$(PACKAGE_SOURCE))/cmake) \
$(shell find $(call find_source_fn,$(PACKAGE_SOURCE)) \
-name CMakeLists.txt) \
$(wildcard $(call find_source_fn, \
$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)/configure) \
$(MU_BUILD_ROOT_DIR)/config.site" ; \
Expand Down
1 change: 1 addition & 0 deletions build/external/ebuild-install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_RTE_SCHED_COLLECT_STATS=y
4 changes: 2 additions & 2 deletions build/external/packages/dpdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ DPDK_MLX5_PMD_DLOPEN_DEPS ?= n
DPDK_TAP_PMD ?= n
DPDK_FAILSAFE_PMD ?= n

DPDK_VERSION ?= 18.11
DPDK_VERSION ?= 19.02
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
DPDK_18.08_TARBALL_MD5_CKSUM := da5e7fb25ab063c47e53929fb8c58be5
DPDK_18.11_TARBALL_MD5_CKSUM := 04b86f4a77f4f81a7fbd26467dd2ea9f
DPDK_19.02_TARBALL_MD5_CKSUM := 23944a2cdee061aa4bd72ebe7d836db0
MACHINE=$(shell uname -m)

# replace dot with space, and if 3rd word exists we deal with stable dpdk rel
Expand Down
2 changes: 1 addition & 1 deletion build/external/packages/nasm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ nasm_version := 2.13.03
nasm_tarball := nasm-$(nasm_version).tar.xz
nasm_tarball_md5sum := d5ca2ad7121ccbae69dd606b1038532c
nasm_tarball_strip_dirs := 1
nasm_url := http://www.nasm.us/pub/nasm/releasebuilds/$(nasm_version)/$(nasm_tarball)
nasm_url := https://ftp.osuosl.org/pub/blfs/conglomeration/nasm/$(nasm_tarball)
nasm_cflags := -Wno-implicit-fallthrough -std=c11

$(eval $(call package,nasm))
4 changes: 2 additions & 2 deletions docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
About
=====

**VPP Version:** 19.01-rc0~497-g05ce4b8
**VPP Version:** 19.04-rc0~102-g22c0ece

**Built on:** Mon Dec 17 20:43:52 GMT 2018
**Built on:** Wed Jan 30 15:37:57 GMT 2019
49 changes: 20 additions & 29 deletions docs/gettingstarted/developers/buildwireshark.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,58 @@
How to build a vpp dispatch trace aware Wireshark
=================================================

At some point, we will upstream our vpp pcap dispatch trace dissector.
It's not finished - contributions welcome - and we have to work through
whatever issues will be discovered during the upstreaming process.
The vpp pcap dispatch trace dissector has been merged into the wireshark
main branch, so the process is simple. Download wireshark, compile it,
and install it.

On the other hand, it's ready for some tire-kicking. Here's how to build
wireshark.
Download wireshark source code
------------------------------

Download and patch wireshark source code
-----------------------------------------

The wireshark git repo is large, so it takes a while to clone.
The wireshark git repo is large, so it takes a while to clone.

```
git clone https://code.wireshark.org/review/wireshark
cp .../extras/wireshark/packet-vpp.c wireshark/epan/dissectors
patch -p1 < .../extras/wireshark/diffs.txt
git clone https://code.wireshark.org/review/wireshark
```

The small patch adds packet-vpp.c to the dissector list.

Install prerequisite Debian packages
Install prerequisite packages
------------------------------------

Here is a list of prerequisite packages which must be present in order
to compile wireshark, beyond what's typically installed on an Ubuntu
18.04 system:

```
libgcrypt11-dev flex bison qtbase5-dev qttools5-dev-tools qttools5-dev
qtmultimedia5-dev libqt5svg5-dev libpcap-dev qt5-default
libgcrypt11-dev flex bison qtbase5-dev qttools5-dev-tools qttools5-dev
qtmultimedia5-dev libqt5svg5-dev libpcap-dev qt5-default
```

Compile Wireshark
-----------------

Mercifully, Wireshark uses cmake, so it's relatively easy to build, at
least on Ubuntu 18.04.
least on Ubuntu 18.04.


```
$ cd wireshark
$ cmake -G Ninja
$ ninja -j 8
$ sudo ninja install
$ cd wireshark
$ mkdir build
$ cd build
$ cmake -G Ninja ../
$ ninja -j 8
$ sudo ninja install
```

Make a pcap dispatch trace
--------------------------

Configure vpp to pass traffic in some fashion or other, and then:


```
vpp# pcap dispatch trace on max 10000 file vppcapture buffer-trace dpdk-input 1000

```


or similar. Run traffic for long enough to capture some data. Save the
dispatch trace capture like so:

Expand All @@ -73,9 +69,4 @@ dispatch trace pcap files because they won't understand the encap type.

Set wireshark to filter on vpp.bufferindex to watch a single packet
traverse the forwarding graph. Otherwise, you'll see a vector of packets
in e.g. ip4-lookup, then a vector of packets in ip4-rewrite, etc.





in e.g. ip4-lookup, then a vector of packets in ip4-rewrite, etc.
Loading