Commit Graph

73 Commits

Author SHA1 Message Date
Bruce Richardson
d8a1ccdc55 scripts: add more git log capitalization checks
Add API, NUMA, HW, SW, FW and VMDq to list of words to capitalize properly.
Since VMDq is a bit unusual, add it as special case check so we can
print an error message giving the correct way to write it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2016-07-10 17:01:02 +02:00
Nelio Laranjeiro
e757070d64 scripts: check headline of drivers commits
A driver patch under net should start with "net/<driver name>" or if
a patch touch multiple drivers, it should only start with "net:".
The same apply for crypto.
A patch touching all drivers (net + crypto) should start with "drivers:".

Longer prefixes like "net/mlx:" (for mlx4/mlx5) or "net/e1000/base:" are
handled by not checking the colon.

The directories doc/ and config/ are ignored because a driver patch
can modify them.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-10 16:34:11 +02:00
Thomas Monjalon
341332481e scripts: reduce line size of commit checks
Small cleanup to comply with the 80 chars limit.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-10 16:34:11 +02:00
Thomas Monjalon
4fe45378b8 scripts: check spacing after commit references
A blank line between "Fixes" and "Signed-off-by" helps to
separate information in blocks.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-10 16:34:11 +02:00
Thomas Monjalon
48660cab92 scripts: fix commit check for empty list
When running check-git-log.sh on a clean tree it was complaining
of a wrong empty headline because '^[^:]*$' was matching.
It is fixed by matching at least one character with +.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-10 16:34:11 +02:00
Thomas Monjalon
ecb9eb2927 scripts: fix commit check of first word
The first word of each commit message is checked.
But when the commit range was greater than 1, only the latest commit
was checked.
It is fixed by checking each commit separately.

Fixes: 9c24780f0d ("scripts: check first word of commit messages")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-07-10 16:34:05 +02:00
Thomas Monjalon
e039cc863b scripts: test clean build when config is changed
If there is a change in the config directory the build test
will refresh the tested build config to take into account new options.
The git working directory and the last git commit are checked for a
change in config/.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-01 12:35:57 +02:00
Thomas Monjalon
b647da1064 scripts: check fixed commit branch
The commit id of a fixed commit must be in the current branch.
It avoids referencing a local branch or a next-* branch when
pushing in the master.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-07-01 12:35:57 +02:00
Thomas Monjalon
1c66057f07 scripts: enable qede in build test
The driver qede can be automatically enabled if libz is available.

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-29 13:33:01 +02:00
Bruce Richardson
9c24780f0d scripts: check first word of commit messages
Avoid messages starting with "It" without describing what
it is talking about.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-29 13:33:01 +02:00
Thomas Monjalon
7f3fd5e8aa scripts: add verbose option in build test help
The verbose option was available but not advertised.

Fixes: 6e38dfe213 ("scripts: add verbose test build option")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-27 16:50:27 +02:00
Thomas Monjalon
b774321344 scripts: relax line length check for fixed commit
It is better to keep the line "Fixes:" longer than 75 characters
than splitting.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-06-27 16:50:27 +02:00
Pablo de Lara
ba4d6c891c crypto/snow3g: rename libsso reference due to library update
The underlying libsso library that SNOW3G PMD uses has been updated,
so now it is called libsso_snow3g. Also, the path to the library
has been renamed to reflect this changes (now called LIBSSO_SNOW3G_PATH).

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-06-20 22:38:44 +02:00
Pablo de Lara
2773c86d06 crypto/kasumi: add driver for KASUMI library
Added new SW PMD which makes use of the libsso_kasumi SW library,
which provides wireless algorithms KASUMI F8 and F9
in software.

This PMD supports cipher-only, hash-only and chained operations
("cipher then hash" and "hash then cipher") of the following
algorithms:
- RTE_CRYPTO_SYM_CIPHER_KASUMI_F8
- RTE_CRYPTO_SYM_AUTH_KASUMI_F9

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-06-20 22:25:32 +02:00
Thomas Monjalon
18aa32725e config: make libarchive optional
The commit 66819e6 has introduced a dependency on libarchive to be able
to use some tar resources in the unit tests.
It is now an optional dependency because some systems do not have it
installed.

