Commit Graph

423 Commits

Author SHA1 Message Date
Olivier Matz
4ccd2bb3a9 app/test: enhance mbuf refcnt check
Check that the data in the cloned mbuf is the same than in the
reference mbuf.
Check that the reference counter is incremented for each segment.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-04-28 11:38:41 +02:00
Olivier Matz
f1022aba76 app/test: rename mbuf variable
It's better to name the mbuf 'm' instead of 'mc' as it's not a clone.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-04-28 11:37:34 +02:00
Olivier Matz
ea0c20ea95 apps: use helper to create mbuf pools
When it's possible, use the new helper to create the mbuf pools.
Most of the patch is trivial, except for the following files that
have some specifics (indirect mbufs):
- ip_fragmentation
- ip_pipeline
- ipv4_multicast
- vhost

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-04-28 11:34:10 +02:00
Olivier Matz
dfb03bbe2b app/testpmd: use standard functions to initialize mbufs and mbuf pool
The rte_pktmbuf_pool_init() and rte_pktmbuf_init() functions now
support to have a non-hardcoded buffer length. We can remove the
specific functions used in testpmd and replace them by the standard
ones.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-04-28 11:22:56 +02:00
Olivier Matz
1d493a4949 mbuf: fix data room size calculation in pool init
Deduct the mbuf data room size from mempool->elt_size and priv_size,
instead of using an hardcoded value that is not related to the real
buffer size.

To use rte_pktmbuf_pool_init(), the user can either:
- give a NULL parameter to rte_pktmbuf_pool_init(): in this case, the
  private size is assumed to be 0, and the room size is
  mp->elt_size - sizeof(struct rte_mbuf).
- give the rte_pktmbuf_pool_private filled with appropriate
  data_room_size and priv_size values.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-04-27 22:39:20 +02:00
Stephen Hemminger
6065355a03 pci: make device id tables const
The PCI device id table is immutable and should be made const
in all drivers. The pseudo drivers can initialize their local
copy as necessary.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-04-20 19:58:54 +02:00
Thomas Monjalon
f12f13f2f6 use simple zero initializers
To initialize a structure with zeros, one field was explicitly set
to avoid "missing initializer" bug with old GCC (e.g. 4.4).
This warning is now disabled (commit <insertlater>) for old versions of GCC,
so the workarounds may be removed.

These initializers should not be needed for static variables but they
are still used to workaround an ICC bug (see commit b2595c4aa9).

There is one remaining exception where {0} initializer doesn't work cleanly,
even with recent GCC:
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:735:9:
error: missing braces around initializer [-Werror=missing-braces]
  struct rte_mbuf mb_def = {0}; /* zeroed mbuf */

Tested with gcc-4.4.7 (CentOS), gcc-4.7.2 (Debian), gcc-4.9.2 (Arch),
clang-3.6.0 and icc-13.1.1.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-04-20 14:37:36 +02:00
Stephen Hemminger
2c62fae0a9 ethdev: make dev_ops const
The ethernet device ops function table should be made const for
safety and security.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-04-13 22:50:10 +02:00
Stephen Hemminger
36d40d0b0e app/test: put dev_ops in private
The test PMD uses a special type of eth_dev_ops to test features.
Rather allocating this separately, just put in the private data area.
This allows for next change to make dev_ops const.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-04-13 22:50:10 +02:00
Stephen Hemminger
517f837710 app/test: remove useless null check before rte_free
rte_free like Glibc free allows rte_free(NULL) as null operation.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-04-13 22:50:09 +02:00
Stephen Hemminger
83eb33fe2d app/test: remove useless memset
Remove useless memset, since dev_private is created by rte_zmalloc
it must already be zero.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-04-13 22:50:09 +02:00
Olivier Matz
c22f2fee16 doc: update testpmd guide about csum forward engine
Document the functions introduced by commit 64fc36064d.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-31 02:55:07 +02:00
Pawel Wodkowski
205f47e57c app/test: fix strict aliasing with gcc 4.4
Fix strict aliasing rule error seen in gcc 4.4

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2015-03-30 22:44:03 +02:00
Julien Cretin
12a8e30fd7 app/testpmd: fix potential out of bounds read
After the last enabled port has been seen, and the last time we
evaluate the loop condition, there is an out of bounds read in
ports[p].enabled because p is equal to size, which is the length of
ports.

