Commit Graph

1409 Commits

Author SHA1 Message Date
Helin Zhang
8a387fa85f ethdev: more RSS flags
- i40e RSS flags have been added (and enlarged to 64-bit)
- A new configuration of 'uint8_t rss_key_len' has been added in
  'struct rte_eth_rss_conf' to support different length of RSS keys.
- In each PMD, only the supported flags are masked.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Heqing Zhu <heqing.zhu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
2014-06-17 18:21:41 +02:00
Ivan Boule
70bdb18657 ethdev: add Rx error counters for missed, badcrc and badlen packets
Split input error stats to have a better understanding of why packets
have been dropped.
Keep ierrors field untouched for backward compatibility.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-06-17 11:28:14 +02:00
Cristian Dumitrescu
5205954791 app/test: packet framework unit tests
Unit tests for Packet Framework libraries.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
2014-06-17 03:34:11 +02:00
Cristian Dumitrescu
48f31ca50c app/pipeline: packet framework benchmark
This application is purposefully built to benchmark the performance
of the Intel DPDK Packet Framework toolbox.

It uses 3 CPU cores connected in a chain through SW rings
(NICs --> Core A --> Core B --> Core C --> NICs)
1. Core A: reads packets from NIC ports and writes them to SW queues;
2. Core B: instantiates a Packet Framework pipeline that uses ring reader
   input ports, a table whose type is selected trhough command line arguments
   (--none, --stub, --lpm, --acl, --hash[-spec]-KEYSZ-TYPE, with KEYSZ as
   8, 16 or 32 bytes and TYPE as ext (Extendible bucket) or lru (LRU))
   and ring writers output ports;
3. Core C: reads packets from SW rings and writes them to NIC ports.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
[Thomas: remove dedicated build option]
2014-06-17 03:34:11 +02:00
Jingjing Wu
0db70a8030 app/testpmd: add commands for filters
add commands in testpmd for NIC filters:
add_ethertype_filter
remove_ethertype_filter
get_ethertype_filter
add_2tuple_filter
remove_2tuple_filter
get_2tuple_filter
add_5tuple_filter
remove_5tuple_filter
get_5tuple_filter
add_syn_filter
remove_syn_filter
get_syn_filter
add_flex_filter
remove_flex_filter
get_flex_filter

Signed-off-by: jingjing.wu <jingjing.wu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Reviewed-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16 19:55:14 +02:00
Anatoly Burakov
317fe51f6e eal: add command line option to select vfio interrupt type
Unlike igb_uio, VFIO interrupt type is not set by kernel module
parameters but is set up via ioctl() calls at runtime. This warrants
a new EAL command-line parameter. It will have no effect if VFIO is
not compiled, but will set VFIO interrupt type to either "legacy", "msi"
or "msix" if VFIO support is compiled. Note that VFIO initialization
will fail if the interrupt type selected is not supported by the system.

If the interrupt type parameter wasn't specified, VFIO will try all
interrupt types (starting with MSI-X).

In unit tests, we don't know if VFIO is compiled (eal_vfio.h header is
internal to Linuxapp EAL), so we check this flag regardless.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16 15:02:10 +02:00
Anatoly Burakov
71d74422e2 pci: rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING
Rename the RTE_PCI_DRV_NEED_IGB_UIO to be more generic.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-16 15:02:10 +02:00
Konstantin Ananyev
26c057ab6c acl: new test-acl application
Usage example and main test application for the ACL library.
Provides IPv4/IPv6 5-tuple classification.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
[Thomas: some code-style changes]
2014-06-14 01:29:45 +02:00
Konstantin Ananyev
93b6c43b91 acl: update unit tests
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
2014-06-14 01:29:45 +02:00
Bruce Richardson
c3eabff124 distributor: add unit tests
Add a set of unit tests and some basic performance test for the
distributor library. These tests cover all the major functionality of
the library on both distributor and worker sides.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
2014-06-12 15:48:24 +02:00
Konstantin Ananyev
3440438c5d lpm: introduce rte_lpm_lookupx4
Allows to lookup four IP addresses in an LPM table.
Uses SSE instrincts.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
2014-06-12 12:11:39 +02:00
Pawel Wodkowski
cc333208d5 pci: remove conditions on device definitions
This patch removes obsolete code that prevents defining
NICs 82575EB, I218 and I350.

Signed-off-by: Pawel Wodkowski <pawelx.wdkowski@intel.com>
[Thomas: remove conditions for I218]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11 18:10:53 +02:00
Ouyang Changchun
6a18e1af70 app/testpmd: Tx rate limitation for queue and VF
Signed-off-by: Ouyang Changchun <changchun.ouyang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
2014-06-11 15:56:19 +02:00
Ouyang Changchun
cfae07fdaa app/testpmd: add commands for link up and down
This patch adds commands to test the functionality of setting link up and down.