If CONFIG_RTE_APP_TEST_RESOURCE_TAR is disabled, the PCI test will not
be run. When a "configure" script will be integrated, the libarchive
availability could be checked to automatically enable the option.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-14 15:31:26 +02:00
Thomas Monjalon
602dac4fa1 scripts: check commits with checkpatch
The new option -n allows to give a number of commits to check
from the git HEAD.
If neither -n nor patch files are given, the commits after
origin/master are checked.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-06-07 09:42:10 +02:00
Yuanhan Liu
e5ca6e91cc scripts: highlight bad patterns in commit check
I got a report like following:

    Wrong headline lowercase:
            xxx: move vhost device ctx to cuse

It takes a bit while (by checking the code) that it's "ctx" triggers
the warning. It could be spotted very quickly if "tx" is highlighted.
This patch adds such support.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-05-24 16:46:01 +02:00
Yuanhan Liu
95ce9981dd scripts: fix false positive in commit check
It reports an false positive warning when the commit subject includes
the word "ctx", as it matches following regexp:

     -e 'rx\|tx\|RX\|TX'

Fixes: edbeb7d962 ("scripts: check commit formatting")

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-05-24 16:42:17 +02:00
Thomas Monjalon
7c801f9f3a scripts: ignore bit macro in checkpatch
It was suggesting to use a Linux macro:
CHECK:BIT_MACRO: Prefer using the BIT macro

It is ignored because it is a false positive in DPDK case.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 16:17:02 +02:00
Thomas Monjalon
73eefe6d1f scripts: remove unused map files merger
This script was forgotten when dropping the combined library.

Fixes: 948fd64bef ("mk: replace the combined library with a linker script")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2016-05-24 16:17:02 +02:00
Ferruh Yigit
8919f73bcb mk: add build directory to library search path
Add default library output folder to the library search folder.

This is useful for development environment, in production environment
DPDK libraries already should be in know locations.

Patch removes requirement to set LD_LIBRARY_PATH variable when DPDK
compiled as shared library.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-05-18 16:46:16 +02:00
Thomas Monjalon
9b9d7caa84 log: increase default level to info
The default was to compile every logs (including debug) and set
the default level to debug.
As some debug logs may hurt performance, a notice is added and the
default level is now info.

In order to enable debug logs, they must be compiled with
RTE_LOG_LEVEL=RTE_LOG_DEBUG and enabled at runtime with --log-level=8.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-02 15:31:17 +02:00
Thomas Monjalon
edbeb7d962 scripts: check commit formatting
The git messages have three parts:
1/ the headline
2/ the explanations
3/ the footer tags

The headline helps to quickly browse an history or catch instantly the
purpose of a commit. Making it short with some consistent wording
allows to easily parse it or match some patterns.

The explanations must give some keys like the reason of the change.
Nothing can be automatically checked for this part, except line length.

The footer contains some tags to find the origin of a bug or who
was working on it.

This script is doing some basic checks mostly on parts 1 and 3.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-04-11 23:56:34 +02:00
Thomas Monjalon
c4109298cc scripts: test build with all stats enabled
These stats will be compiled when adding +debug
to test-build.sh targets:
	CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT
	CONFIG_RTE_SCHED_COLLECT_STATS
	CONFIG_RTE_PORT_STATS_COLLECT
	CONFIG_RTE_TABLE_STATS_COLLECT
	CONFIG_RTE_PIPELINE_STATS_COLLECT
	CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS
	CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-11 23:56:34 +02:00
Thomas Monjalon
7d85af1362 scripts: test build with libsso
The SNOW3G PMD has a dependency on libsso which can be downloaded
after having passed some Intel validation about export restrictions.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
6e38dfe213 scripts: add verbose test build option
The option -v enables the verbose mode when testing a build.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
c7e8b41ad4 scripts: hook build test config
Insert a hook at the end of the config procedure, after having
adapted the configuration to the environment variables and the options
passed to the script.
It allows to better tune the automatic configuration of the build tests
in a function located in the devel config file.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
d568d5d38d scripts: allow tuning any test build option
Any build option can be enabled or disabled by appending the end
of its name to the config name.
Examples:
	+INTRINSICS to enable CONFIG_RTE_FORCE_INTRINSICS
	~RXTX_CALLBACKS to disable CONFIG_RTE_ETHDEV_RXTX_CALLBACKS