Signed-off-by: Julien Cretin <julien.cretin@trust-in-soft.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-23 12:35:20 +01:00
Marvin Liu
651dac9128 app/test: fix build with gcc < 4.4
Option var-tracking-assignments supported in gcc from 4.4.
Add gcc version check wil fix this issue.

error: unrecognized command line option "-fno-var-tracking-assignments"

Fixes: 74adbc5ef7 ("app/test: disable variable tracking assignment for memcpy")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
2015-03-23 00:31:20 +01:00
Marvin Liu
d788ccb130 app/test: fix build constructor with gcc < 4.4
Build app/test will be failed for function only defined but not used.
test_prefetch.c:65: error: ‘testfn_prefetch_cmd’ defined but not used

Add attribute used in test function declaration can fix this.
static void __attribute__((used)) testfn_##t(void);

Fixes: 727909c592 ("app/test: introduce dynamic commands list")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
2015-03-23 00:31:20 +01:00
Yong Liu
6ae9bee6c6 app/testpmd: fix reconfig flag for all ports
When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero.
So this function will only set ports[255] need_reconfig flag, other ports will
be skipped.

Fixes: edab33b1c0 ("app/testpmd: support port hotplug")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
2015-03-21 00:21:56 +01:00
John McNamara
66abc3f310 eal: fix type casting of value to align
Fix a warning when the rte_common.h header is included in a compilation
using  -Wbad-function-cast, such as in Open vSwitch where the
following warning is emitted repeatedly:

    ../rte_common.h: In function 'rte_is_aligned':
    ../rte_common.h:184:9: warning: cast from function call of
    type 'uintptr_t' to non-matching type 'void *' [-Wbad-function-cast]

This change fixes the issue in rte_common.h by using the RTE_ALIGN_FLOOR
macro to get the aligned floor value with generic type casting.

Also removed the rte_align_floor_int() function and replaced it with
the RTE_PTR_ALIGN_FLOOR() macro.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-17 00:46:01 +01:00
Yong Liu
0a530f0d58 app/testpmd: fix incorrect port number check
testpmd parameter "nb-port" mean the number of forwarding port.
It's incorrect to use function port_id_is_invalid to check number of ports.

Fixes: edab33b1c0 ("app/testpmd: support port hotplug")

Signed-off-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-11 15:59:56 +01:00
Jingjing Wu
0ef38281f9 ixgbe: fix supported flow types
Ixgbe doesn't support the ipv4-frag and ipv6-frag flow types, remove them.
Ixgbe doesn't support configure flex mask on each kind of flow type, this
patch uses RTE_ETH_FLOW_UNKNOWN to specify global flex mask setting.
This patch also changes the string "raw" to "none" to indicate flex mask
setting unrelated with flow type in testpmd for ixgbe.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-03-10 16:44:54 +01:00
Pablo de Lara
8210ec2572 app/testpmd: stop forwarding when quitting
When user quits testpmd, and there is traffic being forwarded,
that may produce a segmentation fault, due to ports being closed,
while they are still transmitting packets.

This patch prevents the issue from happening,
by stopping packet forwarding before closing the ports.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-10 16:22:44 +01:00
David Marchand
da0113c539 eal: remove useless errno
There is no remaining reference to E_RTE_NO_TAILQ.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-10 12:17:31 +01:00
David Marchand
873a61c752 tailq: introduce dynamic register system
This register system makes it possible to reserve a tailq for the dpdk
libraries.
The "dynamic" tailqs are right after the "static" tailqs in shared mem.
Primary process is responsible for writing the tailq names, so that secondary
processes can find them.

This is a temp commit, "static" tailqs are removed after conversion of all
users in next commits.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-10 11:58:02 +01:00
David Marchand
9b7e0dbb6c tailq: get rid of broken reserve api
The "reserve" macros and functions do not check if the requested entry is free.
They do nothing more than the lookup function (which itself "creates" entries
...).
The rte_tailq api is marked as "internal use" in documentation and these macros
are only used in test application, so just get rid of them.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-10 11:51:12 +01:00
David Marchand
ff708facfc tailq: remove unneeded inclusions
Only keep inclusion where really needed.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-03-10 11:47:46 +01:00
Michael Qiu
4d2c67be57 app/test: fix printf format
test_hash.c: In function ‘test_crc32_hash_alg_equiv’:
error: format ‘%lu’ expects argument of type ‘long unsigned int’,
but argument 2 has type ‘size_t’ [-Werror=format]

