History log of /dpdk/app/test-pmd/testpmd.h (Results 26 – 50 of 303)
Revision Date Author Comments
# 180ba023 20-Feb-2023 David Marchand <david.marchand@redhat.com>

app/testpmd: factorize fwd engines init

Reduce code duplication by introducing a helper that takes care of
initialising the fs object.

While at it, remove unneeded initialisation of fwd_engine empt

app/testpmd: factorize fwd engines init

Reduce code duplication by introducing a helper that takes care of
initialising the fs object.

While at it, remove unneeded initialisation of fwd_engine empty fields.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# 06c20561 20-Feb-2023 David Marchand <david.marchand@redhat.com>

app/testpmd: factorize core cycles record

Rather than have each forward engines deal with core cycles recording,
move this to testpmd common code.
fwd engines just need to report that they did some

app/testpmd: factorize core cycles record

Rather than have each forward engines deal with core cycles recording,
move this to testpmd common code.
fwd engines just need to report that they did some busy work.

By doing this, get_*_cycles() helpers are unneeded and removed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# 3e3edab5 02-Feb-2023 Gregory Etelson <getelson@nvidia.com>

ethdev: add flow quota

Quota action limits traffic according to pre-defined configuration.
Quota reflects overall traffic usage regardless bandwidth.
Quota flow action initialized with signed tokens

ethdev: add flow quota

Quota action limits traffic according to pre-defined configuration.
Quota reflects overall traffic usage regardless bandwidth.
Quota flow action initialized with signed tokens number value.
Quota flow action updates tokens number according to
these rules:
1. if quota was configured to count packet length, for each packet
of size S, tokens number reduced by S.
2. If quota was configured to count packets, each packet decrements
tokens number.
quota action sets packet metadata according to a number of remaining
tokens number:
PASS - remaining tokens number is non-negative.
BLOCK - remaining tokens number is negative.

Quota flow item matches on that data

Application updates tokens number in quota flow action
with SET or ADD calls:
SET(QUOTA, val) - arm quota with new tokens number set to val
ADD(QUOTA, val) - increase existing quota tokens number by val

Both SET and ADD return to application number of tokens stored in port
before update.

If quota state was BLOCK (negative action tokens number)
application can change it to PASS after providing enough tokens to
raise action tokens number to 0 or above.

Application must create a rule with quota action to mark flow and
match on the mark with quota item in following flow rule.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 60261a00 08-Feb-2023 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add flow template table insertion type

Allow user to specify insertion type used in template tables.
The insertion type is responsible for choosing the appropriate key
value used to map inse

ethdev: add flow template table insertion type

Allow user to specify insertion type used in template tables.
The insertion type is responsible for choosing the appropriate key
value used to map inserted flow rules into a template table.

Flow rules can be inserted by calculating the hash value for
the pattern or inserted by index via the new create_by_index() API.
The idea of the index-based insertion is to avoid additional matches
and simply execute predefined actions after jumping to the index.

This is how the regular pattern-based table works:
1. The hash is calculated on a 5-tuple of a packet.
2. The corresponding entry in the table is checked for collisions.
3. Actions are executed once the final entry is found.
The index-based table skips any lookups for the packet:
1. The index value is taken from a specified field.
2. Actions are executed at the specified index in the table.

The insertion into an already occupied index results in an error.
The old rule must be destroyed first. An index cannot be bigger than
the size of the table, otherwise, the rule is rejected as well.

Add testpmd CLI interface for specifying a template table insertion type.
Available types are: pattern and index.
flow template_table 0 create table_id 0 insertion_type index ...
Allow specifying the rule index instead of the pattern template index:
flow queue 0 create 0 template_table 0 rule_index 5 actions_template 0 ...

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 543df472 15-Dec-2022 Chengwen Feng <fengchengwen@huawei.com>

app/testpmd: add --disable-flow-flush option

This patch adds "--disable-flow-flush" parameter, which could used to
disable port flow flush when stop port. It allows testing keep flow
rules or shared

app/testpmd: add --disable-flow-flush option