These builtin (lowercase) options are also added for convenience:
	+debug to enable every debug options
	+default to set target machine as default

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
7d7c713f3c scripts: allow tuning build options per test target
The global variables are reloaded between each build to allow
having different config options based on DPDK_TARGET.

Some checks can now be removed from the script as they can
be done in the devel config file.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
1335dcf780 scripts: stop build test after first error
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
8067621d1f scripts: test build of performance-thread example
This example is not part of the baseline because of its
experimental state. That's why it must be tested separately.

Fixes: b700090c8c ("examples/performance-thread: mark as experimental")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
462cc98b5c scripts: remove legacy build method test
Building with "make install T=" is now deprecated.
The script will test only the standard "make" command.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
af6bc978ad scripts: fix run in any directory
The path to load-devel-config.sh must be relative to the script.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-07 23:05:47 +02:00
Thomas Monjalon
e13fbc065c scripts: improve quiet checkpatch
The option --no-summary will remove this line in quiet mode:
	total: 1 errors, 0 warnings, 7 lines checked

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-24 22:16:01 +01:00
Olivier Matz
0853f25d25 scripts: fix checkpatch help
When started without defining DPDK_CHECKPATCH_PATH, the usage was not
displayed.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-24 22:04:10 +01:00
Declan Doherty
eec136f3c5 aesni_gcm: add driver for AES-GCM crypto operations
This patch provides the implementation of an AES-NI accelerated crypto PMD
which is dependent on Intel's multi-buffer library, see the white paper
"Fast Multi-buffer IPsec Implementations on Intel®  Architecture  Processors"

This PMD supports AES_GCM authenticated encryption and authenticated
decryption using 128-bit AES keys

The patch also contains the related unit tests functions

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
2016-03-11 01:01:42 +01:00
Panu Matilainen
948fd64bef mk: replace the combined library with a linker script
The physically linked-together combined library has been an increasing
source of problems, as was predicted when library and symbol versioning
was introduced. Replace the complex and fragile construction with a
simple linker script which achieves the same without all the problems,
remove the related kludges from eg mlx drivers.

Since creating the linker script is practically zero cost, remove the
config option and just create it always.

Based on a patch by Sergio Gonzales Monroy, linker script approach
initially suggested by Neil Horman.

Suggested-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Suggested-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-01 14:37:27 +01:00
John Griffin
d5176d630d qat: fix build on 32-bit systems
Fixing build on 32-bit systems on quick assist driver - for example:
drivers/crypto/qat/qat_crypto.c: In function ‘qat_alg_write_mbuf_entry’:
drivers/crypto/qat/qat_crypto.c:408:34: error:
cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

Fixes: 1703e94ac5 ("qat: add driver for QuickAssist devices")

Signed-off-by: John Griffin <john.griffin@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-02-24 15:31:02 +01:00
Panu Matilainen
ece9c50d40 scripts: fix ABI validator when revision is a tag
Commit 9cbae2aa64 managed to break the only previously supported
case where a tag is used as a revision, due to git show output
differing between tags and other objects. The hash is on the last
line of the output in both cases though so just grab that.

Fixes: 9cbae2aa64 ("scripts: support any git revisions as ABI validation range")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-12-15 15:19:32 +01:00
Thomas Monjalon
413244a484 scripts: add help for build testing
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-12-14 22:57:27 +01:00
Rasesh Mody
99d47f445e bnx2x: fix 32-bit build
Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2015-12-13 01:58:10 +01:00
Panu Matilainen
08def3afcb scripts: fix relpath.sh output when $prefix is set in environment
When relpath.sh is called from install target with prefix set, eg
"make install DESTDIR=/tmp/dpdk-root prefix=/usr", the prefix
from the environment leaks to relpath.sh internal helper variable and
causes incorrect symlinks to be generated in sdk $(targetdir):

   include -> /usr../../../include/dpdk
   lib -> /usr../../../lib

