Qi Zhang [Mon, 23 Mar 2020 07:17:25 +0000 (15:17 +0800)]
net/ice/base: add and update E822 device IDs
Add the device IDs for the Intel(R) Ethernet Connection E822-L and
E822-X SKUs. Update the codenames and branding strings for the previous
C822N device IDs which should be using E822-C.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Mon, 23 Mar 2020 07:17:24 +0000 (15:17 +0800)]
net/ice/base: fix uninitialized stack variables
Via code inspection, I found that some partially initialized
stack variables were being passed along to called functions,
which could eventually result in those uninitialized members
being used. To fix this, make sure the local variables are
zeroed out before partially initializing them. This should
prevent any unintended consequences from using stack memory that
might have junk in it.
In addition to the memsets, this patch also initializes one
member in one function, that needed to be initialized to non-zero.
Fixes:
fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Chengwen Feng [Thu, 26 Mar 2020 07:14:33 +0000 (15:14 +0800)]
net/hns3: fix return value of setting VLAN offload
Currently, the '.vlan_offload_set' ops implementation function named
hns3vf_vlan_offload_set always return 0 in hns3 VF PMD driver.
This patch fixes it with the following modification in the function
named hns3vf_vlan_offload_set.
1. Avoid setting hardware configuration and return -EIO during resetting.
2. Add the return value detection process for calling internal static
function named hns3vf_en_hw_strip_rxvtag.
Fixes:
a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Min Hu (Connor) [Thu, 26 Mar 2020 07:14:32 +0000 (15:14 +0800)]
net/hns3: fix mailbox opcode data type
The mailbox opcode is defined as one byte in datasheet which is not
compatible with that in the current hns3 PMD driver.
This patch fixes the data type of the local variable for mailbox opcode
in driver, changing from uint16_t to uint8_t.
Fixes:
463e748964f5 ("net/hns3: support mailbox")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Lijun Ou [Thu, 26 Mar 2020 07:14:31 +0000 (15:14 +0800)]
net/hns3: fix configuring RSS hash when rules are flushed
Currently, when performing test case as follow:
1. Run testpmd application based on hns3 network engine with multiple
receive queues(--rxq=N --txq=N, N>1).
2. Create the special RSS rules by "create flow ..." command in the
command prompt of the testpmd application.
3. Flush the RSS rules created in step 2 by "flow flush ..." command.
4. Enable RSS by "port config all rss all" command.
In step 4, the command exeuctes successfully. This phenomenon is
inconsistent with the expectation. The API function named
rte_eth_dev_rss_hash_update called in the command should return error
and the command should fail.
This patch fixes it by adding a flag for disabling RSS in the driver.
When RSS rules is flushed, we set the the flag with true, and the
'.rss_hash_update' ops implementation function named
hns3_dev_rss_hash_update return -EINVAL.
Fixes:
c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Lijun Ou [Thu, 26 Mar 2020 07:14:30 +0000 (15:14 +0800)]
net/hns3: fix RSS indirection table configuration
For the current hns3 PMD driver, there are some RSS related bugs at
the following scenes:
1. Start the application with the number of Rx queues equals 1(--rxq=1),
modify the number of Rx queue to some number greater than 1 during
normal operation. As a result, upper application can't receive packets
from multiple rx queues.
2. Start testpmd application with the option disable-rss and the number
of Rx queue is greater than 1(--disable-rss --rxq=N, N>1). As a result,
upper application still can receive packets from multiple rx queues.
The root cause as below:
There are some error configuration in the RSS indirection table of hns3
network engine.
This patch fixes them with the following modification.
1. When RSS size is changed, we need to update RSS redirection table
maintained by driver and configure them to hardware. Besides, during
the entire reset process, we need to ensure that the RSS table
information are not overwritten and configured directly to the hardware
in the RESET_STAGE_RESTORE stage of the reset process.
2. When sarting testpmd application with the options disable-rss, it
doesn't need to configure RSS redirection table to hardware.
Fixes:
c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
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>
Muhammad Ahmad [Fri, 20 Mar 2020 06:46:00 +0000 (11:46 +0500)]
app/testpmd: add FW version in port info
rte_eth_dev_fw_version_get() was not called in test PMD.
Added rte_eth_dev_fw_version_get() in testpmd under
"show port info <port no>"
Bugzilla ID: 225
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Muhammad Ahmad <muhammad.ahmad@emumba.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andy Pei [Mon, 16 Mar 2020 06:07:17 +0000 (14:07 +0800)]
net/ipn3ke: use control thread to check link status
ipn3ke driver creates a thread to check link status.
Before this patch, pthread_create() is used to create
thread, leaving the new thread unrestrained wrt cpu
affinity.
After this patch, rte_ctrl_thread_create() is used to
create thread. The affinity of the new thread is based
on the CPU affinity retrieved at the time rte_eal_init()
was called, the dataplane and service lcores are then
excluded.
Fixes:
70d6b7f550f4 ("net/ipn3ke: add representor")
Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:17 +0000 (23:01 +0800)]
net/hinic: support flow control
The patch supports pause flow control, including getting or
setting rx_pasue, tx_pause and auto_neg, auto_neg is just
for Electric port type.
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:16 +0000 (23:01 +0800)]
net/hinic: clean up logs
The patch optimizes log files without "\n".
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:15 +0000 (23:01 +0800)]
net/hinic: add flow director filter
The patch supports filter type of inner VXLAN or non vxlan dport,
and use TCAM method to config these rules.
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:14 +0000 (23:01 +0800)]
net/hinic: remove 40G mezzanine card
The 40GE Mezz card is not support, so remove it from the PMD driver.
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:13 +0000 (23:01 +0800)]
net/hinic/base: optimize doorbell area initialization
The maximum doorbell area is initialized from hardware param, and not
uses const macro param.
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:12 +0000 (23:01 +0800)]
net/hinic/base: fix port start during FW hot update
When repeatedly hotupdate firmware and start/stop port at the same time,
port start may be failed when cmdq reinit failed at the FW active phase,
so if cmdq fails, then reinit the cmdq when port start.
Fixes:
d9ce1917941c ("net/hinic/base: add hardware operation")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Xiaoyun Wang [Tue, 17 Mar 2020 15:01:11 +0000 (23:01 +0800)]
net/hinic: fix LRO
PMD driver should change the max_lro_pkt_size parameter into lro_wqe_num
that used for hardware, and when packets are coalesced by hardware,
PKT_RX_LRO flag should be set in the RX mbuf.
Fixes:
9d4878ef0897 ("net/hinic: support LRO offload")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Wei Hu (Xavier) [Tue, 17 Mar 2020 09:12:06 +0000 (17:12 +0800)]
net/hns3: fix status after repeated resets
Currently, when performing the following test case:
1. Run testpmd application based on hns3 PF device.
2. Inject reset(global/IMP reset) repeatedly.
After the reset, the network port can't link up.
In the RESET_STAGE_DEV_INIT stage of the reset process, the driver will
reinitialize the hardware. If global/IMP reset occurs at this time
again, the operation of reinitialize the hardware will fail because that
firmware don't respond to the configuration commands issued by driver.
In current driver, when failed to reinitialize the hardware, rollback
operation is done, such as clearing the relevant configuration of the
command queue registers.
If firmware detects that the function's command queue register is not
configured correctly, it will not complete the reset related hardware
configuration for this function, resulting in that driver can't detect
that the hardware reset has been completed. And then the reset process
of the driver exit abnormally, the hardware can not work normally after
reset.
This patch fixes it by avoid clearing the command queue related
registers when failed to reinitialize the hardware in the
RESET_STAGE_DEV_INIT stage of the reset process.
Fixes:
2790c6464725 ("net/hns3: support device reset")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Min Hu (Connor) [Tue, 17 Mar 2020 09:12:05 +0000 (17:12 +0800)]
net/hns3: fix configuring illegal VLAN PVID
The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not
support this situation that the VLAN pvid is larger than Maximum VLAN
ID(4095).
Fixes:
411d23b9eafb ("net/hns3: support VLAN")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengwen Feng [Tue, 17 Mar 2020 09:12:04 +0000 (17:12 +0800)]
net/hns3: fix crash when flushing RSS flow rules with FLR
Currently, we encounter segmentation fault when performing the following
test case:
1. Run testpmd application, config the flow filter rules then flush them
repeatedly.
2. Inject FLR concurrently every 5 second.
The calltrace info:
This GDB was configured as "aarch64-linux-gnu".
Reading symbols from ./testpmd...(no debugging symbols found)...done.
[New LWP 322]
[New LWP 325]
[New LWP 324]
[New LWP 326]
[New LWP 323]
[New LWP 327]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/
libthread_db.so.1".
Core was generated by `/home/root/app/testpmd -w 0000:00:01.0 -w
0000:00:02.0 -w 0000:00:03.0 -l 0-3 -'.
Program terminated with signal SIGSEGV, Segmentation fault.
libc.so.6
[Current thread is 1 (Thread 0xffff8bb35110 (LWP 322))]
(gdb) bt
#0 0x0000ffff8b936a90 in strlen () from /lib/aarch64-linux-gnu/
libc.so.6
#1 0x0000ffff8b905ccc in vfprintf () from /lib/aarch64-linux-gnu/
libc.so.6
#2 0x0000ffff8b993d04 in __printf_chk () from /lib/aarch64-linux-gnu/
libc.so.6
#3 0x0000000000754828 in port_flow_flush ()
#4 0x0000000000870f3c in cmdline_parse ()
The root cause as follows:
In the '.flush' ops implementation function named hns3_flow_flush, By
the way the '.flush' ops is defined in the struct rte_flow_ops, if
failed to call hns3_clear_rss_filter, the out parameter error is not
set, and then the member variable name message in the struct error is
invalid(filled with 0x44444444 in port_flow_flush function of the
testpmd application), it leads to segmentation fault when format the
message.
We fixes it by filling error parameter when failure in calling static
function named hns3_clear_rss_filter in the the '.flush' ops
implementation function named hns3_flow_flush.
Fixes:
c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengwen Feng [Tue, 17 Mar 2020 09:12:03 +0000 (17:12 +0800)]
net/hns3: fix default error code of command interface
Currently, the hns3 PMD driver can interact with firmware through
command to complete hardware configuration. The driver calls internal
interface function named hns3_cmd_send to issues command to the
firmware, and check the execution result of the command through desc_ret
returned by firmware to driver.
As the design of error code, when device is resetting hns3_cmd_send will
only return -EBUSY or -EIO. But we found that if desc_ret is in
[12,65535], for example the item doesn't exist when issuing the command
to query some table item, hns3_cmd_send also return -EIO. This
phenomenon will affect the processing logic for the return value.
The root cause as below:
When desc_ret is in [12,65535], in the static function named
hns3_cmd_convert_err_code called by hns3_cmd_send, matches the default
case and return -EIO. And then hns3_cmd_send return -EIO.
This patch fixes it with the following modification.
1. Change the return value of the default case in the static function
named hns3_cmd_convert_err_code from -EIO to -EREMOTEIO.
2. Modify the comment add errcode description of the internal interface
function named hns3_cmd_send.
Fixes:
737f30e1c3ab ("net/hns3: support command interface with firmware")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengwen Feng [Tue, 17 Mar 2020 09:12:02 +0000 (17:12 +0800)]
net/hns3: fix packets offload features flags in Rx
Currently there is a certain probability of the unexpected ol_flag of
the Rx packets's rte_mbuf when receiving packets.
The root cause as below:
1. The member variable named ol_flag of the structure named rte_mbuf is
not properly initialized to zero in the '.rx_pkt_burst' ops
implementation function named hns3_recv_pkts.
2. When multi-segment rte_mbufs are needed for long packet in Rx
operation, the driver should assign value to the ol_flag of the first
segment, not to the ol_flag of the last segment.
This patch fixes it with the following modification in the
'.rx_pkt_burst' ops implementation function named hns3_recv_pkts.
1. Where the first write operation in the '.rx_pkt_burst' ops
implementation function, assign PKT_RX_RSS_HASH to ol_flags directly
using '=' operation instead of '|=' operation.
2. In the static function named hns3_rx_set_cksum_flag, the last
rte_mbuf's ol_flags should be assigned when processing multi-segment.
We fix it by passing first_seg variable to the function instead of
rxm(the last segment's address).
Fixes:
bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes:
ad7cf94823e8 ("net/hns3: fix offload flag for RSS hash")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengchang Tang [Tue, 17 Mar 2020 09:12:01 +0000 (17:12 +0800)]
net/hns3: modify inappropriate names
This patch modifies the name of some macro and local variable to avoid
devil number and increase code readability in the internal interface
function named hns3_set_port_vlan_filter.
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengchang Tang [Tue, 17 Mar 2020 09:12:00 +0000 (17:12 +0800)]
net/hns3: remove redundant check when setting MAC
This patch removes unnecessary MAC address validity check operation in
the .mac_addr_set ops implementation function named
hns3_set_default_mac_addr and hns3vf_set_default_mac_addr, because it
has been guaranteed that input parameter named mac_addr is valid address
in the rte layer of DPDK framework.
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:49 +0000 (00:33 +0530)]
doc: add trace library guide
Add programmer's guide for trace library support.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:48 +0000 (00:33 +0530)]
mempool: add tracepoints
Add tracepoints at important and mandatory APIs for tracing support.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:47 +0000 (00:33 +0530)]
cryptodev: add tracepoints
Add tracepoints at important and mandatory APIs for tracing support.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:46 +0000 (00:33 +0530)]
eventdev: add tracepoints
Add tracepoints at important and mandatory APIs for tracing support.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:45 +0000 (00:33 +0530)]
ethdev: add tracepoints
Add tracepoints at important and mandatory APIs for tracing support.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:44 +0000 (00:33 +0530)]
test/trace: add performance test cases
This test case shall be used to measure the trace overhead.
Example command to run the performance test case.
echo "trace_perf_autotest" | ./build/app/test/dpdk-test -c 0x3 --trace=.*
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:43 +0000 (00:33 +0530)]
test/trace: add functional test cases
Example commands to run UT and check the traces with babeltrace viewer.
- Delete the existing /root/dpdk-traces/ directory if needed.
> sudo rm -rf /root/dpdk-traces/
- Start the dpdk-test
> sudo ./build/app/test/dpdk-test -c 0x3 - --trace=.*
- Run trace_autotest
> trace_autotest
- View the traces with babletrace viewer.
> sudo babeltrace /root/dpdk-traces/
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:42 +0000 (00:33 +0530)]
trace: add trace mode configuration parameter
Trace library exposes --trace-mode eal parameter to configure
event record mode when ring buffers are full.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:41 +0000 (00:33 +0530)]
trace: add trace bufsize configuration parameter
Trace library exposes --trace-bufsz EAL parameter to configure
maximum size of ring buffer where events are to be stored.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:40 +0000 (00:33 +0530)]
trace: add trace directory configuration parameter
Trace library exposes --trace-dir EAL parameter to configure
directory where traces will be generated.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:39 +0000 (00:33 +0530)]
trace: add trace configuration parameter
Trace library exposes --trace EAL parameter to enable trace points.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:38 +0000 (00:33 +0530)]
trace: add interrupt tracepoints
Add the following interrupt related tracepoints.
- rte_eal_trace_intr_callback_register()
- rte_eal_trace_intr_callback_unregister()
- rte_eal_trace_intr_enable()
- rte_eal_trace_intr_disable()
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:37 +0000 (00:33 +0530)]
trace: add thread tracepoints
Add the following thread related tracepoints.
- rte_eal_trace_thread_remote_launch()
- rte_eal_trace_thread_lcore_ready()
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:36 +0000 (00:33 +0530)]
trace: add memzone tracepoints
Add the following memzone related tracepoints.
- rte_eal_trace_memzone_reserve()
- rte_eal_trace_memzone_lookup()
- rte_eal_trace_memzone_free()
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:35 +0000 (00:33 +0530)]
trace: add memory tracepoints
Add the following memory-related tracepoints.
- rte_eal_trace_mem_zmalloc()
- rte_eal_trace_mem_malloc()
- rte_eal_trace_mem_realloc()
- rte_eal_trace_mem_free()
rte_malloc() and rte_free() has been used in the trace implementation,
in order to avoid tracing implementation specific events, added
an internal no trace version rte_malloc() and rte_free().
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:34 +0000 (00:33 +0530)]
trace: add alarm tracepoints
Add following alarm related trace points.
- rte_eal_trace_alarm_set()
- rte_eal_trace_alarm_cancel()
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:33 +0000 (00:33 +0530)]
trace: add generic tracepoints
This patch creates the following generic tracepoint for
generic tracing when there is no dedicated tracepoint is
available.
- rte_eal_trace_generic_void()
- rte_eal_trace_generic_u64()
- rte_eal_trace_generic_u32()
- rte_eal_trace_generic_u16()
- rte_eal_trace_generic_u8()
- rte_eal_trace_generic_i64()
- rte_eal_trace_generic_i32()
- rte_eal_trace_generic_i16()
- rte_eal_trace_generic_i8()
- rte_eal_trace_generic_int()
- rte_eal_trace_generic_long()
- rte_eal_trace_generic_float()
- rte_eal_trace_generic_double()
- rte_eal_trace_generic_ptr()
- rte_eal_trace_generic_str()
For example, if an application wishes to emit an int datatype,
it can call rte_eal_trace_generic_int(val) to emit the trace.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:32 +0000 (00:33 +0530)]
trace: hook subsystem to FreeBSD
Connect the internal trace interface API to FreeBSD EAL.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:31 +0000 (00:33 +0530)]
trace: hook subsystem to Linux
Connect the internal trace interface API to Linux EAL.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:30 +0000 (00:33 +0530)]
trace: implement provider payload
The trace function payloads such as rte_trace_point_emit_* have
dual functions. The first to emit the payload for the registration
function and the second one to act as trace mem emitters a.k.a
provider payload.
When it is used as provider payload, those function copy the trace
field to trace memory based on the tracing mode.
Added payload definitions under ALLOW_EXPERIMENTAL_API define
to allow the existing applications to compile without enabling
experimental APIs.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:29 +0000 (00:33 +0530)]
trace: implement registration payload
The trace function payloads such as rte_trace_point_emit_* have
dual functions. The first to emit the payload for the registration
function and the second one to act as trace memory emitters.
When it is used as registration payload, it will do the following to
fulfill the registration job.
- Find out the size of the event,
- Generate metadata field string using __rte_trace_point_emit_field().
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:28 +0000 (00:33 +0530)]
trace: implement trace save
Implement rte_trace_save(), which will save the metadata
file and trace memory snapshot to the trace directory.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:27 +0000 (00:33 +0530)]
trace: implement debug dump
Implement rte_trace_metadata_dump() and rte_trace_dump()
functions. Former one used to dump the CTF metadata file and
the latter one to dump all the registered events and its status.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:26 +0000 (00:33 +0530)]
trace: implement memory allocation
Trace memory will be allocated per thread to enable lockless trace
events updates to the memory. The allocator will first attempt to
allocate from hugepage, then if not available from hugepage or
finally fallback to malloc memory.
Later in the patches series, this API will be hooked to DPDK fast path
and control plane thread creation API. It is possible for non
DPDK thread to use trace events. In that case, trace memory
will be allocated on the first event emission.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Sunil Kumar Kori [Wed, 22 Apr 2020 19:03:25 +0000 (00:33 +0530)]
trace: handle CTF keyword collision
Some of the keyword like align, event, "." and "->" etc will be
used in CTF metadata syntax. This patch support for handling
those keywords with DPDK events name.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:24 +0000 (00:33 +0530)]
trace: create CTF TDSL metadata in memory
Common trace format(CTF) defines the metadata[1][2] for trace events,
This patch creates the metadata for the DPDK events in memory and
later this will be saved to trace directory on rte_trace_save()
invocation.
[1] https://diamon.org/ctf/#specification
[2] https://diamon.org/ctf/#examples
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:23 +0000 (00:33 +0530)]
trace: save bootup timestamp
Find epoch_sec, epoch_nsec and uptime_ticks time information
on eal_trace_init()/bootup to derive the time in the trace.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:22 +0000 (00:33 +0530)]
trace: add internal init and fini interface
Define eal_trace_init() and eal_trace_fini() EAL interface
functions that rte_eal_init() and rte_eal_cleanup() function can
use to initialize and finalize the trace subsystem.
eal_trace_init() function will add the following functionality if
trace is enabled through EAL command line param.
- Test for trace registration failure.
- Test for duplicate trace name registration.
- Generate UUID ver 4.
- Create a trace directory.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:21 +0000 (00:33 +0530)]
trace: implement operation APIs
This patch implements the following public trace APIs.
- rte_trace_is_enabled()
- rte_trace_mode_get()
- rte_trace_mode_set()
- rte_trace_pattern()
- rte_trace_point_disable()
- rte_trace_point_enable()
- rte_trace_point_is_enabled()
- rte_trace_point_lookup()
- rte_trace_regexp()
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:20 +0000 (00:33 +0530)]
trace: implement register API
The consumers of trace API defines the tracepoint and registers
to eal. Internally these tracepoints will be stored in STAILQ
for future use. This patch implements the tracepoint
registration function.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:19 +0000 (00:33 +0530)]
trace: introduce new subsystem
Define the public API for trace support.
This patch also adds support for the build infrastructure and
update the MAINTAINERS file for the trace subsystem.
The 8 bytes tracepoint object is a global variable, and can be used in
fast path. Created a new __rte_trace_point section to store the
tracepoint objects as,
- It is a mostly read-only data and not to mix with other "write"
global variables.
- Chances that the same subsystem fast path variables come in the same
fast path cache line. i.e, it will enable a more predictable
performance number from build to build.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Jerin Jacob [Wed, 22 Apr 2020 19:03:18 +0000 (00:33 +0530)]
eal: introduce API for getting thread name
Introduce rte_thread_getname() API to get the thread name
and implement it for Linux and FreeBSD.
FreeBSD does not support getting the thread name.
One of the consumers of this API will be the trace subsystem where
it used as an informative purpose.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Honnappa Nagarahalli [Wed, 22 Apr 2020 03:30:06 +0000 (22:30 -0500)]
rcu: add additional debug logs
Added additional debug logs. These helped in debugging RCU defer APIs.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Ruifeng Wang [Wed, 22 Apr 2020 03:30:05 +0000 (22:30 -0500)]
doc: add RCU integration design details
Add a section to describe a design to integrate QSBR RCU library
with other libraries in DPDK.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Honnappa Nagarahalli [Wed, 22 Apr 2020 03:30:04 +0000 (22:30 -0500)]
test/rcu: add defer queue APIs tests
Add test cases for RCU defer queue APIs.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Honnappa Nagarahalli [Wed, 22 Apr 2020 03:30:03 +0000 (22:30 -0500)]
rcu: add resource reclamation APIs
Add resource reclamation using defer queues to make it simple for
applications and libraries to integrate rte_rcu library.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Pablo de Lara [Fri, 17 Apr 2020 22:00:37 +0000 (23:00 +0100)]
doc: support IPsec Multi-buffer lib v0.54
Updated AESNI MB and AESNI GCM PMD documentation guides
with information about the latest Intel IPSec Multi-buffer
library supported.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Adam Dybkowski [Thu, 16 Apr 2020 12:24:38 +0000 (14:24 +0200)]
crypto/qat: support plain SHA1..SHA512 hashes
This patch adds support for plain SHA-1, SHA-224, SHA-256,
SHA-384 and SHA-512 hashes to QAT PMD.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Thu, 16 Apr 2020 09:25:32 +0000 (10:25 +0100)]
test/crypto: do not check for PMD
Remove PMD bitmask, which selects the PMD to be tested
for each test case. Instead, all PMDs are eligible
to run all tests, and capability checking discards
the PMDs which do not support each test case.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Thu, 16 Apr 2020 09:25:31 +0000 (10:25 +0100)]
test/crypto: check out-of-place support
Before running any out-of-place test cases,
check if device supports this mode.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Thu, 16 Apr 2020 09:25:30 +0000 (10:25 +0100)]
test/crypto: check session-less support
Before running any sessionless test cases,
check if device supports this mode.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Thu, 16 Apr 2020 09:25:29 +0000 (10:25 +0100)]
cryptodev: add session-less feature flag
Add feature flag for symmetric sessionless support,
so it can be checked by applications.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Thu, 16 Apr 2020 17:24:24 +0000 (18:24 +0100)]
test/crypto: do not check for internal PMD information
Now that capabilities are checked to see if an algorithm
is supported by a device, there is no need to check
for a specific version of a library used in a PMD.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Thu, 16 Apr 2020 17:24:23 +0000 (18:24 +0100)]
test/crypto: add capability check
Check if test case is supported by the crypto device,
including algorithm and some of its parameter, such as key length,
IV length, etc, using the capabilities API.
If it is not supported, test case is skipped.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:48 +0000 (15:46 -0700)]
doc: add feature matrix table for bbdev
Adding missing overview page in documentation with
comparison of feature set by each available PMD implementation.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:47 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: support interrupt
Adding support for interrupt capability in the PMD
and the related operations.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:46 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add HARQ loopback capability
Adding optional capability to support loopback preloading
and check of the extern HARQ memory.
This function is required to run the HARQ bit exact test successfully.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:45 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add configure function
Add configure function to configure the PF from within
the bbdev-test itself without external application
configuration the device.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Reviewed-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:44 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add debug functionality
Adding functionality for debug mode to be more
verbose and catch error from unsupported configuration.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:43 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add HW error capture
Adding HW specific parsing of error report for
negative scenarios. Not hit through unit test.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:42 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add LDPC processing functions
Adding LDPC processing operations and related documentation.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:41 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add queue configuration
Adding function to create and configure queues for
the device. Still no capability.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:40 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add info get function
Add in the "info_get" function to the driver, to allow us to query the
device.
No capability are available yet.
Linking bbdev-test to support the PMD with null capability.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:39 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add HW register definitions
Add in the list of registers for the device and related
HW specs definitions.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nicolas Chautru [Sat, 18 Apr 2020 22:46:38 +0000 (15:46 -0700)]
baseband/fpga_5gnr_fec: add PMD for FPGA 5GNR FEC
Add stubs for the FPGA 5GNR FEC PMD
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Niall Power <niall.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Adam Dybkowski [Fri, 17 Apr 2020 15:44:04 +0000 (17:44 +0200)]
test/compress: check IM buffer too small
This patch adds new tests for verification of the "internal
QAT IM buffer too small" case handling. These unit tests aren't
specific to the QAT PMD only - they pass or skip on other PMDs like
ISAL and ZLIB (depending on particular PMD capabilities).
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Adam Dybkowski [Fri, 17 Apr 2020 15:44:03 +0000 (17:44 +0200)]
compress/qat: support IM buffer too small operation
This patch implements a special way of buffer handling when internal
QAT IM buffer is too small for Huffman dynamic compression operation.
Instead of falling back to fixed compression, the operation is now
split into multiple smaller dynamic compression requests (possible to
execute on QAT) and their results are then combined and copied into
the output buffer. This is not possible if any checksum calculation
was requested - in such case the code falls back to fixed compression
as before.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Ankur Dwivedi [Fri, 17 Apr 2020 15:41:55 +0000 (21:11 +0530)]
examples/ipsec-secgw: check event adapter errors
The return values of functions are checked before proceeding further.
Coverity issue: 355670, 355671, 355672, 355673
Fixes:
1d89ccf32301 ("examples/ipsec-secgw: support event Tx adapter")
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Ankur Dwivedi [Fri, 17 Apr 2020 15:41:54 +0000 (21:11 +0530)]
examples/ipsec-secgw: remove duplicated check
The two if check does the same task, so removing one.
Coverity issue: 355669
Fixes:
9ad50c29d01d ("examples/ipsec-secgw: add app mode worker")
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:25:02 +0000 (19:25 +0200)]
test/security: check capability get
Add unit tests for rte_security_capability_get function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:25:01 +0000 (19:25 +0200)]
test/security: check capabilities get
Add unit tests for rte_security_capabilities_get function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:25:00 +0000 (19:25 +0200)]
test/security: check userdata get
Add unit tests for rte_security_get_userdata function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:59 +0000 (19:24 +0200)]
test/security: check metadata set
Add unit tests for rte_security_set_pkt_metadata function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:58 +0000 (19:24 +0200)]
test/security: check session destroy
Add unit tests for rte_security_session_destroy function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:57 +0000 (19:24 +0200)]
test/security: check session stats
Add unit tests for rte_security_session_stats_get function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:56 +0000 (19:24 +0200)]
test/security: check session size
Add unit tests for rte_security_session_get_size function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:55 +0000 (19:24 +0200)]
test/security: check session update
Add unit tests for rte_security_session_update function.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:54 +0000 (19:24 +0200)]
test/security: introduce security lib tests
This patch introduces set of unit tests of librte_security API functions.
Tests are added to dpdk-test application and can be run with
"security_autotest" runtime command.
This is the first patch in the series of patches as adding all test cases
for all API functions in a single patch would make it unreadable.
This patch defines structure of the file and necessary test framework
initialization. It also contains first subset of unit tests for
rte_security_session_create API function.
Structure of the tests file is following:
- macros for making tests more readable;
- mockup structures and functions for rte_security_ops;
- test suite and test cases setup and teardown functions;
- tests functions;
- declaration of testcases.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:53 +0000 (19:24 +0200)]
test: remove redundant macro
Remove RTE_TEST_TRACE_FAILURE macro definition from app/test/test.h
as it might be already defined and cause build problems.
Also it is good to leave the decision of additional logs to the final
user of test.h and rte_test.h
Fixes:
5afc521eac6a ("eal: add test assert macros")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:52 +0000 (19:24 +0200)]
security: fix session counter
Fix session counter to be decreased in rte_security_session_destroy
only when session was successfully destroyed.
Formerly session counter was decreased prior session destroying
and returning session object to mempool. It remained decreased even
if session was not destroyed and mempool object released making counter
invalid.
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:51 +0000 (19:24 +0200)]
security: fix return types in documentation
Enhance returned values description for rte_security_session_destroy
and some other minor description changes.
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Lukasz Wojciechowski [Thu, 9 Apr 2020 17:24:50 +0000 (19:24 +0200)]
security: fix verification of parameters
This patch adds verification of the parameters to the ret_security API
functions. All required parameters are checked if they are not NULL.
Checks verify full chain of pointers, e.g. in case of verification of
"instance->ops->session_XXX", they check also "instance"
and "instance->ops".
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Fixes:
1a08c379b9b5 ("security: support user data retrieval")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Tue, 14 Apr 2020 17:25:55 +0000 (18:25 +0100)]
crypto/openssl: fix out-of-place encryption
When authenticating after encrypting, if the operation
is out-of-place, the destination buffer is the one
that will get authenticated.
If the cipher offset is higher than the authentication
offset, it means that part of the text to authenticate
will be plaintext, so this needs to get copied to the
destination buffer, or the result will be incorrect.
Fixes:
d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Konstantin Ananyev [Fri, 17 Apr 2020 15:03:49 +0000 (16:03 +0100)]
test/crypto: add CPU crypto mode for AESNI MB
This patch adds ability to run unit tests in cpu crypto mode
for AESNI MB cryptodev.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Konstantin Ananyev [Fri, 17 Apr 2020 15:03:48 +0000 (16:03 +0100)]
crypto/aesni_mb: support CPU crypto
Add support for CPU crypto mode by introducing required handler.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Praveen Shetty [Thu, 16 Apr 2020 16:47:29 +0000 (17:47 +0100)]
examples/ipsec-secgw: support flow director
Support load distribution in security gateway application using
NIC load distribution feature (Flow Director).
Flow Director is used to redirect the specified inbound ipsec flow
to a specified queue. This is achieved by extending the SA rule syntax
to support specification by adding new action_type of <flow-direction>
to a specified <port_id> <queue_id>.
Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Thu, 16 Apr 2020 17:12:46 +0000 (18:12 +0100)]
test/crypto: fix flag check
An incorrect flag check was done, using "&&" instead of "&".
Fixes:
2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Mairtin o Loingsigh [Wed, 15 Apr 2020 11:51:35 +0000 (12:51 +0100)]
crypto/aesni_mb: support DOCSIS AES-256
This patch adds support for DOCSIS AES-256 when using AESNI-MB
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>