Signed-off-by: Ouyang Changchun <changchun.ouyang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked by: Ivan Boule <ivan.boule@6wind.com>
2014-06-11 00:29:37 +02:00
Bruce Richardson
3031749c2d remove trailing whitespaces
This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11 00:29:34 +02:00
Ivan Boule
f79959ea15 app/testpmd: allow to configure RSS hash key
Add the command "port config X rss-hash-key key" in the 'testpmd'
application to configure the RSS hash key used to compute the RSS
hash of input [IP] packets received on port X.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-27 18:42:05 +02:00
Ivan Boule
16321de093 ethdev: allow to get RSS hash functions and key
1) Add a new function "rss_hash_conf_get" in the PMD API to retrieve the
   current configuration of the RSS functions and/or of the RSS key used
   by a NIC to compute the RSS hash of input packets.
   The new function uses the existing data structure "rte_eth_rss_conf" for
   returning the RSS hash configuration.

2) Add the ixgbe-specific function "ixgbe_dev_rss_hash_conf_get" and the
   igb-specific function "eth_igb_rss_hash_conf_get" to retrieve the RSS
   hash configuration of ixgbe and igb controllers respectively.

3) Add the command "show port X rss-hash [key]" in the testpmd application
   to display the RSS hash configuration of port X.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-27 18:42:05 +02:00
Ivan Boule
560e02ee52 app/testpmd: configure RSS without restart
The function cmd_config_rss_parsed() associated with the command
"port config rss all" required to first stop all ports, in order to
then entirely re-configure all ports with the new RSS hash computation
parameters.
Use now the new function rte_eth_dev_rss_hash_conf_update() that dynamically
only changes the RSS hash computation parameters of a port, without needing
to previously stop the port.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-27 18:42:05 +02:00
Stephen Hemminger
3d349a1d35 sched: use malloc instead of memzone for allocation
The existing rte scheduler can only be safely configured once per port
because a memory zone has a fixed size once it is created and can never
be freed or change in size.

This patch changes the scheduler to use rte_malloc instead. This allows
for a port to be reconfigured by doing rte_sched_port_free followed
rte_sched_port_config.

The patch also removes the now unused name parameter from the
port parameters structure.

Signed-off-by: Stephen Hemminger <shemming@brocade.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-22 16:13:30 +02:00
Neil Horman
e5ffdd1457 ethdev: remove rte_pmd_init_all function
Now that we've converted all the pmds in dpdk to use the driver registration
macro, rte_pmd_init_all has become empty.  As theres no reason to keep it around
anymore, just remove it and fix up all the eample callers.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:26 +02:00
Neil Horman
61934c0956 ring: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the ring driver to use the PMD_REGISTER_DRIVER macro and fix up the
Makefile so that its linkage is only done if we are building static libraries.
This means that the test applications now have no reference to the ring library
when building DSO's and must specify its use on the command line with the -d
option.  Static linking will still initalize the driver automatically.

Note that the ring driver was also written in such a way that it violated some
general layering principles, several functions were contained in the pmd which
were being called by example from the test application in the app/test
directory.  Specifically it was calling eth_ring_pair_attach,
eth_ring_pair_create and rte_eth_ring_devinit, which should only be called
internally to the dpdk core library.  To correct this I've removed those
functions, and instead allowed them to be called indirectly at initalization
time using the vdev command line argument key nodeaction=<name>:<node>:<action>
where action is one of ATTACH or CREATE.  I've tested out the functionality of
the command line with the testpmd utility, with success, and have removed the
called functions from the test utility.  This will affect how the test utility
is invoked (the -d and --vdev option will need to be specified on the command
line now), but honestly, given the way it was coded, I think the testing of the
ring pmd was not the best example of how to code with dpdk to begin with.  I
have also left the two layer violating functions in place, so as not to break
existing applications, but added deprecation warnings to them so that apps can
migrate off them.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-20 14:28:16 +02:00
Stephen Hemminger
e5ac7c2ff3 eal: don't inline string functions
It makes no sense to inline string functions, in fact snprintf
can't be inlined because the function supports variable number of
arguments.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: update includes]
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-05-16 16:02:55 +02:00
Stephen Hemminger
591a9d7985 add FILE argument to debug functions
The DPDK dump functions are useful for remote debugging of an
applications. But when application runs as a daemon, stdout
is typically routed to /dev/null.

Instead change all these functions to take a stdio FILE * handle
instead. An application can then use open_memstream() to capture
the output.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: fix quota_watermark example]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 16:02:55 +02:00
David Marchand
bc20240622 app/testpmd: add --disable-link-check option
When starting/stopping ports, a link status check on all available ports is
done. This can be annoying when cables are not plugged at the time.
Default behavior is untouched.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:25:42 +02:00
Zijie Pan
d8c89163cb app/testpmd: show mac address at initialization
Display port number and MAC address at start up.
It is useful when configuring a packet generator.

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:25:35 +02:00
Ivan Boule
168dfa6166 app/testpmd: add engine that replies to ARP and ICMP echo requests
Add a new specific packet processing engine in the "testpmd" application that
only replies to ARP requests and to ICMP echo requests.
For this purpose, a new "icmpecho" forwarding mode is provided that can be
dynamically selected with the following testpmd command:

    set fwd icmpecho

before starting the receipt of packets on the selected ports.

Then, the "icmpecho" engine performs the following actions on all received
packets:

- replies to a received ARP request by sending back on the RX port a ARP
  reply with a "sender hardware address" field containing the MAC address
  of the RX port,

- replies to a ICMP echo request by sending back on the RX port a ICMP echo
  reply, swapping the IP source and the IP destination address in the IP
  header,

- otherwise, simply drops the received packet.

When replying to a received packet that was encapsulated into a VLAN tunnel,
the reply is sent back with the same VLAN identifier.
By default, the testpmd configures VLAN header stripping RX option on each
port.
This option is not managed by the icmpecho engine which won't detect
packets that were encapsulated into a VLAN.
To address this issue, the VLAN header stripping option must be previously
switched off with the following testpmd command:

    vlan set strip off

When the "verbose" mode has been set with the testpmd command
"set verbose 1", the "icmpecho" engine displays informations about each
received packet.

The "icmpecho" forwarding engine can also be used to simply check port
connectivity at the hardware level (check that cables are well-plugged)
and at the software level (receipt of VLAN packets, for instance).

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:25:16 +02:00
Cyril Chemparathy
a7e7bb4e44 app/testpmd: allow txpkts to be setup via command line
We allow a new --txpkts command-line parameter to configure segment sizes when
in txonly or flowgen forwarding modes.

Signed-off-by: Cyril Chemparathy <cchemparathy@tilera.com>
[Thomas: add usage help]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:25:08 +02:00
Cyril Chemparathy
e9e23a617e app/testpmd: add flowgen forwarding engine
This commit adds a multi-flow traffic generator forwarding engine.  In effect,
this forwarding mode functions very similar to the txonly mode, with the
difference that it generates multiple L4 flows.

Signed-off-by: Cyril Chemparathy <cchemparathy@tilera.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:25:02 +02:00
Cyril Chemparathy
d47388f196 app/testpmd: add macswap forwarding engine
This commit adds a new forwarding mode, in which the source and destination
MAC addresses of packets are swapped before forwarding according to the
port-topology in effect.  This has been designed for operation primarily with
--port-topology=loopback.

Signed-off-by: Cyril Chemparathy <cchemparathy@tilera.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:24:52 +02:00
Thomas Monjalon
769ce6b178 app/testpmd: list forwarding engines
Having a function to list forwarding engines helps to show them
in cli help and in parameters usage witout duplicating code.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2014-05-16 13:23:54 +02:00
Cyril Chemparathy
ce9b9fb024 app/testpmd: allow command line selection of forwarding engine
This commit allows testpmd forwarding mode selection through command line
parameters instead of having to set this up in interactive mode.

Signed-off-by: Cyril Chemparathy <cchemparathy@tilera.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:23:47 +02:00
Cyril Chemparathy
ca7feb2273 app/testpmd: add auto-start option in interactive mode
This patch adds support for a command-line argument --auto-start (-a).  When
running in interactive mode, this allows us to start traffic without user
intervention before dropping to the prompt.

Signed-off-by: Cyril Chemparathy <cchemparathy@tilera.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:23:36 +02:00
Cyril Chemparathy
3e2006d618 app/testpmd: add loopback topology
This commits adds a new "loop" option to the --port-topology argument.  With
the loop option specified, ingress traffic is simply transmitted back on the
same interface.

Signed-off-by: Cyril Chemparathy <cchemparathy@tilera.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 13:23:08 +02:00
Julien Cretin
5706de6533 app/testpmd: fix incompatible sign for printf arguments
The socket_id member of struct rte_port is an unsigned int while the d
conversion specifier of printf expects an int.

The addr_bytes member of struct ether_addr is an array of uint8_t
while the X conversion specifier of printf expects an unsigned int.
Values of type uint8_t are promoted to type int when used in the
ellipsis notation of a function.

These minor bugs were found using TrustInSoft Analyzer.

Signed-off-by: Julien Cretin <julien.cretin@trust-in-soft.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-14 11:22:11 +02:00
Julien Cretin
6f8d4ded4a app/testpmd: fix minor signed overflow in a constant
The expression (192 << 24) has an undefined behavior since:
- the integer constant 192 has type int, and
- 192 x 2^24 is not representable as an int.

Suffixing 192 with U defines a behavior since:
- the integer constant 192U has type unsigned int, and
- the value of (192U << 24) is defined as
  (192 x 2^24) % (UINT_MAX + 1)

This minor bug was found using TrustInSoft Analyzer.

Signed-off-by: Julien Cretin <julien.cretin@trust-in-soft.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-14 11:22:05 +02:00
Adrien Mazarguil
5886ae07d2 app/testpmd: fix crash of tx_first mode with numa
When NUMA is enabled, the mbuf pool pointer of per-core fwd_lcores structure
is not set, causing a crash when accessing to mbp for txonly burst.

Initialize fwd_lcore after allocating NUMA memory pools.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-30 22:59:17 +02:00
Liu Xiaofeng
20a0286fd2 app/testpmd: check socket id validity
Now socket id is from device's numa_node, if it is invalid, just set it to 0
as default to avoid crash which will be caused by the reference to
port_per_socket[socket_id].

