History log of /dpdk/app/test-pmd/testpmd.c (Results 176 – 200 of 421)
Revision Date Author Comments
# 401b744d 07-Apr-2019 Shahaf Shuler <shahafs@mellanox.com>

app/testpmd: fix mempool free on exit

Allocated mempools were never free. it is bad practice.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs

app/testpmd: fix mempool free on exit

Allocated mempools were never free. it is bad practice.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 13302cd5 01-Apr-2019 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: use port sibling iterator in device cleanup

When removing a rte_device on a port-based request,
all the sibling ports must be marked as closed.
The iterator loop can be simplified by us

app/testpmd: use port sibling iterator in device cleanup

When removing a rte_device on a port-based request,
all the sibling ports must be marked as closed.
The iterator loop can be simplified by using the dedicated macro.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

show more ...


# 82010ef5 28-Mar-2019 Yongseok Koh <yskoh@mellanox.com>

app/testpmd: make txonly mode generate multiple flows

Testpmd can generate multiple flows without taking much cost and this
could be a simple traffic generator for developer's quick tests.
If "--txo

app/testpmd: make txonly mode generate multiple flows

Testpmd can generate multiple flows without taking much cost and this
could be a simple traffic generator for developer's quick tests.
If "--txonly-multi-flow" is specified in the command line, IP source
address is varied to generate multiple flows.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 53324971 25-Mar-2019 David Marchand <david.marchand@redhat.com>

app/testpmd: display/clear forwarding stats on demand

Add a new "show/clear fwd stats all" command to display fwd and port
statistics on the fly.

To be able to do so, the (testpmd only) rte_port st

app/testpmd: display/clear forwarding stats on demand

Add a new "show/clear fwd stats all" command to display fwd and port
statistics on the fly.

To be able to do so, the (testpmd only) rte_port structure can't be used
to maintain any statistics.
Moved the stats dump parts from stop_packet_forwarding() and merge with
fwd_port_stats_display() into fwd_stats_display().
fwd engine statistics are then aggregated into a local per port array.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# 7718296d 25-Mar-2019 David Marchand <david.marchand@redhat.com>

app/testpmd: remove useless casts on statistics

Caught by code review while investigating the fwd stats display code.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by

app/testpmd: remove useless casts on statistics

Caught by code review while investigating the fwd stats display code.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# c185d42c 25-Mar-2019 David Marchand <david.marchand@redhat.com>

app/testpmd: extend forwarding statistics to 64 bits

fwd engine statistics are stored as unsigned int (32bits) and can wrap
quite quickly.
Example: sending 7mpps for 614s gives us 4298000000 packets

app/testpmd: extend forwarding statistics to 64 bits

fwd engine statistics are stored as unsigned int (32bits) and can wrap
quite quickly.
Example: sending 7mpps for 614s gives us 4298000000 packets =>
0x1002e4680 larger than 32bits.

testpmd reports forwarding stats as:
RX-packets: 3500381 TX-packets: 3500010 TX-dropped: 371

While the port and accumulated stats are reported as 64bits:
RX-packets: 4298467677 RX-dropped: 0 RX-total: 4298467677
TX-packets: 4298467306 TX-dropped: 371 TX-total: 4298467677

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# 94d65546 25-Mar-2019 David Marchand <david.marchand@redhat.com>

app/testpmd: add missing newline when showing statistics

Having the standard stats and the rx burst stats on the same line gives a
really long line and is not consistent with the rest.

Before:
iofw

app/testpmd: add missing newline when showing statistics

Having the standard stats and the rx burst stats on the same line gives a
really long line and is not consistent with the rest.

Before:
iofwd engine
RX-packets: 121811360 TX-packets: 121811392 TX-dropped: 0 RX-bursts : 3806605 [100% of 32 pkts]
TX-bursts : 3806606 [100% of 32 pkts]

csum engine
RX-packets: 5467488 TX-packets: 5467520 TX-dropped: 0 RX- bad IP checksum: 0 Rx- bad L4 checksum: 0 Rx- bad outer L4 checksum: 0
RX-bursts : 170859 [100% of 32 pkts]
TX-bursts : 170860 [100% of 32 pkts]