According to C99, for size_t type should use format "%zu"

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-03-09 18:07:43 +01:00
Ouyang Changchun
c9dd4aad4f app/testpmd: more vlan offload commands
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend.

Don't remove the original command(hw-vlan) considering that some user still want to use
only one command to switch on/off all 3 options.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-09 12:47:26 +01:00
Michal Jastrzebski
64b01ee0b2 app/testpmd: check vlan filter configuration
This patch modifies testpmd behavior when setting:
rx_vlan add all vf_port (enabling all vlanids
to be passed thru rx filter on VF).
Rx_vlan_all_filter_set() function,
checks if the next vlanid can be enabled by the driver.
Number of vlanids is limited by the NIC and thus the NIC
do not allow to enable more vlanids than it can allocate
in VFTA table.

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-09 12:47:26 +01:00
Michal Jastrzebski
7143d8fd4a app/testpmd: fix bond port creation
When invoking creation of bonded device using:
create bonded device mode socket in testpmd the bonded port was not
enabled at the end of cmd_create_bonded_device_parsed function.
This caused commands 'show port info' and 'show port stats' not working
properly with bonding device. This patch fixed it.

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-09 12:47:25 +01:00
Michael Qiu
4468635fdd app/testpmd: forbid actions on invalid port
Currently, if try to start/stop/close one invalid port,
no error shows in testpmd.
This is a bug, need check the port number.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
2015-03-09 12:47:25 +01:00
Michael Qiu
92d2703e2c app/testpmd: fix log with no bound device
As hotplug has been enabled, start the testpmd with no nic binded
will show one error log "Please stop the ports first":

Interactive-mode selected
Please stop the ports first
Done
testpmd>

This issue is cause by the logic of check link status.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-03-09 12:46:46 +01:00
Stephen Hemminger
f2cae314c3 app/test: remove unneeded casts
The malloc family returns void * and therefore cast is unnecessary.
Use calloc rather than zmalloc with multiply for array.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-03-04 21:51:01 +01:00
Tetsuya Mukawa
ffc468ff3c app/testpmd: fix crash when portmask is specified
If testpmd is invoked with portmask option like below, segmentation
fault will occur. This patch fixes the issue.

Reported-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-28 00:24:32 +01:00
Tetsuya Mukawa
edab33b1c0 app/testpmd: support port hotplug
The patch introduces following commands.
- port attach [ident]
- port detach [port_id]
 - attach: attaching a port
 - detach: detaching a port
 - ident: pci address of physical device.
          Or device name and parameters of virtual device.
         (ex. 0000:02:00.0, eth_pcap0,iface=eth0)
 - port_id: port identifier

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2015-02-26 00:20:43 +01:00
Tetsuya Mukawa
9f1653e7b7 ethdev: add device type
This new parameter is needed to keep device type like PCI or virtual.
Port detaching processes are different between PCI device and virtual
device.
RTE_ETH_DEV_PCI indicates device type is PCI. RTE_ETH_DEV_VIRTUAL
indicates device is virtual.

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
2015-02-26 00:08:25 +01:00
Yerden Zhumabekov
3981ab2b79 app/test: add crc32 algorithms equivalence check
New function test_crc32_hash_alg_equiv() checks whether software,
4-byte operand and 8-byte operand versions of CRC32 hash function
implementations return the same result value.

Signed-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-02-25 16:18:33 +01:00
Zhihong Wang
667d534aa7 app/test: extend memcpy test coverage
Main code changes:
1. Added more typical data points for a thorough performance test
2. Added unaligned test cases since it's common in DPDK usage

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-25 11:34:23 +01:00
Zhihong Wang
bbc4d593cd app/test: remove unnecessary memcpy test cases
Removed unnecessary test cases for base move functions
since the function "func_test" covers them all.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-25 11:27:44 +01:00
Zhihong Wang
74adbc5ef7 app/test: disable variable tracking assignment for memcpy
VTA is for debugging only, it increases compile time and binary size,
especially when there're a lot of inlines.
So disable it since memcpy test contains a lot of inline calls.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-25 11:18:17 +01:00
Robert Sanford
7085f6c738 timer: fix reset return value
- API rte_timer_reset() should return -1 when the timer is in the
RUNNING or CONFIG state. Instead, it ignores the return value of
internal function __rte_timer_reset() and always returns 0.
We change rte_timer_reset() to return the value returned by
__rte_timer_reset().