Also one warning is displayed to user that port-numa-config and
ring-numa-config parameters should be used along with --numa for NUMA mode.

A check for NUMA_NO_CONFIG was also missing from init_fwd_stream().

Signed-off-by: Liu Xiaofeng <xiaofeng.liu@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-30 14:23:09 +02:00
Olivier Matz
4c39baf297 vdev: new registration API
Instead of having a list of virtual device drivers in EAL code, add an
API to register drivers. Thanks to this new registration method, we can
remove the references to pmd_ring, pmd_pcap and pmd_xenvirt in EAL code.
This also enables the ability to register a virtual device driver as
a shared library.

The registration is done in an init function flaged with
__attribute__((constructor)). The new convention is to name this
function rte_pmd_xyz_init(). The per-device init function is renamed
rte_pmd_xyz_devinit().

By the way the internal PMDs are now also .so/standalone ready. Let's do
it later on. It will be required to ease maintenance.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-11 16:17:42 +02:00
Olivier Matz
01b2092a5e testpmd: add dump commands for debug
Copy all the dump commands provided in app/test into app/testpmd. These
commands are useful to debug a problem when using testpmd.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 15:50:34 +02:00
Olivier Matz
0ae134b335 devargs: add dump command in test application
This is useful for debug purposes. Example:

echo 100 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 100 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
./app/test -c 0x15 -n 3 -m 64 \
  --use-dev="eth_ring0" --use-device="eth_ring1" --use-device="02:00.0"
RTE>>dump_devargs
User device white list:
  VIRTUAL eth_ring0
  VIRTUAL eth_ring1
  PCI whitelist 0000:02:00.0

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 15:50:34 +02:00
Olivier Matz
cac6d08c8b devargs: replace --use-device option by --pci-whitelist and --vdev
This commit splits the "--use-device" option in two new options:

- "--pci-whitelist or -w": add a PCI device in the white list
- "--vdev": instanciate a new virtual device

Before the patch, the same option "--use-device" was used for these 2
use-cases.

By the way, we also add "--pci-blacklist" in addition to the existing
"-b" for coherency with the whitelist parameter.

Test result:

echo 100 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 100 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
./app/test -c 0x15 -n 3 -m 64
RTE>>eal_flags_autotest
[...]
Test OK

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 15:50:34 +02:00
Olivier Matz
a8b97e3a1d devargs: use a comma instead of semicolon to separate key/values
This commit changes the API of --use-device command line argument.
It changes the separators from ';' to ','. Indeed, ';' is not the best
choice as this character is also used to separate shell commands,
forcing the user to surround arguments with quotes.

This commit impacts both devargs and kvargs as each of them define
a separator in --use-device argument:

- devargs defines the separator between the device name or pci_id and
   its arguments
- kvargs defines the separator between each key/value pairs in
   arguments for drivers using the kvargs API to parse their arguments

The modification of devargs and kvargs is done in one commit to keep
the coherency of --use-device.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 15:50:11 +02:00
Olivier Matz
1220458951 devargs: use devargs for vdev and PCI whitelist/blacklist
Remove old whitelist code:
- remove references to rte_pmd_ring, rte_pmd_pcap and pmd_xenvirt in
  is_valid_wl_entry() as we want to be able to register external virtual
  drivers as a shared library. Moreover this code was duplicated with
  dev_types[] from eal_common_pci.c
- eal_common_whitelist.c was badly named: it was able to process PCI
  devices white list and the registration of virtual devices
- the parsing code was complex: all arguments were prepended in
  one string dev_list_str[4096], then split again

Use the newly introduced rte_devargs to get:
- the PCI white list
- the PCI black list
- the list of virtual devices

Rework the tests:
- a part of the whitelist test can be removed as it is now tested
  in app/test/test_devargs.c
- the other parts are just reworked to adapt them to the new API

This commit induce a small API modification: it is not possible to specify
several devices per "--use-device" option. This notation was anyway a bit
cryptic. Ex:
  --use-device="eth_ring0,eth_pcap0;iface=ixgbe0"
  now becomes:
  --use-device="eth_ring0" --use-device="eth_pcap0;iface=ixgbe0"

On the other hand, it is now possible to work in PCI blacklist mode and
instanciate virtual drivers, which was not possible before this patch.

Test result:

./app/test -c 0x15 -n 3 -m 64
RTE>>devargs_autotest
EAL: invalid PCI identifier <08:1>
EAL: invalid PCI identifier <00.1>
EAL: invalid PCI identifier <foo>
EAL: invalid PCI identifier <>
EAL: invalid PCI identifier <000f:0:0>
Test OK

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 14:59:34 +02:00
Olivier Matz
bf6dea0e04 devargs: introduce API and test
This commit introduces a new API for storing device arguments given by
the user. It only adds the framework and the test. The modification of
EAL to use this new module is done in next commit.

The final goals:

- unify pci-blacklist, pci-whitelist, and virtual devices arguments
  in one file
- allow to register a virtual device driver from a dpdk extension
  provided as a shared library. For that we will require to remove
  references to rte_pmd_ring and rte_pmd_pcap in argument parsing code