After:
iofwd engine
RX-packets: 259770560 TX-packets: 259770592 TX-dropped: 0
RX-bursts : 8117830 [100% of 32 pkts]
TX-bursts : 8117831 [100% of 32 pkts]

csum engine
RX-packets: 7834016 TX-packets: 7834048 TX-dropped: 0 RX- bad IP checksum: 0 Rx- bad L4 checksum: 0 Rx- bad outer L4 checksum: 0
RX-bursts : 244813 [100% of 32 pkts]
TX-bursts : 244814 [100% of 32 pkts]

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# 683d1e82 18-Mar-2019 Igor Romanov <igor.romanov@oktetlabs.ru>

app/testpmd: fix stdout flush after printing stats

User can specify stats period(n). The statistics should be available
to user every n second. But the print_stats() function does not
force stdout t

app/testpmd: fix stdout flush after printing stats

User can specify stats period(n). The statistics should be available
to user every n second. But the print_stats() function does not
force stdout to be flushed, so for instance, a user reading testpmd's
stdout through pipe will not be able to read it until the stdout
buffer is filled.

Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 5fbc1d49 06-Mar-2019 Bruce Richardson <bruce.richardson@intel.com>

build/freebsd: rename macro BSDPAPP to FREEBSD

Rename the macro and all instances in DPDK code, but keep a copy of
the old macro defined for legacy code linking against DPDK

Signed-off-by: Bruce Ri

build/freebsd: rename macro BSDPAPP to FREEBSD

Rename the macro and all instances in DPDK code, but keep a copy of
the old macro defined for legacy code linking against DPDK

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 62e8a5a8 22-Jan-2019 Viacheslav Ovsiienko <viacheslavo@mellanox.com>

app/testpmd: add TOS and TTL fields to VXLAN encapsulation

The new testpmd set vxlan-tos-ttl command is added. It
allows to specify tos and tll fields for encapsulation IP
header.

IPv4 VXLAN outer

app/testpmd: add TOS and TTL fields to VXLAN encapsulation

The new testpmd set vxlan-tos-ttl command is added. It
allows to specify tos and tll fields for encapsulation IP
header.

IPv4 VXLAN outer header:

testpmd> set vxlan-tos-ttl ip-version ipv4 vni 4 udp-src 4
udp-dst 4 ip-tos 0 ip-ttl 255 ip-src 127.0.0.1
ip-dst 128.0.0.1 eth-src 11:11:11:11:11:11
eth-dst 22:22:22:22:22:22

IPv6 VXLAN outer header:
testpmd> set vxlan-tos-ttl ip-version ipv6 vni 4 udp-src 4
udp-dst 4 ip-tos 0 ip-ttl 255 ::1 ip-dst ::2222
eth-src 11:11:11:11:11:11 eth-dst
22:22:22:22:22:22

Note: ip-ttl parameter corresponds the nop_limits field for IPv6.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>

show more ...


# 08fd782b 04-Jan-2019 Cristian Dumitrescu <cristian.dumitrescu@intel.com>

app/testpmd: fix quit to stop all ports before close

This patch proposes a slightly different test-pmd quit operation: stop
all devices before starting to close any device. Basically, stop all
movin

app/testpmd: fix quit to stop all ports before close

This patch proposes a slightly different test-pmd quit operation: stop
all devices before starting to close any device. Basically, stop all
moving parts before beginning to remove them. The current test-pmd quit
is stopping and closing each device before moving to the next device.

If all devices in the system are independent of each other, this
difference is usually not important. In case of Soft NIC devices, any
such virtual device typically depends on one or more physical devices
being alive, as it accesses their queues, so this difference becomes
important.

Without this straightforward fix, all the Soft NIC devices need to be
manually stopped before the quit command is issued, otherwise the quit
command can sometimes crash the test-pmd application.

Fixes: d3a274ce9dee ("app/testpmd: handle SIGINT and SIGTERM")
Cc: stable@dpdk.org

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 9d650537 20-Dec-2018 Anatoly Burakov <anatoly.burakov@intel.com>

eal: add 64-bit log2 function

Add missing implementation for 64-bit log2 function, and extend
the unit test to test this new function. Also, remove duplicate
reimplementation of this function from t

eal: add 64-bit log2 function