Initialize the local variable to empty to avoid side-effects from
environment.

Fixes: 6b62a72a70 ("mk: install a standard cutomizable tree")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-12 00:34:57 +01:00
Alejandro Lucero
defb9a5dd1 nfp: introduce driver initialization
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
2015-12-08 03:00:42 +01:00
Panu Matilainen
9cbae2aa64 scripts: support any git revisions as ABI validation range
In addition to git tags, support validating abi between any legal
gitrevisions(7) syntaxes, such as "validate-abi.sh -1 . <target>"
"validate-abi.sh master mybranch <target>" etc in addition to
validating between tags. Makes it easier to run the validator
for in-development work.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-12-08 00:09:43 +01:00
Ferruh Yigit
9f8eeb60ef mk: fix combined lib build with ABI versioning
Fixes following error (observed when versioning macros used):
  LD libdpdk.so
  /usr/bin/ld: /root/dpdk/build/lib/libdpdk.so: version node not found
  for symbol <function>@DPDK_x.y

Also resulting combined library contains symbol version information:
$ readelf -a build/lib/libdpdk.so | grep rte_eal_ | grep @ | head
   <...>    GLOBAL DEFAULT   12 rte_eal_alarm_set@@DPDK_2.0
   <...>    GLOBAL DEFAULT   12 rte_eal_pci_write_config@@DPDK_2.1
   <...>    GLOBAL DEFAULT   12 rte_eal_remote_launch@@DPDK_2.0
...

Versioning fixed by merging all version scripts into one automatically and
feeding it to final library.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2015-12-06 15:41:04 +01:00
Panu Matilainen
6100ed5849 scripts: fix ABI validator for KNI module config
The validator attempts to disable all kernel modules but since
commit 36080ff96b fails to do so
for KNI, causing the build stage to fail if kernel headers are missing.

With the introduction of CONFIG_RTE_KNI_KMOD, CONFIG_RTE_LIBRTE_KNI=n
can eventually be dropped but leaving it around for now as its
needed with pre-2.1 versions.

Fixes: 36080ff96b ("config: add KNI kmod option")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-12-04 16:30:08 +01:00
Panu Matilainen
2e7a72ec0b scripts: factorize ABI validator config fixups
Move identical config fixups into a function.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-12-03 20:40:26 +01:00
Panu Matilainen
77852b6e17 scripts: permit passing extra flags to ABI validator
Its sometimes necessary to disable warnings etc to get an older
version of code to build.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-12-03 20:39:49 +01:00
Thomas Monjalon
cd31ca579c scripts: add build tests
This script helps to build a list of target with some custom options.
It tries to enable most of the options.
The examples and documentation are also built.

It uses some configuration from exported variables.
This config works on my machine:
export DPDK_DEP_PCAP=y
export DPDK_DEP_MOFED=y
       mlxdep=/opt/mofed-3.0
export DPDK_DEP_CFLAGS=-I$mlxdep/include
export DPDK_DEP_LDFLAGS=-L$mlxdep/lib
export DPDK_BUILD_TEST_CONFIGS='x86_64-native-linuxapp-gcc+shared+next
       x86_64-native-linuxapp-clang+shared+combined
       i686-native-linuxapp-gcc+combined'
export DPDK_MAKE_JOBS=8
export DPDK_NOTIFY=notify-send

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

v2:
- conditionally enable szedata2
- add quotes for CFLAGS and LDFLAGS
2015-12-03 18:36:25 +01:00
Thomas Monjalon
b07c376464 scripts: add checkpatch wrapper
This script can be used to call checkpatch.pl from Linux with some
custom DPDK options.

The path to the original Linux script must be set in an environment
variable. A script is added to load any configuration variables
required by development tools from a file .develconfig, or
~/.config/dpdk/devel.config or /etc/dpdk/devel.config.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

v2:
- do not ignore COMPLEX_MACRO
- use option --no-tree to avoid silent failure
- add -q and -v options
2015-12-03 00:03:03 +01:00