- clarify the API of eal_common_whitelist.c, and rework its code that is
  often complex for no reason.
- support arguments for PCI devices and possibly future non-PCI devices
  (other than virtual devices) without effort.

Test result:

echo 100 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 100 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
./app/test -c 0x15 -n 3 -m 64
RTE>>eal_flags_autotest
[...]
Test OK

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 14:58:34 +02:00
Olivier Matz
5b1f4a67dd pci: rename device and driver lists
To avoid confusion with virtual devices, rename device_list as
pci_device_list and driver_list as pci_driver_list.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-10 14:58:31 +02:00
Stephen Hemminger
e6b87d19d9 get rid of DOS format end of lines
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-03-20 16:17:57 +01:00
David Marchand
2a315d6985 pcap: revert build patches
This reverts commits
a0cdfcf9 (use pcap-config to guess compilation flags),
ef5b2363 (fix build with empty LIBPCAP_CFLAGS) and
60191b89 (fix build when pcap_sendpacket is unavailable).

These patches are creating more problems than solving the initial one
(which was a build error with too old pcap libraries).
Since old pcap libraries are not that common, just revert them.

Reported-by: Meir Tseitlin <mirots@gmail.com>
Reported-by: Mats Liljegren <mats.liljegren@enea.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-03-19 14:33:52 +01:00
Zijie Pan
926fe27039 app/testpmd: fix configuration of pause frames
The entries for the configuration of the reception and of the transmission
of pause frames are inverted in the mode conversion array.

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2014-02-26 11:07:29 +01:00
Thomas Monjalon
0d56cb81d5 app/testpmd: fix build without librte_cmdline
Some features are not available if LIBRTE_CMDLINE is disabled:
- interactive mode
- ethernet address parsing

Note: ethernet address parsing could be rewritten without cmdline dependency.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:07:29 +01:00
Thomas Monjalon
21a7f4e264 app/test: fix build without librte_cmdline
Some features are not available if LIBRTE_CMDLINE is disabled:
- interactive commands
- cmdline tests
Remove also cmdline_parse includes which are not needed.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:07:29 +01:00
David Marchand
a0cdfcf936 pcap: use pcap-config to guess compilation flags
Use pcap-config to populate CFLAGS and LDFLAGS.
LIBPCAP_CFLAGS and LIBPCAP_LDFLAGS can be used to override this (useful when
cross-compiling).

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:07:28 +01:00
Ivan Boule
e659b6b439 ethdev: add pause frame counters for em/igb/ixgbe
Add into the `rte_eth_stats` data structure 4 (64-bit) counters
of XOFF/XON pause frames received and sent on a given port.

Update em, igb, and ixgbe drivers to return the value of the 4 XOFF/XON
counters through the `rte_eth_stats_get` function exported by the DPDK
API.

Display the value of the 4 XOFF/XON counters in the `testpmd` application.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:07:28 +01:00
Thomas Monjalon
10ed99419b pci: use igb_uio mapping only when needed
Since DPDK 1.4, if RTE_EAL_UNBIND_PORTS is disabled, igb_uio mapping is
done for all devices (commit eee16c964c), breaking some non-Intel drivers.
But pci_uio_map_resource() should only be called for Intel devices
(using igb_uio kernel module).
The flag RTE_PCI_DRV_NEED_IGB_UIO is set for all those devices, even when
RTE_EAL_UNBIND_PORTS is disabled (fixes commit a22f5ce8fc).

Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Damien Millescamps <damien.millescamps@6wind.com>
2014-02-26 11:07:28 +01:00
Olivier Matz
e495f54355 kvargs: add test case in app/test
Add a file app/test/test_kvargs.c that checks the rte_kvargs API.
The test passes:

  RTE>>kvargs
  == test valid case ==
  == test invalid case ==
  PMD: Error parsing device, invalid key <wrong-key>
  Test OK

I also tested that rte_eth_pcap runs with the following arguments:

  ./app/testpmd -c 0x15 -n 3 --proc-type=primary --huge-dir=/mnt/huge \
    --use-device="eth_pcap0;iface=ixgbe0" \
    -- -i --port-topology=chained

  ./app/testpmd -c 0x15 -n 3 --proc-type=primary --huge-dir=/mnt/huge \
    --use-device="eth_pcap0;rx_iface=ixgbe0;rx_iface=ixgbe1;tx_iface=ixgbe0" \
    -- -i --port-topology=chained

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 11:01:14 +01:00
Thomas Monjalon
894f5cc441 eal: fix type of pointer arithmetic result
Adding or subtracting a value to a pointer makes a new pointer
of unknown type.
So typeof() is replaced by (void*) in RTE_PTR_ADD() and RTE_PTR_SUB().

But RTE_PTR_ALIGN_* macros have in their explicit API to return a pointer
of the same type. Since RTE_PTR_ALIGN_CEIL is based on RTE_PTR_ADD, a
typeof() is added to keep the original behaviour.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2014-02-26 11:01:13 +01:00
Bruce Richardson
3ce690d3d5 app/testpmd: disable RSS when in SRIOV
Hardware does not support RSS in SRIOV setups.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-26 10:47:57 +01:00
Daniel Kan
35105f1288 app/testpmd: fix RSS by setting mq_mode
The mq_mode was not set when rxq is > 0; it's defaulted to ETH_MQ_RX_NONE.
As a result, RSS remains inactive. The fix is to set mq_mode to ETH_MQ_RX_RSS
when hf is non-zero.

