Jasvinder Singh [Mon, 20 Nov 2017 16:39:19 +0000 (16:39 +0000)]
app/testpmd: add commands for metering and policing
Add following CLIs to testpmd application;
- show port metering and policing capabilities.
- enable/disable meter of the MTR object.
- update the MTR object dscp table entries.
Jasvinder Singh [Mon, 20 Nov 2017 16:39:18 +0000 (16:39 +0000)]
app/testpmd: clean metering and policing commands
This patch updates the metering and policing CLIs as follows:
- change name of set port meter CLI to create port meter and add meter
enable option, dscp table entries arguments, action mask, policer actions
and previous meter color option as an input color
- set the right metering algorithm in add meter profile CLIs related to
srtcm(rfc2697) and trtcm(rfc2698,rfc4115)
- change clear flag type from uint32_t to string in show meter stats CLI
Yanglong Wu [Tue, 2 Jan 2018 05:35:42 +0000 (13:35 +0800)]
app/testpmd: fix port id allocation
In the feature of increasing port_id range from 8 bits to 16 bits,
vlan port_id allocation function was forget to substitute UINT8 with
UINT16, so the vlan port_id was allocated as a inccrete number.
Fixes: 28caa76aea71 ("app/testpmd: fix port id type") Cc: stable@dpdk.org Signed-off-by: Yanglong Wu <yanglong.wu@intel.com> Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Kefu Chai [Fri, 1 Dec 2017 11:22:39 +0000 (19:22 +0800)]
contigmem: fix build on FreeBSD 12
include <sys/vmmeter.h> to fix build
otherwise the build fails with FreeBSD 12, like
In file included from contigmem.c:57:
/usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error:
use of undeclared identifier 'vm_cnt'
return (vm_cnt.v_free_count += adj);
^
Signed-off-by: Kefu Chai <tchaikov@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Fri, 5 Jan 2018 11:33:20 +0000 (12:33 +0100)]
devtools: ignore checkpatch warning for maintainers file
The script checkpatch.pl from Linux is enforcing a tab
in the MAINTAINERS file (Linux commit 628f91a28649).
It can be ignored in our wrapper checkpatches.sh.
Suggested-by: Remy Horton <remy.horton@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Remy Horton <remy.horton@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
bus/pci: do not use kernel version to determine MSIX defines
In real life, kernel version is only weakly corolated with presence
or absence of defines in header files. Instead, check directly if
the needed value is defined.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Olivier Matz [Fri, 22 Dec 2017 15:59:02 +0000 (16:59 +0100)]
net: update licence for network headers
To be compliant with the DPDK licensing guidelines, switch to
BSD-3-Clause. It can be done safely since the BSD headers from which
these files derive also exist as a BSD-3-Clause license in FreeBSD.
Hemant Agrawal [Tue, 19 Dec 2017 10:14:38 +0000 (15:44 +0530)]
license: introduce SPDX identifiers
The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are naturally GPLv2 licensed.
Many of the files in the DPDK source code contain the full text of the
applicable license. For example, most of the BSD-3-Clause files contain a
full copy of the BSD-3-Clause license text.
Including big blocks of License headers in all files blows up the source
code with mostly redundant information. An additional problem is that even
the same licenses are referred to by a number of slightly varying text
blocks (full, abbreviated, different indentation, line wrapping and/or
white space, with obsolete address information, ...) which makes validation
and automatic processing a nightmare.
To make this easier, DPDK uses of a single line reference to
Unique License Identifiers in source files as defined by the Linux
Foundation's SPDX project https://spdk.org.
Adding license information in this fashion, rather than adding full license
text, can be more efficient for developers; decreases errors; and improves
automated detection of licenses. The current set of valid, predefined SPDX
identifiers is set forth on the SPDX License List at
https://spdx.org/licenses/.
For example, to label a file as subject to the BSD-3-Clause license,
the following text would be used as the top line of the file.
SPDX-License-Identifier: BSD-3-Clause
Note: Any new file contributions in DPDK shall adhere to the above scheme.
It is also recommended to replace or at least amend the existing license
text in the code with SPDX-License-Identifiers.
Any exception to DPDK IP policies shall be approved by DPDK tech board and
DPDK Governing Board. Steps for any exception approval:
1. Mention the appropriate license identifier form SPDX. If the license is
not listed in SPDX Licenses. It is the submitters responsibiliity to get
it first listed.
2. Get the required approval from the DPDK Technical Board. Technical board
may advise the author to check alternate means first. If no other
alternatives are found and the merit of the contributions are important
for DPDK's mission, it may decide on such exception with two-thirds vote
of the members.
3. Technical board then approach Governing board for such limited approval
for the given contribution only.
Any approvals shall be documented in "licenses/exceptions.txt" with record
dates.
Note: From the legal point of view, this patch is supposed to be only a
change to the textual representation of the license information, but in no
way any change to the actual license terms. With this patch applied, all
files will still be licensed under the same terms they were before.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Thomas Monjalon <thomas@monjalon.net>
doc: update oldest supported kernel in Linux guide
The DPDK needs to stay up to date with current LTS Linux kernel support.
If the kernel is older than LTS it is likely to be insecure and buggy.
Therefore only require DPDK to work on oldest LTS kernel.
If distribution vendors want to support DPDK on older kernels, that is
their choice. But the upstream source does not need to be cluttered
with support for this.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Ferruh Yigit [Tue, 28 Nov 2017 23:45:53 +0000 (23:45 +0000)]
kni: fix build with kernel 4.15
build error:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2809:2:
error: implicit declaration of function ‘setup_timer’;
did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
setup_timer(&adapter->watchdog_timer, &igb_watchdog,
^~~~~~~~~~~
sk_stop_timer
cc1: all warnings being treated as errors
Thomas Monjalon [Wed, 15 Nov 2017 17:54:07 +0000 (18:54 +0100)]
doc: fix GSO guide as PDF
The PDF cannot be built because of some images integration being
forced as SVG. They are converted for PDF format, so the extension
must be a wildcard in the RST file.
Maria Lingemark [Tue, 14 Nov 2017 08:04:24 +0000 (09:04 +0100)]
pdump: fix typo in error log
Fixes: 278f945402c5 ("pdump: add new library for packet capture") Signed-off-by: Maria Lingemark <maria.lingemark@ericsson.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Update types of variables to correspond to nb_segs type change from
uint8_t to uint16_t.
Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments") Cc: stable@dpdk.org Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Andrew Rybchenko [Tue, 14 Nov 2017 11:32:35 +0000 (11:32 +0000)]
net/sfc: avoid Tx queue setup failure if thresholds are set
Tx queue prefetch, host and writeback thresholds are used for
performance fine-tuning and not applicable to Solarflare NICs.
It is safe to just log warning and do not fail Tx queue setup
to be more friendly to DPDK applications which hardcode it.
Fixes: b1b7ad933b39 ("net/sfc: set up and release Tx queues") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Tue, 14 Nov 2017 11:32:34 +0000 (11:32 +0000)]
net/sfc: avoid Rx queue setup failure if thresholds are set
Rx queue prefetch, host and writeback thresholds are used for
performance fine-tuning and not applicable to Solarflare NICs.
It is safe to just log warning and do not fail Rx queue setup
to be more friendly to DPDK applications which hardcode it.
Pengzhen Liu [Fri, 27 Oct 2017 03:54:09 +0000 (11:54 +0800)]
net/virtio: fix memory leak on failure
In function eth_virtio_dev_init(), dynamic memory stored
in "eth_dev->data->mac_addrs" variable and it is not freed
when function return,
this is a possible memory leak.
Fixes: 8ced1542f7a3 ("net/virtio: eth_dev->data->mac_addrs is not freed") Cc: stable@dpdk.org Signed-off-by: Pengzhen Liu <liupengzhen3@huawei.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
In weak memory order architectures (powerpc,arm), the 2nd load might be
reodered before the 1st load, that makes *entries is bigger than we wanted.
This nasty reording messed enque/deque up.
load r->cons.head
load r->prod.tail
...
store r->cons.{head,tail}
load r->cons.head
Then, r->cons.head will be bigger than prod_tail, then make *entries very
big and the consumer will go forward incorrectly.
After this patch, the old cons.head will be recaculated after failure of
rte_atomic32_cmpset
There is no such issue on X86, because X86 is strong memory order model.
But rte_smp_rmb() doesn't have impact on runtime performance on X86, so
keep the same code without architectures specific concerns.
Fixes: 50d769054872 ("ring: add burst API") Cc: stable@dpdk.org Signed-off-by: Jia He <jia.he@hxt-semitech.com> Signed-off-by: Jie Liu <jie2.liu@hxt-semitech.com> Signed-off-by: Bing Zhao <bing.zhao@hxt-semitech.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Pablo de Lara [Tue, 24 Oct 2017 09:55:54 +0000 (10:55 +0100)]
maintainers: update PTP client example
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Pablo de Lara [Tue, 24 Oct 2017 09:56:44 +0000 (10:56 +0100)]
maintainers: update job stats library
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com> Acked-by: Yuanhan Liu <yliu@fridaylinux.org> Acked-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Moti Haimovsky [Thu, 9 Nov 2017 17:30:56 +0000 (19:30 +0200)]
doc: update mlx4 documentation
This updates mlx4 documentation and DPDK release notes
to reflect the PMD support for rdma-core from linux-rdma.
- PMD is now freed from Mellanox OFED and now only depends on the
public rdma-core package (v15 and above) instead.
(see https://github.com/linux-rdma/rdma-core/releases)
This PMD should run under Linux v4.14 and above.
- In case any of the above requirements can't be satisfied,
Mellanox OFED v4.2 and above also provide an updated rdma-core
as well back-ported kernel modules for most Linux distributions
and previous Linux versions.
(see http://www.mellanox.com/page/products_dyn?product_family=26).
Thomas Monjalon [Wed, 8 Nov 2017 20:44:10 +0000 (21:44 +0100)]
doc: move fast mbuf free feature in net guide
The feature was added at the end of the table.
And the description was between the anchor _nic_features_timesync
and its title.
It is moved near related features with a new anchor.
It is also renamed from "mbuf fast free" to "fast mbuf free".
Fixes: d6f90afd3070 ("ethdev: add mbuf fast free Tx offload") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
If pdump_pktmbuf_copy_data() fails it's possible to have segment leak
as rte_pktmbuf_free() only handles m_dup chain but not the seg just
allocated and yet not chained.
Fixes: 278f945402c5 ("pdump: add new library for packet capture") Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
This patch fixes three problems in memory autotest:
- the regex for IOVA
- missing validation of second and following output lines
- propagation of error to consecutive tests
- conversion base for mem size (hex indtead of dec)
First fix is for changes introduced with IOVA, the regex was not
updated which lead to unit test failure. Patch now also uses loop for
line outputs processing to verify more than just one line. By this we
also satisfy the pexpect() and scan the "Test OK"/"Test Failed" so in
case of error all output lines are consumed and does not break the
consecutive test (error does not propagate).
Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA") Fixes: b4ce15aa2bc7 ("app/test: fix memory autotest") Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
This patch fixes the memory leaks in memzone_autotest. Those memory leaks
lead to failures in tests from the same testing group due to out of memory
problems. With introduction of rte_memzone_free() it is now possible to
free the memzone. Fix uses this API call to make a clean after each test
case.