- Enhance timer stress test 2 to report how many timer reset
collisions occur, i.e., how many times rte_timer_reset() fails
due to a timer being in the CONFIG state.

Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-25 10:43:27 +01:00
Robert Sanford
319abb43fa timer: fix stress test on multiple runs
Fix timer stress test to succeed on multiple runs.

Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-25 10:40:54 +01:00
Daniel Mrzyglod
d6fe2f5ee0 app/test: fix missing NULL pointer checks
In test_sched, we are missing NULL pointer checks after create_mempool()
and rte_pktmbuf_alloc(). Add in these checks using TEST_ASSERT_NOT_NULL macros.

VERIFY macro was removed and replaced by standard test ASSERTS from "test.h" header.
This provides additional information to track when the failure occurred.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
2015-02-24 21:53:24 +01:00
David Marchand
23df14d1ba devargs: restore empty devargs
Following commit c07691ae10, an implicit change has been done in the
devargs API.
This triggers problem in virtual pmds that did not check for parameters
validity as it was implicitely valid.

Fix this by restoring the empty argument as "" and add a note in the api.
Restore associated tests.

Fixes: c07691ae10 ("devargs: remove limit on parameters length")

Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
2015-02-24 20:23:11 +01:00
Cunming Liang
128ee4c26d app/test: add unit tests for --lcores option
The patch add unit test for the new eal option "--lcores".

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
2015-02-24 20:22:08 +01:00
Bruce Richardson
1a9a0b9b02 ethdev: rename interrupt callbacks field
The 'callbacks' member of the rte_eth_dev structure has been renamed
to 'link_intr_cbs' to make it clear that it refers to callbacks from
NIC interrupts. This allows us to add other types of callbacks to
the structure without ambiguity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-02-24 00:38:14 +01:00
Sergio Gonzalez Monroy
4769bc5a27 mbuf: remove build option to disable refcnt
This patch removes all references to RTE_MBUF_REFCNT, setting the refcnt
field in the mbuf struct permanently.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-02-23 19:31:24 +01:00
Yerden Zhumabekov
6597fc642d app/test: remove redundant compile checks
Since rte_hash_crc() can now be run regardless of SSE4.2 support,
we can safely remove compile checks for RTE_MACHINE_CPUFLAG_SSE4_2
in test utilities.

Signed-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2015-02-23 18:32:36 +01:00
Jijiang Liu
b297cdca3d app/testpmd: support NVGRE in Tx checksum offload
Enhance csum fwd engine based on current TX checksum framework in order
to test TX Checksum offload for NVGRE packet.

It includes:
 - IPv4 and IPv6 packet
 - outer L3, inner L3 and L4 checksum offload for Tx side.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2015-02-23 16:38:21 +01:00
Jijiang Liu
7d1da6342d app/testpmd: support NVGRE in Rx tunnel filtering
Extend the "tunnel_filter" command in testpmd to test the RX tunnel filter API for NVGRE packet.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2015-02-23 16:35:40 +01:00
Helin Zhang
7a18146d7b app/testpmd: support new rss offloads
RSS offloads supported 'ip' and 'udp' only, which did not demonstrate
all of the hardware capabilities. The modifications adds support of
new RSS offloads of 'tcp', 'sctp', 'ether' and 'all'.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2015-02-22 23:56:21 +01:00
Helin Zhang
00472f2362 app/testpmd: fix some indent
Added code style fixes.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2015-02-22 23:56:21 +01:00
Helin Zhang
b12964f621 ethdev: unification of RSS offload types
RSS offload types were defined separately for 1/10G and 40G NICs,
and have no relationship with flow types. The modifications are to
unify all RSS offload types for all PMDs. Unified RSS offload types
have new and common names which can be used for any PMD or
applications, and decouple from specific hardwares.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: merge with fm10k]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-02-22 23:56:20 +01:00
Helin Zhang
7fa96d696f ethdev: unification of flow types
Flow types was defined actually for i40e hardware specifically,
and wasn't able to be used for defining RSS offload types of all
PMDs. It removed the enum flow types, and uses macros instead
with new names. The new macros can be used for defining RSS
offload types later. Also modifications are made in i40e and
testpmd accordingly.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: merge with new flow director API]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-02-22 23:56:20 +01:00
Jingjing Wu
990d370366 app/testpmd: new commands for ntuple filter
Following commands of 5tuple and 2tuple filter are removed:
 - add_2tuple_filter (port_id) protocol (pro_value) (pro_mask)
   dst_port (port_value) (port_mask) flags (flg_value) priority (prio_value)
   queue (queue_id) index (idx)
 - remove_2tuple_filter (port_id) index (idx)
 - get_2tuple_filter (port_id) index (idx)
 - add_5tuple_filter (port_id) dst_ip (dst_address) src_ip (src_address)
   dst_port (dst_port_value) src_port (src_port_value) protocol (protocol_value)
   mask (mask_value) flags (flags_value) priority (prio_value)"
   queue (queue_id) index (idx)
 - remove_5tuple_filter (port_id) index (idx)
 - get_5tuple_filter (port_id) index (idx)