Add missing implementation for 64-bit log2 function, and extend
the unit test to test this new function. Also, remove duplicate
reimplementation of this function from testpmd and memalloc.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# 4e261f55 20-Dec-2018 Anatoly Burakov <anatoly.burakov@intel.com>

eal: add 64-bit bsf and 32-bit safe bsf functions

Add an rte_bsf64 function that follows the convention of existing
rte_bsf32 function. Also, add missing implementation for safe
version of rte_bsf32

eal: add 64-bit bsf and 32-bit safe bsf functions

Add an rte_bsf64 function that follows the convention of existing
rte_bsf32 function. Also, add missing implementation for safe
version of rte_bsf32, and implement unit tests for all recently
added bsf varieties.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# e9436f54 03-Dec-2018 Tiwei Bie <tiwei.bie@intel.com>

pdump: remove deprecated APIs

We already changed to use generic IPC in pdump since below commit:

commit 660098d61f57 ("pdump: use generic multi-process channel")

The `rte_pdump_set_socket_dir()`,

pdump: remove deprecated APIs

We already changed to use generic IPC in pdump since below commit:

commit 660098d61f57 ("pdump: use generic multi-process channel")

The `rte_pdump_set_socket_dir()`, the `path` parameter of
`rte_pdump_init()` and the `enum rte_pdump_socktype` have been
deprecated since then. This commit removes these deprecated
APIs and also bumps the pdump ABI.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>

show more ...


# cc1bf307 15-Nov-2018 Jeff Guo <jia.guo@intel.com>

app/testpmd: workaround deadlock in hot-unplug callback

Because the user's callback is invoked in eal interrupt callback, the
interrupt callback need to be finished before it can be unregistered
whe

app/testpmd: workaround deadlock in hot-unplug callback

Because the user's callback is invoked in eal interrupt callback, the
interrupt callback need to be finished before it can be unregistered
when detaching device. So finish callback soon and use a deferred
removal to detach device is need.

It is a workaround, once the device detaching be moved into the eal in
the future, the deferred removal could be deleted. This patch aim to
add this workaround and refine the function name and the description to
be more explicit and comment the limitation.

Fixes: 2049c5113fe8 ("app/testpmd: use hotplug failure handler")

Signed-off-by: Jeff Guo <jia.guo@intel.com>

show more ...


# 4f1ed78e 25-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: setup attached ports on probe event

After probing is done, each new port must be setup.
The new ports are currently guessed by iterating on ports
matching the devargs string used for pr

app/testpmd: setup attached ports on probe event

After probing is done, each new port must be setup.
The new ports are currently guessed by iterating on ports
matching the devargs string used for probing.

When probing a port, it is possible that one more port probing
get triggered (e.g. PF is automatically probed when probing
a VF representor). Such automatic probing will be caught only on event.

The iterator loop may be replaced by a call from the event callback.
In order to be able to test both modes, a command is added
to choose between iterator and event modes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 97b5d8b5 25-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: move ethdev events registration

The callback for ethdev events was registered on port start,
so it was missing some events.

It is now registered at the beginning of the main function.

app/testpmd: move ethdev events registration

The callback for ethdev events was registered on port start,
so it was missing some events.

It is now registered at the beginning of the main function.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 86fa5de1 25-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: check not configuring port twice

It is possible to request probing of a device twice,
and possibly get new ports for this device.
However, the ports which were already probed and setup

app/testpmd: check not configuring port twice

It is possible to request probing of a device twice,
and possibly get new ports for this device.
However, the ports which were already probed and setup
must not be setup again. That's why it is checked whether
the port is already part of fwd_ports_ids array at the beginning
of the function setup_attached_port().

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# 4f1de450 25-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: merge ports list update functions

The arrays ports_ids and fwd_ports_ids require the same kind
of update when some ports are removed or added.

The functions update_fwd_ports() and remo

app/testpmd: merge ports list update functions

The arrays ports_ids and fwd_ports_ids require the same kind
of update when some ports are removed or added.

The functions update_fwd_ports() and remove_unused_fwd_ports()
are merged in the new function remove_invalid_ports().
The part for adding new port is moved into setup_attached_port().

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# f8e5baa2 25-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: check not detaching device twice

