Zhihong Wang [Tue, 14 Jun 2016 23:08:03 +0000 (19:08 -0400)]
app/testpmd: add tx_first burst number option
This patch enables configurable tx_first burst number.
Use "start tx_first (burst_num)" to specify how many bursts of packets to
be sent before forwarding start, or "start tx_first" like before for the
default 1 burst send.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Zhihong Wang [Tue, 14 Jun 2016 23:08:02 +0000 (19:08 -0400)]
app/testpmd: add retry option
This patch adds retry option in testpmd to prevent most packet losses.
It can be enabled by "set fwd <mode> retry". All modes except rxonly
support this option.
Adding retry mechanism expands test case coverage to support scenarios
where packet loss affects test results.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:42 +0000 (16:35 +0100)]
app/testpmd: stop forwarding on exit
Stop forwarding on exit whether all ports are started or not.
Fixes:
ce8d561418d4 ("app/testpmd: add port configuration settings")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:41 +0000 (16:35 +0100)]
app/testpmd: check for valid mbuf pool
Fixes:
b6ea6408fbc7 ("ethdev: store numa_node per device")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:40 +0000 (16:35 +0100)]
app/testpmd: check for valid socket id when attaching port
Fixes:
edab33b1c01d ("app/testpmd: support port hotplug")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:39 +0000 (16:35 +0100)]
app/testpmd: move forward streams initialisation
Move call to init_fwd_streams from start_port function
to start_packet_forwarding function.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:37 +0000 (16:35 +0100)]
app/testpmd: separate forward config setup from display
Add call to fwd_config_setup to init_config.
Add call to fwd_config_setup for corelist, coremask and nbcore setup.
Add call to fwd_config_setup for portlist, portmask and nbport setup.
Add call to fwd_config_setup for rxq, txq, rxd and txd setup.
Remove fwd_config_setup from fwd_config_display.
Call the pkt_fwd_config_display function directly,
and remove the fwd_config_display wrapper function.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:38 +0000 (16:35 +0100)]
app/testpmd: check stopping port is not in bonding
Add new function port_is_bonding_slave
Use this function in stop_port and close_port functions.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:36 +0000 (16:35 +0100)]
app/testpmd: check stopping port is not forwarding
Add calls to port_is_forwarding function in stop_port and
close_port functions to check that port is not forwarding.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Bernard Iremonger [Tue, 14 Jun 2016 15:35:35 +0000 (16:35 +0100)]
app/testpmd: do not update forwarding config
Do not update forwarding configuration when attaching or detaching a port
Remove checks on test_done variable.
Remove code to update forwarding configuration.
Fixes:
edab33b1c01d ("app/testpmd: support port hotplug")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Olivier Matz [Tue, 17 May 2016 09:59:52 +0000 (11:59 +0200)]
config: enable virtio for ppc64
Now that virtio pmd is supported on ppc, enable it.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Tue, 17 May 2016 09:59:51 +0000 (11:59 +0200)]
virtio: fix PCI accesses for ppc64 in legacy mode
Although ppc supports both endianesses, qemu supposes that the cpu is
big endian and enforces this for the virtio-net stuff.
Fix PCI accesses in legacy mode. Only ppc64le is supported at the moment.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Wed, 18 May 2016 16:27:30 +0000 (18:27 +0200)]
pci: mmap ioports on non-x86 Linux
On PPC64, the ioports are mapped in memory. Implement the missing part
of ioport API for PPC64 when using uio. This may also work on other
architectures but it has not been tested.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 17 May 2016 09:59:49 +0000 (11:59 +0200)]
pci: split function parsing resources in sysfs
Split pci_parse_sysfs_resource() and introduce
pci_parse_one_sysfs_resource() that parses one line of sysfs resource
file.
This new function will be exported and used in next commits when
mapping the ioports resources.
No functional change.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 17 May 2016 09:59:48 +0000 (11:59 +0200)]
pci: remove invalid comment
In a previous commit, the file used to map the PCI resources changed
from "/dev/uio<x>" to "/sys/bus/pci/devices/<busaddr>/resource", making
the comment wrong. Remove it.
Fixes:
9e67561acd1a ("eal/linux: mmap uio resources using resourceX files")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 17 May 2016 09:59:47 +0000 (11:59 +0200)]
eal/linux: only call iopl on x86
From iopl(2) man page: "This call is mostly for the x86 architecture. On
many other architectures it does not exist or will always return an
error".
This patch removes the call to iopl() in rte_eal_iopl_init() for
architectures other than x86, and always return 0 (success). This was
already done for ARM in
commit
0291476ae364 ("eal/linux: never check iopl for arm")
Next patches will introduce the support of memory mapped IO resources
for architectures != x86.
On BSD, there is nothing to do as open("/dev/io") already does the
proper thing. See man IO(4).
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 17 May 2016 09:59:46 +0000 (11:59 +0200)]
pci: fix typos in ioport doxygen comments
Fix some typos and add missing comments related to ioports API in
rte_pci.h.
Fixes:
756ce64b1 ("eal: introduce PCI ioport API")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Wed, 15 Jun 2016 11:48:07 +0000 (13:48 +0200)]
mbuf: add new Rx flags for stripped VLAN
The behavior of PKT_RX_VLAN_PKT was not very well defined, resulting in
PMDs not advertising the same flags in similar conditions.
Following discussion in [1], introduce 2 new flags PKT_RX_VLAN_STRIPPED
and PKT_RX_QINQ_STRIPPED that are better defined:
PKT_RX_VLAN_STRIPPED: a vlan has been stripped by the hardware and its
tci is saved in mbuf->vlan_tci. This can only happen if vlan stripping
is enabled in the RX configuration of the PMD.
For now, the old flag PKT_RX_VLAN_PKT is kept but marked as deprecated.
It should be removed from applications and PMDs in a future revision.
This patch also updates the drivers. For PKT_RX_VLAN_PKT:
- e1000, enic, i40e, mlx5, nfp, vmxnet3: done, PKT_RX_VLAN_PKT already
had the same meaning than PKT_RX_VLAN_STRIPPED, minor update is
required.
- fm10k: done, PKT_RX_VLAN_PKT already had the same meaning than
PKT_RX_VLAN_STRIPPED, and vlan stripping is always enabled on fm10k.
- ixgbe: modification done (vector and normal), the old flag was set
when a vlan was recognized, even if vlan stripping was disabled.
- the other drivers do not support vlan stripping.
For PKT_RX_QINQ_PKT, it was only supported on i40e, and the behavior was
already correct, so we can reuse the same bit value for
PKT_RX_QINQ_STRIPPED.
[1] http://dpdk.org/ml/archives/dev/2016-April/037837.html,
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Mon, 13 Jun 2016 13:45:28 +0000 (15:45 +0200)]
ethdev: clarify the origin of mbufs
Following the discussion on dpdk-users [1], enhance the API
documentation of rte_eth_tx_burst() to specify that the mbufs have to be
allocated from a pool.
[1] http://dpdk.org/ml/archives/users/2016-June/000618.html
Reported-by: Xiaoban Wu <xiaoban_wu@student.uml.edu>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 13 Jun 2016 09:43:03 +0000 (11:43 +0200)]
examples: fix duplicated lpm6 name
When starting the ip_fragmentation or ip_reassembly example
on several sockets, it fails.
The name of the lpm6 table is the same on every socket,
resulting in a table creation failure (-EEXIST). The failure
appeared after:
commit
f82f705b635d ("lpm: fix allocation of an existing object")
Indeed, before this commit the returned value when the existing
table, which was probably a bug in that case: one table for 2
sockets for lpm6, and one per socket for lpm.
Fixes:
74de12b7b63a ("examples/ip_fragmentation: overhaul")
Fixes:
b84fb4cb88ff ("examples/ip_reassembly: overhaul")
Reported-by: Heng Ding <hengx.ding@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Zhihong Wang [Wed, 25 May 2016 01:23:03 +0000 (21:23 -0400)]
eal/x86: improve memcpy performance
This patch fixes rte_memcpy performance in Haswell and Broadwell for
vhost when copy size larger than 256 bytes.
It is observed that for large copies like 1024/1518 ones, rte_memcpy
suffers high ratio of store buffer full issue which causes pipeline
to stall in scenarios like vhost enqueue. This can be alleviated by
adjusting instruction layout. Note that this issue may not be visible
in micro test.
How to reproduce?
PHY-VM-PHY using vhost/virtio or vhost/virtio loop back, with large
packets like 1024/1518 bytes ones. Make sure packet generation rate
is not the bottleneck if PHY-VM-PHY is used.
Test report: http://dpdk.org/ml/archives/dev/2016-May/039716.html
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Sergio Gonzalez Monroy [Thu, 9 Jun 2016 08:19:47 +0000 (09:19 +0100)]
mempool: fix local cache initialization
The mempool local cache was not initialized properly leading to
undefined behavior in cases where the allocated memory was used
previously and left with data.
Fixes:
213af31e0960 ("mempool: reduce structure size if no cache needed")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Jan Viktorin [Tue, 14 Jun 2016 13:46:21 +0000 (15:46 +0200)]
app/test: remove real PCI ids
There are 2 new fake devices for testing PCI infra. All the fake devices
are now identified by non-existing vendor and device IDs so there is no
real driver to bind to them. The testing drivers match those IDs.
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jerin Jacob [Mon, 13 Jun 2016 14:01:32 +0000 (19:31 +0530)]
config: select maximum nodes and cores on ThunderX
ThunderX platform can support dual sockets numa configuration and 48
cores per socket.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Chao Zhu [Wed, 15 Jun 2016 11:38:42 +0000 (19:38 +0800)]
mk: define objcopy target and arch on IBM POWER
This patch defines the target and arch value of objcopy program for
IBM POWER PPC64 little endian architecture.
Fixes:
99d6231fdca7 ("mk: define objcopy-specific target and arch")
Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Guruprasad Mukundarao [Fri, 10 Jun 2016 15:55:05 +0000 (16:55 +0100)]
examples/ip_pipeline: add core mappings script
This script parses the application configuration file and detects all the
pipelines specified therein, and then, it generates all the possible mappings
of those pipelines on the specified CPU core-list.
As a result, each of the possible pipeline-to-core mappings is saved as
separate output configuration file. For example- if input file is
edge_router_downstream.cfg with 3 pipeline (excluding pipeline 0) and
core-list is “1, 2”, following combinations will be generated-
Pipeline 1 Pipeline 2 Pipeline 3
Core = 1 Core = 1 Core = 2
Core = 1 Core = 2 Core = 1
Core = 2 Core = 1 Core = 1
Core = 2 Core = 2 Core = 1
Core = 2 Core = 1 Core = 2
Core = 1 Core = 2 Core = 2
Core = C1 Core = C1H Core = C2
Core = C1 Core = C2 Core = C1H
Core = C2 Core = C1 Core = C1H
This script will help users to analyse the performance of application by
evaluating all the generated configuration files with different
pipelines-to-core mappings and obtaining the application configuration file
with best performance.
To run the script, issue the following command;
./pipeline-to-core-mapping.py -i <input_configuration_file> -pc "s<socket-id>c<core-id>"
Some optional arguments are as follows:
-h, --help show this help message and exit
-ht {ON,OFF}, --hyper-thread {ON,OFF}
enable/disable hyper threading. default is ON
-nO, --no-output-file
disable output config file generation. Output file
generation is enabled by default
Signed-off-by: Guruprasad Mukundarao <guruprasadx.rao@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Sun, 12 Jun 2016 12:42:47 +0000 (13:42 +0100)]
examples/ip_pipeline: fix false cacheline sharing among threads
In ip_pipeline app, the structure app_thread_data needs to be aligned to
the cache line boundary as threads on different cpu cores are accessing
fields of the app->thread_data and having this structure not aligned on
cacheline boundary leads to false cacheline sharing.
Fixes:
7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Marcin Kerlin [Mon, 13 Jun 2016 09:35:48 +0000 (11:35 +0200)]
examples/ip_pipeline: fix null pointer dereference
Return value of function app_pipeline_type_find is not checking before
dereference. Fix this problem by adding checking condition.
Coverity issue: 127196
Fixes:
b4aee0fb9c6d ("examples/ip_pipeline: reconfigure thread binding dynamically")
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Thu, 2 Jun 2016 10:28:10 +0000 (11:28 +0100)]
sched: fix build without red
This commit fixes the following compile error messages when
CONFIG_RTE_SCHED_RED=n and CONFIG_RTE_SCHED_COLLECT_STATS=y;
rte_sched.c: In function ‘rte_sched_port_update_subport_stats_on_drop’:
rte_sched.c:1090:41: error: unused parameter ‘red’
struct rte_mbuf *pkt, uint32_t red)
^
rte_sched.c: In function ‘rte_sched_port_update_queue_stats_on_drop’:
rte_sched.c:1116:39: error: unused parameter ‘red’
struct rte_mbuf *pkt, uint32_t red)
Fixes:
4d51afb5cdb6 ("sched: keep track of RED drops")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Alex Wang [Sat, 21 May 2016 07:58:36 +0000 (00:58 -0700)]
kni: describe mempool capacity requirement
Function like 'rte_kni_rx_burst()' keeps
allocating 'MAX_MBUF_BURST_NUM' mbufs to
kni fifo queue unless the queue's capacity
('KNI_FIFO_COUNT_MAX') is reached. So, if
the mempool is under-provisioned, user may
run into "Out of Memory" logs from KNI code.
This commit documents the need to provision
mempool capacity of more than
"2 x KNI_FIFO_COUNT_MAX" for each KNI interface.
Signed-off-by: Alex Wang <alex@awakenetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Alex Wang [Sat, 21 May 2016 07:58:35 +0000 (00:58 -0700)]
kni: fix inverted function comments
The 'mbufs' alloc/free descriptions for
'rte_kni_tx_burst()' and 'rte_kni_rx_burst()'
should be inverted.
Fixes:
3fc5ca2 ("kni: initial import")
Signed-off-by: Alex Wang <alex@awakenetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jingjing Wu [Mon, 23 May 2016 14:24:54 +0000 (22:24 +0800)]
doc: add known issue in EAL argument parsing
This patch docs the issue on EAL argument that the last EAL
argument is replaced by program name in argv[].
Reported-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Ziye Yang [Tue, 24 May 2016 12:50:36 +0000 (20:50 +0800)]
pci: support class id probing
This patch is used to add the class_id (class_code,
subclass_code, programming_interface) support for
pci_device probe. With this patch, it will be
flexible for users to probe a class of devices
by class_id.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Thomas Monjalon [Tue, 14 Jun 2016 08:51:39 +0000 (10:51 +0200)]
config: make libarchive optional
The commit
66819e6 has introduced a dependency on libarchive to be able
to use some tar resources in the unit tests.
It is now an optional dependency because some systems do not have it
installed.
If CONFIG_RTE_APP_TEST_RESOURCE_TAR is disabled, the PCI test will not
be run. When a "configure" script will be integrated, the libarchive
availability could be checked to automatically enable the option.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>
David Hunt [Thu, 26 May 2016 14:15:54 +0000 (15:15 +0100)]
app/test: fix wraparound of mempool performance rate
Recent CPU's can easily wrap around a 32-bit unsigned int in
the mempool perf test. Increase to a 64-bit uint.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Michal Jastrzebski [Fri, 27 May 2016 15:20:52 +0000 (17:20 +0200)]
app/test: fix bond device name too long
Bond device name was too long (grather than 32 signs) that
cause mempool allocation to fail.
Fixes:
92073ef961ee ("bond: unit tests")
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Tomasz Kulasek [Thu, 9 Jun 2016 11:14:32 +0000 (13:14 +0200)]
app/test: fix array overflow warning with gcc 4.5
app/test/test_cryptodev.c:
In function ‘create_snow3g_cipher_operation_oop.clone.15’:
x86_64-native-linuxapp-gcc/include/rte_memcpy.h:796:14
error: array subscript is above array bounds.
In test_cryptodev.c:
2429 rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
When iv_len is declared as 'unsigned int', rte_memcpy evaluates code for
buffer size bigger than 255, but while 'iv' array is 64 bytes long, it
causes 'above array bounds' warning in gcc 4.5 and breaks compilation.
Using uint8_t as a size of copied block prevents to evaluate in rte_memcpy
code for length bigger than 255, causing the problem.
The root of this issue and solution is the same as for commit
2c007ea10616
("app/test: fix array overflow warning with gcc 4.5")
Fixes:
9727af14b032 ("app/test: add out-of-place symmetric crypto operations")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Tomasz Kantecki [Mon, 13 Jun 2016 10:26:38 +0000 (11:26 +0100)]
app/test: reduce duration of red functional test
'red_autotest' changed to run only functional tests without test #4 which was
taking ~53 seconds. 'red_autotest' takes ~2[s] now.
'red_perf' has been added to run performance tests only).
'red_all' has been added to run all functional tests (including #4) and
perfromance tests. This reflects current 'red_autotest' behavior.
Other changes:
- machine TSC clock frequency detection takes place only once now.
- timeouts and number of iterations in functional tests have been reduced
in order to shorten test duration.
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:45 +0000 (17:07 +0200)]
app/test: do not dump devices in PCI blacklist test
Dumping of devices in a unittest is useless. Instead, test whether
the test has been set up well - i.e. there are no devices.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:44 +0000 (17:07 +0200)]
pci: allow to override sysfs path
The SYSFS_PCI_DEVICES is a constant that makes the PCI testing
difficult as it points to an absolute path. We remove using this
constant and introducing a function pci_get_sysfs_path that gives
the same value. However, the user can pass a SYSFS_PCI_DEVICES env
variable to override the path. It is now possible to create a fake
sysfs hierarchy for testing.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:43 +0000 (17:07 +0200)]
app/test: rename PCI blacklist test case
The current test_pci is just a single test case that tests the
blacklisting of devices. Rename it to test_pci_blacklist and call it
from the test_pci. The setup and cleanup are moved out of the
test_pci_blacklist entirely to cover all other tests.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:42 +0000 (17:07 +0200)]
app/test: extract PCI setup and cleanup functions
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:41 +0000 (17:07 +0200)]
app/test: use linked list to store PCI drivers
The test unregisters all drivers before start. The drivers were stored
into a fixed-sized array. This is inflexible. This patch change this to
utilize a linked list for the same purpose.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:40 +0000 (17:07 +0200)]
app/test: support resources archived by tar
When a more complex resource (a file hierarchy) is needed, packing
every single file as a single resource would be very ineffective. For
that purpose, it is possible to pack the files into a tar archive,
extract it before test from the resource and finally clean up all the
created files.
This patch introduces functions resource_untar and resource_rm_by_tar
to perform those tasks. An example of using those functions is included
as a test.
A new dependency is required to build the app/test: libarchive.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:39 +0000 (17:07 +0200)]
app/test: create files from resources
A resource can be written into the target filesystem by calling
resource_fwrite or resource_fwrite_file. Such file can be created
before a test is started and removed after the test finishes.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:38 +0000 (17:07 +0200)]
app/test: support resources externally linked
To include resources from other source that the C source code we
can take advantage of the objcopy behaviour, i.e. packing of an
arbitrary file as an object file that is linked to the target program.
A linked object file is always accessible as a pair
extern const char beg_<name>;
extern const char end_<name>;
(extern const char siz_<name>;)
A unit test that packs the resource.c source file is included.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:36 +0000 (17:07 +0200)]
app/test: introduce resources for tests
Certain internal mechanisms of DPDK access different file system
structures (e.g. /sys/bus/pci/devices). It is difficult to test
those cases automatically by a unit test when such path is not
hard-coded and there is no simple way how to distribute fake ones
with the current testing environment.
This patch adds a possibility to declare a resource embedded in
the test binary itself. The structure resource cover the generic
situation - it provides a name for lookup and pointers to the
embedded data blob. A resource is registered in a constructor by
the macro REGISTER_RESOURCE.
Some initial tests of simple resources is included and added into
the group_1.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Jan Viktorin [Mon, 13 Jun 2016 15:07:37 +0000 (17:07 +0200)]
mk: define objcopy-specific target and arch
The program objcopy uses non-standard conventions to name the
target and arch. Define the values for supported architectures
(tile and ppc_64 are missing).
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Christian Ehrhardt [Mon, 13 Jun 2016 11:06:57 +0000 (13:06 +0200)]
mk: fix missing internal dependencies
This patch adds missing DEPDIRS to avoid any library referring to
symbols they are not linked against.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Christian Ehrhardt [Mon, 13 Jun 2016 11:06:56 +0000 (13:06 +0200)]
mk: fix vhost dependency to pthread
Add the missing external dependency to pthread to avoid referring to
symbols the library is not linked against.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Ferruh Yigit [Fri, 10 Jun 2016 13:19:09 +0000 (15:19 +0200)]
mk: reduce scope of whole-archive static linking
The --whole-archive argument is only required for plugins (drivers)
and libraries used by these plugins.
Currently it covers all libraries.
Reducing the scope of this argument slightly reduce final application size
when statically linked.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Fri, 10 Jun 2016 13:19:08 +0000 (15:19 +0200)]
mk: sort libraries in level order when linking
As stated in the comment:
Order is important: from higher level to lower level
This is an attempt to make the layering order better respected.
It will help to restrict the --whole-archive scope for plugins.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Ferruh Yigit [Fri, 10 Jun 2016 13:19:07 +0000 (15:19 +0200)]
mk: prevent overlinking in applications
Replace --no-as-needed linker flag with --as-needed flag, which will
only link libraries directly called by application.
It can be achieved now that the libraries dependencies are handled
properly.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Fri, 10 Jun 2016 13:19:06 +0000 (15:19 +0200)]
mk: remove library grouping during application linking
>From "man ld":
Using this option has a significant performance cost.
It is best to use it only when there are unavoidable
circular references between two or more archives.
Remove the option since it does not seem necessary.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Fri, 10 Jun 2016 13:19:05 +0000 (15:19 +0200)]
mk: fix driver dependencies order for static application
On a linker command line, the dependencies must be declared after
the libraries using them.
It will avoid some issues when building an application with static
libraries and --as-needed option.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Thomas Monjalon [Fri, 10 Jun 2016 13:19:04 +0000 (15:19 +0200)]
mk: sort drivers in static application link list
Just a clean up to prepare next patches.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Panu Matilainen [Mon, 23 May 2016 05:53:33 +0000 (08:53 +0300)]
mk: fix install with tar 1.29
--exclude became a positional option in tar 1.29, breaking the
test app filtering in "make install", causing .map files and all test
apps to get installed in bindir. Adjust the tar arguments accordingly,
this is compatible with older versions too since they do not care about
the order.
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=
1337864
Fixes:
6b62a72a70d0 ("mk: install a standard cutomizable tree")
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Thomas Monjalon [Thu, 9 Jun 2016 14:40:01 +0000 (16:40 +0200)]
eal: remove useless includes of mempool and ring
The libraries rte_mempool and rte_ring are not used in EAL,
except for the ivshmem part (CONFIG_RTE_LIBRTE_IVSHMEM).
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Thomas Monjalon [Thu, 9 Jun 2016 13:49:48 +0000 (15:49 +0200)]
log: deprecate history dump
The log history uses rte_mempool. In order to remove the mempool
dependency in EAL (and improve the build), this feature is deprecated.
The ABI is kept but the behaviour is now voided because it seems this
function was not used. The history can be read from syslog.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Panu Matilainen [Tue, 7 Jun 2016 10:01:54 +0000 (13:01 +0300)]
mk: generate internal library dependencies
Up to now dependencies between DPDK internal libraries have been
untracked at shared library level, requiring applications to know
about library internal dependencies and often consequently overlinking.
Since the dependencies are already recorded for build ordering in the
makefiles with DEPDIRS-y we can use that information to generate LDLIBS
entries for internal libraries automatically.
Also revert commit
8180554d82b3 ("vhost: fix linkage of driver with
library") which is made redundant by this change.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
John McNamara [Fri, 20 May 2016 14:08:39 +0000 (15:08 +0100)]
doc: fix code section in versioning guide
Fix broken console directive in the ABI validator section of the
ABI versioning docs.
Fixes:
f1ef9794f9bd ("doc: add ABI guidelines")
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Mauricio Vasquez B [Tue, 7 Jun 2016 08:48:53 +0000 (10:48 +0200)]
doc: fix testpmd commands for flow director
A previous patch modified the CLIs witout updating the examples.
Fixes:
53b2bb9b7ea7 ("app/testpmd: new flow director commands")
Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Pablo de Lara [Wed, 8 Jun 2016 15:40:17 +0000 (16:40 +0100)]
doc: clarify port hotplug in testpmd
Port needs to be stopped and then closed before it can be detached,
but the documentation was only saying to close the port.
Also, both sections for port detaching and attaching has been reformatted
slightly, to show clearly how to use the commands.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pablo de Lara [Wed, 8 Jun 2016 15:20:31 +0000 (16:20 +0100)]
app/testpmd: fix typo when closing port
Fixes:
ce8d561418d4 ("app/testpmd: add port configuration settings")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jerin Jacob [Tue, 3 May 2016 14:07:45 +0000 (19:37 +0530)]
app/testpmd: prefetch data in the forwarding loop
prefetch the next packet data address in advance in forwarding loop
for performance improvement.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Olivier Matz [Mon, 30 May 2016 12:04:17 +0000 (14:04 +0200)]
app/testpmd: log mbuf pool creation
Enhance the logs related to mbuf pool creation. Display an info level
log when creating the mbuf, and display the error as a string on failure.
After the patch, we have:
[...]
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=331456, \
size=2176, socket=0
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate \
memory
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Maciej Czekaj [Fri, 22 Apr 2016 14:51:20 +0000 (16:51 +0200)]
app/testpmd: add Tx flags in config command
"port config all txqflags <value>" allows for
specifying txq_flags value in command line.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Maciej Czekaj [Fri, 22 Apr 2016 14:51:19 +0000 (16:51 +0200)]
app/testpmd: add scatter enabling in config command
"port config all scatter on|off" allows for
controlling rxmode.enable_scatter in command line.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Maciej Czekaj [Fri, 22 Apr 2016 14:51:18 +0000 (16:51 +0200)]
app/testpmd: add scatter enabling option
This parameter allows for controlling rxmode.enable_scatter
which in turn allow for multi-segment packet receive tests.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Piotr Azarewicz [Mon, 23 May 2016 12:19:56 +0000 (14:19 +0200)]
examples/quota_watermark: fix memory overflow
qw app at its init stage reserve 2*sizeof(int) memory space for quota
and low_watermark shared variables, but both apps (qw and qwctl) assign
wrong address for low_watermark pointer (out of reserved memzone space)
due to wrong pointer arithmetic.
CID 30709 : Extra sizeof expression (SIZEOF_MISMATCH)
suspicious_pointer_arithmetic: Adding 4UL /* sizeof (int) */ to pointer
(unsigned int *)(*qw_memzone).addr of type unsigned int * is suspicious
because adding an integral value to this pointer automatically scales
that value by the size, 4 bytes, of the pointed-to type, unsigned int.
Most likely, sizeof (int) is extraneous and should be replaced with 1.
Coverity issue: 30709
Fixes:
1d6c3ee3321a ("examples/quota_watermark: initial import")
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Tomasz Kulasek [Fri, 29 Apr 2016 16:30:24 +0000 (18:30 +0200)]
examples/performance-thread: fix size of destination port ids
After extending IPv4 next hop in lpm library, size of dst_port array was
changed from 16 to 32 bits in l3fwd-thread example, without modification
of the rest of path written for 16 bit value.
This patch uses similar approach for fix, like in commit
8353a36a9b4b
("examples/l3fwd: fix size of destination port ids"), restoring 16 bit size
for destination port ids and doing necessary conversion from 32 to 16 bit
after lpm_lookupx4.
Fixes:
dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Tomasz Kulasek [Fri, 29 Apr 2016 16:30:56 +0000 (18:30 +0200)]
examples/performance-thread: fix destination port
This fixes wrong logic in get_dst_port() on lpm path causing unpredictable
return value when ipv4/ipv6 lookup success (return with no value).
Fixes:
dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Jan Viktorin [Tue, 26 Apr 2016 11:30:59 +0000 (13:30 +0200)]
examples/l3fwd: report error when no vector engine available
If no SSE nor NEON are available the l3fwd should complain loudly
to quickly find out the reason.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Rami Rosen [Thu, 21 Apr 2016 18:16:47 +0000 (21:16 +0300)]
examples/l2fwd-jobstats: fix a typo
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Jerin Jacob [Tue, 19 Apr 2016 09:35:28 +0000 (15:05 +0530)]
examples/l2fwd: increase mempool cache size for performance
l3fwd sets the mempool cache size to 256, selected the same value for l2fwd
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Jerin Jacob [Tue, 19 Apr 2016 09:35:27 +0000 (15:05 +0530)]
examples/l2fwd: remove hardcoded cycles per second
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Jasvinder Singh [Wed, 1 Jun 2016 14:01:02 +0000 (15:01 +0100)]
examples/ip_pipeline: add sample configs for various layers
The sample configuration file demonstrates that network layer components such
as TCP, UDP, ICMP etc, can be easily integrated into ip pipeline infrastructure.
Similarily, various other functionalities such as IP Reassembly for input
traffic with local destination and IP Fragmentation to enforce the MTU for
the routed output traffic, can be added using SWQs enabled with
reassembly and fragmentation features.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Wed, 1 Jun 2016 14:01:01 +0000 (15:01 +0100)]
examples/ip_pipeline: update routes when ports state change
The routing pipeline registers a callback function with the nic ports and
this function is invoked for updating the routing entries (corresponding to
local host and directly attached network) tables whenever the nic ports
change their states (up/down).
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Wed, 1 Jun 2016 14:01:00 +0000 (15:01 +0100)]
examples/ip_pipeline: assign MAC address to routing ports
As a result of tracking, output ports of routing pipelines are linked with
physical nic ports (potentially through other pipeline instances).
Thus, the mac addresses of the NIC ports are assigned to routing pipeline
out ports which are connected to them and are further used in routing table
entries instead of hardcoded default values.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Wed, 1 Jun 2016 14:00:59 +0000 (15:00 +0100)]
examples/ip_pipeline: link routing output ports to devices
This commit implements tracking mechanism for linking routing pipeline
output ports to physical NIC ports.
Once all the pipelines of the application are initialised, mechanism is
invoked during post initialisation phase for relating routing pipeline
output with NIC ports by navigating through the intermediate pipelines,
if present.
The tracking functions of the pipelines which help in navigating through
the intermediate pipelines are moved from pipeline_<pipeline_name>_be.c
to pipeline_<pipeline_name>.c. All pipelines except passthrough pipelines
use default tracking function (pipeline/pipeline_common_fe.c).
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Wed, 1 Jun 2016 14:00:58 +0000 (15:00 +0100)]
examples/ip_pipeline: increase constants
To allow more queues, pipeline types, threads, source/sink ports,etc., in
the ip pipeline application, larger values of macros are set.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Mon, 30 May 2016 17:14:49 +0000 (18:14 +0100)]
examples/ip_pipeline: support RSS
This patch enables rss (receive side scaling) per network interface
through the configuration file. The user can specify following
parameters in LINK section for enabling the rss feature - rss_qs,
rss_proto_ipv4, rss_proto_ipv6 and ip_proto_l2.
The "rss_qs" is mandatory parameter which indicates the queues to be
used for rss, while rest of the parameters are optional. When optional
parameters are not provided in the configuration file, default setting
(ETH_RSS_IPV4 | ETH_RSS_IPV6) is assumed for "rss_hf" field of the
rss_conf structure.
For example, following configuration can be applied for using the rss
on port 0 of the network interface;
[PIPELINE0]
type = MASTER
core = 0
[LINK0]
rss_qs = 0 1
[PIPELINE1]
type = PASS-THROUGH
core = 1
pktq_in = RXQ0.0 RXQ0.1 RXQ1.0
pktq_out = TXQ0.0 TXQ1.0 TXQ0.1
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Wed, 8 Jun 2016 16:30:56 +0000 (17:30 +0100)]
examples/ip_pipeline: clean up configuration parser
This commit adds following changes to configuration file parsing of
the ip pipeline application;
1. Parsing routines related to packet queues (pktq_in/out fields in the
PIPELINE section) and message queues (msgq_in/out fields of in the MSGQ
Section) are updated.
In the parsing routines, function "strtok_r()" is used for parsing the
string instead of manually checking the string termination, white
spaces, tabs etc., between the string tokens. Each call to strtok_r()
returns a pointer to a null-terminated string containing the next token.
If no more tokens are found, strtok_r() returns NULL. As a result of
using strtok_r(), the code size of the parsing routines is reduced
significantly.
2. Replace PARSER_PARAM_ADD_CHECK macro by more specific macros such as
PARSE_CHECK_DUPLICATE_SECTION, PARSE_CHECK_DUPLICATE_SECTION_EAL to detect
duplicate entries in the various sections of the configuration file
3. Add new macros PARSER_ERROR_NO_ELEMENTS and PARSE_ERROR_TOO_MANY_ELEMENTS
for detecting no element and more elements than allowed situations
respectively, in the section entry.
4. Add new macros APP_PARAM_ADD_LINK_FOR_RXQ, APP_PARAM_ADD_LINK_FOR_TXQ
and APP_PARAM_ADD_LINK_FOR_TM which add corresponding nic ports entry to
the application param structure while parsing rx/tx queues, TM (Traffic
Manager) port sections and pktq_in/out entries of pipeline sections
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 8 Jun 2016 10:35:25 +0000 (12:35 +0200)]
examples/ip_pipeline: update edge router use case
Update edge router usecase config files to use bulk commands.
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 8 Jun 2016 10:35:24 +0000 (12:35 +0200)]
examples/ip_pipeline: rework routing CLI
Several routing commands are merged into two commands:
route and arp - these two commands are handled by cli library.
Rest of the commands are handled internaly by the pipeline code.
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 8 Jun 2016 10:35:23 +0000 (12:35 +0200)]
examples/ip_pipeline: rework flow action CLI
All commands merged into one: cmd_action_parsed.
modified bulk command:
action flow bulk
File line format:
flow <flow ID>
meter 0 <cir> <pir> <cbs> <pbs> meter 1 <cir> <pir> <cbs> <pbs> meter 2
<cir> <pir> <cbs> <pbs> meter 3 <cir> <pir> <cbs> <pbs>
policer 0 <action> <action> <action> policer 1 <action> <action>
<action> policer 2 <action> <action> <action> policer 3 <action>
<action> <action>
port <port ID>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tomasz Kulasek [Wed, 8 Jun 2016 10:35:22 +0000 (12:35 +0200)]
examples/ip_pipeline: rework flow classification CLI
This patch modifies flow classifications pipeline command line
interface. All commands are merged into one cmd_fc_parsed.
Additionally a classification for ipv6, ipv4 and qinq can be added from
configuration file.
1. flow add qinq bulk
File line format:
qinq <svlan> <cvlan> port <port ID> id <flow ID>
File line example:
qinq 1 2 port 3 id 0
2. flow add ipv4 bulk
File line format:
ipv4 <sipaddr> <dipaddr> <sport> <dport> <proto> port <port ID> id
<flowID>
File line example:
ipv4 1.2.3.4 10.20.30.40 63 127 6 port 2 id 999
3. flow add ipv6 bulk
File line format:
ipv6 <sipaddr> <dipaddr> <sport> <dport> <proto> port <port ID> id
<flowID>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Daniel Mrzyglod [Wed, 8 Jun 2016 10:35:21 +0000 (12:35 +0200)]
examples/ip_pipeline: rework firewall CLI
Each command are merged into one: cmd_firewall_parsed.
ADD command format is changed:
p <pipeline ID> firewall add priority <priority> ipv4 <sipaddr>
<sipdepth> <dipaddr> <dipdepth> <sport0> <sport1> <dport0> <dport1>
<proto> <protomask> port <port ID>
and bulk command was modified:
1. firewall add bulk
File line format:
priority <priority> ipv4 <sipaddr> <sipdepth> <dipaddr> <dipdepth>
<sport0> <sport1> <dport0> <dport1> <proto> <protomask> port <port ID>
(protomask is a hex value)
File line example:
priority 0 ipv4 1.2.3.0 24 10.20.30.40 32 0 63 64 127 6 0xF port 3
2. firewall del bulk
File line format:
ipv4 <sipaddr> <sipdepth> <dipaddr> <dipdepth> <sport0> <sport1>
<dport0> <dport1> <proto> <protomask>
File line example:
ipv4 1.2.3.0 24 10.20.30.40 32 0 63 64 127 6 0xF
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tomasz Kulasek [Wed, 8 Jun 2016 10:35:20 +0000 (12:35 +0200)]
examples/ip_pipeline: rework common CLI
All link commands are merged into one command:
cmd_link_parsed.
Improve run command to allow run periodically.
Adding static keyword to a lot of token declarations.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Piotr Azarewicz [Wed, 8 Jun 2016 10:35:19 +0000 (12:35 +0200)]
examples/ip_pipeline: add string parsing helpers
Add a couple of additional functions that will allow to parse many types
of input parameters, i.e.: bool, 16, 32, 64 bits, hex, etc.
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Fan Zhang [Tue, 17 May 2016 16:02:10 +0000 (17:02 +0100)]
examples/ip_pipeline: fix null packet in source port
This patch fixes the NULL packet processing problem. Originally,
pipeline's write attempt to NULL packets generated by source
port may crash the application.
This patch fixes the problem by enforcing each source port
defined in cfg file containing a user specified or default pcap
file path.
Fixes:
0e1e7d53 ("examples/ip_pipeline: add pcap file source")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jasvinder Singh [Thu, 19 May 2016 14:35:08 +0000 (15:35 +0100)]
table: remove unnecessary acl dump
Removes rte_acl_dump() call from rte_table_acl_build () as it invokes
number of printf messages.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Pablo de Lara [Tue, 12 Apr 2016 10:04:03 +0000 (11:04 +0100)]
examples/l2fwd-crypto: fix supported key size check
When initializing crypto devices within the app,
the provided key sizes are checked against the supported
sizes from the crypto device capabilities.
When the supported sizes are not a range, but a single value,
the check may become an infinite loop (when size is not supported).
Fixes:
a061e50a0d97 ("examples/l2fwd-crypto: fix ambiguous input key size")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
Fan Zhang [Wed, 25 May 2016 09:00:15 +0000 (10:00 +0100)]
doc: fix l2fwd-crypto sample command
Corrected a typo in application name.
Corrected authentication algorithm to fit the sample 16-byte
authentication key.
Fixes:
ba7b86b1 ("doc: add l2fwd-crypto sample app guide")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Fan Zhang [Wed, 25 May 2016 09:00:45 +0000 (10:00 +0100)]
examples/l2fwd-crypto: enable AES-XCBC-MAC authentication algo
This patch enables AES-XCBC-MAC authentication algorithm support to
l2fwd-crypto sample application.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Fan Zhang [Fri, 3 Jun 2016 10:11:59 +0000 (11:11 +0100)]
examples/l2fwd-crypto: enable AES-CTR cipher algorithm
This patch enables AES counter mode algorithm support to l2fwd-crypto
sample application.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Fri, 3 Jun 2016 10:11:57 +0000 (11:11 +0100)]
aesni_mb: add AES-CTR
This patch provides counter mode support to AES-NI multi-buffer library.
The following cipher algorithm is enabled:
- RTE_CRYPTO_CIPHER_AES_CTR
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Arek Kusztal [Fri, 6 May 2016 10:22:16 +0000 (11:22 +0100)]
app/test: add AES-CTR
Added tests cases for AES working in counter mode.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Arek Kusztal [Fri, 6 May 2016 10:22:15 +0000 (11:22 +0100)]
qat: add AES-CTR capability
Added possibility for AES to work in counter mode
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Arek Kusztal [Tue, 7 Jun 2016 16:58:14 +0000 (17:58 +0100)]
qat: set default optimization level
Changed to -O3 optimization flag in Intel QuickAssist Technology Makefile.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>