New commands are added for 5tuple and 2tuple filter by using filter_ctrl API
and new ntuple filter structure:
 - 2tuple_filter (port_id) (add|del)
   dst_port (dst_port_value) protocol (protocol_value)
   mask (mask_value) tcp_flags (tcp_flags_value)
   priority (prio_value) queue (queue_id)
 - 5tuple_filter (port_id) (add|del)
   dst_ip (dst_address) src_ip (src_address)
   dst_port (dst_port_value) src_port (src_port_value)
   protocol (protocol_value)
   mask (mask_value) tcp_flags (tcp_flags_value)
   priority (prio_value) queue (queue_id)

Test report: http://dpdk.org/ml/archives/dev/2015-February/013049.html

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-22 04:04:53 +01:00
Jingjing Wu
9df58d413a app/testpmd: new commands for syn filter
Following commands of syn filter are removed:
  - add_syn_filter (port_id) priority (high|low) queue (queue_id)
  - remove_syn_filter (port_id)
  - get_syn_filter (port_id)
New command is added for syn filter by using filter_ctrl API and new
syn filter structure:
  - syn_filter (port_id) (add|del) priority (high|low) queue (queue_id)

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2015-02-22 03:09:04 +01:00
Jingjing Wu
a47ce91502 app/testpmd: new commands for flex filter
Following commands of flex filter are removed:
  - add_flex_filter (port_id) len (len_value) bytes (bytes_string) mask (mask_value)
    priority (prio_value) queue (queue_id)
  - remove_flex_filter (port_id) index (idx)
  - get_flex_filter (port_id) index (idx)
New command is added for flex filter by using filter_ctrl API and new flex filter structure:
  - flex_filter (port_id) (add|del) len (len_value) bytes (bytes_value) mask (mask_value)
    priority (prio_value) queue (queue_id)

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-22 02:53:29 +01:00
Jingjing Wu
d9d5e6f2f0 app/testpmd: set default flow director mask
This patch sets the default value of flow director's mask.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-02-22 01:49:44 +01:00
Jingjing Wu
7c554b4f04 app/testpmd: update display of flow director information
update the function to print information includes:
 - capability
 - mask
 - flex configuration

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-02-22 01:49:44 +01:00
Jingjing Wu
a563359259 app/testpmd: update flow director commands
Add new command to set flow director's mask:
  - flow_director_mask
Update arguments of commands:
  - flow_director_filter
  - flow_director_flex_mask
  - flow_director_flex_payload
Following commands of flow director filter are removed:
  - add_signature_filter
  - upd_signature_filter
  - rm_signature_filter
  - add_perfect_filter
  - upd_perfect_filter
  - rm_perfect_filter
  - set_masks_filter
  - set_ipv6_masks_filter

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-02-22 01:48:43 +01:00
Jingjing Wu
299191e0c9 ethdev: remove flexbytes offset from flow director
This patch removes the flexbytes_offset from rte_fdir_conf, because
the flexible payload setting is done by flex_conf instead of flexbytes_offset.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-02-22 01:14:31 +01:00
Maciej Gajdzica
6e6b34fb26 app/test: add unit tests for link bonding mode 6
Added 4 unit tests checking link bonding mode 6 behavior.

Also modified virtual_pmd so it is possible to provide packets,
that should be received with rx_burst and to inspect packets
transmitted by tx_burst.