The command "port detach" is removing the EAL rte_device
of the ethdev port specified as parameter.
The function name and some comments are updated to m

app/testpmd: check not detaching device twice

The command "port detach" is removing the EAL rte_device
of the ethdev port specified as parameter.
The function name and some comments are updated to make clear
that we are detaching the whole device.

After detaching, the pointer, which maps a port to its device,
is reset. This way, it is possible to check whether a port
is still associated to a (not removed) device.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# c9cce428 23-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

ethdev: remove deprecated attach/detach functions

The hotplug attach/detach features are implemented in EAL layer.
There is a new ethdev iterator to retrieve ports from ethdev layer.

As announced e

ethdev: remove deprecated attach/detach functions

The hotplug attach/detach features are implemented in EAL layer.
There is a new ethdev iterator to retrieve ports from ethdev layer.

As announced earlier, the (buggy) ethdev functions are now removed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

show more ...


# c18feafa 21-Oct-2018 Dekel Peled <dekelp@mellanox.com>

app/testpmd: support metadata as flow rule item

As described in [1], this series adds option to set metadata value
as match pattern when creating a new flow rule.

This patch introduces additional o

app/testpmd: support metadata as flow rule item

As described in [1], this series adds option to set metadata value
as match pattern when creating a new flow rule.

This patch introduces additional options in testpmd commands:
- New item type "meta" "data"
- New per-port offload flag "match_metadata".

It also adds commands to configure the tx_metadata value to use:
- New 'config' command takes a 32 bit value and stores it per port:
port config <port_id> tx_metadata <value>
testpmd will add to any Tx packet sent from this port the metadata
value, and set ol_flags accordingly.
- A matching 'show' command is added to read the configured value:
port config <port_id> tx_metadata <value>

[1] "ethdev: support metadata as flow rule criteria"

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# 23ea57a2 19-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

ethdev: complete closing of port

After closing a port, it cannot be restarted.
So there is no reason to not free all associated resources.

The last step was done with rte_eth_dev_detach() which is

ethdev: complete closing of port

After closing a port, it cannot be restarted.
So there is no reason to not free all associated resources.

The last step was done with rte_eth_dev_detach() which is deprecated.
Instead of blindly removing the associated rte_device, the driver should
check if no more port (ethdev, cryptodev, etc) is open for the device.

The last ethdev freeing which were done by rte_eth_dev_detach(),
are now done at the end of rte_eth_dev_close() if the driver supports
the flag RTE_ETH_DEV_CLOSE_REMOVE.
There will be a transition period for PMDs to enable this new flag
and migrate to the new behaviour.
When enabling RTE_ETH_DEV_CLOSE_REMOVE, the PMD must free all its
private resources for the port, in its dev_close function.
It is advised to call the dev_close function in the remove function
in order to support removing a device without closing its ports.

Some drivers does not allocate MAC addresses dynamically or separately.
In those cases, the pointer is set to NULL, in order to avoid wrongly
freeing them in rte_eth_dev_release_port().

A closed port will have the state RTE_ETH_DEV_UNUSED which is
considered as invalid by rte_eth_dev_is_valid_port().
So validity is not checked anymore for closed ports in testpmd.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

show more ...


# 3f4a8370 19-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

app/testpmd: allow detaching a port not closed

The testpmd application aim is for testing;
so order of operations should not be enforced.

There was a test to forbid detaching before closing a port.

app/testpmd: allow detaching a port not closed

The testpmd application aim is for testing;
so order of operations should not be enforced.

There was a test to forbid detaching before closing a port.
However, it may interesting to test what happens in such case.
It is possible for a PMD to automatically close the port when detaching.

in order to avoid a crash, it is checked that the port must be stopped
before detaching (as for closing).

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


# ce6959bf 19-Oct-2018 Wisam Jaddo <wisamm@mellanox.com>

app/testpmd: update port list for multiple removals

When detaching a port, the full rte_device is removed.
If the rte_device was hosting several ports,
the testpmd list of ports must be updated for

app/testpmd: update port list for multiple removals

When detaching a port, the full rte_device is removed.
If the rte_device was hosting several ports,
the testpmd list of ports must be updated for multiple removals.

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

show more ...


12345678910>>...17