summaryrefslogtreecommitdiff
path: root/devtools
AgeCommit message (Collapse)Author
2019-07-02devtools: test pkg-config fileBruce Richardson
The pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-07-02devtools: test meson build with available compilersBruce Richardson
Allow the script to run with a reduced set of builds if clang, or other compilers, are missing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-06-29enforce experimental tag at beginning of declarationsDavid Marchand
Putting a '__attribute__((deprecated))' in the middle of a function prototype does not result in the expected result with gcc (while clang is fine with this syntax). $ cat deprecated.c void * __attribute__((deprecated)) incorrect() { return 0; } __attribute__((deprecated)) void *correct(void) { return 0; } int main(int argc, char *argv[]) { incorrect(); correct(); return 0; } $ gcc -o deprecated.o -c deprecated.c deprecated.c: In function ‘main’: deprecated.c:3:1: warning: ‘correct’ is deprecated (declared at deprecated.c:2) [-Wdeprecated-declarations] int main(int argc, char *argv[]) { incorrect(); correct(); return 0; } ^ Move the tag on a separate line and make it the first thing of function prototypes. This is not perfect but we will trust reviewers to catch the other not so easy to detect patterns. sed -i \ -e '/^\([^#].*\)\?__rte_experimental */{' \ -e 's//\1/; s/ *$//; i\' \ -e __rte_experimental \ -e '/^$/d}' \ $(git grep -l __rte_experimental -- '*.h') Special mention for rte_mbuf_data_addr_default(): There is either a bug or a (not yet understood) issue with gcc. gcc won't drop this inline when unused and rte_mbuf_data_addr_default() calls rte_mbuf_buf_addr() which itself is experimental. This results in a build warning when not accepting experimental apis from sources just including rte_mbuf.h. For this specific case, we hide the call to rte_mbuf_buf_addr() under the ALLOW_EXPERIMENTAL_API flag. Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-06-29remove experimental tags from all symbol definitionsDavid Marchand
We had some inconsistencies between functions prototypes and actual definitions. Let's avoid this by only adding the experimental tag to the prototypes. Tests with gcc and clang show it is enough. git grep -l __rte_experimental |grep \.c$ |while read file; do sed -i -e '/^__rte_experimental$/d' $file; sed -i -e 's/ *__rte_experimental//' $file; sed -i -e 's/__rte_experimental *//' $file; done Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-05-10devtools: select patches to check with git rangeDavid Marchand
Rather than default to origin/master.., it can be handy to choose the range you want to check. Example on a branch rebased on next-net: Before: $ ./devtools/checkpatches.sh ... ... 67/69 valid patches After: $ ./devtools/checkpatches.sh -r next-net/master.. 3/3 valid patches Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-05-10devtools: fix check of symbol added as stable APIDavid Marchand
The incriminated commit broke the detection of new symbols skipping the EXPERIMENTAL step before entering a stable ABI section. sed won't return an error, check a null output instead. Fixes: 3630757803ab ("devtools: accept experimental symbol promotion") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-05-10devtools: fix symbol name in check logDavid Marchand
We have an incorrect variable name in this log. Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-05-10devtools: skip warning for reordered symbolsDavid Marchand
No need to shout when we are just reordering symbols in a section. Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-05-02devtools: fix ABI compatibility checkPeng Huang
The new default-taget "linux" is introduced in v19.05-rc1 but not exist in before release such as v19.02 which have default-target "linuxapp", there is no compatibility report when run validate-abi.sh to check ABI compatibility between v19.05-rc1 and v19.02, changed default-target from "linux" to "linuxapp" in validate-abi.sh Fixes: 218c4e68c1d9 ("mk: use linux and freebsd in config names") Cc: stable@dpdk.org Signed-off-by: Peng Huang <peng.huang@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-19devtools: fix meson build test for plain bourne shellBruce Richardson
The pipefail option is not supported in /bin/sh, just in bash/ksh and similar shells - which means it's there by default on most Linux distros but not on e.g. FreeBSD. Therefore we check for it's presence before setting the option, and if it's missing, we upgrade verbosity level if needed to ensure we never hide any build failures. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17devtools: fix bash-isms in meson testBruce Richardson
The use of "==" is non-standard extension from bash, so use "=" for comparisons instead. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17devtools: support older compilers with meson testBruce Richardson
Older versions of GCC, such as on Redhat/CentOS 7, don't support -march=nehalem, but need -march=corei7 instead. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17devtools: skip meson build for missing compilersBruce Richardson
If either gcc or clang are missing, skip doing those builds. This allows a setup to only do, e.g. gcc tests. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-04-16devtools: add git log checks for TPID, LACP and RETAFerruh Yigit
Add case check to TPID, LACP and RETA abbreviations. Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-16devtools: accept experimental symbol promotionDavid Marchand
Currently, when symbols get promoted from the EXPERIMENTAL section to a stable ABI section, the script complains they should go to the EXPERIMENTAL section. Example: ERROR: symbol rte_devargs_add is added in the DPDK_19.05 section, but is expected to be added in the EXPERIMENTAL section of the version map This is legit. Moving from a stable ABI to another is also allowed, but must have gone through the proper process. Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-04-12net/nfb: add new netcope driverRastislav Cernay
Added new net driver for Netcope nfb cards Signed-off-by: Rastislav Cernay <cernay@netcope.com>
2019-04-04devtools/cocci: create safer version of strlcpy scriptBruce Richardson
The existing cocci script for coccinelle replaces all matching instances of snprintf() with strlcpy() without regards to header inclusion. To allow changes without build errors, we create a safer version of this script that only makes changes when the rte_string_fns.h header is already included. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-04devtools/cocci: make strlcpy replacement smarterBruce Richardson
The original coccinelle script worked by replacing instances of snprintf(.."%s",...) with strlcpy(), but only where the source and dest parameters were plain identifiers. Allowing expressions for those params opens up a wide range of other possible changes. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-02eal: remove exec-env directoryThomas Monjalon
Only one header file (rte_kni_common.h) was in the sub-directory include/exec-env/ This file was installed in a sub-directory of the same name in the makefile-based build. Source and install directories are moved as below: lib/librte_eal/linux/eal/include/exec-env/ -> lib/librte_eal/linux/eal/include/ build/include/exec-env/ -> build/include/ The consequence is to have a file hierarchy a bit more flat. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: David Marchand <david.marchand@redhat.com> Tested-by: David Marchand <david.marchand@redhat.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-01devtools: allow test build outside source directoryBruce Richardson
The test-meson-builds.sh script correctly detects the source directory and builds the native builds successfully in a directory outside of the source tree. However, the paths to the cross-files are not prefixed with the source directory path, so the cross-builds all fail. Fix this by prepending the source directory path appropriately. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-03-27devtools: fix config check when building tagsBruce Richardson
The check for a valid configuration in build-tags.sh relied on the output of "make showconfig" rather than checking directly for a config file of that name. This broke when as part of the rename of the linuxapp/bsdapp configs to just linux/freebsd, as we stopped advertising the old names even if they worked. Changing the code to just look for the config file by name fixes this issue while shortening the code too. Fixes: 218c4e68c1d9 ("mk: use linux and freebsd in config names") Fixes: aafaea3d3b70 ("devtools: add tags and cscope index generation") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-03-13devtools: fix meson build test to exit on failureBruce Richardson
When piping the ninja command through cat, we lose the error value from the call to ninja in the case of failure. This prevents the script from exiting at the first broken build. Fix this by setting the "pipefail" shell option. Fixes: 4bcb9b768604 ("devtools: add verbose option to meson build test") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12mk: use linux and freebsd in config namesBruce Richardson
Rather than using linuxapp and bsdapp everywhere, we can change things to use the, more readable, terms "linux" and "freebsd" in our build configs. Rather than renaming the configs we can just duplicate the existing ones with the new names using symlinks, and use the new names exclusively internally. ["make showconfigs" also only shows the new names to keep the list short] The result is that backward compatibility is kept fully but any new builds or development can be done using the newer names, i.e. both "make config T=x86_64-native-linuxapp-gcc" and "T=x86_64-native-linux-gcc" work. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12build: rename linuxapp to linux in meson cross filesBruce Richardson
Rename the cross files for meson compilation from having linuxapp in the name to just linux in the name. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12eal/linux: rename linuxapp to linuxBruce Richardson
The term "linuxapp" is a legacy one, but just calling the subdirectory "linux" is just clearer for all concerned. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12eal/bsd: rename bsdapp to freebsdBruce Richardson
The term "bsdapp" is a legacy one, but just calling the subdirectory "freebsd" is just clearer for all concerned. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-04devtools: fix index generationFerruh Yigit
build-tags.sh is broken because of removed 'test' folder, this breaks helper make targets like 'make cscope', 'make tags', etc... Fixing it by removing 'test' from source directories list. Fixes: a9de470cc7c0 ("test: move to app directory") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Rami Rosen <ramirose@gmail.com>
2019-03-04devtools: fix result of svg include checkMichael Santana
Fix trivial bug. In sh shell, 'foo = 1' is not the same as 'foo=1'. Using 'foo = 1' makes the shell attempt to interpret foo as a command, rather than a simple variable assignment. Fixes: dafc04c15174 ("devtools: fix return of forbidden addition checks") Cc: stable@dpdk.org Signed-off-by: Michael Santana <msantana@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-03-04devtools: enable codespell in checkpatchMichael Santana
Enable codespell by default. codespell is a feature by checkpatch.pl that checks for common spelling mistakes in patches. This feature is disabled by default. To enable it one must add the '--codespell' flag to the $options variable in checkpatches.sh. With this change codespell is enabled by default. The user can decide to turn off codespell from a one of the config files read by checkpatches.sh. Signed-off-by: Michael Santana <msantana@redhat.com> Reviewed-by: Rami Rosen <ramirose@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-03-01devtools: add verbose option to meson build testBruce Richardson
When running ninja, the commands are, by default, always printed on top of each other. For those who want more detail in the output, two levels of verbose output has been added to the test-meson-builds script. When "-v" is passed, or the "TEST_MESON_BUILD_VERBOSE" flag is set in the environment, then the output of ninja is passed through "cat" to prevent each line overwriting the next. If "-vv" is passed, or "TEST_MESON_BUILD_VERY_VERBOSE" is set in the environment, then ninja is called with the "-v" flag to print out each command in full as it is executing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26devtools: fix build test on FreeBSDBruce Richardson
readlink option "-m" is not supported on FreeBSD (checked on BSD 11), so change to the largely-equivalent "-f" flag. Fixes: a55277a788df ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26test: move to app directoryBruce Richardson
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we can move it back to where it all started in early versions of DPDK - the "app/" folder. This move has a couple of advantages: * This reduces clutter at the top level of the project, due to one less folder. * It eliminates the separate build task necessary for building the autotests using make "make test-build" which means that developers are less likely to miss something in their own compilation tests * It re-aligns the final location of the test binary in the app folder when building with make with it's location in the source tree. For meson builds, the autotest app is different from the other apps in that it needs a series of different test cases defined for it for use by "meson test". Therefore, it does not get built as part of the main loop in the app folder, but gets built separately at the end. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-25devtools: add git log checks for DCB, TOS and TTLFerruh Yigit
Add case check to DCB, TOS and TTL abbreviations. Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-24devtools: fix test of some build optionsThomas Monjalon
CONFIG_RTE_LIBRTE_PMD_ISAL was not tested because of a typo. CONFIG_RTE_LIBRTE_PMD_QAT_SYM was not tested since it has been introduced and made CONFIG_RTE_LIBRTE_PMD_QAT enabled by default. While at it, DPDK_DEP_JSON is now checked for "y", as other DPDK_DEP_* variables, instead of non-empty. Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD") Fixes: 7a34c2155716 ("compress/qat: add empty driver") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-02-24devtools: test build of zlib PMDThomas Monjalon
The PMD zlib was not enabled in devtools/test-build.sh. It is fixed by using the environment variable DPDK_DEP_ZLIB. Fixes: 0c4e4c16b004 ("compress/zlib: introduce zlib PMD") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24devtools: add libelf dependency to build testThomas Monjalon
The option CONFIG_RTE_LIBRTE_BPF_ELF was never enabled with test-build.sh. It is fixed with the environment variable DPDK_DEP_ELF. Fixes: 5dba93ae5f2d ("bpf: add ability to load eBPF program from ELF object file") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-01-14devtools: fix build check for whether meson has runBruce Richardson
The current check to see whether we need to call meson or just ninja simply checked if the build directory existed. However, if meson was run but failed, the build directory would still exist. We can fix this by instead checking for the build.ninja file inside the directory. Once that is present, we can use ninja safely and let it worry about rerunning meson if necessary. Fixes: a55277a788df ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2019-01-10devtools: fix wrong headline lowercase for armGavin Hu
Change to the new wording according to Arm corp: https://mails.dpdk.org/archives/dev/2018-October/115174.html otherwise, "Wrong headline lowercase" may be falsely reported. Fixes: f146ada21d1e ("scripts: add more git log checks") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
2018-12-21devtools: fix return of forbidden addition checksArnon Warshavsky
Explicitly collect the error code of the multiple awk script calls. Bugzilla ID: 165 Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides") Cc: stable@dpdk.org Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-12-01devtools: fix symbol check when adding experimental sectionDavid Marchand
The incriminated commit did relax the condition to catch all sections but dropped the + removal which can trigger false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch. Fixes: 7281cf520f89 ("devtools: relax rule for identifying symbol section") Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-11-30devtools: report the incorrect section when complainingDavid Marchand
It does not hurt reporting the incriminated section. Before: ERROR: symbol rte_plop is added in a section other than the EXPERIMENTAL section of the version map After: ERROR: symbol rte_plop is added in the DPDK_19.02 section, but is expected to be added in the EXPERIMENTAL section of the version map Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-11-18devtools: fix regex in symbol addition checkNeil Horman
The regex to determine the end of the map file chunk in a patch seems to be wrong, It was using perl regex syntax, which awk doesn't appear to support (I'm still not sure how it was working previously). Regardless, it wasn't triggering and as a result symbols were getting added to the mapdb that shouldn't be there. Fix it by converting the regex to use traditional posix syntax, matching only on the negation of the character class [^map] Tested and shown to be working on the ip_frag patch set provided by doucette@bu.edu Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: stable@dpdk.org Reported-by: Cody Doucette <doucette@bu.edu> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
2018-11-04devtools: add explicit warnings for forbidden tokensArnon Warshavsky
Replace the content of warning in the forbidden tokens script from using the searched regex into using explicit messages Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-11-01devtools: check wrong svg include in guidesThomas Monjalon
Including svg files with the svg extension is a common mistake: .. figure:: example.svg must be .. figure:: example.* So it will work also when building pdf doc with figures converted to png files. A check is added in checkpatches.sh. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
2018-10-27telemetry: add client feature and socketsCiara Power
This patch introduces clients to the telemetry API. When a client makes a connection through the initial telemetry socket, they can send a message through the socket to be parsed. Register messages are expected through this socket, to enable clients to register and have a client socket setup for future communications. A TAILQ is used to store all clients information. Using this, the client sockets are polled for messages, which will later be parsed and dealt with accordingly. Functionality that make use of the client sockets were introduced in this patch also, such as writing to client sockets, and sending error responses. Signed-off-by: Ciara Power <ciara.power@intel.com> Signed-off-by: Brian Archbold <brian.archbold@intel.com> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-10-25devtools: add git log checks for PHYFerruh Yigit
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-25devtools: add git check exception for OCTEON TXAnoob Joseph
The 'TX' in OCTEON TX would cause a warning. Adding an exception for that. OCTEON TX is a registered product under Cavium Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
2018-10-25devtools: fix alignment of Marvell build optionsThomas Monjalon
Really minor issue: There were extra spaces making the alignment wrong. Fixes: e95faac15110 ("crypto/mrvl: rename PMD to mvsam") Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-11net/mvneta: add PMD skeletonZyta Szpak
Add neta pmd driver skeleton providing base for the further development. Signed-off-by: Natalie Samsonov <nsamsono@marvell.com> Signed-off-by: Yelena Krivosheev <yelena@marvell.com> Signed-off-by: Dmitri Epshtein <dima@marvell.com> Signed-off-by: Zyta Szpak <zr@semihalf.com> Signed-off-by: Andrzej Ostruszka <amo@semihalf.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-01devtools: use a common prefix for temporary filesThomas Monjalon
Some temporary files were generated in /tmp, others in the current directory, and none was "dpdk prefixed". All these files have a common path prefix now: $TMPDIR/dpdk. TMPDIR is /tmp by default. Note: the previous use of mktemp, with a template but without -t, was generating a file in the current directory. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>