In packet_burst_generator.c function creating eth_header is
modified, so it accepts ether_type as a parameter and function
creating arp_header is added. Updated other unit tests to get
rid of compilation errors.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-20 23:07:02 +01:00
Daniel Mrzyglod
200866003a bond: rename mode 5
This patch modify mode older name from
BONDING_MODE_ADAPTIVE_TRANSMIT_LOAD_BALANCING to BONDING_MODE_TLB
This patch also changes order of TEST_ASSERT macro in
test_tlb_verify_slave_link_status_change_failover.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-20 23:07:02 +01:00
Maciej Gajdzica
31db4d38de net: change arp header struct declaration
Changed MAC address type from uint8_t[6] to struct ether_addr and IP
address type from uint8_t[4] to uint32_t to make it consistent with
other DPDK code using MAC and IP addresses. It allows us to use
is_same_ether_addr and ether_addr_copy functions on MAC addresses in ARP header.  Also
removed union from arp_hdr struct to make calls to arp_data items
shorter. Updated test-pmd to match new arp_hdr version.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
[Thomas: doxygenize comments]
2015-02-20 22:10:52 +01:00
Pablo de Lara
422a20a4e6 app/testpmd: fix uninitialized flow control variables
rx_fc_en and tx_fc_en in cmd_link_flow_ctrl_set_parsed
could be used without being initialized.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-02-20 12:13:28 +01:00
Tomasz Kulasek
d23e09e0ef app/test: link with ring pmd when needed
This patch links test application against librte_pmd_ring.so for shared
libraries. It's required as long as librte_pmd_ring provides some additional
routines used for testing purposes and must be "hard-linked".

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-18 18:58:55 +01:00
Tomasz Kulasek
5e41ab250d app/test: unit tests for bonding mode 4
This patch adds unit tests for mode 4. It is split into separate
file to avoid problems with other modes that does not need to
look into packets payload.
This patch includes also a modification of maximum number of ports
used in their tests for bonding modes 0-3 from 16 to 6.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-18 18:58:55 +01:00
Tomasz Kulasek
174ddb8152 app/test: rework assert macros
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-18 18:58:55 +01:00
Sergio Gonzalez Monroy
d0c9b58d71 app/test: new reorder unit test
Adding new reorder unit test for the test app.
The command to run the unit test from the test shell is: reorder_autotest

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2015-02-18 16:52:05 +01:00
David Marchand
edef7d1f4d app/test: fix devargs tests
Add missing free for devargs->args and fix tests.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-02-18 12:15:31 +01:00
Olivier Matz
08f661aca1 app/testpmd: fix TSO when using outer checksum offloads
The l4_len has also to be copied in mbuf in case we are offloading outer
IP checksum. Currently, TSO + outer checksum is not supported by any
driver but it will soon be supported by i40e.

Reported-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
c86e19755a app/testpmd: warn if outer ip cksum is requested but not supported
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
9075b0f1ce app/testpmd: support IPIP tunnel in csum forward engine
Add support for IP over IP tunnels.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
74e929a7c7 app/testpmd: support GRE tunnels in csum fwd engine
Add support for Ethernet over GRE and IP over GRE tunnels.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
c10a026c3b app/testpmd: introduce vxlan parsing function in csum fwd engine
Move code parsing vxlan into a function. It will ease the support
of GRE tunnels and IPIP tunnels in next commits.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
c5b6033110 app/testpmd: use a structure to store offload info in csum fwd engine
To simplify the API of parse_* functions, store all the offload
information for the current packet in a structure.

No functional change.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
160c3dc945 app/testpmd: introduce IP parsing functions in csum fwd engine
These functions may be used to parse encapsulated layers
when we will support IP over GRE tunnels.

No functional change.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
3994a3e8bb app/testpmd: rename vxlan in outer-ip in csum commands
The tx_checksum command concerns outer IP checksum, not VxLAN checksum.
Actually there is no checkum in VxLAN header, there is one checksum in
outer IP header, and one checksum in outer UDP header. This option only
controls the outer IP checksum.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
64fc36064d app/testpmd: add csum parse-tunnel command
Add a new command related to csum forward engine:

  csum parse-tunnel (on|off) (tx_port_id)

If enabled, the tunnel packets received by the csum forward engine are
parsed and seen as "outer-headers/inner-headers/data".

If disabled, the parsing of the csum forward engine stops at the first
l4 layer. A tunnel packet is seens as "headers/data" (inner headers are
included in payload).