This patch adds "--disable-flow-flush" parameter, which could used to
disable port flow flush when stop port. It allows testing keep flow
rules or shared flow objects across restart.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>

show more ...


# 99a4974a 09-Feb-2023 Robin Jarry <rjarry@redhat.com>

app/testpmd: report lcore usage

The --record-core-cycles option already accounts for busy cycles. One
turn of packet_fwd_t is considered "busy" if there was at least one
received or transmitted pack

app/testpmd: report lcore usage

The --record-core-cycles option already accounts for busy cycles. One
turn of packet_fwd_t is considered "busy" if there was at least one
received or transmitted packet.

Rename core_cycles to busy_cycles in struct fwd_stream to make it more
explicit. Add total_cycles to struct fwd_lcore. Add cycles accounting in
noisy_vnf where it was missing.

When --record-core-cycles is specified, register a callback with
rte_lcore_register_usage_cb() and update total_cycles every turn of
lcore loop based on a starting tsc value.

In the callback, resolve the proper struct fwd_lcore based on lcore_id
and return the lcore total_cycles and the sum of busy_cycles of all its
fwd_streams.

This makes the cycles counters available in rte_lcore_dump() and the
lcore telemetry API:

testpmd> dump_lcores
lcore 3, socket 0, role RTE, cpuset 3
lcore 4, socket 0, role RTE, cpuset 4, busy cycles 1228584096/9239923140
lcore 5, socket 0, role RTE, cpuset 5, busy cycles 1255661768/9218141538

--> /eal/lcore/info,4
{
"/eal/lcore/info": {
"lcore_id": 4,
"socket": 0,
"role": "RTE",
"cpuset": [
4
],
"busy_cycles": 10623340318,
"total_cycles": 55331167354
}
}

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>

show more ...


# a4bf5421 21-Nov-2022 Hanumanth Pothula <hpothula@marvell.com>

app/testpmd: add option to fix multi-mempool check

Add new testpmd command line argument, multi-rx-mempool,
to control multi-rx-mempool feature. By default it's disabled.

Also, validate ethdev para

app/testpmd: add option to fix multi-mempool check

Add new testpmd command line argument, multi-rx-mempool,
to control multi-rx-mempool feature. By default it's disabled.

Also, validate ethdev parameter 'max_rx_mempools' to know whether
device supports multi-mempool feature or not.

Bugzilla ID: 1128
Fixes: 4f04edcda769 ("app/testpmd: support multiple mbuf pools per Rx queue")

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
Tested-by: Yaqi Tang <yaqi.tang@intel.com>

show more ...


# 6d736e05 08-Nov-2022 Suanming Mou <suanmingm@nvidia.com>

app/testpmd: flush flow templates when port is removed

Add explicit flushing of template tables, pattern and actions templates,
when a port is closed or detached.

Signed-off-by: Suanming Mou <suanm

app/testpmd: flush flow templates when port is removed

Add explicit flushing of template tables, pattern and actions templates,
when a port is closed or detached.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>

show more ...


# 4f04edcd 10-Nov-2022 Hanumanth Pothula <hpothula@marvell.com>

app/testpmd: support multiple mbuf pools per Rx queue

Some of the HW has support for choosing memory pools based on
the packet's size. The pool sort capability allows PMD/NIC to
choose a memory pool

app/testpmd: support multiple mbuf pools per Rx queue

Some of the HW has support for choosing memory pools based on
the packet's size. The pool sort capability allows PMD/NIC to
choose a memory pool based on the packet's length.

On multiple mempool support enabled, populate mempool array
accordingly. Also, print pool name on which packet is received.

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# f4f7ba1a 07-Nov-2022 Alexander Kozyrev <akozyrev@nvidia.com>

app/testpmd: fix flow list with async flow API

Flows created with the new asynchronous flow API lack attributes
(direction, priority, group number). These attributes are part of
a template table for

app/testpmd: fix flow list with async flow API

Flows created with the new asynchronous flow API lack attributes
(direction, priority, group number). These attributes are part of
a template table for flows created via rte_flow_async_create().