This bug was introduced by commit 243db2ddee
igb/ixgbe: ETH_MQ_RX_NONE should disable RSS

Signed-off-by: Daniel Kan <dan@nyansa.com>
Acked-by: Maxime Leroy <maxime.leroy@6wind.com>
2014-02-26 10:47:00 +01:00
Bruce Richardson
57e852429d app/testpmd: added new macfwd-retry mode
This adds a new forwarding mode to testpmd, whereby it will forward
packets, but on a transmit failure, it will wait a small amount of time
before retrying the transmit again. This mode can be useful in some
cases to set a zero-packet loss rate at the cost of overall throughput,
especially in cases where TX ring size/buffering is constrained, such as
with virtio.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:33 +01:00
Bruce Richardson
2d23ec5631 app/test: fixes to python control script
* Change behaviour to spread the memory specified across all sockets
  rather than duplicating the memory for each one. This way the memory
  size specified is the total memory needed by the test.
* Minor reordering of test cases, to ensure that ring autotest is the
  final test run.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:33 +01:00
Bruce Richardson
5c64c7d168 app/test: remove all-autotests option
It's no longer possible to run all autotests in
a single go and have them pass, so remove that option.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:33 +01:00
Bruce Richardson
c1090bdee1 app/test: minor cleanup in test_acl
Minor chanes including replacing local DIM macro with more standard
RTE_DIM macro from rte_common.h.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:33 +01:00
Bruce Richardson
8ec70d19f5 app/test: conditionalize on timer enabled
don't compile the timer autotests unless timer library is turned on in
the compile-time configuration.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:33 +01:00
Bruce Richardson
e803ddb7e8 app/test: minor updates
Minor fixes/updates to the autotest app, including:
* replace hard-coded values with #defines in rte_power.h
* replace local DIM() macro with common RTE_DIM

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:33 +01:00
Bruce Richardson
148f963fb5 xen: core library changes
Core support for using the Intel DPDK with Xen Dom0 - including EAL
changes and mempool changes. These changes encompass how memory mapping
is done, including support for initializing a memory pool inside an
already-allocated block of memory.
KNI sample app updated to use KNI close function when used with Xen.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
40b966a211 ivshmem: library changes for mmaping using ivshmem
These library changes provide a new Intel DPDK feature for communicating
with virtual machines using QEMU's IVSHMEM mechanism.

The feature works by providing a command line for QEMU to map several hugepages
into a single IVSHMEM device. For the guest to know what is inside any given IVSHMEM
device (and to distinguish between Intel(R) DPDK and non-Intel(R) DPDK IVSHMEM
devices), a metadata file is also mapped into the IVSHMEM segment. No work needs to
be done by the guest application to map IVSHMEM devices into memory; they are
automatically recognized by the Intel(R) DPDK Environment Abstraction Layer (EAL).

Changes in this patch:
* Changes to EAL to allow mapping of all hugepages in a memseg into a single file
* Changes to EAL to allow ivshmem devices to be transparently mapped in
  the process running on the guest.
* New ivshmem library to create and manage metadata exported to guest VM's
* New ivshmem compilation targets
* Mempool and ring changes to allow export of structures to a VM and allow
  a VM to attach to those structures.
* New autotests to unit tests this functionality.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
013615a784 mem: add bounded reserve function
For certain functionality, e.g. Xen Dom0 support, it is required that
we can guarantee that memzones for descriptor rings won't cross 2M
boundaries. So add new memzone reserve function where we can pass in a
boundary condition parameter.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
764bf26873 add FreeBSD support
Changes to allow compilation and use on FreeBSD. Includes:
* contigmem and nic_uio driver for FreeBSD
* new EAL instance
* new "bsdapp" compilation target
* various compilation fixes due to differences between linux and freebsd

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
e9d48c0072 update Intel copyright years to 2014
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:14 +01:00
Intel
5e2ee19641 app/testpmd: more help
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
588ae1affb app/testpmd: add MAC control forward
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
7b7e5ba79e app/testpmd: add bypass support
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
b4ce15aa2b app/test: fix memory autotest
Memory length is printed as a decimal value since version 1.4
(commit 3b46fb77eb).

Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
b1fc0b2017 app/test: fix whitelist
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
51f567129c app/test: add pmd_ring
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
4d2ca079d4 app/test: rename pmac_acl as acl
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
9b0a912f5c app/cmdline_test: fix build without app/test
This application is built if LIBRTE_CMDLINE is enabled.
But there was no enabled source file if APP_TEST is disabled.
Let's consider that CONFIG_RTE_APP_TEST apply only on app/test.

Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
7741e4cf16 app/testpmd: VMDq and DCB updates
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
20309d5040 app/test: various updates
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
5233e5924a app/test: update kni
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
f1a6c22424 app/test: update interrupts test
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
6504308972 app/test: fix memzone test
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
97d3fc9188 app/test: new timer test
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
fa34246add app/test: add whitelist
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
277afaf3db app/test: add timer_perf
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
f1bd3e38c7 app/test: minor changes
Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
24f42575df app/test: remove pattern matching test
It needs librte_pmac which is not released.