Note: the port argument is the tx_port. It's more coherent compared
to all other testpmd csum flags.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:18 +01:00
Olivier Matz
75032511f3 app/testpmd: move checksum config display in a function
No functional changes in this commit, we just move the code
that displays the csum forward engine configuration in a
function.

This makes the next commit easier to read as it will also
use this function.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:17 +01:00
Olivier Matz
117fa9a9f8 app/testpmd: rename Tx checksum command
Replace the "tx_checksum" command by "csum". It has several
advantages:

- it's more coherent with the forward engine name
- it's shorter
- the next commit will introduce a command that is related to
  the csum forward engine, but about rx side.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-16 19:21:17 +01:00
Olivier Matz
c9433176b3 mbuf: remove UDP tunnel flag
Since previous commit, the flag PKT_TX_UDP_TUNNEL_PKT is not used by any PMD,
remove it from mbuf API and from csumonly (testpmd). In csumonly, the
PKT_TX_OUTER_IP_CKSUM flag is already set for vxlan checksum, providing
enough information to the underlying driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:17 +01:00
Olivier Matz
609dd68ef1 mbuf: enhance the API documentation of offload flags
Based on http://dpdk.org/ml/archives/dev/2015-January/011127.html

Also adapt the csum forward engine code to the API.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
2015-02-16 19:21:17 +01:00
Pablo de Lara
f2c5125a68 app/testpmd: use default Rx/Tx port configuration
Function to get rx/tx port configuration from the PMDs
was added in previous release to simplify the port configuration
in all sample apps, but testpmd was not modified.

This patch makes testpmd get the default rx/tx port configuration,
but still uses the parameters passed by the command line.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2015-02-14 11:35:25 +01:00
Pablo de Lara
e20511e4b2 app/testpmd: force user to stop forwarding when changing port/core list
Testpmd has the capability of changing the forwarding cores and ports in runtime.
If these are changed when forwarding, two issues may be encountered:

- If "show config fwd" is used, changes made in the core list are applied.
  Therefore, trying to stop forwarding may hang testpmd,
  since it could be waiting for cores to stop that are not actually running anything

- If the port list is changed, when stopping forwarding,
  it may miss the stats of some of the ports that were actually being used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-02-14 11:35:25 +01:00
Pablo de Lara
57af3415b2 app/testpmd: remove incorrect parameter limits in help command line
Ring threshold parameters an RX/TX queue (pthresh, wthresh and hthresh)
had an incorrect range of values shown in help command line.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-14 11:35:24 +01:00
Pablo de Lara
44fa5307b0 app/testpmd: remove duplicated parameter parsing
Several parameters were being parsed twice in testpmd,
so this patch gets rid of the second parsing.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-14 11:35:24 +01:00
Xuelin Shi
3e0d91bf42 app/testpmd: fix port parsing in show port info command
The port number type should be consistent with librte_cmdline,
else there is potential endian issue.

Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-02-14 11:35:24 +01:00
Helin Zhang
a09f3e4c50 app/testpmd: add hash configuration
To demonstrate the hash filter control, commands are added.
They are,
- get_sym_hash_ena_per_port
- set_sym_hash_ena_per_port
- get_hash_global_config
- set_hash_global_config

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-02-02 16:13:54 +01:00
Declan Doherty
ecd9d5193b bond: remove offload flags from transmit policy checks
The Link bonding library is incorrectly using receive packet type flags
in the transmit policy hashing functions, which would cause packets
generated locally to be incorrectly distributed across the slave
devices. This patch completely removes the dependency on the packet
type flags and uses the ether_type from either the Ethernet header or
the VLAN headers for branching.

