Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:25 +0000 (19:44 +0530)]
examples/l3fwd-graph: add ethdev configuration changes
Add changes to ethdev port and queue configuration based
on command line parameters for l3fwd graph application.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:24 +0000 (19:44 +0530)]
examples/l3fwd-graph: add graph-based l3fwd skeleton
Add graph based l3fwd application skeleton with cmdline
parsing support inline with normal l3fwd.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:23 +0000 (19:44 +0530)]
node: add packet drop
Add packet drop node process function for pkt_drop
rte_node. This node simply free's every object received as
an rte_mbuf to its rte_pktmbuf pool.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:22 +0000 (19:44 +0530)]
node: add IPv4 rewrite and lookup control
Add ip4_rewrite and ip4_lookup ctrl API. ip4_lookup ctrl
API is used to add route entries for LPM lookup with
result data containing next hop id and next proto.
ip4_rewrite ctrl API is used to add rewrite data for
every next hop.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Kiran Kumar K [Sat, 11 Apr 2020 14:14:21 +0000 (19:44 +0530)]
node: add IPv4 rewrite
Add ip4 rewrite process function for ip4_rewrite
rte_node. On every packet received by this node,
header is overwritten with new data before forwarding
it to next node. Header data to overwrite with is
identified by next hop id passed in mbuf priv data
by previous node.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Pavan Nikhilesh [Sat, 11 Apr 2020 14:14:20 +0000 (19:44 +0530)]
node: add IPv4 lookup for x86
Add IPv4 lookup process function for ip4_lookup
rte_node. This node performs LPM lookup using x86_64
vector supported RTE_LPM API on every packet received
and forwards it to a next node that is identified by
lookup result.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:19 +0000 (19:44 +0530)]
node: add IPv4 lookup for arm64
Add arm64 specific IPv4 lookup process function
for ip4_lookup node. This node performs LPM lookup
on every packet received and forwards it to a next
node that is identified by lookup result.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Pavan Nikhilesh [Sat, 11 Apr 2020 14:14:18 +0000 (19:44 +0530)]
node: add generic IPv4 lookup
Add IPv4 lookup process function for ip4_lookup node.
This node performs LPM lookup using simple RTE_LPM API on every packet
received and forwards it to a next node that is identified by lookup
result.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:17 +0000 (19:44 +0530)]
node: add ethdev control
Add ctrl api to setup ethdev_rx and ethdev_tx node.
This ctrl api clones 'N' number of ethdev_rx and ethdev_tx
nodes with specific (port, queue) pairs updated in their context.
All the ethdev ports and queues are setup before this api
is called.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:16 +0000 (19:44 +0530)]
node: add ethdev Tx
Add rte_node ethdev_tx process function and register it to
graph infra. This node has a specific (port, tx-queue) as context
and it enqueue's all the packets received to that specific queue pair.
When rte_eth_tx_burst() i.e enqueue to queue pair fails, packets
are forwarded to pkt_drop node to be free'd.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:15 +0000 (19:44 +0530)]
node: add ethdev Rx
Add source rte_node ethdev_rx process function and register
it. This node is a source node that will be called periodically
and when called, performs rte_eth_rx_burst() on a specific
(port, queue) pair and enqueue them as stream of objects to
next node.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:14 +0000 (19:44 +0530)]
node: add logging and null node
Add log infra for node specific logging.
Also, add null rte_node that just ignores all the objects
directed to it.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Pavan Nikhilesh [Sat, 11 Apr 2020 14:14:13 +0000 (19:44 +0530)]
test/graph: add performance tests
Add unit test framework to create and test performance of various
graph models.
example command to test:
echo "graph_perf_autotest" | sudo ./build/app/test/dpdk-test -c 0x30
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Kiran Kumar K [Sat, 11 Apr 2020 14:14:12 +0000 (19:44 +0530)]
test/graph: add functional tests
Adding the unit test to test the functionality of node and graph APIs.
Testing includes registering a node, cloning a node, creating a graph,
perform graph walk, collecting stats and all node and graph debug APIs.
example command to test:
echo "graph_autotest" | sudo ./build/app/test/dpdk-test -c 0x30
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:11 +0000 (19:44 +0530)]
graph: implement fastpath routines
Adding implementation for rte_graph_walk() API. This will perform a walk
on the circular buffer and call the process function of each node
and collect the stats if stats collection is enabled.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:10 +0000 (19:44 +0530)]
graph: implement stats
Adding implementation for graph stats collection API. This API will
create a cluster for a specified node pattern and aggregate the node
runtime stats.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:09 +0000 (19:44 +0530)]
graph: implement debug routines
Adding implementation for graph specific API to dump the
Graph information to a file. This API will dump detailed internal
info about node objects and graph objects.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:08 +0000 (19:44 +0530)]
graph: implement Graphviz export
Adding API implementation support exporting the graph object to file.
This will export the graph to a file in Graphviz format.
It can be viewed in many viewers such as
https://dreampuf.github.io/GraphvizOnline/
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:07 +0000 (19:44 +0530)]
graph: implement graph operations
Adding support for graph specific API implementation like
Graph lookup to get graph object, retrieving graph ID
From name and graph name from ID.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:06 +0000 (19:44 +0530)]
graph: implement create and destroy
Adding graph specific API implementations like graph create
and graph destroy. This detect loops in the graph,
check for isolated nodes and operation to verify the validity of
graph.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:05 +0000 (19:44 +0530)]
graph: populate fastpath memory for graph reel
Adding support to create and populate the memory for graph reel.
This includes reserving the memory in the memzone, populating the nodes,
Allocating memory for node-specific streams to hold objects.
Once it is populated the reel memory contains the following sections.
+---------------------+
| Graph Header |
+---------------------+
| Fence |
+---------------------+
| Circular buffer |
+---------------------+
| Fence |
+---------------------+
| Node Object 0 |
+------------------- -+
| Node Object 1 |
+------------------- -+
| Node Object 2 |
+------------------- -+
| Node Object n |
+------------------- -+
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:04 +0000 (19:44 +0530)]
graph: implement internal operation helpers
Adding internal graph API helpers support to check whether a graph has
isolated nodes and any node have a loop to itself and BFS
algorithm implementation etc.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:03 +0000 (19:44 +0530)]
graph: implement node debug routines
Adding node debug API implementation support to dump
single or all the node objects to the given file.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:02 +0000 (19:44 +0530)]
graph: implement node operations
Adding node-specific API implementation like cloning node, updating
edges for the node, shrinking edges of a node, retrieving edges of a
node.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:01 +0000 (19:44 +0530)]
graph: implement node registration
Adding rte_node_register() API implementation includes allocating
memory for node object, check for duplicate node name and
add the allocated node to STAILQ node_list for future use.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:00 +0000 (19:44 +0530)]
graph: define API
Graph architecture abstracts the data processing functions as
"node" and "link" them together to create a complex "graph" to enable
reusable/modular data processing functions.
These APIs enables graph framework operations such as create, lookup,
dump and destroy on graph and node operations such as clone,
edge update, and edge shrink, etc. The API also allows creating the
stats cluster to monitor per graph and per node stats.
This patch defines the public API for graph support.
This patch also adds support for the build infrastructure and
update the MAINTAINERS file for the graph subsystem.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Olivier Matz [Mon, 4 May 2020 12:49:18 +0000 (14:49 +0200)]
mempool: return 0 if area is too small on populate
Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
return 0 instead of -EINVAL when there is not enough room to store one
object, as it can be helpful for applications to distinguish this
specific case.
As this is an ABI change, use symbol versioning to preserve old
behavior for binary applications.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Ray Kinsella [Thu, 30 Apr 2020 10:27:26 +0000 (11:27 +0100)]
version: reference next ABI 21 for recent additions
Change references to ABI 20.0.1 to use ABI v21, see
https://doc.dpdk.org/guides/contributing/abi_policy.html#general-guidelines
"Major ABI versions are declared no more frequently than yearly.
Compatibility with the major ABI version is mandatory in subsequent
releases until a new major ABI version is declared."
Combined ABI policy and versioning in maintainers, add map files to the
filter to more closely monitor future ABI changes.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Beilei Xing [Sun, 26 Apr 2020 08:21:53 +0000 (16:21 +0800)]
maintainers: update for testpmd
Replace Jingjing Wu with Beilei Xing.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Beilei Xing [Sun, 26 Apr 2020 08:21:52 +0000 (16:21 +0800)]
maintainers: update for Intel iavf
Replace Wenzhuo Lu with Beilei Xing.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Beilei Xing [Sun, 26 Apr 2020 08:21:51 +0000 (16:21 +0800)]
maintainers: update for Intel i40e
Replace Qi Zhang with Jeff Guo.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Mon, 27 Apr 2020 01:28:59 +0000 (09:28 +0800)]
maintainers: update for Intel ixgbe/igb/igc
Replace Wenzhuo Lu, Alvin Zhang and Konstantin Ananyev
with Wei Zhao and Jeff Guo.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Alvin Zhang <alvinx.zhang@intel.com>
David Marchand [Mon, 27 Apr 2020 13:23:41 +0000 (15:23 +0200)]
ethdev: fix build warning on 64-bit value
Building OVS with dpdk, sparse complains about 64-bit constant being
passed as a normal integer that can't fit it:
error: constant 0xffffffffffffffff is so big it is unsigned long
Fixes:
ecbc8570131d ("ethdev: add PFCP header to flow API")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Mon, 27 Apr 2020 13:23:40 +0000 (15:23 +0200)]
eal: fix typo in endian conversion macros
Caught by code inspection, for little endian, RTE_LEXX macros should
provide rte_leXX_t type values.
Fixes:
b75667ef9f7e ("eal: add static endianness conversion macros")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Mon, 27 Apr 2020 13:23:39 +0000 (15:23 +0200)]
ring: fix build with -Wswitch-enum
Some popular vswitch implementation might use a gcc option that
complains about missing enums in switch statements.
Fix this by listing all possible values.
Fixes:
664ff4b1729b ("ring: introduce peek style API")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Amaranath Somalapuram [Mon, 27 Apr 2020 06:11:45 +0000 (11:41 +0530)]
maintainers: update for AMD axgbe and CCP crypto
Ownership change.
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ruifeng Wang [Mon, 27 Apr 2020 07:57:56 +0000 (15:57 +0800)]
maintainers: update for Arm v7 and v8
Updating ARM v7 and v8 maintainer. Gavin is leaving Arm.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Thomas Monjalon [Sun, 26 Apr 2020 22:04:01 +0000 (00:04 +0200)]
version: 20.05-rc1
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Anatoly Burakov [Mon, 20 Apr 2020 17:56:52 +0000 (17:56 +0000)]
examples/l3fwd-power: implement proper shutdown
Currently, shutdown for l3fwd-power application is all over the place
and may or may not happen either in the signal handler or in the main()
function. Fix this so that the signal handler will only set the exit
variable, thereby allowing all of the loops to end properly and proceed
to deinitialize everything.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Anatoly Burakov [Mon, 20 Apr 2020 17:56:51 +0000 (17:56 +0000)]
examples/l3fwd-power: exit on power lib init failure
Currently, if power library initialization fails, only a log message is
displayed. This is suboptimal for a number of reasons, but the main one
is that telemetry mode does not depend on the power library and can
therefore run in environments where l3fwd-power would normally not run
correctly (such as inside a VM). This will lead to attempts to
deinitialize the power library on exit, with a subsequent forced unclean
shutdown of DPDK.
Fix this by only initializing the power library in modes that actually
need it, and change a log message to a failure to initialize.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Xiaolong Ye [Wed, 18 Mar 2020 00:58:08 +0000 (08:58 +0800)]
doc: fix log level example in Linux guide
Now we need to add prefix like lib. to enable the log,
also changing val 8 to "debug"" which would be more descriptive.
Fixes:
ffb9fd1b0808 ("log: update legacy modules dynamic logs regex")
Cc: stable@dpdk.org
Reported-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Phil Yang [Sun, 26 Apr 2020 14:45:15 +0000 (22:45 +0800)]
timer: relax barrier for status update
Volatile has no ordering semantics. The rte_timer structure defines
timer status as a volatile variable and uses the rte_r/wmb barrier
to guarantee inter-thread visibility.
This patch optimized the volatile operation with c11 atomic operations
and one-way barrier to save the performance penalty. According to the
timer_perf_autotest benchmarking results, this patch can uplift 10%~16%
timer appending performance, 3%~20% timer resetting performance and 45%
timer callbacks scheduling performance on aarch64 and no loss in
performance for x86.
Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Dmitry Kozlyuk [Sun, 26 Apr 2020 16:41:52 +0000 (19:41 +0300)]
eal: disable tracing on Windows
Fix build errors caused by using Unix-specific functions in common code.
Hide and disable command-line options related to tracing on Windows.
Fixes:
3d26a70ae338 ("trace: add trace configuration parameter")
Fixes:
3b155d24bdaf ("trace: hook subsystem to Linux")
Reported-by: Pallavi Kadam <pallavi.kadam@intel.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Raslan Darawsheh [Thu, 23 Apr 2020 09:05:26 +0000 (12:05 +0300)]
app/testpmd: add parsing for QinQ VLAN headers
When having QinQ VLAN headers in the packet, parse_ethernet
is capable of parsing only the first VLAN.
Add parsing for QinQ VLAN headers in the packet.
Fixes:
51f694dd40f5 ("app/testpmd: rework checksum forward engine")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Kalesh AP [Thu, 23 Apr 2020 15:02:24 +0000 (20:32 +0530)]
net/bnxt: fix VNIC Rx queue count on VNIC free
bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring
port vlan stripping. bnxt_setup_one_vnic keeps incrementing the
vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic.
Fixes:
cfadfee41ed1 ("net/bnxt: fix VLAN strip")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Rahul Gupta [Thu, 23 Apr 2020 15:02:23 +0000 (20:32 +0530)]
net/bnxt: fix memory leak during queue restart
During port 0 rxq 1 start ie queue start,
bnxt_free_hwrm_rx_ring() we are clearing the pointers to mbuf array.
Due to this we overwrite the queue with fresh mbuf allocations
causing previously allocated mbufs to leak.
Add a check before allocating mbuf to replenish only empty mbuf slots
in the RxQ.
Fixes:
2eb53b134aae ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Thomas Monjalon [Sun, 26 Apr 2020 10:40:46 +0000 (12:40 +0200)]
mem: fix build
Some compilers (on RHEL7 and CentOS7) were getting this error:
error: "RTE_EXEC_ENV_FREEBSD" is not defined [-Werror=undef]
Existence of a macro must be checked with "#ifdef" or "#if defined".
Fixes:
d72e4042c5eb ("mem: exclude unused memory from core dump")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
Muhammad Bilal [Tue, 7 Apr 2020 07:56:13 +0000 (12:56 +0500)]
mbuf: prevent setting mempool ops name empty
Bugzilla ID: 353
Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Vijaya Mohan Guvva [Fri, 24 Apr 2020 17:08:28 +0000 (13:08 -0400)]
bus/pci: fix UIO resource access from secondary process
For PCI devices presented through igb_uio, pcidev->mem_resource[] is
not populated when the device is initialized for secondary process.
Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
Fixes:
eee16c964cd6 ("pci: support multiple PCI regions per device")
Cc: stable@dpdk.org
Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Luca Boccassi [Thu, 12 Mar 2020 16:30:27 +0000 (16:30 +0000)]
usertools: check for pci.ids in /usr/share/misc
Debian and Ubuntu switched years ago from /usr/share/hwdata to
/usr/share/misc, and the former is just a compat symlink now.
We are starting to get bug reports to nudge us into changing.
So check the new path first, and the old one as a fallback.
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Mon, 20 Apr 2020 23:25:31 +0000 (01:25 +0200)]
app: fix usage help of options separated by dashes
The EAL options and app-specific options are separated
with double dashes.
The help of testpmd, test-acl and pdump were missing
the dashes after EAL options.
Note: testpmd was completely missing the EAL options.
Fixes:
af75078fece3 ("first public release")
Fixes:
26c057ab6c45 ("acl: new test-acl application")
Fixes:
b2854d5317e8 ("app/pdump: support multi-core capture")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Luca Boccassi [Sat, 29 Feb 2020 16:37:06 +0000 (16:37 +0000)]
fix various typos found by Lintian
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Honnappa Nagarahalli [Mon, 24 Feb 2020 06:42:18 +0000 (14:42 +0800)]
timer: protect initialization with lock
rte_timer_subsystem_initialized is a global variable that can be
accessed by multiple processes simultaneously. Hence, any access
to rte_timer_subsystem_initialized should be protected by
rte_mcfg_timer_lock.
Fixes:
f9d6cd8bfe9e ("timer: fix resource leak in finalize")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Vladimir Medvedkin [Mon, 20 Apr 2020 18:27:05 +0000 (19:27 +0100)]
ipsec: use hash lookup with signatures in SAD lookup
Change hash function from jhash to crc.
Precalculate hash signatures for a bulk of keys and then
use rte_hash_lookup_with_hash_bulk_data() to speed up sad lookup
Also use rte_hash_add_key_with_hash and _del_key_with_hash with
precalculated hash signature for a key in rte_ipsec_sad_add and
rte_ipsec_sad_del
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Vladimir Medvedkin [Thu, 16 Apr 2020 15:07:19 +0000 (16:07 +0100)]
hash: add bulk lookup with signatures array
Implement rte_hash_lookup_with_hash_bulk_data() and
rte_hash_lookup_with_hash_bulk() - bulk lookup
functions with precomputed hash signatures.
Add these two functions into performance tests.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
David Christensen [Mon, 16 Mar 2020 20:38:28 +0000 (13:38 -0700)]
bus/pci: support IOVA as VA on PowerNV systems
All recent POWER systems, Power 8 and 9 specifically, support an IOMMU
(it can't be disabled). The functionality of the IOMMU is different
depending on whether it's running on a bare metal PowerNV system or in
a virtual environment (PowerVM LPAR or KVM/QEMU). DPDK currently
supports the IOMMU found on PowerNV platforms, sPAPRv2, so IOVA=VA
mode can be enabled when the correct platform is detected.
The POWER IOMMU type can't be detected through mechanisms such as
parsing files in the /sys hierarchy like x86_64 systems so the
/proc/cpuinfo file is parsed to determine whether Linux is running
on bare metal (i.e. PowerNV) or in a virtual environment (KVM/QEMU).
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Haiyue Wang [Sat, 25 Apr 2020 10:56:18 +0000 (18:56 +0800)]
devtools: ignore internal ABI check
Ignore the internal version ABI check, this kind of ABI is used only
by drivers and libraries.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Haiyue Wang [Sat, 25 Apr 2020 10:56:17 +0000 (18:56 +0800)]
build: add internal tag check
Add checks during build to ensure that all symbols in the INTERNAL
version map section have __internal tags on their definitions, and
enable the warnings needed to announce their use.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Haiyue Wang [Sat, 25 Apr 2020 10:56:16 +0000 (18:56 +0800)]
build: enable internal API tag
Allow the drivers and libraries to use the internal tag for marking
internal ABI symbols.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Haiyue Wang [Sat, 25 Apr 2020 10:56:15 +0000 (18:56 +0800)]
eal: add internal ABI tag definition
Introduce the __rte_internal tag to mark internal ABI function which is
used only by the drivers or other libraries.
Like for __rte_experimental, this tag must be on a separate line before
function proprotypes.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Aaron Conole [Mon, 20 Apr 2020 19:25:23 +0000 (15:25 -0400)]
test/ipfrag: add unit test case
Initial IP fragmentation unit test.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Aaron Conole [Mon, 20 Apr 2020 19:25:22 +0000 (15:25 -0400)]
ip_frag: ensure minimum v6 fragmentation length
In addition, do a formal parameter check.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Aaron Conole [Mon, 20 Apr 2020 19:25:21 +0000 (15:25 -0400)]
ip_frag: ensure minimum v4 fragmentation length
Do a formal parameter check of mtu length, as well as
checking the the various inputs for validity. If any
aren't acceptable, we bail.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
David Marchand [Thu, 23 Apr 2020 14:24:36 +0000 (16:24 +0200)]
eal: fix build on armv7
Caught by OBS on armv7:
In file included from .../lib/librte_eal/include/rte_string_fns.h:21,
from .../lib/librte_kvargs/rte_kvargs.c:9:
.../lib/librte_eal/include/rte_common.h:67:37: error: expected '=', ',',
';', 'asm' or '__attribute__' before '__rte_aligned'
67 | typedef uint64_t unaligned_uint64_t __rte_aligned(1);
| ^~~~~~~~~~~~~
.../lib/librte_eal/include/rte_common.h:68:37: error: expected '=', ',',
';', 'asm' or '__attribute__' before '__rte_aligned'
68 | typedef uint32_t unaligned_uint32_t __rte_aligned(1);
| ^~~~~~~~~~~~~
.../lib/librte_eal/include/rte_common.h:69:37: error: expected '=', ',',
';', 'asm' or '__attribute__' before '__rte_aligned'
69 | typedef uint16_t unaligned_uint16_t __rte_aligned(1);
| ^~~~~~~~~~~~~
make[3]: *** [.../mk/internal/rte.compile-pre.mk:116: rte_kvargs.o] Error 1
Move __rte_aligned macro definition before alignment types used by
architectures requiring RTE_ARCH_STRICT_ALIGN like armv7.
Fixes:
f35e5b3e07b2 ("replace alignment attributes")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Li Feng [Fri, 24 Apr 2020 13:19:05 +0000 (21:19 +0800)]
mem: exclude unused memory from core dump
Currently, even though memory is mapped with PROT_NONE, this does not
cause it to be excluded from core dumps. This is counter-productive,
because in a lot of cases, this memory will go unused (e.g. when the
memory subsystem preallocates VA space but hasn't yet mapped physical
pages into it).
Use `madvise()` call with MADV_DONTDUMP/MADV_NOCORE to exclude the
unused memory from being dumped.
Signed-off-by: Li Feng <fengli@smartx.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Li Feng [Fri, 24 Apr 2020 10:42:05 +0000 (18:42 +0800)]
mem: mark pages as not accessed when freeing memory
Commit
8a4baf06c17a ("mem: mark pages as not accessed when reserving VA")
has mapped the initialized memory with PROT_NONE, and when it's unmapped,
eal_memalloc.c should remmap the anonymous memory with PROT_NONE too.
Fixes:
8a4baf06c17a ("mem: mark pages as not accessed when reserving VA")
Cc: stable@dpdk.org
Signed-off-by: Li Feng <fengli@smartx.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Stephen Hemminger [Tue, 10 Mar 2020 16:35:20 +0000 (09:35 -0700)]
eal: fix comments spelling
Fix spelling errors in comments (found with codespell).
Note that "inbetween" is not correct in English and should
either be two words or better yet, the in can be dropped.
https://www.grammarly.com/blog/in-between-or-inbetween/
Fixes:
12f45fa7e29b ("eal/arm: read timer from PMU if enabled")
Fixes:
096ffd811fe2 ("eal/x86: use lock-prefixed instructions for SMP barrier")
Fixes:
1d406458db47 ("mem: make segment preallocation OS-specific")
Fixes:
bb372060dad4 ("malloc: make heap a doubly-linked list")
Fixes:
7353ee7344b4 ("fbarray: add API to find biggest used or free chunks")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Stephen Hemminger [Tue, 10 Mar 2020 16:26:22 +0000 (09:26 -0700)]
lpm6: fix comments spelling
Fix spelling errors in comments.
Fixes:
e480688dce6d ("lpm6: add incremental update on delete")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Alex Kiselev [Wed, 8 Apr 2020 13:07:30 +0000 (15:07 +0200)]
lpm6: fix size of tbl8 group
Fixes:
e480688dce6d ("lpm6: add incremental update on delete")
Cc: stable@dpdk.org
Signed-off-by: Alex Kiselev <alex@therouter.net>
Acked-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Yangchao Zhou [Mon, 20 Apr 2020 02:48:50 +0000 (10:48 +0800)]
lpm: skip table entries update if rules found
Table entries do not need to be updated if the same rules can be found.
Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Fady Bader [Wed, 22 Apr 2020 07:37:44 +0000 (10:37 +0300)]
mempool: remove inline functions from export list
The code didn't compile when using exported mempool functions
under Windows.
compilation error logs:
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_cache_flush
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_default_cache
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_generic_get
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_generic_put
lib\librte_mempool.dll.a : fatal error LNK1120: 4 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see invocation)
The cause was that there were some inline functions that were included
in the export list.
To solve this the functions, which are implemented in the header
and shouldn't be exported, were removed from rte_mempool_version.map
export list.
Fixes:
4b5062755aa7 ("mempool: allow user-owned cache")
Fixes:
656f2d3ede96 ("mempool: deprecate specific get and put functions")
Cc: stable@dpdk.org
Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Thomas Monjalon [Fri, 24 Apr 2020 09:32:24 +0000 (11:32 +0200)]
devtools: fix tracepoint symbols check
The tracepoint symbols __rte_*_trace_* are defined via a macro,
adding prefix "__", so they cannot be found by map checker.
Those symbols defined by RTE_TRACE_POINT and RTE_TRACE_POINT_FP
are checked in source code without the generated prefix.
The same logic is applied to per core variables, previously skipped.
Fixes:
6c232fc44c74 ("trace: add generic tracepoints")
Fixes:
4931010619fe ("trace: add alarm tracepoints")
Fixes:
52f409d614a0 ("trace: add memory tracepoints")
Fixes:
402321cfca9b ("trace: add memzone tracepoints")
Fixes:
0baa1e01c339 ("trace: add thread tracepoints")
Fixes:
05c4105738d8 ("trace: add interrupt tracepoints")
Fixes:
78d44153de8f ("ethdev: add tracepoints")
Fixes:
32e326869ed6 ("eventdev: add tracepoints")
Fixes:
4cf30e3f3c35 ("cryptodev: add tracepoints")
Fixes:
40b75c73d1c6 ("mempool: add tracepoints")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Konstantin Ananyev [Thu, 23 Apr 2020 15:10:42 +0000 (16:10 +0100)]
security: fix crash at accessing non-implemented ops
Valid checks for optional function pointers inside dev-ops
were disabled by undefined macro.
Fixes:
b6ee98547847 ("security: fix verification of parameters")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:51 +0000 (14:33 -0700)]
net/bnxt: fix port MAC query on VF
HWRM_PORT_MAC_QCFG is not supported on a VF. Added a PF check
in bnxt_hwrm_port_mac_qcfg() to prevent the probe failure on a VF.
Fixes:
f6e250d21ab0 ("net/bnxt: fetch SVIF information from firmware")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:50 +0000 (14:33 -0700)]
net/bnxt: log firmware status on early init failure
Firmware reports any fatal error (either ASIC or Firmware related) via a
new status register. This status register can provide more detailed
information about the firmware errors, especially if error occurs before
HWRM_VER_GET is issued. Attempt to map this register if it is present
and check for firmware status when VER_GET command fails.
Refactored the code to allocate the "bp->recovery_info" structure
in bnxt_init_fw() instead of doing in bnxt_hwrm_error_recovery_qcfg().
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:49 +0000 (14:33 -0700)]
net/bnxt: fix VLAN add when port is stopped
Driver destroys the vnic when the port is brought down.
When user tries to add a vlan when port is stopped, driver
issues HWRM command to FW with invalid vnic_id and it fails.
Fixed to return an error while setting vlan when port is
not started.
Fixes:
b4e190d55c25 ("net/bnxt: fix MAC/VLAN filter allocation")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:48 +0000 (14:33 -0700)]
net/bnxt: fix port start failure handling
Fixed to invoke clean up in the reverse sequence of
initialization in case any of the FW commands fail
during port start.
Fixes:
0b533591238f ("net/bnxt: inform firmware about IF state changes")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:47 +0000 (14:33 -0700)]
net/bnxt: use true/false for bool types
Fixes:
0b533591238f ("net/bnxt: inform firmware about IF state changes")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:46 +0000 (14:33 -0700)]
net/bnxt: fix HWRM command during FW reset
FW returns HWRM_ERR_CODE_HOT_RESET_PROGRESS(0xa) when it is
unable to process a specific cmd while hot reset is in progress.
Host driver is expected to keep retrying the cmd for 2s with
a gap of 50ms between each retrial.
Also, fixed to fail port start if the HWRM_FUNC_DRV_IF_CHANGE
still returns error after 2 seconds.
Fixes:
0b533591238f ("net/bnxt: inform firmware about IF state changes")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:45 +0000 (14:33 -0700)]
net/bnxt: support speed capabilities query
Added information about supported speeds for the port in the
"dev_infos_get". As other PMDs are returning the speed capabilities,
apps may expect this behavior from bnxt PMD.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Tue, 21 Apr 2020 21:33:44 +0000 (14:33 -0700)]
net/bnxt: use macro for PCI log format
Use PCI_PRI_FMT instead of "%04x:%02x:%02x:%02x" print format.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Tue, 21 Apr 2020 21:33:43 +0000 (14:33 -0700)]
net/bnxt: fix build on BSD
There is no ENODATA in the errno.h in BSD.
Use a common errno to return error.
Fixes:
69c410b8448d ("net/bnxt: support EM/EEM")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Beilei Xing [Wed, 22 Apr 2020 12:22:44 +0000 (20:22 +0800)]
net/ice: fix flow redirector
If there's VF reset, the kernel PF will remove rules
associated with the reset VF no matter the HW VSI ID
is changed or not. So DCF should redirector all rules
associated with the reset VF no matter the HW VSI ID
is changed or not.
Fixes:
3b3757bda3c3 ("net/ice: get VF hardware index in DCF")
Fixes:
c8183dd8e059 ("net/ice: redirect switch rule to new VSI")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Cheng Peng [Tue, 14 Apr 2020 01:56:57 +0000 (09:56 +0800)]
net/iavf: fix stats query error code
The iavf_dev_stats_get function should return ret instead of -eio.
Fixes:
f4a41a6953af ("net/avf: support stats")
Cc: stable@dpdk.org
Signed-off-by: Cheng Peng <cheng.peng5@zte.com.cn>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
David Christensen [Thu, 9 Apr 2020 18:20:55 +0000 (11:20 -0700)]
net/i40e: enable PPC AltiVec path in meson build
The meson build file does not enable i40e vectorization support for
PPC/altivec systems, even though the existing Makefile does enable the
support. Add the required architecture check and sources line.
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Shougang Wang [Mon, 13 Apr 2020 01:38:39 +0000 (01:38 +0000)]
net/ixgbe: fix link status after port reset
It's a normal behavior to change the link status to up after
resetting the port. So it is unnecessary to set link down before
starting port, and changing the link state(link up/down) frequently
will cause link speed unstable.
Fixes:
c3f2fbff78cf ("net/ixgbe: fix link status")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Tested-by: Xueming Zhang <xuemingx.zhang@intel.com>
Wei Zhao [Mon, 20 Apr 2020 05:18:55 +0000 (13:18 +0800)]
net/ice: support flow for AH ESP and L2TP
Add switch filter support for AH ESP and L2TP protocol,
and use SPI or session idas input set for switch rule.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Mon, 20 Apr 2020 05:18:54 +0000 (13:18 +0800)]
net/ice/base: support L2TP on switch
Add dummy packet and tunnel type to support
L2TP on switch, now we can use session id as
input set for switch rule.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Mon, 20 Apr 2020 05:18:53 +0000 (13:18 +0800)]
net/ice/base: support AH ESP and NAT-T on switch
Add dummy packet and tunnel type to support
AH ESP and NAT-T on switch, now we can use SPI as
input set for switch rule.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tao Zhu [Wed, 22 Apr 2020 12:37:36 +0000 (12:37 +0000)]
net/ixgbe: fix resource leak after thread exits normally
When the thread exits normally, pthread_join() is not called, which can
result in a resource leak. Therefore, the thread is set to separation
mode using function pthread_detach(), so that no program call
pthread_join() is required to recycle, and when the thread exits,
the system automatically reclaims resources.
Wait for the thread to finish with timeout argument(0 means that it will
not return until link complete), wait until the thread finishes before
returning. Normally, the thread will finish in a shorter time, and give
a warning message if it hasn't finished in a longer time.
Fixes:
819d0d1d57f1 ("net/ixgbe: fix blocking system events")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Alexander Kozyrev [Fri, 17 Apr 2020 17:20:39 +0000 (17:20 +0000)]
net/mlx5: improve logging of MPRQ selection
MPRQ is silently turned off in case there is not enough
Rx queues configured. Improve the logging to show a
warning in this case to notify a user about the Rx burst
function selected.
Fixes:
7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Alexander Kozyrev [Fri, 17 Apr 2020 17:14:53 +0000 (17:14 +0000)]
net/mlx5: set dynamic flow metadata in Rx queues
Using a global mbuf dynamic field for metadata incurs some
performance penalty on a datapath. Store this information in
the Rx queue descriptor for a better cache locality.
Fixes:
a18ac6113331 ("net/mlx5: add metadata support to Rx datapath")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Bing Zhao [Tue, 21 Apr 2020 14:03:34 +0000 (22:03 +0800)]
net/mlx5: fix header modify action validation
The header modify actions number supported now has some limitation,
and it is decided by both driver and hardware. If the configuration
is different or the table to insert the flow is different, the result
might be different if the flow contains header modify actions.
Currently, the actual action number could only be calculated in the
later stage called translate, from user specified value to the driver
format. And the action numbers checking is missed in the flow
validation. So PMD will return incorrect result to indicate the
flow actions are valid by rte_flow_validate but then it will fail
when calling rte_flow_create.
Adding some simple checking in the validation will help to get rid
of this incorrect checking. Most of the actions will only consume 1
SW action field except the MAC address and IPv6 address. And from
SW POV, the maximal action fields for these will be consumed even if
only part of such field will be modified because that there is no
mask in the flow actions and the mask will always be all ONEs.
The metering or extra metadata supports will cost one more action.
Fixes:
9597330c6844 ("net/mlx5: update modify header action translator")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Tonghao Zhang [Wed, 15 Apr 2020 08:52:29 +0000 (16:52 +0800)]
net/mlx5: fix crash when releasing meter table
The meters of ports share the same meter table on
the port. When releasing meters, don't check value returned
using assert. Because other meters may reference to it.
Fixes:
46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
Fixes:
9dbaf7eef6e1 ("net/mlx5: fix meter suffix table leak")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Lijun Ou [Sat, 18 Apr 2020 03:44:38 +0000 (11:44 +0800)]
app/testpmd: remove hardcoded descriptors limit
When users configure rxds and txds by used port config cmd based
on testpmd application, it will not be able to configure rxd and
txd according to the max capability range supported by the actual
NIC hardware. Due testpmd defects, it can only configure a fixed
range to 0 to 2048.
The final result is that an incorrect printing prompt appears and
cannot be applied using rxd && txd according to the actual
capabilities supported by the device.
In order to solve the above problems, we modify the testpmd. First
by calling the rte_eth_dev_info_get api to obtain the max and min
rx/tx capability supported by the hns3, and then use this range
to compare with the actual value by users configured and make
reasonable limitation.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Chengwen Feng [Tue, 21 Apr 2020 03:32:15 +0000 (11:32 +0800)]
net/hns3: get Rx/Tx queue fbd in xstats
This patch adds getting Rx/Tx queue fbd information in extended device
statistics. The upper level application can get them by calling the
rte_eth_xstats_get API function.
The fbd registers of every Rx/Tx queue are very useful to identify the
Rx/Tx bottleneck.
1. The Rx queue fbd register is the number of the unprocessed buffer
descriptors which are waiting for driver to process;
2. The Tx queue fbd register is the number of the unprocessed buffer
descriptors which are waiting for network engine hardware to process.
As a result, we get the following output information in testpmd
application by using the command "show port xstats" as below:
rx_q0RX_QUEUE_FBD: 19
rx_q1RX_QUEUE_FBD: 18
tx_q0TX_QUEUE_FBD: 0
tx_q1TX_QUEUE_FBD: 0
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Wei Hu (Xavier) [Tue, 21 Apr 2020 03:32:14 +0000 (11:32 +0800)]
net/hns3: modify format for firmware version
This patch modifies the print format for firmware version in the log, It
replaces "0x%08x" with "%lu.%lu.%lu.%lu" in the format control string.
By the way, this patch adds ".fw_version_get" ops implemation for hns3
VF PMD driver.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Jeff Guo [Wed, 22 Apr 2020 01:02:55 +0000 (21:02 -0400)]
app/testpmd: add new types to RSS hash commands
Add some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/
l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used
to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 end key_len 0 queues end / end
port config commands was:
testpmd>port config all rss l2tpv3
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Jeff Guo [Wed, 22 Apr 2020 01:02:54 +0000 (21:02 -0400)]
net/iavf: add RSS configuration for VF
The VF must be capable of configuring RSS. Add a virtchnl handler to
parse a specific RSS configuration, and process the configuration for
VFs, such as add or delete a RSS rule.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Jeff Guo [Wed, 22 Apr 2020 01:02:53 +0000 (21:02 -0400)]
ethdev: add RSS offload types
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/
/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>