Wei Zhao [Wed, 29 Apr 2020 02:03:52 +0000 (10:03 +0800)]
doc: add i40e limitation for flow director
Each PCTYPE can only have one specific FDIR input set at one time.
Add input set requirement info to i40e doc.
Bugzilla ID: 403
Fixes:
14c66a451ef7 ("net/i40e: flush tunnel filters")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Wei Zhao [Wed, 29 Apr 2020 02:03:51 +0000 (10:03 +0800)]
net/i40e: fix flow director for ARP packets
Currently, flow "pattern eth type is 0x0806 / end actions mark id
0x86 / rss / end" can't be created successfully. FDIR parser
shouldn't deny RTE_ETHER_TYPE_ARP since ARP packets will be
parsed as PCTYPE_L2_PAYLOAD. This patch fixes the issue.
Bugzilla ID: 402
Fixes:
42044b69c67d ("net/i40e: support input set selection for FDIR")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Thu, 23 Apr 2020 04:22:13 +0000 (12:22 +0800)]
net/ice/base: workaround unexpected rule deletion
Ideally a rule with "TO VSI LIST" action should not be deleted when one
of the VF reset happens. The correct action by kernel PF driver is to
remove the VSI of a reset VF from the VSI list, but this is not
implemented in kernel PF yet, so workaround is the DCF to prevent a
rule with "To VSI List" action happens.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Shahaji Bhosle [Sat, 25 Apr 2020 03:47:25 +0000 (09:17 +0530)]
net/bnxt: add Truflow flush-timer to alloc table scope
Updated the params list to include flush timer, this will
allow users to set the HW flush timer value in 10th of second.
Setting 0 will disable the pending cache flush feature.
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Sat, 25 Apr 2020 03:47:24 +0000 (09:17 +0530)]
net/bnxt: update ULP to handle action/index tables
The ulp required to be changed to properly call the index table
management routines and use the index for external memory indices.
The ulp no longer has to account for stride as the tf_core returns the
actual offset, not a 0 based index.
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sat, 25 Apr 2020 03:47:23 +0000 (09:17 +0530)]
net/bnxt: update external action record pool
- Added support variable sized action records
- Additional error checking on table scope params
- Single external pool supported per direction
- Changed to return action record pointer
- Allows action pool to fully utilize the number of flows
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Mike Baucom [Sat, 25 Apr 2020 03:47:22 +0000 (09:17 +0530)]
net/bnxt: enable processing partially added flows
The resource function did not have a method of invalidating or
indicating that a resource is uninitialized. Added an invalid enum so
that processing works correctly for partially added flows.
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Fri, 24 Apr 2020 11:00:54 +0000 (16:30 +0530)]
net/bnxt: fix max ring count
Max Rx Ring count could be < Max stat contexts. While accounting
for stat contexts, this should be also considered and
the max ring count adjusted accordingly.
Fixes:
f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
David Christensen [Mon, 4 May 2020 21:03:47 +0000 (14:03 -0700)]
eal/ppc: fix build with gcc 9.3
Building DPDK on Ubuntu 20.04 with GCC 9.3.0 results in a "subscript is
outside array bounds" message in rte_memcpy function. The build error
is caused by an interaction between __builtin_constant_p and
"-Werror=array-bounds" as described in this bugzilla:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90387
Modify the code to disable the array-bounds check for GCC versions 9.0
to 9.3.
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Olivier Matz [Wed, 29 Apr 2020 13:17:00 +0000 (15:17 +0200)]
kvargs: fix invalid token parsing on FreeBSD
The behavior of strtok_r() is not the same between GNU libc and FreeBSD
libc: in the first case, the context is set to "" when the last token is
returned, while in the second case it is set to NULL.
On FreeBSD, the current code crashes because we are dereferencing a NULL
pointer (ctx1). Fix it by first checking if it is NULL. This works with
both GNU and FreeBSD libc.
Fixes:
ffcf831454a9 ("kvargs: fix buffer overflow when parsing list")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Phil Yang [Tue, 28 Apr 2020 14:37:07 +0000 (22:37 +0800)]
trace: fix build with gcc 10
Prevent from writing beyond the allocated memory.
GCC 10 compiling output:
eal_common_trace_utils.c: In function 'eal_trace_dir_args_save':
eal_common_trace_utils.c:290:24: error: '__builtin___sprintf_chk' \
may write a terminating nul past the end of the destination \
[-Werror=format-overflow=]
290 | sprintf(dir_path, "%s/", optarg);
| ^
Fixes:
8af866df8d8c ("trace: add trace directory configuration parameter")
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Tested-by: Lijian Zhang <lijian.zhang@arm.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Thu, 30 Apr 2020 17:44:48 +0000 (19:44 +0200)]
trace: remove string duplication
No need to duplicate an untouched string.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
David Marchand [Thu, 30 Apr 2020 16:31:55 +0000 (18:31 +0200)]
trace: remove limitation on patterns number
There is nothing performance sensitive in this list, use dynamic
allocations and remove the arbitrary limit on the number of trace
patterns a user can pass.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
David Marchand [Thu, 30 Apr 2020 15:33:18 +0000 (17:33 +0200)]
trace: remove unneeded checks in internal API
The trace framework can be configured via 4 EAL options:
- --trace which calls eal_trace_args_save,
- --trace-dir which calls eal_trace_dir_args_save,
- --trace-bufsz which calls eal_trace_bufsz_args_save,
- --trace-mode which calls eal_trace_mode_args_save.
Those 4 internal callbacks are getting passed a non NULL value:
optarg won't be NULL since those options are declared with
required_argument (man getopt_long).
eal_trace_bufsz_args_save() already trusted passed value, align the other
3 internal callbacks.
Coverity issue: 357768
Fixes:
8c8066ea6a7b ("trace: add trace mode configuration parameter")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
David Marchand [Thu, 30 Apr 2020 17:27:16 +0000 (19:27 +0200)]
trace: avoid confusion on optarg
Prefer a local name to optarg which is a global symbol from the C library.
Fixes:
8c8066ea6a7b ("trace: add trace mode configuration parameter")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
David Marchand [Wed, 29 Apr 2020 13:46:49 +0000 (15:46 +0200)]
trace: simplify trace point headers
Invert the current trace point headers logic by making
rte_trace_point_register.h include rte_trace_point.h.
There is no more need for a RTE_TRACE_POINT_REGISTER_SELECT special macro
since including rte_trace_point_register.h itself means we want to
register trace points.
The unexplained "provider" notion is removed from the documentation and
rte_trace_point_provider.h is merged into rte_trace_point.h.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
David Marchand [Wed, 29 Apr 2020 12:36:23 +0000 (14:36 +0200)]
cryptodev: fix trace points registration
Those trace points are defined but not registered.
Fixes:
4cf30e3f3c35 ("cryptodev: add tracepoints")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
Ori Kam [Thu, 30 Apr 2020 14:22:14 +0000 (14:22 +0000)]
eal/ppc: fix bool type after altivec include
The AltiVec header file breaks boolean type. [1] [2]
Currently the workaround was located only in mlx5 device.
Adding the trace module caused this issue to appear again, due to
order of includes, it keeps overriding the local fix.
This patch solves this issue by resetting the bool type, immediately
after it is being changed.
[1] https://mails.dpdk.org/archives/dev/2018-August/110281.html
[2]
In file included from
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:18:0,
from
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool.h:54,
from
dpdk/drivers/common/mlx5/mlx5_common_mr.c:7:
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h: In
function '__rte_trace_point_fp_is_enabled':
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h:226:2:
error: incompatible types when returning type 'int' but '__vector __bool
int' was expected
return false;
^
In file included from
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h:281:0,
from
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:18,
from
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool.h:54,
from
dpdk/drivers/common/mlx5/mlx5_common_mr.c:7:
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:
In function 'rte_mempool_trace_ops_dequeue_bulk':
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point_provider.h:104:6:
error: wrong type argument to unary exclamation mark
if (!__rte_trace_point_fp_is_enabled()) \
^
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h:49:2:
note: in expansion of macro '__rte_trace_point_emit_header_fp'
__rte_trace_point_emit_header_##_mode(&__##_tp); \
^
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h:99:2:
note: in expansion of macro '__RTE_TRACE_POINT'
__RTE_TRACE_POINT(fp, tp, args, __VA_ARGS__)
^
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:20:1:
note: in expansion of macro 'RTE_TRACE_POINT_FP'
RTE_TRACE_POINT_FP(
^
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:
In function 'rte_mempool_trace_ops_dequeue_contig_blocks':
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point_provider.h:104:6:
error: wrong type argument to unary exclamation mark
if (!__rte_trace_point_fp_is_enabled()) \
^
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h:49:2:
note: in expansion of macro '__rte_trace_point_emit_header_fp'
__rte_trace_point_emit_header_##_mode(&__##_tp); \
^
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point.h:99:2:
note: in expansion of macro '__RTE_TRACE_POINT'
__RTE_TRACE_POINT(fp, tp, args, __VA_ARGS__)
^
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:29:1:
note: in expansion of macro 'RTE_TRACE_POINT_FP'
RTE_TRACE_POINT_FP(
^
dpdk/ppc_64-power8-linux-gcc/include/rte_mempool_trace_fp.h:
In function 'rte_mempool_trace_ops_enqueue_bulk':
dpdk/ppc_64-power8-linux-gcc/include/rte_trace_point_provider.h:104:6:
error: wrong type argument to unary exclamation mark
if (!__rte_trace_point_fp_is_enabled()) \
Fixes:
725f5dd0bfb5 ("net/mlx5: fix build on PPC64")
Signed-off-by: Ori Kam <orika@mellanox.com>
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Kevin Traynor [Fri, 17 Apr 2020 15:43:35 +0000 (16:43 +0100)]
eal/x86: ignore gcc 10 stringop-overflow warnings
stringop-overflow warns when it sees a possible overflow
in a string operation.
In the rte_memcpy functions different branches are taken
depending on the size. stringop-overflow is raised for the
branches in the function where it sees the static size of the
src could be overflowed.
However, in reality a correct size argument and in some cases
dynamic allocation would ensure that this does not happen.
For example, in the case below for key, the correct path will be
chosen in rte_memcpy_generic at runtime based on the size argument
but as some paths in the function could lead to a cast to 32 bytes
a warning is raised.
In function ‘_mm256_storeu_si256’,
inlined from ‘rte_memcpy_generic’
at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:315:2,
inlined from ‘iavf_configure_rss_key’
at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:869:10:
/usr/lib/gcc/x86_64-redhat-linux/10/include/avxintrin.h:928:8:
warning: writing 32 bytes into a region of size 1 [-Wstringop-overflow=]
928 | *__P = __A;
| ~~~~~^~~~~
In file included
from ../drivers/net/iavf/../../common/iavf/iavf_prototype.h:10,
from ../drivers/net/iavf/iavf.h:9,
from ../drivers/net/iavf/iavf_vchnl.c:22:
../drivers/net/iavf/iavf_vchnl.c:
In function ‘iavf_configure_rss_key’:
../drivers/net/iavf/../../common/iavf/virtchnl.h:508:5:
note: at offset 0 to object ‘key’ with size 1 declared here
508 | u8 key[1]; /* RSS hash key, packed bytes */
| ^~~
Ignore the stringop-overflow warnings for rte_memcpy.h functions.
Bugzilla ID: 394
Bugzilla ID: 421
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Kevin Traynor [Wed, 11 Mar 2020 11:33:00 +0000 (11:33 +0000)]
examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning
gcc 10.0.1 reports:
../examples/ipsec-secgw/ipsec_process.c: In function ‘ipsec_process’:
../examples/ipsec-secgw/ipsec_process.c:132:34:
error: ‘grp.m’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
132 | grp[n].cnt = pkts + i - grp[n].m;
| ~~~~~~^~
This is a correct warning for the initial execution of the statement.
However, it is the design of the loop that grp[0].cnt will later be
written with the correct value using an initialized grp[0].m before it
is used.
In order to remove the warning, initialize grp[0].m for the initial and
unused calculation of grp[0].cnt.
Fixes:
3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec library")
Cc: stable@dpdk.org
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Kevin Traynor [Wed, 11 Mar 2020 11:32:59 +0000 (11:32 +0000)]
net/avp: fix gcc 10 maybe-uninitialized warning
gcc 10.0.1 reports:
../drivers/net/avp/avp_ethdev.c: In function ‘avp_xmit_scattered_pkts’:
../drivers/net/avp/avp_ethdev.c:1791:24:
warning: ‘avp_bufs[count]’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
1791 | tx_bufs[i] = avp_bufs[count];
| ~~~~~~~~^~~~~~~
../drivers/net/avp/avp_ethdev.c:1791:24:
warning: ‘avp_bufs[count]’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
Fix by initializing the array.
Fixes:
295abce2d25b ("net/avp: add packet transmit functions")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Steven Webster <steven.webster@windriver.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:28 +0000 (19:44 +0530)]
doc: add l3fwd-graph application user guide
Adding the user guide for l3fwd graph application.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Jerin Jacob [Sat, 11 Apr 2020 14:14:27 +0000 (19:44 +0530)]
doc: add graph library guide
Adding programmer's guide for Graph library and the inbuilt nodes.
This patch also updates the release note for the new libraries.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Nithin Dabilpuram [Sat, 11 Apr 2020 14:14:26 +0000 (19:44 +0530)]
examples/l3fwd-graph: add graph config and main loop
Add graph creation, configuration logic and graph main loop.
This graph main loop is run on every slave lcore and calls
rte_graph_walk() to walk over lcore specific rte_graph.
Master core accumulates and prints graph walk stats of all the
lcore's graph's.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
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>