This patch also includes the associate changes in the test suite and in
the packet_burst_generator code to remove the dependences on the packet
type flags.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2015-02-02 12:30:33 +01:00
Thomas Monjalon
7e60e08397 acl: remove standalone header
This is a duplication of some EAL parts for a standalone packaging
which is not documented.
Packaging should be done outside of DPDK.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-02-02 12:30:33 +01:00
Konstantin Ananyev
62945e029e acl: introduce config parameter for performance/space trade-off
If at build phase we don't make any trie splitting,
then temporary build structures and resulting RT structure might be
much bigger than current.
>From other side - having just one trie instead of multiple can speedup
search quite significantly.
>From my measurements on rule-sets with ~10K rules:
RT table up to 8 times bigger, classify() up to 80% faster
than current implementation.
To make it possible for the user to decide about performance/space trade-off -
new parameter for build config structure (max_size) is introduced.
Setting it to the value greater than zero, instructs  rte_acl_build() to:
- make sure that size of RT table wouldn't exceed given value.
- attempt to minimise number of tries in the table.
Setting it to zero maintains current behaviour.
That introduces a minor change in the public API, but I think the possible
performance gain is too big to ignore it.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-01-28 17:11:26 +01:00
Konstantin Ananyev
0e58d84e13 app/test-acl: add ability to manually select RT method
In test-acl replace command-line option "--scalar" with new one:
"--alg=scalar|sse|avx2".
Allows user manually select preferred classify() method.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-01-28 17:11:25 +01:00
Konstantin Ananyev
589758eb1c app/test: few small fixes for acl
Make sure that test_acl would not ignore error conditions.
Run classify() with all possible values.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-01-28 17:11:25 +01:00
Jingjing Wu
fb7a78a12a app/testpmd: new commands for ethertype filter
Following commands of ethertype filter are removed:
  - add_ethertype_filter (port_id) ethertype (eth_value)
  - remove_ethertype_filter (port_id) index (idx)
  - get_ethertype_filter (port_id) index (idx)
New command is added for ethertype filter by using filter_ctrl API and new
ethertype filter structure:
  - ethertype_filter (port_id) (add|del) (mac_addr|mac_ignr)
    (mac_address) ethertype (ether_type) (drop|fwd) queue (queue_id)

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2015-01-20 09:14:53 +01:00
Ouyang Changchun
a30979f6ad app/testpmd: set Rx VMDq RSS mode
Set VMDq RSS mode if it has VF (VF number is more than 1) and has RSS information.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-01-18 23:15:55 +01:00
Bruce Richardson
950d15163a app/testpmd: remove duplicated function for list parsing
There were two static functions called "parse_item_list" in testpmd app.
Since one was a superset of the functionality of the other, we can
collapse the two calls down into a single one, shared between the two
C files.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2015-01-15 13:41:39 +01:00
Declan Doherty
7b00a204bb bond: fix vlan flag interpretation
This patch contains a fix for link bonding handling of vlan tagged packets in mode 3 and 5.
Currently xmit_slave_hash function misinterprets the PKT_RX_VLAN_PKT flag to mean that
there is a vlan tag within the packet when in actually means that there is a valid entry
in the vlan_tci field in the mbuf.

- Fixed VLAN tag support in hashing functions.
- Adds support for TCP in layer 4 header hashing.
- Splits transmit hashing function into separate functions for each policy to
  reduce branching and to make the code clearer.
- Fixed incorrect flag set in test application packet generator.

Test report: http://dpdk.org/ml/archives/dev/2015-January/010792.html

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SunX Jiajia <sunx.jiajia@intel.com>
2015-01-15 13:41:39 +01:00
Olivier Matz
e89ae122ce app/test: fix misplaced braces in strncmp
One occurrence call to strncmp had the closing brace in the wrong
place. Changing this form:
	if (strncmp(X, Y, sizeof(X) != 0))
which does a comparison of length 1, to
	if (strncmp(X, Y, sizeof(X)) != 0)
which does the correct length comparison and then compares the result
to zero in the "if" part.

Seen with clang-3.5:
  "error: size argument in 'strncmp' call is a comparison"

This patch is similar to 261386248 but it looks that one occurrence
was forgotten.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2014-12-18 00:26:08 +01:00
Bruce Richardson
e1e0d0bc1b app/test: fix assert macro
One of the test assertion macros was missing the "do" part of the
do-while. This issue was picked up by clang reporting an empty while
loop body for the closing while of the do-while pair.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-18 00:26:08 +01:00
Bruce Richardson
6f78a6651f app/test: check for mbuf allocation failure
If mbuf allocation failed for whatever reason, we would get a NULL
pointer exception in test_table_acl.c:test_pipeline_single_filter test
case.
We fix this by causing an early break out of the application loop. If we
quit the test immediately we would leak any existing allocated mbufs,
but by breaking instead, we allow the test to continue and clean up the
mbufs already in the pipeline, while still having a test failure as the
mbuf counts should not match.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-12-17 01:04:06 +01:00