Rami Rosen [Wed, 19 Jul 2017 20:06:06 +0000 (23:06 +0300)]
jobstats: fix typo in doxygen comment
This patch fixes a trivial typo in rte_jobstats.h.
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Yong Wang [Tue, 18 Jul 2017 12:03:07 +0000 (08:03 -0400)]
doc: fix metrics example
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Remy Horton <remy.horton@intel.com>
Remy Horton [Tue, 18 Jul 2017 09:43:47 +0000 (10:43 +0100)]
metrics: fix name string termination
The public API (struct rte_metric_name) includes the NULL terminator
byte in RTE_METRICS_MAX_NAME_LENGTH but the library itself internally
excludes it. This makes it possible for an application to receive an
unterminated name string. Fix be enforcing the NULL termination of all
name strings to the length that the public API expects.
Fixes:
349950ddb9c5 ("metrics: add information metrics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Cian Ferriter [Fri, 7 Jul 2017 14:17:40 +0000 (15:17 +0100)]
mbuf: fix VXLAN port in comment
IANA assigns a destination port of 4789 for the VXLAN in the Service
Name and Transport Protocol Port Number Registry. This is mentioned in
RFC 7348.
Fixes:
f295a00a2b44 ("mbuf: add definitions of unified packet types")
Cc: stable@dpdk.org
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Harry van Haaren [Mon, 17 Jul 2017 15:21:54 +0000 (16:21 +0100)]
service: add -S corelist option
This commit allows the -S (captial 's') to be used to indicate
a corelist for Services. This is a "nice to have" patch, and does
not modify any of the service core functionality.
Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Hemant Agrawal [Mon, 17 Jul 2017 08:43:10 +0000 (14:13 +0530)]
bus/fslmc: remove workaround for smmu mapping
This is not required any more for A72 based dpaa2 systems.
(A57 based platform is not in production anymore)
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Jerin Jacob [Mon, 10 Jul 2017 16:59:46 +0000 (22:29 +0530)]
ethdev: introduce lock-free Tx queue capability
Introducing the DEV_TX_OFFLOAD_MT_LOCKFREE TX capability flag.
if a PMD advertises DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads
can invoke rte_eth_tx_burst() concurrently on the same tx queue without
SW lock. This PMD feature will be useful in the following use cases and
found in the OCTEON family of NPUs.
1) Remove explicit spinlock in some applications where lcores
to TX queues are not mapped 1:1.
example: OVS has such instance
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L299
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L1859
See the the usage of tx_lock spinlock.
2) In the eventdev use case, avoid dedicating a separate TX core for
transmitting and thus enables more scaling as all workers can
send the packets.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:31 +0000 (15:19 +0100)]
event/sw: add service capability
This commit shows how easy it is to enable a specific
DPDK component with a service callback, in order to get
CPU cycles for it.
The beauty of this method is that the service is unaware
of how much CPU time it is getting - the application can
decide how to split and slice cores and map them to the
registered services.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:30 +0000 (15:19 +0100)]
service: add unit tests
Add a bunch of unit tests, to ensure that the service
core functions are operating as expected.
As part of these tests a dummy service is registered which
allows identifying if a service callback has been invoked
by using the CPU tick counter. This allows identifying if
functions to start and stop service lcores are actually having
effect.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:29 +0000 (15:19 +0100)]
service: add coremask option -s
Add logic for parsing a coremask from EAL, which allows
the application to be unaware of the cores being taken from
its coremask.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:28 +0000 (15:19 +0100)]
service: initialize with EAL
This commit shows the changes required in rte_eal_init()
to transparently launch the service threads. The threads
are launched into the service worker functions here because
after rte_eal_init() the application is not gauranteed to
call any other DPDK API.
As the registration of services happens at initialization
time, the services that require CPU time are already available
when we reach the end of rte_eal_init().
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Harry van Haaren [Tue, 11 Jul 2017 14:19:27 +0000 (15:19 +0100)]
service: introduce service cores concept
Add header files, update .map files with new service
functions, and add the service header to the doxygen
for building.
This service header API allows DPDK to use services as
a concept of something that requires CPU cycles. An example
is a PMD that runs in software to schedule events, where a
hardware version exists that does not require a CPU.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Thomas Monjalon [Sun, 16 Jul 2017 13:53:35 +0000 (15:53 +0200)]
examples: remove duplicate includes
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Stephen Hemminger [Tue, 11 Jul 2017 18:55:45 +0000 (11:55 -0700)]
test: remove duplicate includes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Tue, 11 Jul 2017 18:55:44 +0000 (11:55 -0700)]
app/testpmd: remove duplicate includes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Tue, 11 Jul 2017 18:55:43 +0000 (11:55 -0700)]
app/procinfo: remove duplicate include
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Tue, 11 Jul 2017 18:55:35 +0000 (11:55 -0700)]
drivers/net: remove duplicate includes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Tue, 11 Jul 2017 18:55:41 +0000 (11:55 -0700)]
drivers/dpaa2: remove duplicate includes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Stephen Hemminger [Tue, 11 Jul 2017 18:55:29 +0000 (11:55 -0700)]
lib: remove duplicate includes
Include files only need to be refrenced once per file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:59 +0000 (20:25 +0530)]
drivers: add newline in dpaa2 logs
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:58 +0000 (20:25 +0530)]
config: enable virtual IOVA by default for DPAA2
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:57 +0000 (20:25 +0530)]
bus/fslmc: align object name log to real resource name
the DPAA2 resources are named with ".", so changing
"-" with "."
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:56 +0000 (20:25 +0530)]
bus/fslmc: set the dpaa2 device name
rte_eth_dev_allocated expect the device name to be filled.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:55 +0000 (20:25 +0530)]
event/dpaa2: fix debug build
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:54 +0000 (20:25 +0530)]
bus/fslmc: fix debug build
Fixes:
9ccb76b24c1d ("bus/fslmc: enable portal interrupt handling")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:53 +0000 (20:25 +0530)]
net/dpaa2: fix flow control switch case break
Fixes:
977d0006ada1 ("net/dpaa2: add support for flow control")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Tue, 11 Jul 2017 14:55:52 +0000 (20:25 +0530)]
crypto/dpaa2_sec: fix build with gcc 7.1
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Qiming Yang [Tue, 20 Jun 2017 03:24:11 +0000 (11:24 +0800)]
test/alarm: add delay tolerance
Because accuracy of timing to the microsecond is not guaranteed
in rte_eal_alarm_set, this function will not be called before
the requested time, but may be called a period of time
afterwards which can not be calculated. In order to ensure
test alarm running success, this patch added the delay time
before check the flag.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Vasily Philipov [Sun, 9 Jul 2017 08:08:05 +0000 (11:08 +0300)]
app/testpmd: add --flow-isolate-all option
Providing this parameter requests flow API isolated mode on all ports at
initialization time. It ensures all traffic is received through the
configured flow rules only (see flow command).
Ports that do not support this mode are automatically discarded.
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Thomas Monjalon [Thu, 6 Jul 2017 21:45:32 +0000 (23:45 +0200)]
ethdev: fix build with gcc 5.4.0
Seen on Ubuntu 16.04 with GCC 5.4.0:
lib/librte_ether/rte_ethdev.c: In function 'get_mac_addr_index':
lib/librte_ether/rte_ethdev.c:2369:26: error:
'dev_info.max_mac_addrs' may be used uninitialized in this function
Indeed, rte_eth_dev_info_get() do not write into dev_info
if the port_id is not valid.
So we need to check the port_id and return in case of error.
This extra check should not be needed because the port_id is always
checked before calling get_mac_addr_index().
However it does not hurt.
Reported-by: Matan Azrad <matan@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Matan Azrad <matan@mellanox.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:57 +0000 (12:23 +0800)]
net/ixgbe: support committing TM hierarchy
Add the support of the Traffic Management API,
rte_tm_hierarchy_commit.
When calling this API, the driver tries to enable
the TM configuration on HW.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:56 +0000 (12:23 +0800)]
net/ixgbe: support getting TM node capability
Add the support of the Traffic Management API,
rte_tm_node_capabilities_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:55 +0000 (12:23 +0800)]
net/ixgbe: support getting TM level capability
Add the support of the Traffic Management API,
rte_tm_level_capabilities_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:54 +0000 (12:23 +0800)]
net/ixgbe: support getting TM node type
Add the support of the Traffic Management API,
rte_tm_node_type_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:53 +0000 (12:23 +0800)]
net/ixgbe: support deleting TM node
Add the support of the Traffic Management API,
rte_tm_node_delete.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:52 +0000 (12:23 +0800)]
net/ixgbe: support adding TM node
Add the support of the Traffic Management API,
rte_tm_node_add.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:51 +0000 (12:23 +0800)]
net/ixgbe: support deleting TM shaper profile
Add the support of the Traffic Management API,
rte_tm_shaper_profile_delete.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:50 +0000 (12:23 +0800)]
net/ixgbe: support adding TM shaper profile
Add the support of the Traffic Management API,
rte_tm_shaper_profile_add.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:49 +0000 (12:23 +0800)]
net/ixgbe: support getting TM capability
Add the support of the Traffic Management API,
rte_tm_capabilities_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:48 +0000 (12:23 +0800)]
net/ixgbe: support getting TM ops
To support QoS scheduler APIs, create a new C file for
the TM (Traffic Management) ops but without any function
implemented.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:47 +0000 (12:23 +0800)]
net/i40e: support committing TM hierarchy
Add the support of the Traffic Management API,
rte_tm_hierarchy_commit.
When calling this API, the driver tries to enable
the TM configuration on HW.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:46 +0000 (12:23 +0800)]
net/i40e: support getting TM node capability
Add the support of the Traffic Management API,
rte_tm_node_capabilities_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:45 +0000 (12:23 +0800)]
net/i40e: support getting TM level capability
Add the support of the Traffic Management API,
rte_tm_level_capabilities_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:44 +0000 (12:23 +0800)]
net/i40e: support getting TM node type
Add the support of the Traffic Management API,
rte_tm_node_type_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:43 +0000 (12:23 +0800)]
net/i40e: support deleting TM node
Add the support of the Traffic Management API,
rte_tm_node_delete.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:42 +0000 (12:23 +0800)]
net/i40e: support adding TM node
Add the support of the Traffic Management API,
rte_tm_node_add.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:41 +0000 (12:23 +0800)]
net/i40e: support deleting TM shaper profile
Add the support of the Traffic Management API,
rte_tm_shaper_profile_delete.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:40 +0000 (12:23 +0800)]
net/i40e: support adding TM shaper profile
Add the support of the Traffic Management API,
rte_tm_shaper_profile_add.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:39 +0000 (12:23 +0800)]
net/i40e: support getting TM capability
Add the support of the Traffic Management API,
rte_tm_capabilities_get.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Thu, 29 Jun 2017 04:23:38 +0000 (12:23 +0800)]
net/i40e: support getting TM ops
To support QoS scheduler APIs, create a new C file for
the TM (Traffic Management) ops but without any function
implemented.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Cristian Dumitrescu [Mon, 12 Jun 2017 13:35:39 +0000 (14:35 +0100)]
ethdev: add traffic management API
This patch introduces the generic ethdev API for the traffic manager
capability, which includes: hierarchical scheduling, traffic shaping,
congestion management, packet marking.
Main features:
- Exposed as ethdev plugin capability (similar to rte_flow)
- Capability query API per port, per level and per node
- Scheduling algorithms: Strict Priority (SP), Weighed Fair Queuing (WFQ)
- Traffic shaping: single/dual rate, private (per node) and shared (by
multiple nodes) shapers
- Congestion management for hierarchy leaf nodes: algorithms of tail drop,
head drop, WRED; private (per node) and shared (by multiple nodes) WRED
contexts
- Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for
TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Balasubramanian Manoharan <balasubramanian.manoharan@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Cristian Dumitrescu [Mon, 12 Jun 2017 13:35:38 +0000 (14:35 +0100)]
ethdev: add traffic management ops get API
The rte_flow feature breaks the monolithic approach for ethdev by
introducing the new rte_flow API to ethdev using a plugin-like approach.
Basically, the rte_flow API is still logically part of ethdev:
- It extends the ethdev functionality: rte_flow is a new feature/
capability of ethdev;
- all its functions work on an Ethernet device: the first parameter of the
rte_flow functions is Ethernet device port ID.
Also, the rte_flow API is a sort of capability plugin for ethdev:
- the rte_flow API functions have their own name space: they are called
rte_flow_operationXYZ() as opposed to rte_eth_dev_flow_operationXYZ());
- the rte_flow API functions are placed in separate files in the same
librte_ether folder as opposed to rte_ethdev.[hc].
The way it works is by using the existing ethdev API function
rte_eth_dev_filter_ctrl() to query the current Ethernet device port ID for
the support of the rte_flow capability and return the pointer to the
rte_flow operations when supported and NULL otherwise:
struct rte_flow_ops *eth_flow_ops;
int rte = rte_eth_dev_filter_ctrl(eth_port_id,
RTE_ETH_FILTER_GENERIC, RTE_ETH_FILTER_GET, ð_flow_ops);
This patch reuses the same approach for ethdev Traffic Management API.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Pablo de Lara [Mon, 10 Jul 2017 02:59:23 +0000 (03:59 +0100)]
cryptodev: fix build with icc
Removed unnecessary macro RTE_STD_C11, which is used
for unnamed structs.
Since there is no longer an unnamed structure in
rte_cryptodev_sym_session, this is not needed and
it is actually breaking compilation on icc:
lib/librte_cryptodev/rte_cryptodev.h(887): error: expected a declaration
__extension__ void *sess_private_data[0];
^
Fixes:
7c110ce7aa4e ("cryptodev: remove mempool from session")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Jan Blunck [Tue, 11 Jul 2017 23:15:48 +0000 (19:15 -0400)]
bus/vdev: allocate empty arguments string
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Jan Blunck [Tue, 11 Jul 2017 23:15:47 +0000 (19:15 -0400)]
bus/vdev: use local bus reference
It isn't necessary to use rte_bus_find_by_name() to find a reference to
our own bus.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Jan Blunck [Tue, 11 Jul 2017 23:15:46 +0000 (19:15 -0400)]
bus/vdev: get name from embedded generic device
Instead of getting the name from the devargs lets take it from the
rte_device.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Hemant Agrawal [Tue, 11 Jul 2017 08:50:19 +0000 (14:20 +0530)]
bus/fslmc: fix missing brace
Fixes:
c7fe1eea8a74 ("bus: simplify finding starting point")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Radu Nicolau [Mon, 10 Jul 2017 11:39:49 +0000 (12:39 +0100)]
doc: notify bypass API change
Added API change description - moved bypass functions
from the rte_ethdev library to ixgbe PMD
Fixes:
e261265e42a1 ("ethdev: move bypass functions to ixgbe PMD")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Jerin Jacob [Thu, 6 Jul 2017 14:20:25 +0000 (19:50 +0530)]
net/thunderx: remove libm dependency
Used rte_log2_u32() to replace integer log2() to
remove libm dependency.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Jerin Jacob [Thu, 6 Jul 2017 14:20:24 +0000 (19:50 +0530)]
test: add unit test for integer log2 function
add a unit testcase for rte_log2_u32.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Shreyansh Jain [Mon, 10 Jul 2017 09:13:05 +0000 (14:43 +0530)]
update NXP copyright headers
NXP Copyright has been wrongly worded with '(c)' at various places.
This patch removes these extra characters. It also removes
"All rights reserved".
Only NXP copyright syntax is changed. Freescale copyright is not
modified.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Jerin Jacob [Fri, 7 Jul 2017 16:26:54 +0000 (21:56 +0530)]
eal/armv7: emulate vaddvq u16 variant
vaddvq_u16() is not available for armv7.
Emulate the vaddvq_u16() using armv7 NEON intrinsics.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Thomas Monjalon [Sun, 9 Jul 2017 22:55:30 +0000 (00:55 +0200)]
version: 17.08-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
John McNamara [Fri, 23 Jun 2017 13:05:29 +0000 (14:05 +0100)]
doc: import sphinx rtd theme when available
The ReadTheDocs theme is no longer available by default in
Sphinx versions >= 1.3.1 and if it isn't available then an
exception is raised. This patch imports the ReadTheDocs
theme when it is available and warns but proceeds when it
isn't.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Cian Ferriter [Fri, 7 Jul 2017 14:09:51 +0000 (15:09 +0100)]
doc: fix typo in contributing guide
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Hemant Agrawal [Fri, 23 Jun 2017 07:23:59 +0000 (12:53 +0530)]
doc: add note for IPv4 multicast application
Add a note to indicate that only first four ports can be
tested with this application.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reshma Pattan [Mon, 3 Jul 2017 14:17:58 +0000 (15:17 +0100)]
doc: add note for pdump initialization
Updated note to make users aware that the packet capture framework
is initialized by default only in testpmd. Other primary applications
need to explicitly modify the code to do this initialization.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
John McNamara [Mon, 3 Jul 2017 13:21:04 +0000 (14:21 +0100)]
doc: add libnuma as dependency
Add libnuma as a dependency to the Linux Getting Started Guide
since it is a new requirement in DPDK 17.08+.
Fixes:
1b72605d2416 ("mem: balanced allocation of hugepages")
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Tom Barbette [Wed, 5 Jul 2017 13:59:44 +0000 (15:59 +0200)]
ethdev: document VMDq Rx configuration
From documentation it is very unclear how VMDq configuration can be
tweaked, and online search offer very poor results.
This patch will ultimately spawn an online documentation page
for the rte_eth_vmdq_rx_conf struct which will eventually add a bit of
documentation about the rx_mode tag and how to allow e.g. VMDq pools
to receive packets without VLAN tags.
Signed-off-by: Tom Barbette <tom.barbette@ulg.ac.be>
Acked-by: John McNamara <john.mcnamara@intel.com>
Gaetan Rivet [Sun, 9 Jul 2017 01:44:45 +0000 (03:44 +0200)]
ethdev: save VLAN filter setting
In order to be able to replicate a configuration onto a second port,
device configuration should be fully described and available.
Other configuration items (i.e. MAC addresses) are stored within
rte_eth_dev_data, but not this one.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Rami Rosen [Sat, 8 Jul 2017 21:55:16 +0000 (00:55 +0300)]
bus: remove wrong doxygen for dump function
This trivial patch removes wrong comments about
the return value of the rte_bus_dump(), as
this method does not return any value
(it's return type is void)
Fixes:
a97725791eec ("bus: introduce bus abstraction")
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Ferruh Yigit [Wed, 10 May 2017 11:01:04 +0000 (12:01 +0100)]
bus/vdev: remove probe with driver name option
Virtual device/driver probing done via name.
A new alternative method introduced to probe the device with providing
driver name in devargs as "driver=<driver_name>".
This patch removes alternative method and fixes virtual device usages
with proper device names.
Fixes:
87c3bf29c642 ("test: do not short-circuit null device creation")
Fixes:
d39670086a63 ("eal: parse driver argument before probing drivers")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Fri, 7 Jul 2017 19:52:50 +0000 (12:52 -0700)]
net/virtio: do not claim to support LRO
The current virtio supports Transmit Segmentation Offload, but
does not really support Large Receive Offload. The driver was confusing
the two offloads.
Fixes:
86d59b21468a ("net/virtio: support LRO")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Stephen Hemminger [Fri, 7 Jul 2017 19:52:49 +0000 (12:52 -0700)]
net/virtio: do not falsely claim to do IP checksum
The virtio driver is confused about the meaning of the ip_checksum
flag. In DPDK, ip_checksum means the hardware is capable of checking
the Layer 3 IP checksum. But KVM/QEMU does not do that. The flag
VIRTIO_NET_F_GUEST_CSUM controls whether the receive side does
Layer 4 (TCP/UDP) checksum offload.
Fix by erroring out any requests to do IP checksum.
Fixes:
96cb6711939e ("net/virtio: support Rx checksum offload")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Jiayu Hu [Sun, 9 Jul 2017 05:46:46 +0000 (13:46 +0800)]
app/testpmd: enable TCP/IPv4 GRO
This patch enables TCP/IPv4 GRO library in csum forwarding engine.
By default, GRO is turned off. Users can use command "gro (on|off)
(port_id)" to enable or disable GRO for a given port. If a port is
enabled GRO, all TCP/IPv4 packets received from the port are performed
GRO. Besides, users can set max flow number and packets number per-flow
by command "gro set (max_flow_num) (max_item_num_per_flow) (port_id)".
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Jiayu Hu [Sun, 9 Jul 2017 05:46:45 +0000 (13:46 +0800)]
lib/gro: support TCP/IPv4
In this patch, we introduce five APIs to support TCP/IPv4 GRO.
- gro_tcp4_reassemble: reassemble an inputted TCP/IPv4 packet.
- gro_tcp4_tbl_create: create a TCP/IPv4 reassembly table, which is used
to merge packets.
- gro_tcp4_tbl_destroy: free memory space of a TCP/IPv4 reassembly table.
- gro_tcp4_tbl_pkt_count: return the number of packets in a TCP/IPv4
reassembly table.
- gro_tcp4_tbl_timeout_flush: flush timeout packets from a TCP/IPv4
reassembly table.
TCP/IPv4 GRO API assumes all inputted packets are with correct IPv4
and TCP checksums. And TCP/IPv4 GRO API doesn't update IPv4 and TCP
checksums for merged packets. If inputted packets are IP fragmented,
TCP/IPv4 GRO API assumes they are complete packets (i.e. with L4
headers).
In TCP/IPv4 GRO, we use a table structure, called TCP/IPv4 reassembly
table, to reassemble packets. A TCP/IPv4 reassembly table includes a key
array and a item array, where the key array keeps the criteria to merge
packets and the item array keeps packet information.
One key in the key array points to an item group, which consists of
packets which have the same criteria value. If two packets are able to
merge, they must be in the same item group. Each key in the key array
includes two parts:
- criteria: the criteria of merging packets. If two packets can be
merged, they must have the same criteria value.
- start_index: the index of the first incoming packet of the item group.
Each element in the item array keeps the information of one packet. It
mainly includes three parts:
- firstseg: the address of the first segment of the packet
- lastseg: the address of the last segment of the packet
- next_pkt_index: the index of the next packet in the same item group.
All packets in the same item group are chained by next_pkt_index.
With next_pkt_index, we can locate all packets in the same item
group one by one.
To process an incoming packet needs three steps:
a. check if the packet should be processed. Packets with one of the
following properties won't be processed:
- FIN, SYN, RST, URG, PSH, ECE or CWR bit is set;
- packet payload length is 0.
b. traverse the key array to find a key which has the same criteria
value with the incoming packet. If find, goto step c. Otherwise,
insert a new key and insert the packet into the item array.
c. locate the first packet in the item group via the start_index in the
key. Then traverse all packets in the item group via next_pkt_index.
If find one packet which can merge with the incoming one, merge them
together. If can't find, insert the packet into this item group.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Jiayu Hu [Sun, 9 Jul 2017 05:46:44 +0000 (13:46 +0800)]
lib/gro: add Generic Receive Offload API framework
Generic Receive Offload (GRO) is a widely used SW-based offloading
technique to reduce per-packet processing overhead. It gains
performance by reassembling small packets into large ones. This
patchset is to support GRO in DPDK. To support GRO, this patch
implements a GRO API framework.
To enable more flexibility to applications, DPDK GRO is implemented as
a user library. Applications explicitly use the GRO library to merge
small packets into large ones. DPDK GRO provides two reassembly modes.
One is called lightweight mode, the other is called heavyweight mode.
If applications want to merge packets in a simple way and the number
of packets is relatively small, they can use the lightweight mode.
If applications need more fine-grained controls, they can choose the
heavyweight mode.
rte_gro_reassemble_burst is the main reassembly API which is used in
lightweight mode and processes N packets at a time. For applications,
performing GRO in lightweight mode is simple. They just need to invoke
rte_gro_reassemble_burst. Applications can get GROed packets as soon as
rte_gro_reassemble_burst returns.
rte_gro_reassemble is the main reassembly API which is used in
heavyweight mode and tries to merge N inputted packets with the packets
in GRO reassembly tables. For applications, performing GRO in heavyweight
mode is relatively complicated. Before performing GRO, applications need
to create a GRO context object, which keeps reassembly tables of
desired GRO types, by rte_gro_ctx_create. Then applications can use
rte_gro_reassemble to merge packets. The GROed packets are in the
reassembly tables of the GRO context object. If applications want to get
them, applications need to manually flush them by flush API.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Jan Blunck [Sun, 9 Jul 2017 09:44:16 +0000 (05:44 -0400)]
crypto/scheduler: fix build with old gcc
Seen with gcc 4.9.2:
drivers/crypto/scheduler/scheduler_multicore.c:286:2: error:
'for' loop initial declarations are only allowed in C99 or C11 mode
for (uint16_t i = 0; i < sched_ctx->nb_wc; i++)
^
Fixes:
4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:33 +0000 (02:04 +0200)]
devargs: introduce new parsing helper
Introduce a more versatile helper to parse device strings. This
helper expects a generic rte_devargs structure as storage in order not
to require API changes in the future, should this structure be
updated.
The old equivalent function is thus being deprecated, as its API does
not allow to accompany rte_devargs evolutions.
A deprecation notice is issued.
This new helper will parse bus information as well as device name and
device parameters. It does not allocate an rte_devargs structure and
expects one to be given as input.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:32 +0000 (02:04 +0200)]
devargs: make device types generic
rte_devargs now represents any device from any bus.
The related devtypes do not identify a bus anymore, only which scan
policy the device subscribes to.
The bus itself is identified by a bus handle previously introduced.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:31 +0000 (02:04 +0200)]
net/virtio: remove device type reference
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:30 +0000 (02:04 +0200)]
devargs: make device representation generic
Remove the dependency of this subsystem upon bus specific device
representation.
Devargs only validates that a device declaration is correct and handled
by a bus. The device interpretation is done afterward within the bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:29 +0000 (02:04 +0200)]
devargs: parse bus policies
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:28 +0000 (02:04 +0200)]
bus: introduce scan policies
Scan policies describe the way a bus should scan the system to search
for possible devices.
Three flags are introduced:
RTE_BUS_SCAN_UNDEFINED: Configuration is irrelevant for this bus
RTE_BUS_SCAN_WHITELIST: Scanning should be limited to declared devices
RTE_BUS_SCAN_BLACKLIST: Scanning should exclude only declared devices
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:27 +0000 (02:04 +0200)]
eal: move kernel driver enum out of PCI header
Device kernel module is a device attribute.
It is used in generic device structures and must not be tied to a bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Thomas Monjalon [Fri, 7 Jul 2017 00:04:26 +0000 (02:04 +0200)]
examples/ethtool: include PCI header directly
In devargs rework, rte_pci.h won't be included by rte_ethdev.h
(via rte_devargs.h) anymore.
rte_ethtool_get_drvinfo() could use rte_devargs.name instead of
creating equivalent bus specific name.
For now, it is workarounded by just including rte_pci.h.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:25 +0000 (02:04 +0200)]
test: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:24 +0000 (02:04 +0200)]
app/testpmd: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:23 +0000 (02:04 +0200)]
net/sfc: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:22 +0000 (02:04 +0200)]
net/ixgbe: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:21 +0000 (02:04 +0200)]
net/e1000: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:20 +0000 (02:04 +0200)]
net/mlx5: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:19 +0000 (02:04 +0200)]
net/bnxt: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:04:18 +0000 (02:04 +0200)]
net/bonding: include PCI header directly
In devargs rework, rte_pci.h won't be included
via rte_devargs.h anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:12 +0000 (02:03 +0200)]
devargs: parse bus info
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:11 +0000 (02:03 +0200)]
bus: add helper to find a bus from a device name
Find which bus should be able to parse this device name into an internal
device representation.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:10 +0000 (02:03 +0200)]
bus/pci: implement parse bus operation
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:09 +0000 (02:03 +0200)]
bus/vdev: implement parse bus operation
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Fri, 7 Jul 2017 00:03:08 +0000 (02:03 +0200)]
bus: introduce parsing functionality
This operation can be used either to validate that a device
representation can be understood by a bus, as well as store the resulting
specialized device representation in any format determined by the bus.
Implementing this function allows EAL initialization routines to infer
which bus should handle a device. This is used as a way to respect
backward compatibility.
This API will disappear once this compatibility is not enforced anymore.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Thomas Monjalon [Fri, 7 Jul 2017 00:03:07 +0000 (02:03 +0200)]
bus: fix driver registration
The bus name was stored with embedded double quotes.
Indeed the bus name is given with a string in a macro,
which is not used elsewhere.
These macros are useless because the buses are drivers,
so they must not have any API for the application writer.
The registration can be done with a hardcoded value without quotes.
There is another (small) benefit of not using macros for driver names:
it is to have a meaningful constructor function name.
For instance, it was businitfn_PCI_BUS_NAME instead of businitfn_pci.
The bus registration macro is also changed to use
the new RTE_INIT_PRIO macro, similar to RTE_INIT used for other drivers.
The priority is the highest (101) in order to be sure that the bus driver
is registered before its device drivers.
Fixes:
0fd1a0eaae19 ("pci: add bus driver")
Fixes:
fea892e35f21 ("bus/vdev: use standard bus registration")
Fixes:
7e7df6d0a41d ("bus/fslmc: introduce fsl-mc bus driver")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>