When testpmd tries to list all the flows it accesses flow
attributes via pointer and crashes. Save flow attributes during
the template table creation and use them in the "flow list" output.

Fixes: ecdc927b99 ("app/testpmd: add async flow create/destroy operations")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 7c06f1ab 07-Nov-2022 Huisong Li <lihuisong@huawei.com>

app/testpmd: update bonding configuration for new slave

Some capabilities (like, rx_offload_capa and tx_offload_capa) of bonding
device in dev_info is zero when no slave is added. And its capability

app/testpmd: update bonding configuration for new slave

Some capabilities (like, rx_offload_capa and tx_offload_capa) of bonding
device in dev_info is zero when no slave is added. And its capability will
be updated when add a new slave device.

The capability to update dynamically may introduce some problems if not
handled properly. For example, the reconfig() is called to initialize
bonding port configurations when create a bonding device. The global
tx_mode is assigned to dev_conf.txmode. The DEV_TX_OFFLOAD_MBUF_FAST_FREE
which is the default value of global tx_mode.offloads in testpmd is removed
from bonding device configuration because of zero rx_offload_capa.
As a result, this offload isn't set to bonding device.

Generally, port configurations of bonding device must be within the
intersection of the capability of all slave devices. If use original port
configurations, the removed capabilities because of adding a new slave may
cause failure when re-initialize bonding device.

So port configurations of bonding device need to be updated because of the
added and removed capabilities. In addition, this also helps to ensure
consistency between testpmd and bonding device.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Min Hu (Connor) <humin29@huawei.com>

show more ...


# 236bc417 26-Oct-2022 Gregory Etelson <getelson@nvidia.com>

app/testpmd: fix MAC header in checksum forward engine

MLX5 SR-IOV Tx engine will not transmit Ethernet frame
if destination MAC address matched local port address. The frame ether
looped-back to Rx

app/testpmd: fix MAC header in checksum forward engine

MLX5 SR-IOV Tx engine will not transmit Ethernet frame
if destination MAC address matched local port address. The frame ether
looped-back to Rx or dropped, depending on the port configuration.

Application running over MLX5 SR-IOV port cannot transmit packet
polled from Rx queue as is. The packet Ethernet destination address
must be changed.

Add new run-time configuration parameter to the `csum` forwarding
engine to control MAC addresses configuration:

testpmd> csum mac-swap on|off <port_id>

`mac-swap on` replace MAC addresses.
`mac-swap off` keep Ethernet header unchanged.

Fixes: 9b4ea7ae77fa ("app/testpmd: revert MAC update in checksum forwarding")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Huisong Li <lihuisong@huawei.com>

show more ...


# 966eb55e 26-Oct-2022 Michael Baum <michaelba@nvidia.com>

ethdev: add queue-based API to report aged flow rules

When application use queue-based flow rule management and operate the
same flow rule on the same queue, e.g create/destroy/query, API of
queryin

ethdev: add queue-based API to report aged flow rules

When application use queue-based flow rule management and operate the
same flow rule on the same queue, e.g create/destroy/query, API of
querying aged flow rules should also have queue id parameter just like
other queue-based flow APIs.

By this way, PMD can work in more optimized way since resources are
isolated by queue and needn't synchronize.

If application do use queue-based flow management but configure port
without RTE_FLOW_PORT_FLAG_STRICT_QUEUE, which means application operate
a given flow rule on different queues, the queue id parameter will
be ignored.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 020dbb4c 17-Oct-2022 Chengwen Feng <fengchengwen@huawei.com>

app/testpmd: remove jumbo offload

The jumbo offload was removed from patch [1], but testpmd still exist
jumbo offload related code, this patch removes it, and also updates
the rst file.

[1] ethdev:

app/testpmd: remove jumbo offload

The jumbo offload was removed from patch [1], but testpmd still exist
jumbo offload related code, this patch removes it, and also updates
the rst file.

[1] ethdev: remove jumbo offload flag

Fixes: b563c1421282 ("ethdev: remove jumbo offload flag")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 23f2dfd3 12-Oct-2022 Yuan Wang <yuanx.wang@intel.com>

