Commit Graph

4658 Commits

Author SHA1 Message Date
Jan Viktorin
4beab17005 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>
2016-06-13 21:08:48 +02:00
Jan Viktorin
53c3c30c11 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>
2016-06-13 21:08:48 +02:00
Jan Viktorin
ceabf73721 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>
2016-06-13 20:58:03 +02:00
Jan Viktorin
4090205953 app/test: extract PCI setup and cleanup functions
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:57:28 +02:00
Jan Viktorin
56a6e9c457 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>
2016-06-13 20:57:15 +02:00
Jan Viktorin
66819e6c11 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>
2016-06-13 20:57:06 +02:00
Jan Viktorin
115cc1150d 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>
2016-06-13 20:56:53 +02:00
Jan Viktorin
ab64f5df80 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>
2016-06-13 20:56:48 +02:00
Jan Viktorin
fe6923cbfd 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>
2016-06-13 20:56:42 +02:00
Jan Viktorin
99d6231fdc 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>
2016-06-13 20:56:09 +02:00
Christian Ehrhardt
6cbf4f75e0 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>
2016-06-13 16:17:56 +02:00
Christian Ehrhardt
473b718f70 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>
2016-06-13 16:17:31 +02:00
Ferruh Yigit
95dc3c3cf3 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>
2016-06-13 16:11:29 +02:00
Thomas Monjalon
ce18c527d4 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>
2016-06-13 16:10:44 +02:00
Ferruh Yigit
6248e442ee 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>
2016-06-13 16:09:58 +02:00
Thomas Monjalon
4e04fd459c 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>
2016-06-13 16:09:05 +02:00
Thomas Monjalon
ea4698938e 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>
2016-06-13 16:08:19 +02:00
Thomas Monjalon
cb8e39da1b 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>
2016-06-13 16:07:33 +02:00
Panu Matilainen
dd9ae4c7b3 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: 6b62a72a70 ("mk: install a standard cutomizable tree")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-06-10 17:23:39 +02:00
Thomas Monjalon
3037e5e268 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>
2016-06-10 15:09:04 +02:00
Thomas Monjalon
a3f34a98b7 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>
2016-06-10 15:08:57 +02:00
Panu Matilainen
bf5a46fa59 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 8180554d82 ("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>
2016-06-09 11:30:46 +02:00
John McNamara
b3c64b7de8 doc: fix code section in versioning guide
Fix broken console directive in the ABI validator section of the
ABI versioning docs.

Fixes: f1ef9794f9 ("doc: add ABI guidelines")

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2016-06-08 22:38:53 +02:00
Mauricio Vasquez B
190c878a0d doc: fix testpmd commands for flow director
A previous patch modified the CLIs witout updating the examples.

Fixes: 53b2bb9b7e ("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>
2016-06-08 22:38:53 +02:00
Pablo de Lara
4cd69cc855 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>
2016-06-08 22:38:53 +02:00
Pablo de Lara
b38bb262a4 app/testpmd: fix typo when closing port
Fixes: ce8d561418 ("app/testpmd: add port configuration settings")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:53 +02:00
Jerin Jacob
7fdb263bbb 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>
2016-06-08 22:38:53 +02:00
Olivier Matz
d1eb542e05 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>
2016-06-08 22:38:53 +02:00
Maciej Czekaj
faac4bff87 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>
2016-06-08 22:38:53 +02:00
Maciej Czekaj
7903072cac 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>
2016-06-08 22:38:52 +02:00
Maciej Czekaj
0499793854 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>
2016-06-08 22:38:52 +02:00
Piotr Azarewicz
66888a37ff 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: 1d6c3ee332 ("examples/quota_watermark: initial import")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
2016-06-08 22:38:52 +02:00
Tomasz Kulasek
c714211398 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 8353a36a9b
("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: dc81ebbaca ("lpm: extend IPv4 next hop field")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2016-06-08 22:38:52 +02:00
Tomasz Kulasek
6b90b6798e 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: dc81ebbaca ("lpm: extend IPv4 next hop field")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2016-06-08 22:38:52 +02:00
Jan Viktorin
f8ed6a2dc2 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>
2016-06-08 22:38:52 +02:00
Rami Rosen
9de6337d29 examples/l2fwd-jobstats: fix a typo
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2016-06-08 22:38:52 +02:00
Jerin Jacob
b3e4d4e3b9 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>
2016-06-08 22:38:52 +02:00
Jerin Jacob
2412742cf6 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>
2016-06-08 22:38:52 +02:00
Jasvinder Singh
65067473d0 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>
2016-06-08 21:40:38 +02:00
Jasvinder Singh
5a522263b5 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>
2016-06-08 21:40:38 +02:00
Jasvinder Singh
1f277fa81a 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>
2016-06-08 21:39:13 +02:00
Jasvinder Singh
760064838e 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>
2016-06-08 21:36:04 +02:00
Jasvinder Singh
32af1f421a 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>
2016-06-08 21:35:36 +02:00
Jasvinder Singh
966794fecb 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>
2016-06-08 21:35:35 +02:00
Jasvinder Singh
e5a1cd8a48 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>
2016-06-08 20:10:04 +02:00
Piotr Azarewicz
f1aefdbf66 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>
2016-06-08 16:45:05 +02:00
Piotr Azarewicz
ccbb3dbde0 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>
2016-06-08 16:45:05 +02:00
Piotr Azarewicz
816a3db652 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>
2016-06-08 16:45:05 +02:00
Tomasz Kulasek
93771a569d 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>
2016-06-08 16:45:05 +02:00
Daniel Mrzyglod
0c1f2c4a0b 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>
2016-06-08 16:45:05 +02:00