Stephen Hemminger [Fri, 4 Dec 2015 01:12:53 +0000 (17:12 -0800)]
virtio: fix Rx mbuf initialization
The virtio driver was not initializing all the fields in
the receive mbuf. This would cause bugs where previous usage
of mbuf would leave stale TCI and offload flags.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Chas Williams [Wed, 18 Nov 2015 20:58:41 +0000 (15:58 -0500)]
bnx2x: set ethernet address type during VF Tx
The original was always setting unicast. While here, clean up some
other references that also point into the Ethernet header.
Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
Chas Williams [Tue, 3 Nov 2015 17:26:16 +0000 (12:26 -0500)]
bnx2x: fix little endian conversion in Tx
tx_start_bd->vlan_or_ethertype is le16
Signed-off-by: Chas Williams <3chas3@gmail.com>
Stephen Hemminger [Wed, 2 Dec 2015 22:16:18 +0000 (14:16 -0800)]
cxgbe: use explicit PCI driver structure
The upcoming Hyper-V driver converts the pci_drv element
in struct eth_driver to a union. When vmbus is added the
pci_drv needs to be explicit. Easier to fix the issue
ahead of time.
This is backwards compatible with previous code.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Jingjing Wu [Mon, 30 Nov 2015 03:54:09 +0000 (11:54 +0800)]
i40evf: fix MAC deletion when stopping
When dev_stop is called in i40evf pmd driver, queues are switched off
to stop receiving and transmitting. But the mac address of this VF
still exists in VEB switch.
To stop the traffic from VSI level, the mac address need to be removed
too. Then the bandwidth for this SRIOV VSI can be freed.
This patch fix this issue.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Andrey Chilikin [Wed, 2 Dec 2015 15:52:13 +0000 (15:52 +0000)]
i40e: fix flex payload mask
Fix wrong copy-paste which led to one bit missing from
I40E_INSET_FLEX_PAYLOAD mask
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Harry van Haaren [Tue, 1 Dec 2015 10:25:40 +0000 (10:25 +0000)]
ixgbe: fix Tx bytes statistics with link down
This patch fixes tx byte statistics when transmitting packets
with link down.
Previously, the counter would decrement 4 bytes for each packet that
was transmitted with link down, causing the uint64 to wrap around.
Fixes:
c03fcee9abbd ("ixgbe: remove CRC size from byte counters")
Reported-by: Michael Qiu <michael.qiu@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yu Nemo Wenbin [Fri, 4 Dec 2015 03:11:41 +0000 (11:11 +0800)]
hash: customize compare function
Give user a chance to customize the hash key compare function.
The default rte_hash_cmp_eq function is set in the rte_hash_create
function, but these builtin ones may not good enough, so the user
may call this to override the default one.
Signed-off-by: Yu Nemo Wenbin <yuwb_bjy@ctbri.com.cn>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Thu, 3 Dec 2015 16:35:58 +0000 (16:35 +0000)]
hash: remove duplicated exported symbol
rte_hash_create function was accidentally duplicated in
DPDK_2.1 in rte_hash_version.map.
Fixes:
473d1beb ("hash: allow to store data in hash table")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Wed, 18 Nov 2015 15:58:06 +0000 (15:58 +0000)]
mem: fix doxygen comments regarding memzone freeing
We can free memzones now, so remove incorrect doxygen documentation
stating otherwise.
Fixes:
ff909fe21f0a ("mem: introduce memzone freeing")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Yaacov Hazan [Sun, 6 Dec 2015 13:13:29 +0000 (15:13 +0200)]
ethdev: fix debug macro
RTE_PMD_DEBUG_TRACE was changed also to support pedantic flag,
but not completely.
the macro changed only under the RTE_LIBRTE_ETHDEV_DEBUG define,
but when RTE_LIBRTE_ETHDEV_DEBUG is not defined the old format
was left.
fix the macro to support pedantic flag in any case.
Fixes:
b974e4a40cb5 ("ethdev: make error checking macros public")
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Sergio Gonzalez Monroy [Wed, 2 Dec 2015 13:06:20 +0000 (13:06 +0000)]
maintainers: claim responsibility for secondary process and FreeBSD
Claim responsability for:
- Secondary Process as maintainer.
- FreeBSD EAL, FreeBSD contigmem and FreeBSD UIO as co-maintainer.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pablo de Lara [Fri, 27 Nov 2015 14:14:04 +0000 (14:14 +0000)]
maintainers: claim responsibility for various sample apps
Co-maintain helloworld, l2fwd and dpdk-qat sample apps.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Panu Matilainen [Wed, 21 Oct 2015 14:18:27 +0000 (17:18 +0300)]
mk: fix shared library dependencies of drivers
Similar to commit
113c8e13c4201eee207723571f83aaf285277d75, but
for bnx2x, pcap, sze2data and xenvirt PMDs.
Requiring applications to know about library internal details like
dependencies to external helper libraries is a limitation of
static linkage, shared libraries should always know their own
dependencies for sane operation. This is especially highlighted
with dlopen()'ed items, having applications link against about plugin
internal dependencies goes on the side of absurd.
Note that linking with a shared combined library still requires to
know the internal dependencies.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Sun, 6 Dec 2015 18:19:24 +0000 (19:19 +0100)]
mk: prepare dependencies in shared libraries not combined
Some DPDK libraries have a dependency.
The Mellanox drivers embed this declaration in shared library case.
So the application do not need to know the dependency when linking.
But it cannot work with static libraries or the combined one.
Note that Mellanox drivers are currently not supported in a shared
combined library case.
Most of the DPDK libraries declare their dependencies to be linked
with the application in every cases, even when using drivers as
shared library plugins.
This patch improves the condition used for Mellanox drivers, so that
it can be applied to other drivers without breaking the shared
combined library case.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 3 Dec 2015 13:38:31 +0000 (14:38 +0100)]
maintainers: take responsibility for build system
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Thu, 3 Dec 2015 03:38:31 +0000 (04:38 +0100)]
pkg: update RPM with standard install
The "make install" is more standard now.
So the recipe can be simplified.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 23:04:27 +0000 (00:04 +0100)]
app/proc_info: rename binary with prefix
In order to be installed system-wise, this application needs
a prefix. So it makes clear that it is DPDK related.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 23:11:28 +0000 (00:11 +0100)]
mk: install examples
The examples are part of the installed documentation.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 22:59:26 +0000 (23:59 +0100)]
mk: install doc
The HTML API and HTML/PDF guides may be installed if generated.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 22:59:18 +0000 (23:59 +0100)]
mk: install binding tool in sbin directory
sbin/dpdk_nic_bind is a symbolic link to tools/dpdk_nic_bind.py
where some python objects may be generated.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 22:37:52 +0000 (23:37 +0100)]
mk: install kernel modules
Add kernel modules to "make install".
Nothing is done if there is no kernel module compiled.
When using "make install T=", the default path is the same as before.
The Linux path is based on host kernel version.
Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 22:29:48 +0000 (23:29 +0100)]
mk: split install rule
Provides new sub-rules to install runtime and sdk separately.
The build directory must be changed from BUILD_DIR to O in install
rules to avoid a bad recursive effect (O being BUILD_DIR being O + T).
Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 14:04:01 +0000 (15:04 +0100)]
mk: introduce new install syntax
The old install command was:
make install T=x86_64-native-linuxapp-gcc DESTDIR=install
It still works and can be replaced by these more standard commands:
make config T=x86_64-native-linuxapp-gcc 0=x86_64-native-linuxapp-gcc
make O=x86_64-native-linuxapp-gcc
make install O=x86_64-native-linuxapp-gcc prefix= DESTDIR=install
It means the "make install" do not perform any compilation anymore when T
is not used. It is done only in pre_install to keep compatibility with the
old syntax based on T= option.
The default prefix /usr/local is empty in the T= case which is
used only for a local install.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 11:47:48 +0000 (12:47 +0100)]
mk: install a standard cutomizable tree
The rule "install" follows these conventions:
http://gnu.org/prep/standards/html_node/Directory-Variables.html
http://gnu.org/prep/standards/html_node/DESTDIR.html
The variable sdkdir has been added to the more standards ones,
to configure the directory used with RTE_SDK when using the DPDK makefiles
to build an application.
It is still possible to build DPDK with the "install T=" rule without
specifying any DESTDIR. In such case there is no install, as before.
The old usage of an installed SDK is:
make -C examples/helloworld RTE_SDK=$(readlink -m $DESTDIR) \
RTE_TARGET=x86_64-native-linuxapp-gcc
RTE_TARGET can be specified but is useless now with an installed SDK.
The RTE_SDK directory must now point to a different path depending of
the installation.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 08:27:37 +0000 (09:27 +0100)]
mk: move installation procedure in install rule
The real installation was called "binary install" and was done
after the build when DESTDIR was specified.
Remove this limitation and move the code in install rule only.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Tue, 1 Dec 2015 07:36:00 +0000 (08:36 +0100)]
mk: remove multi-target install
The multi-target install create some subdirectories with the target name
which is not standard for a "make install" procedure.
The uninstall procedure cannot be applied properly (without removing
all files in a directory). It would need to pre-compute paths.
As it is a packaging issue, it is removed from the build system capabilities.
The variable BUILD_DIR is also renamed to RTE_OUTPUT used in other files.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Thu, 3 Dec 2015 02:48:50 +0000 (03:48 +0100)]
mk: remove testall
It is not possible to test every configs on an unique machine.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Ferruh Yigit [Thu, 3 Dec 2015 13:51:08 +0000 (13:51 +0000)]
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>
Harry van Haaren [Fri, 30 Oct 2015 14:17:58 +0000 (14:17 +0000)]
tools: add short alias -s to NIC binding status
This patch adds -s as an alias to --status in dpdk_nic_bind.py,
providing a convenient shorthand.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Mike Sowka [Sat, 5 Dec 2015 22:27:56 +0000 (17:27 -0500)]
sched: fix build without SSE4
Irrelevant of the target, the preprocessor #ifdef SSE2 for the
grinder_pipe_exists function is inadequate since the __mm_testz_si128
function requires SSE4.1, PTEST instruction described in
https://en.wikipedia.org/wiki/SSE4#SSE4.1 (I do no have better spec
reference). I have bumped the preprocessor #ifdef to require SSE4.
The Atom N2600 does not have SSE4, http://ark.intel.com/products/58916,
and so I had trouble building rte_sched with optimized version of
grinder_pipe_exists, with following:
error: inlining failed in call to always_inline _mm_testz_si128’:
target specific option mismatch
GCC 4.9 correctly identifies my target as not having SSE4, and with
provided patch builds the non-optimized version of grinder_pipe_exists.
Signed-off-by: Mike Sowka <msowka@gmail.com>
Christian Ehrhardt [Tue, 1 Dec 2015 15:13:23 +0000 (16:13 +0100)]
config: disable vector optimizations in sched library
As it causes issues when building with RTE_MACHINE=default due to SSE4.x
requirements and in other discussions was so far rated "lightly tested and
doesn't provide really significant performance improvement" let us disable
that in the default config.
(=> http://dpdk.org/ml/archives/dev/2015-November/029067.html)
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon [Fri, 4 Dec 2015 16:44:51 +0000 (17:44 +0100)]
mempool: fix mlx driver loading
The function rte_mempool_obj_iter used in mlx drivers
was not exported. So the driver loading was failing:
EAL: open shared lib librte_pmd_mlx4.so
EAL: x86_64-native-linuxapp-gcc/lib/librte_pmd_mlx4.so:
undefined symbol: rte_mempool_obj_iter
Fixes:
9d41beed24b0 ("lib: provide initial versioning")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Thu, 3 Dec 2015 04:16:55 +0000 (05:16 +0100)]
eal: fix build with Xen dom0 enabled
There is a new function in the EAL API for internal use.
It has neither a proper prefix nor a .map export:
libethdev.so: undefined reference to `is_xen_dom0_supported'
Fixes:
719dbebceb81 ("xen: allow determining DOM0 at runtime")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Christian Ehrhardt [Thu, 3 Dec 2015 07:04:23 +0000 (08:04 +0100)]
mk: fix combined library build with Xen driver
Building RTE_LIBRTE_PMD_XENVIRT was broken when RTE_BUILD_COMBINE_LIBS was
enabled (http://dpdk.org/ml/archives/dev/2015-November/028660.html).
Now the underlying issue is rather simple, the xen code needs libxenstore.
But rte.app.mk so far only considered that when RTE_BUILD_COMBINE_LIBS was
disabled.
While it is correct to create the DPDK sublib linking only in the
RTE_BUILD_COMBINE_LIBS=n case, the libxenstore should be added to the linked
libs in any case if RTE_LIBRTE_PMD_XENVIRT is enabled.
Reported-by: Thiago Martins <thiagocmartinsc@gmail.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Simon Kagstrom [Tue, 24 Nov 2015 07:50:01 +0000 (08:50 +0100)]
mk: influence CPU flags with user input
We have encountered a CPU where the AES-NI instruction set is disabled
due to export restrictions. Since the build machine and target machine
is different, using -native configs doesn't work, and on this CPU, the
application refuses to run due to the AES CPU flags being amiss.
The patch passes EXTRA_CFLAGS to the figure-out-cpu-flags helper,
which allows us to add -mno-aes to the compile flags and resolve this
problem.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Fri, 4 Dec 2015 17:11:03 +0000 (18:11 +0100)]
mk: fix objects and libraries order when linking
The initial problem has been seen while building mlx4 pmd as a shared
library on Ubuntu 14.04 (gcc 4.8.4-2ubuntu1~14.04).
Resulting .so will lack the DT_NEEDED entry for libibverbs:
marchand@ubuntu1404:~/dpdk$ ldd ./build/lib/librte_pmd_mlx4.so
linux-vdso.so.1 => (0x00007fff87ebb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ced21a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2ced821000)
And trying to load it in testpmd triggers this error:
[...]
EAL: librte_pmd_mlx4.so: undefined symbol: ibv_query_port
[...]
After some strace, the problem comes from the --as-needed option passed to the
linker.
It is safer to specify libraries we depend on after the objects we are linking
into a shared library, especially when the linker is invoked with options like
--as-needed.
Fixes:
bef06a8a0655 ("mk: set library dependencies in shared object file")
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
John McNamara [Thu, 22 Oct 2015 10:36:27 +0000 (11:36 +0100)]
tools: exit setup script without prompt
Exit tools/setup.sh script without prompting "Press enter to continue".
The script can now be exited by typing the option number, "quit" or "q".
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Panu Matilainen [Thu, 24 Sep 2015 07:50:59 +0000 (10:50 +0300)]
scripts: fix ABI validator for KNI module config
The validator attempts to disable all kernel modules but since
commit
36080ff96b0eb37a6da8c4fec1a2f8a57dfadf5b 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:
36080ff96b0e ("config: add KNI kmod option")
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Panu Matilainen [Thu, 24 Sep 2015 07:50:58 +0000 (10:50 +0300)]
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>
Panu Matilainen [Thu, 24 Sep 2015 07:50:57 +0000 (10:50 +0300)]
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>
Thomas Monjalon [Thu, 22 Oct 2015 18:27:05 +0000 (20:27 +0200)]
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
Thomas Monjalon [Thu, 22 Oct 2015 18:26:28 +0000 (20:26 +0200)]
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
Stephen Hemminger [Wed, 2 Dec 2015 04:05:09 +0000 (20:05 -0800)]
bonding: add depencency on cmdline library
Parallel build of bonding driver can fail because of
missing dependency.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Stephen Hemminger [Wed, 2 Dec 2015 04:05:08 +0000 (20:05 -0800)]
app/cmdline_test: add missing dependencies
The cmdline test is missing a necessary dependency on other components.
This caused a build failure when doing parallel builds.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Jerin Jacob [Mon, 30 Nov 2015 17:20:38 +0000 (22:50 +0530)]
config: disable vector optimization of sched lib for arm
Commit
42ec27a0178a causes compiling error on arm, as RTE_SCHED_VECTOR
does support only SSE intrinsic, so disable it till we have neon support.
Fixes:
42ec27a0178a ("sched: enable SSE optimizations in config")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Jerin Jacob [Mon, 30 Nov 2015 17:20:37 +0000 (22:50 +0530)]
config: use armv8a as base for arm64 targets
let each armv8 machine targets capture only the differences
between the common defconfig_arm64-armv8a-linuxapp-gcc
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Michael Qiu [Wed, 2 Dec 2015 02:39:27 +0000 (10:39 +0800)]
sched: fix build with gcc 4.3.4
gcc 4.3.4 does not include "immintrin.h", and will post below error:
lib/librte_sched/rte_sched.c:56:23: error:
immintrin.h: No such file or directory
This compiler issue is fixed with rte_vect.h
There is another issue, need SSE2 support
Fixes:
42ec27a0178a ("sched: enable SSE optimizations in config")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Michael Qiu [Fri, 27 Nov 2015 03:36:04 +0000 (11:36 +0800)]
examples/distributor: fix build with icc 2015
examples/distributor/main.c(338): error #167:
argument of type "struct rte_mbuf *"
is incompatible with parameter of type "const char *"
The first param passed to _mm_prefetch is wrong,
need convert "struct rte_mbuf *" to "void *".
Fixes:
07db4a975094 ("examples/distributor: new sample app")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Michael Qiu [Fri, 27 Nov 2015 03:36:05 +0000 (11:36 +0800)]
drivers: fix constant suffix for 32-bit platforms
There is a compilation issue with some compilers.
In i686 platform, long is 32bit, so XXX_CYCLECOUNTER_MASK
need define as 'ULL'
Fixes:
9c857bf6be87 ("igb: support ieee1588 functions for device time")
Fixes:
1c4445e1f28e ("ixgbe: support ieee1588 functions for device time")
Fixes:
f3a4e40eca0c ("i40e: support ieee1588 functions for device time")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Chen Jing D(Mark) [Fri, 27 Nov 2015 01:54:12 +0000 (09:54 +0800)]
fm10k: log Rx and Tx functions in use
After introducing vPMD feature, fm10k driver will select best
Rx/Tx in running time. Original implementation selects Rx/Tx
silently without notifications.
This patch adds debug info to notify user what actual Rx/Tx
func are used.
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Chen Jing D(Mark) [Fri, 27 Nov 2015 01:55:45 +0000 (09:55 +0800)]
fm10k: fix Rx function selection
Steps to reproduce the bug:
1. All Rx offloading is disabled and start the device, then
Vector Rx is used.
2. Stop the device. Re-configure to enable hw_ip_checksum = 1,
start the device again.
3. In this case, assume regular Rx should be used since Vector
Rx doesn't support ip checksum offload. But actually Vector
Rx is used and cause checksum won't be done by hardware.
The reason is after re-configuring, driver misses an "else" in
func fm10k_set_rx_function(). Then Rx func in last round are
used.
Fixes:
77a8ab47eb38 ("fm10k: select best Rx function")
Reported-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Helin Zhang [Fri, 27 Nov 2015 15:34:24 +0000 (23:34 +0800)]
i40evf: fix RSS key configuration
It fixes the issue of not configuring rss key enable flags
when there is no rss key available.
Fixes:
647d1eaf758b ("i40evf: support AQ based RSS config")
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Wenzhuo Lu [Fri, 27 Nov 2015 06:07:35 +0000 (14:07 +0800)]
igbvf: fix MAC address if none assigned by PF
If use DPDK PF + DPDK VF on igb NICs, we find the MAC address of VF
port is always 0. Because we forget to give it a value if this MAC
address is not assigned by PF. This patch'll assign a random MAC
address to igb VF port as ixgbe does.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Declan Doherty [Fri, 27 Nov 2015 17:44:47 +0000 (17:44 +0000)]
cryptodev: fix build with gcc 4.4.7
- Fix for build error caused by flexible array member in
struct rte_ccryptodev_session:
error: flexible array member in otherwise empty struct
- Change void** casting of sess parameter in
rte_cryptodev_session_create which causes a strict-aliasing error.
Fixes:
d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Michael Qiu [Thu, 26 Nov 2015 07:21:32 +0000 (15:21 +0800)]
app/test: fix build with icc
app/test/test_cryptodev_perf.c(1837): error #192: unrecognized
character escape sequence
printf("\n%u\t%u\t\%u\t\t%u\t\t%u", dev_num, 0,
"\%u" is the root cause of this issue, just fix it.
Fixes:
202d375c60bc ("app/test: add cryptodev unit and performance tests")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Thomas Monjalon [Wed, 25 Nov 2015 23:35:13 +0000 (00:35 +0100)]
version: 2.2.0-rc2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Fan Zhang [Wed, 28 Oct 2015 17:11:22 +0000 (17:11 +0000)]
table: improve lookup performance with prefetch offset
This patch modifies rte_prefetch offsets to improve hash/lru
table lookup performance.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Wed, 28 Oct 2015 17:11:21 +0000 (17:11 +0000)]
examples/ip_pipeline: add hash key mask parameter
This patch updates the flow_classification pipeline for added key_mask
parameter in 8/16-byte key hash parameters. The update provides user
optional key_mask configuration item applying to the packets.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Wed, 28 Oct 2015 17:11:20 +0000 (17:11 +0000)]
examples/ip_pipeline: add hex parsing
This patch adds parse_hex_string function to parse hex string to uint8_t
array.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Wed, 28 Oct 2015 17:11:17 +0000 (17:11 +0000)]
table: add 16-byte hash operations computed on lookup
This patch is to adding hash table operations for key signature
computed on lookup ("do-sig") for LRU hash tables and Extendible buckets.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Wed, 28 Oct 2015 17:11:16 +0000 (17:11 +0000)]
table: add key mask to 8 and 16-byte hash parameters
This patch relates to ABI change proposed for librte_table.
The key_mask parameter is added for 8-byte and 16-byte
key extendible bucket and LRU tables.The release notes
is updated and the deprecation notice is removed.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Marcin Kerlin [Tue, 20 Oct 2015 13:01:26 +0000 (15:01 +0200)]
examples/ip_pipeline: add bulk update of firewall rules
Added two new cli commands to firewall pipeline. Commands bulk add and
bulk delete takes as argument a file with rules to add/delete. The file
is parsed, and then rules are passed to backend functions which
add/delete records from pipeline tables.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Marcin Kerlin [Tue, 20 Oct 2015 13:01:25 +0000 (15:01 +0200)]
app/test: add bulk adding and deleting
Added to acl table unit test check for bulk add and bulk delete.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Marcin Kerlin [Tue, 20 Oct 2015 13:01:24 +0000 (15:01 +0200)]
pipeline: add bulk adding and deleting for table
Added functions for adding/deleting multiple records to table owned by
pipeline. The LIBABIVER number is incremented.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Marcin Kerlin [Tue, 20 Oct 2015 13:01:23 +0000 (15:01 +0200)]
table: add bulk adding and deleting
New functions prototypes for bulk add/delete added to table API. New
functions allows adding/deleting multiple records with single function
call. For now those functions are implemented only for ACL table. For
other tables these function pointers are set to NULL.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 28 Oct 2015 13:30:45 +0000 (14:30 +0100)]
examples/ip_pipeline: add more ports
Add integrated MP/MC and fragmentation/reassembly support to SWQs
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 28 Oct 2015 13:30:44 +0000 (14:30 +0100)]
port: fix reassembly and fragmentation
Bug fixes for ring ports with IPv4/IPv6 reassembly support.
Previous implementation can't work properly due to incorrect choosing
process function.
Also, assuming that, when processing ip packet, ip header is know we can
set l3_len parameter here.
Fix usage RTE_MBUF_METADATA_* macros due to redefinition the macros.
Fixes:
50f54a84dfb7 ("port: add IPv6 reassembly port")
Fixes:
ba92d511ddac ("port: move metadata offset reference at mbuf head")
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 28 Oct 2015 13:30:43 +0000 (14:30 +0100)]
port: add ring multi reader or writer
ring_multi_reader input port (on top of multi consumer rte_ring)
ring_multi_writer output port (on top of multi producer rte_ring)
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jerin Jacob [Mon, 23 Nov 2015 18:45:38 +0000 (00:15 +0530)]
mk: add xgene1 machine target based on armv8-a
created the new xgene1 machine target to address the difference
in optional armv8-a CRC extension availability compared to
default armv8-a machine target(enabled CRC extension by default)
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Mon, 23 Nov 2015 18:45:37 +0000 (00:15 +0530)]
hash: select CRC hash if armv8-a CRC extension available
select hash function for cuckoo, fbk as rte_hash_crc_4byte
if arm64-CRC extension available
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Mon, 23 Nov 2015 18:45:36 +0000 (00:15 +0530)]
hash: use armv8-a CRC32 instructions
armv8-a has optional CRC32 extension, march=armv8-a+crc enables code
generation for the ARMv8-A architecture together with
the optional CRC32 extensions.
added RTE_MACHINE_CPUFLAG_CRC32 to detect the availability of
CRC32 extension in compile time. At run-time, The RTE_CPUFLAG_CRC32
can be used to find the availability.
armv8-a+crc target support added in GCC 4.9,
Used inline assembly and emulated __ARM_FEATURE_CRC32 to work
with tool-chain < 4.9
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Mon, 23 Nov 2015 18:45:35 +0000 (00:15 +0530)]
hash: replace libc memcmp with optimized functions for arm64
The following measurements shows improvement over the default
libc memcmp function
Length(B) by X% over libc memcmp
16 149.57%
32 122.7%
48 104.96%
64 98.21%
80 93.75%
96 90.55%
112 110.48%
128 137.24%
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Daniel Mrzyglod [Tue, 24 Nov 2015 16:31:18 +0000 (17:31 +0100)]
net: fix build with gcc 4.4.7 and strict aliasing
This fix is for IPv6 checksum offload error on RHEL65.
Any optimalisation above -O0 provide error in IPv6 checksum
flag "-fstrict-aliasing" is default for optimalisation above -O0.
Step 1: testpmd -c 0x6 -n 4 -- -i --portmask=0x3 --disable-hw-vlan
--enable-rx-cksum --crc-strip --txqflags=0
Step 2: settings and start
set verbose 1
set fwd csum
start
Step 3: send scapy with bad checksum IPv6/TCP packet
Ether(src="52:00:00:00:00:00",
dst="90:e2:ba:4a:33:5d")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)
Step 4: Received packets:
RESULTS: IPv6/TCP': ['0xd41'] or other unexpected.
EXPECTED RESULTS: IPv6/TCP': ['0x9f5e']
Fixes:
2b039d5f20a3 ("net: fix build with gcc 4.4.7 and strict aliasing")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Thomas Monjalon [Wed, 25 Nov 2015 17:27:21 +0000 (18:27 +0100)]
cryptodev: mark experimental state
The crypto API is in an early state.
It requires more discussions and experiments to declare it stable,
as discussed in http://dpdk.org/ml/archives/dev/2015-November/028634.html
A documentation section will be required in the guides.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:17 +0000 (13:25 +0000)]
examples/l2fwd-crypto: add sample application
This patch creates a new sample applicaiton based off the l2fwd
application which performs specified crypto operations on IP packet
payloads which are forwarding.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:16 +0000 (13:25 +0000)]
app/test: add cryptodev unit and performance tests
unit tests are run by using cryptodev_qat_autotest or
cryptodev_aesni_autotest from the test apps interactive console.
performance tests are run by using the cryptodev_qat_perftest or
cryptodev_aesni_mb_perftest command from the test apps interactive
console.
If you which to run the tests on a QAT device there must be one
bound to igb_uio kernel driver.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: John Griffin <john.griffin@intel.com>
Signed-off-by: Des O Dea <des.j.o.dea@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:15 +0000 (13:25 +0000)]
aesni_mb: add driver for multi buffer based crypto
This patch provides the initial implementation of the AES-NI multi-buffer
based crypto poll mode driver using DPDK's new cryptodev framework.
This PMD is dependent on Intel's multibuffer library, see the whitepaper
"Fast Multi-buffer IPsec Implementations on Intel® Architecture
Processors", see ref 1 for details on the library's design and ref 2 to
download the library itself. This initial implementation is limited to
supporting the chained operations of "hash then cipher" or "cipher then
hash" for the following cipher and hash algorithms:
Cipher algorithms:
- RTE_CRYPTO_CIPHER_AES_CBC (with 128-bit, 192-bit and 256-bit keys supported)
Authentication algorithms:
- RTE_CRYPTO_AUTH_SHA1_HMAC
- RTE_CRYPTO_AUTH_SHA256_HMAC
- RTE_CRYPTO_AUTH_SHA512_HMAC
- RTE_CRYPTO_AUTH_AES_XCBC_MAC
Important Note:
Due to the fact that the multi-buffer library is designed for
accelerating IPsec crypto operation, the digest's generated for the HMAC
functions are truncated to lengths specified by IPsec RFC's, ie RFC2404
for using HMAC-SHA-1 with IPsec specifies that the digest is truncate
from 20 to 12 bytes.
Build instructions:
To build DPDK with the AESNI_MB_PMD the user is required to download
(ref 2) and compile the multi-buffer library on there system before
building DPDK. The environmental variable AESNI_MULTI_BUFFER_LIB_PATH
must be exported with the path where you extracted and built the multi
buffer library and finally set CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y in
config/common_linuxapp.
Current status: It's doesn't support crypto operation
across chained mbufs, or cipher only or hash only operations.
ref 1:
https://www-ssl.intel.com/content/www/us/en/intelligent-systems/intel-technology/fast-multi-buffer-ipsec-implementations-ia-processors-p
ref 2: https://downloadcenter.intel.com/download/22972
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:14 +0000 (13:25 +0000)]
qat: add driver for QuickAssist devices
This patch adds a PMD for the Intel Quick Assist Technology DH895xxC
hardware accelerator.
This patch depends on a QAT PF driver for device initialization. See
the file docs/guides/cryptodevs/qat.rst for configuration details
This patch supports a limited subset of QAT device functionality,
currently supporting chaining of cipher and hash operations for the
following algorithmsd:
Cipher algorithms:
- RTE_CRYPTO_CIPHER_AES_CBC (with 128-bit, 192-bit and 256-bit keys supported)
Hash algorithms:
- RTE_CRYPTO_AUTH_SHA1_HMAC
- RTE_CRYPTO_AUTH_SHA256_HMAC
- RTE_CRYPTO_AUTH_SHA512_HMAC
- RTE_CRYPTO_AUTH_AES_XCBC_MAC
Some limitation on this patchset which shall be contributed in a
subsequent release:
- Chained mbufs are not supported.
- Hash only is not supported.
- Cipher only is not supported.
- Only in-place is currently supported (destination address is
the same as source address).
- Only supports session-oriented API implementation (session-less
APIs are not supported).
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: John Griffin <john.griffin@intel.com>
Signed-off-by: Des O Dea <des.j.o.dea@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:13 +0000 (13:25 +0000)]
mbuf_offload: introduce library to attach offloads to mbuf
This library add support for adding a chain of offload operations to a
mbuf. It contains the definition of the rte_mbuf_offload structure as
well as helper functions for attaching offloads to mbufs and a mempool
management functions.
This initial implementation supports attaching multiple offload
operations to a single mbuf, but only a single offload operation of a
specific type can be attach to that mbuf.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:12 +0000 (13:25 +0000)]
cryptodev: introduce API and framework for crypto devices
This patch contains the initial proposed APIs and device framework for
integrating crypto packet processing into DPDK.
features include:
- Crypto device configuration / management APIs
- Definitions of supported cipher algorithms and operations.
- Definitions of supported hash/authentication algorithms and
operations.
- Crypto session management APIs
- Crypto operation data structures and APIs allocation of crypto
operation structure used to specify the crypto operations to
be performed on a particular mbuf.
- Extension of mbuf to contain crypto operation data pointer and
extra flags.
- Burst enqueue / dequeue APIs for processing of crypto operations.
Signed-off-by: Des O Dea <des.j.o.dea@intel.com>
Signed-off-by: John Griffin <john.griffin@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:11 +0000 (13:25 +0000)]
mbuf: get physical address of data
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:10 +0000 (13:25 +0000)]
eal: add packing and alignment macros
Adding a new macro for specifying __aligned__ attribute, and updating the
current __rte_cache_aligned macro to use it.
Also adding a new macro to specify the __packed__ attribute
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Bruce Richardson [Tue, 24 Nov 2015 17:37:57 +0000 (17:37 +0000)]
ethdev: add sanity checks to functions
The functions rte_eth_rx_queue_count and rte_eth_descriptor_done are
supported by very few PMDs. Therefore, it is best to check for support
for the functions in the ethdev library, so as to avoid run-time crashes
at run-time if the application goes to use those APIs. Similarly, the
port parameter should also be checked for validity.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Tue, 24 Nov 2015 17:37:56 +0000 (17:37 +0000)]
ethdev: remove duplicated debug functions
The functions for rx/tx burst, for rx_queue_count and descriptor_done in
the ethdev library all had two copies of the code. One copy in
rte_ethdev.h was inlined for performance, while a second was in
rte_ethdev.c for debugging purposes only. We can eliminate the second
copy of the functions by moving the additional debug checks into the
copies of the functions in the header file. [Any compilation for
debugging at optimization level 0 will not inline the function so the
result should be same as when the function was in the .c file.]
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:09 +0000 (13:25 +0000)]
ethdev: make error checking macros public
Move the function pointer and port id checking macros to rte_ethdev and
rte_dev header files, so that they can be used in the static inline
functions there. Also replace the RTE_LOG call within
RTE_PMD_DEBUG_TRACE so this macro can be built with the -pedantic flag
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Declan Doherty [Wed, 25 Nov 2015 13:25:08 +0000 (13:25 +0000)]
ethdev: prefix internal error checking macros
The macros to check that the function pointers and port ids are valid
for an ethdev are potentially useful to have in a common headers for
use with all PMDs. However, since they would then become externally
visible, we apply the RTE_ & RTE_ETH_ prefix to them as approtiate.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Wed, 25 Nov 2015 11:13:55 +0000 (11:13 +0000)]
eal/linux: fix build with glibc < 2.12
pthread_setname_np() function added in glibc 2.12, using this function
in older glibc versions cause compile error:
error: implicit declaration of function "pthread_setname_np"
This patch adds "rte_thread_setname" macro and set it according
glibc >= 2.12 check, thread naming disabled for older glibc versions,
glibc versions that support "pthread_setname_np" will keep using this
function.
Fixes:
67b6d3039e9e ("eal: set name to threads")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon [Wed, 25 Nov 2015 00:45:41 +0000 (01:45 +0100)]
sched: remove unused debug functions
clang warns about unused functions when debug is enabled.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Simon Kagstrom [Tue, 17 Nov 2015 08:14:48 +0000 (09:14 +0100)]
sched: release enqueued mbufs when freeing port
Otherwise mbufs will leak when the port is destroyed. The
rte_sched_port_qbase() and rte_sched_port_qsize() functions are used
in free now, so move them up.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:36 +0000 (09:58 -0800)]
sched: allow more subports
Increase the number of possible subports per port to allow up to 16 bits.
It is still possible that this will require excessive RAM.
Although mbuf structure is changed, it is ABI compatiable since it
just expands existing sched part of structure to overlap pre-existing hole
in the hash element of structure.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:35 +0000 (09:58 -0800)]
sched: fix coding style
Make rte_sched conform to kernel/DPDK coding style.
Fix missing whitespace and some of the excessively long lines.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:34 +0000 (09:58 -0800)]
sched: enable SSE optimizations in config
Make the SSE optimizations visible as a normal config option.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:33 +0000 (09:58 -0800)]
sched: cleanup defined constants
Only use RTE_SCHED_PORT_N_GRINDERS from config.
Use RTE_BUILD_BUG_ON for errors.
The remaining implementation constants can be put together.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:32 +0000 (09:58 -0800)]
sched: drop WRR conditional
The RTE_SCHED_WRR value is always defined as 1.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:31 +0000 (09:58 -0800)]
sched: remove enqueue debug
Remove RTE_SCHED_ENQUEUE ifdef that was always being set.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:30 +0000 (09:58 -0800)]
sched: drop credit check debug
Drop conditional code which was for debugging credit checks.
It is hard to maintain code with any additional #ifdef baggage.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:29 +0000 (09:58 -0800)]
sched: make debugging configurable
All #ifdefs in code should be enabled/disabled via DPDK config
(or better yet removed all together).
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:28 +0000 (09:58 -0800)]
sched: cleanup comments
Break block comments that exceed common practice for line length.
Shorten wording for obvious things.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Fri, 13 Nov 2015 17:58:27 +0000 (09:58 -0800)]
sched: drop deprecated port hierarchy structure
The actual port_hierarchy was deprecated and hidden in 2.1
so drop it from view in DPDK 2.2.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>