app/testpmd: remove unused parameter in Rx header split

Protocol header sequence checking is supported in the ethdev library,
the application does not need to do it again.

Coverity issue: 381396
Fi

app/testpmd: remove unused parameter in Rx header split

Protocol header sequence checking is supported in the ethdev library,
the application does not need to do it again.

Coverity issue: 381396
Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 52e2e7ed 09-Oct-2022 Yuan Wang <yuanx.wang@intel.com>

app/testpmd: add protocol-based buffer split

Add command line parameter:
--rxhdrs=eth[,ipv4]

Set the protocol_hdr of segments to scatter packets on receiving if
split feature is engaged. And the qu

app/testpmd: add protocol-based buffer split

Add command line parameter:
--rxhdrs=eth[,ipv4]

Set the protocol_hdr of segments to scatter packets on receiving if
split feature is engaged. And the queues with BUFFER_SPLIT flag.

Add interactive mode command:
testpmd>set rxhdrs eth,ipv4,ipv4-udp
(protocol sequence should be valid)

The protocol split feature is off by default. To enable protocol split,
you need:
1. Start testpmd with multiple mempools. E.g. --mbuf-size=2048,2048
2. Configure Rx queue with rx_offload buffer split on.
3. Set the protocol type of buffer split. E.g. set rxhdrs eth,eth-ipv4
(default protocols of testpmd : eth|ipv4|ipv6|ipv4-tcp|ipv6-tcp|
ipv4-udp|ipv6-udp|ipv4-sctp|ipv6-sctp|grenat|inner-eth|
inner-ipv4|inner-ipv6|inner-ipv4-tcp|inner-ipv6-tcp|
inner-ipv4-udp|inner-ipv6-udp|inner-ipv4-sctp|inner-ipv6-sctp)
Above protocols can be configured in testpmd. But the configuration can
only be applied when it is supported by specific pmd.

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 23095155 06-Oct-2022 Dariusz Sosnowski <dsosnowski@nvidia.com>

app/testpmd: add hairpin queue memory modes

This patch extends hairpin-mode command line option of test-pmd
application with an ability to configure whether Rx/Tx hairpin queue
should use locked dev

app/testpmd: add hairpin queue memory modes

This patch extends hairpin-mode command line option of test-pmd
application with an ability to configure whether Rx/Tx hairpin queue
should use locked device memory or RTE memory.

For purposes of this configurations the following bits of 32 bit
hairpin-mode are reserved:

- Bit 8 - If set, then force_memory flag will be set for hairpin RX
queue.
- Bit 9 - If set, then force_memory flag will be set for hairpin TX
queue.
- Bits 12-15 - Memory options for hairpin Rx queue:
- Bit 12 - If set, then use_locked_device_memory will be set.
- Bit 13 - If set, then use_rte_memory will be set.
- Bit 14 - Reserved for future use.
- Bit 15 - Reserved for future use.
- Bits 16-19 - Memory options for hairpin Tx queue:
- Bit 16 - If set, then use_locked_device_memory will be set.
- Bit 17 - If set, then use_rte_memory will be set.
- Bit 18 - Reserved for future use.
- Bit 19 - Reserved for future use.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

show more ...


# 3a26e41e 28-Sep-2022 Satha Rao <skoteshwar@marvell.com>

ethdev: increase queue rate parameter from 16b to 32b

The rate parameter modified to uint32_t, so that it can work
for more than 64 Gbps.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Reviewed-

ethdev: increase queue rate parameter from 16b to 32b

The rate parameter modified to uint32_t, so that it can work
for more than 64 Gbps.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 9c4a0c18 26-Sep-2022 Alexander Kozyrev <akozyrev@nvidia.com>

ethdev: add meter color mark flow action

Create a new Flow API action: METER_MARK.
It Meters a packet stream and marks its packets with colors.
The marking is done on a metadata, not on a packet fie

ethdev: add meter color mark flow action