Signed-off-by: Intel
2013-10-09 16:16:15 +02:00
Intel
4c173302c3 pcap: add new driver
This PMD uses libpcap to send/receive packets to/from any NIC.
It can also read/write to/from a file.

Signed-off-by: Intel
2013-10-09 16:16:14 +02:00
Intel
e25e4d7ef1 mk: shared libraries
Allow to build shared libraries (.so) instead of static ones (.a).

Signed-off-by: Intel
2013-10-09 15:35:36 +02:00
Intel
1c1d4d7a92 doc: whitespace changes in licenses
Signed-off-by: Intel
2013-10-09 14:51:55 +02:00
Intel
1ffc25b698 app/testpmd: update csumonly
Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
c655293cad app: fix build with GCC 4.8
GCC 4.8 was producing this error:
	argument to ‘sizeof’ in ‘strncmp’ call is the same expression as the
	second source; did you mean to provide an explicit length?
	[-Werror=sizeof-pointer-memaccess]

Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
8184f087dd app: only use one thread to run autotests
Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
1c14c98d7b app: fix build when some libs are disabled
Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
ac3fb3019c app: rework ring tests
Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
a8afb5e280 app: add a test on mbuf alignment
Signed-off-by: Intel
2013-09-17 14:16:09 +02:00
Intel
d92e8f6cbe app: add tests on --syslog, --no-shconf and --huge-dir flags
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
1fb8b07ee5 app: add some tests
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
b1368463ba app: remove pmac from Makefile
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
793e5df747 app: fix Makefile
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
f2e7592c47 kni: fix multi-process support
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
32e7aa0b3a ethdev: update VMDq/DCB support
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
01a638e15d ethdev: RSS RETA configuration
Signed-off-by: Intel
2013-09-17 14:16:07 +02:00
Intel
b6ea6408fb ethdev: store numa_node per device
Signed-off-by: Intel
2013-09-17 14:16:07 +02:00
Intel
a22f5ce8fc pci: don't unbind resources on exit
unbind operations must be done before starting eal application

Signed-off-by: Intel
2013-09-17 14:09:22 +02:00
Intel
0a45657a67 pci: rework interrupt handling
Signed-off-by: Intel <intel.com>
2013-09-17 14:09:22 +02:00
Stephen Hemminger
eee16c964c pci: support multiple PCI regions per device
Need to change PCI code to support multiple I/O regions on a single device.
Some devices like VMXNET3 have multiple PCI memory regions, and some
have none.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Intel
2013-09-17 14:09:22 +02:00
Intel
e0c8475561 mem: find most little element from heap
Allocations now return the most little element from heap matching size
constraint instead of the first one available.

Signed-off-by: Intel
2013-09-17 14:09:22 +02:00
Intel
e987449c9f timer: prefer TSC to HPET
Signed-off-by: Intel
2013-09-17 14:09:22 +02:00
Intel
1a9f648be2 hash: fix for multi-process apps
Signed-off-by: Intel
2013-09-17 14:09:22 +02:00
Intel
de3cfa2c98 sched: initial import
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
e6541fdec8 meter: initial import
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
d7937e2e3d power: initial import
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
5c510e13a9 lpm: add IPv6 support
Signed-off-by: Intel
2013-09-17 14:09:21 +02:00
Intel
bfdbde0c20 eal: add application usage hook
Signed-off-by: Intel
2013-09-16 15:30:52 +02:00
Intel
803b069703 lib: add rte_hexdump and remove duplicated code
Signed-off-by: Intel
2013-09-06 11:43:07 +02:00
Intel
a974564b34 lib: fix various compilation warnings
Signed-off-by: Intel
2013-09-06 11:43:07 +02:00
Intel
3b46fb77eb lib: 32/64-bit cleanups
Signed-off-by: Intel
2013-09-06 11:43:07 +02:00
Intel
3be52ffc88 app/testpmd: cosmetic changes
Signed-off-by: Intel
2013-09-06 11:43:07 +02:00
Intel
00752cbf41 file mode changes
Signed-off-by: Intel
2013-09-06 11:43:07 +02:00
Intel
b6df9fc871 update copyright date to 2013
Signed-off-by: Intel
2013-07-25 16:07:52 +02:00
Intel
ce8f00eaaa app: various changes
Signed-off-by: Intel
2013-07-25 16:07:51 +02:00
Zijie Pan
1b62bb7d7d app: fix unused values
Fix warnings of type "Value stored to 'xxx' is never read".

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2013-07-25 16:07:51 +02:00
Ivan Boule
85f5ae8b70 app: fix volatile read for GCC >= 4.6
When a memory address must be read, for instance a [mapped] PCI register,
the read value is assigned to a local variable that is not used after,
as for instance:
    x = *((uint8_t *) mem_addr);

