Commit Graph

37 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
7b7e5ba79e app/testpmd: add bypass support
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
1c1d4d7a92 doc: whitespace changes in licenses
Signed-off-by: Intel
2013-10-09 14:51:55 +02:00
Intel
32e7aa0b3a ethdev: update VMDq/DCB support
Signed-off-by: Intel
2013-09-17 14:16:08 +02:00
Intel
b6ea6408fb ethdev: store numa_node per device
Signed-off-by: Intel
2013-09-17 14:16:07 +02:00
Intel
b6df9fc871 update copyright date to 2013
Signed-off-by: Intel
2013-07-25 16:07:52 +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
Intel
013af9b6b6 app/testpmd: various updates
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
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
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
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