Create a new Flow API action: METER_MARK.
It Meters a packet stream and marks its packets with colors.
The marking is done on a metadata, not on a packet field.
Unlike the METER action, it performs no policing at all.
A user has the flexibility to create any policies with the help of
the METER_COLOR item later, only meter profile is mandatory here.

Add testpmd command line to match for METER_MARK action:
flow create ... actions meter_mark mtr_profile 20 / end

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

show more ...


# 4ed89049 04-Oct-2022 David Marchand <david.marchand@redhat.com>

remove prefix to some local macros in apps and examples

RTE_TEST_[RT]X_DESC_DEFAULT and RTE_TEST_[RT]X_DESC_MAX macros have been
copied in a lot of app/ and examples/ code.
Those macros are local to

remove prefix to some local macros in apps and examples

RTE_TEST_[RT]X_DESC_DEFAULT and RTE_TEST_[RT]X_DESC_MAX macros have been
copied in a lot of app/ and examples/ code.
Those macros are local to each program.

They are not related to a DPDK public header/API, drop the RTE_TEST_
prefix.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

show more ...


# c9dc0384 20-Sep-2022 Suanming Mou <suanmingm@nvidia.com>

ethdev: add indirect action async query

As rte_flow_action_handle_create/destroy/update() have their own
asynchronous rte_flow_async_action_handle_create/destroy/update()
version functions to accele

ethdev: add indirect action async query

As rte_flow_action_handle_create/destroy/update() have their own
asynchronous rte_flow_async_action_handle_create/destroy/update()
version functions to accelerate the indirect action operations in
queue based flow engine. Currently, the asynchronous version query
function for indirect action was missing.

Add rte_flow_async_action_handle_query() function corresponding
to rte_flow_action_handle_query(). The new asynchronous version
function enables enqueue the query to the hardware similar as
asynchronous flow management does and returns immediately to free
the CPU for other tasks. Application can get the query results from
rte_flow_pull() when the hardware completes its work.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>

show more ...


# 5007ac13 03-Aug-2022 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

ethdev: remove deprecated Flow Director configuration

Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.

Add internal Flow Director configuratio

ethdev: remove deprecated Flow Director configuration

Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.

Add internal Flow Director configuration copy in ixgbe and txgbe device
private data since flow API supports requires it. Initialize mode to
the first flow rule mode on the rule validation or creation.

Since Flow Director configuration data types are still used by some
drivers internally, move it from public API to ethdev driver internal
API.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>

show more ...


# 0100a038 21-Jul-2022 David Marchand <david.marchand@redhat.com>

net/ixgbe: move testpmd commands

Move related specific testpmd commands into this driver directory.
The bypass init is left in testpmd at this point and can be moved later.
While at it, fix checkpat

net/ixgbe: move testpmd commands

Move related specific testpmd commands into this driver directory.
The bypass init is left in testpmd at this point and can be moved later.
While at it, fix checkpatch warnings.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>

show more ...


# 1bcb7ba9 28-Jul-2022 David Marchand <david.marchand@redhat.com>

app/testpmd: drop PCI register commands

Those commands date back to the early stages of DPDK when only PCI
devices were supported.
At the time, developers may have used those commands to help in
deb

app/testpmd: drop PCI register commands

Those commands date back to the early stages of DPDK when only PCI
devices were supported.
At the time, developers may have used those commands to help in
debugging their buggy^Wwork in progress drivers.

Removing them, we can drop the dependency on the PCI bus and library and
make testpmd bus agnostic.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...


# 119786aa 29-Jun-2022 Ferruh Yigit <ferruh.yigit@xilinx.com>

app/testpmd: remove duplicated flow type name table

Flow type table has two instance, one is used for flow type to string
conversion, and other is used for string to flow type conversion.
And tables

app/testpmd: remove duplicated flow type name table

Flow type table has two instance, one is used for flow type to string
conversion, and other is used for string to flow type conversion.
And tables are diverged by time.

Unifying tables to prevent maintaining two different tables.

Note: made 'flowtype_to_str()' and 'str_to_flowtype()' non-static to
prevent build error for the case PMDs using it disables. Making the two
functions generic, not for some PMDs.

Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>

show more ...


12345678910>>...13