Such instructions do not compile with gcc 4.6.
The fix consists in adding the "volatile" attribute to the accessed data type
and to not assign the read value:
    *((volatile uint8_t *) mem_addr);

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2013-07-25 16:07:51 +02:00
Ivan Boule
e788fe1c6a app/testpmd: fix compliance with __rte_mbuf_sanity_check()
Build mbuf and lists of mbufs in a way compliant with the checks performed
by the function __rte_mbuf_sanity_check() when CONFIG_RTE_LIBRTE_MBUF_DEBUG=y

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2013-07-25 16:07:51 +02:00
Damien Millescamps
c866aaa854 app/testpmd: fix config crash
A chained topology must always have an increment of 1.
Here, it was 2 if ports number is even.

Signed-off-by: Damien Millescamps <damien.millescamps@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2013-07-25 16:07:51 +02:00
Intel
0100a515b5 pmac: integration without lib
This library could be used for pattern matching and ACL.
Code of librte_pmac is not released as Open Source.

Signed-off-by: Intel
2013-07-25 16:07:50 +02:00
Intel
013af9b6b6 app/testpmd: various updates
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
9b53e542e9 app/testpmd: add priority flow control
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
900550de04 app/testpmd: add dcb support
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
ce8d561418 app/testpmd: add port configuration settings
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
c87988187f app/testpmd: add --total-num-mbufs option
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
e9e0a8a23a app/testpmd: fix check on mac address
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
cf808da4bd app/testpmd: fix fdir ipv4 filter
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
d59b178f12 app/testpmd: add fdir ipv6 support
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
a47aa8b97a app/testpmd: add vlan offload support
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
ed30d9b691 app/testpmd: add stats per queue
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Dongsu Han
84ac1559c4 app/testpmd: fix refcnt in mbuf allocation
test-pmd txonly leaks mbuf from the pool.
The function tx_mbuf_alloc() does not change the refcnt
and the refcnt is 0 when it is first allocated.
However, rte_pktmbuf_free_seg called by the driver's xmit code decrements
reference count to -1. So mbuf never goes back to the pool.
As a result, txonly can't send packets after it exhausts the mempool.

The function tx_mbuf_alloc() was getting mbuf directly from mempool and so
was bypassing mbuf API.
The dedicated function is rte_pktmbuf_alloc() but it is much slower because
it does unnecessary initializations in rte_pktmbuf_reset().
By using the internal API __rte_mbuf_raw_alloc(), refcnt is correctly handled
without adding too much overload.

Signed-off-by: Dongsu Han <dongsuh@cs.cmu.edu>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2013-07-25 15:54:18 +02:00
Intel
a40a1f8231 app: various tests update
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
a5d045b2b4 app: cosmetic
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
ce0ce98e9f app: update test pci device ids
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
45f1b6e868 app: add new tests on eal flags
Signed-off-by: Intel
2013-07-25 15:54:18 +02:00
Intel
104a92bd02 app: add reentrancy tests
Signed-off-by: Intel
2013-07-25 15:54:17 +02:00
Intel
5e0337786a app: change route table for lpm
Signed-off-by: Intel
2013-07-25 15:54:17 +02:00
Intel
e242c810e9 app: split performance tests
Signed-off-by: Intel
2013-07-25 15:54:17 +02:00
Intel
e2cc79b75d app: rework autotest.py
Signed-off-by: Intel
2013-07-25 15:54:17 +02:00
Intel
a25904dbbb app: refactor dump_cfg
Signed-off-by: Intel
2013-07-25 15:52:59 +02:00
Intel
1b938bb9df app: remove chkincs
Signed-off-by: Intel
2013-07-25 15:48:45 +02:00
Intel
69d22b8e66 ethdev: init all builtin drivers
Signed-off-by: Intel
2013-07-25 15:23:28 +02:00
Intel
42d7141686 mbuf: group fields in vlan_macip union
Signed-off-by: Intel
2013-07-25 15:23:27 +02:00
Intel
916e4f4f4e memory: fix for multi process support
Signed-off-by: Intel
2013-07-25 15:23:27 +02:00
Intel
50d7690548 ring: add burst API
Signed-off-by: Intel
2013-07-25 15:23:27 +02:00
Intel
18d5e8d78c hash: select default hash by looking at SSE flags
Signed-off-by: Intel
2013-07-25 15:23:27 +02:00
Intel
4cdf471a06 lpm: don't use memzone for allocations
Signed-off-by: Intel
2013-07-25 15:23:26 +02:00
Intel
dbb860e03e cmdline: tests
Signed-off-by: Intel
2013-07-25 15:01:58 +02:00
Intel
30a37273c1 lib: update tailq api
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
70dce76478 lib: new alignment macros
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
32832fc6c0 lib: sysfs parsing
Signed-off-by: Intel
2013-07-25 15:01:57 +02:00
Intel
dada9ef6ed remove version in all files
Signed-off-by: Intel
2013-07-05 11:59:50 +02:00
Intel
af75078fec first public release
version 1.2.3

Signed-off-by: Intel
2013-03-11 17:19:20 +01:00