| #
baef6bbf |
| 06-Apr-2022 |
Min Hu (Connor) <[email protected]> |
app/testpmd: check statistics query before printing
In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails, 'stats' is uncertainty value. The display result will be abnormal.
This p
app/testpmd: check statistics query before printing
In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails, 'stats' is uncertainty value. The display result will be abnormal.
This patch check the return value of 'rte_eth_stats_get' to avoid display abnormal stats.
Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand") Cc: [email protected]
Signed-off-by: Min Hu (Connor) <[email protected]> Acked-by: Aman Singh <[email protected]>
show more ...
|
|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2 |
|
| #
d8c079a5 |
| 17-Feb-2022 |
Min Hu (Connor) <[email protected]> |
app/testpmd: check starting port is not in bonding
In bond, start or stop slave port should be operated by bonding port. This patch add port_is_bonding_slave in start_port function.
Fixes: 0e545d30
app/testpmd: check starting port is not in bonding
In bond, start or stop slave port should be operated by bonding port. This patch add port_is_bonding_slave in start_port function.
Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding") Cc: [email protected]
Signed-off-by: Min Hu (Connor) <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v22.03-rc1 |
|
| #
06c047b6 |
| 09-Feb-2022 |
Stephen Hemminger <[email protected]> |
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free functions found by nullfree.cocci
Signed-off-by: Stephen Hemminger <[email protected]>
show more ...
|
| #
13b19642 |
| 17-Dec-2021 |
Dmitry Kozlyuk <[email protected]> |
app/testpmd: fix external buffer allocation
External pinned buffer memory (--mp-alloc=xbuf) was allocated as multiple IOVA-contiguous memzones of 2M size and 2M alignment. Due to the malloc overhead
app/testpmd: fix external buffer allocation
External pinned buffer memory (--mp-alloc=xbuf) was allocated as multiple IOVA-contiguous memzones of 2M size and 2M alignment. Due to the malloc overhead and the alignment requirement, each 2M memzone consumed 4M of hugepage memory: 2M of usable memory + X of malloc overhead + (2M-X) padding. The allocation often failed with 2M hugepages and IOVA-as-PA if a PA-contiguous span of 2 hugepages could not be found. Also, with any hugepage size and IOVA mode memory consumption was almost 2x of the usable amount.
Alignment requirement of 2M for external buffers is redundant. It was an attempt to ensure IOVA-contiguity by forcing memzones to start at hugepage boundaries, while 2M size intended to leave no unused space on the page. As shown above, this in fact caused excessive memory consumption and decreased the chance of a successful allocation. RTE_MEMZONE_F_IOVA_CONTIG already ensures IOVA-contiguity.
Remove the alignment requirement. Reduce the memzone size by the malloc overhead size (4 cache lines), so that memory consumption for each memzone is (2M-X) of usable memory + X of malloc overhead = 2M. This also means that whenever there are free 2M hugepages, an IOVA-contiguous memzone can always be allocated.
Fixes: 72512e1897b2 ("app/testpmd: add mempool with external data buffers") Cc: [email protected]
Signed-off-by: Dmitry Kozlyuk <[email protected]> Signed-off-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| #
7be78d02 |
| 29-Nov-2021 |
Josh Soref <[email protected]> |
fix spelling in comments and strings
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3 |
|
| #
2490bb89 |
| 16-Nov-2021 |
Ivan Malov <[email protected]> |
app/testpmd: fix flow transfer proxy port handling
The current approach detects the proxy port on each port (re-)plug and may spam the log with error messages if the PMD does not support flows. As t
app/testpmd: fix flow transfer proxy port handling
The current approach detects the proxy port on each port (re-)plug and may spam the log with error messages if the PMD does not support flows. As testpmd is a debug tool, it must not do such implicit port handling. Instead, the new API should be called only when the user requests that.
Revoke the existing code. Implement an explicit command-line primitive to let the user find the proxy port themselves. Provide relevant hints.
Fixes: 1179f05cc9a0 ("ethdev: query proxy port to manage transfer flows")
Signed-off-by: Ivan Malov <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Acked-by: Ori Kam <[email protected]> Acked-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| #
bb9be9a4 |
| 17-Nov-2021 |
David Marchand <[email protected]> |
build: make metrics libraries optional
metrics, bitratestats, jobstats and latencystats libraries can be made optional as they provide standalone features.
Signed-off-by: David Marchand <david.marc
build: make metrics libraries optional
metrics, bitratestats, jobstats and latencystats libraries can be made optional as they provide standalone features.
Signed-off-by: David Marchand <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| #
6970401e |
| 17-Nov-2021 |
David Marchand <[email protected]> |
build: make GRO/GSO libraries optional
GRO and GSO integration in testpmd is relatively self contained and easy to extract. Those libraries can be made optional as they provide standalone features.
build: make GRO/GSO libraries optional
GRO and GSO integration in testpmd is relatively self contained and easy to extract. Those libraries can be made optional as they provide standalone features.
Signed-off-by: David Marchand <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| #
eac341d3 |
| 17-Nov-2021 |
Joyce Kong <[email protected]> |
app/testpmd: remove atomic operations for port status
The port_status changes do not need to be handled atomically, as they are modified during initialization or through the testpmd prompt instead o
app/testpmd: remove atomic operations for port status
The port_status changes do not need to be handled atomically, as they are modified during initialization or through the testpmd prompt instead of multiple threads.
Signed-off-by: Joyce Kong <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]> Reviewed-by: Honnappa Nagarahalli <[email protected]>
show more ...
|
| #
cbe70fde |
| 15-Nov-2021 |
Jie Wang <[email protected]> |
app/testpmd: fix DCB in VT configuration
When set port DCB in VT mode enabled, it should remove RSS HASH offload before reconfiguring the device and queues.
Because port multi-queue mode is changed
app/testpmd: fix DCB in VT configuration
When set port DCB in VT mode enabled, it should remove RSS HASH offload before reconfiguring the device and queues.
Because port multi-queue mode is changed from RSS to DCB in VT.
Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration") Cc: [email protected]
Signed-off-by: Jie Wang <[email protected]> Acked-by: Aman Singh <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc2, v21.11-rc1 |
|
| #
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to have 'rte_eth' prefix.
All internal components switched to using new names.
Syntax fixed on lines that this patch touches.
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Tyler Retzlaff <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Jerin Jacob <[email protected]> Acked-by: Wisam Jaddo <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Chenbo Xia <[email protected]> Acked-by: Hemant Agrawal <[email protected]> Acked-by: Somnath Kotur <[email protected]>
show more ...
|
| #
6a8b64fd |
| 21-Oct-2021 |
Eli Britstein <[email protected]> |
app/testpmd: fix packet burst spreading stats
RX/TX functions (rte_eth_rx_burst/rte_eth_tx_burst) get 'nb_pkts' argument, which specifies the maximum number to receive/transmit. It can be 0..nb_pkts
app/testpmd: fix packet burst spreading stats
RX/TX functions (rte_eth_rx_burst/rte_eth_tx_burst) get 'nb_pkts' argument, which specifies the maximum number to receive/transmit. It can be 0..nb_pkts, meaning nb_pkts+1 options. Testpmd can provide statistics of the burst sizes ('set record-burst-stats on') by incrementing an array cell of index <burst-size>. This array is mistakenly [MAX_PKT_BURST] size. Receiving the maximum burst will cause out of bound write. Enlarge the spread stats array by one cell to fix it.
Fixes: af75078fece3 ("first public release") Cc: [email protected]
Signed-off-by: Eli Britstein <[email protected]> Reviewed-by: Matan Azrad <[email protected]> Acked-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
59840375 |
| 21-Oct-2021 |
Xueming Li <[email protected]> |
app/testpmd: add forwarding engine for shared Rx queue
To support shared Rx queue, this patch introduces dedicate forwarding engine. The engine groups received packets by mbuf->port into sub-group,
app/testpmd: add forwarding engine for shared Rx queue
To support shared Rx queue, this patch introduces dedicate forwarding engine. The engine groups received packets by mbuf->port into sub-group, updates stream statistics and simply frees packets.
Signed-off-by: Xueming Li <[email protected]>
show more ...
|
| #
65744833 |
| 21-Oct-2021 |
Xueming Li <[email protected]> |
app/testpmd: force shared Rx queue polled on same core
Shared Rx queue must be polled on same core. This patch checks and stops forwarding if shared RxQ being scheduled on multiple cores.
It's sugg
app/testpmd: force shared Rx queue polled on same core
Shared Rx queue must be polled on same core. This patch checks and stops forwarding if shared RxQ being scheduled on multiple cores.
It's suggested to use same number of Rx queues and polling cores.
Signed-off-by: Xueming Li <[email protected]> Acked-by: Xiaoyun Li <[email protected]>
show more ...
|
| #
f4d178c1 |
| 21-Oct-2021 |
Xueming Li <[email protected]> |
app/testpmd: add parameter for shared Rx queue
Adds "--rxq-share=X" parameter to enable shared RxQ.
Rx queue is shared if device supports, otherwise fallback to standard RxQ.
Shared Rx queues are
app/testpmd: add parameter for shared Rx queue
Adds "--rxq-share=X" parameter to enable shared RxQ.
Rx queue is shared if device supports, otherwise fallback to standard RxQ.
Shared Rx queues are grouped per X ports. X defaults to UINT32_MAX, implies all ports join share group 1. Queue ID is mapped equally with shared Rx queue ID.
Signed-off-by: Xueming Li <[email protected]> Acked-by: Thomas Monjalon <[email protected]> Acked-by: Ajit Khaparde <[email protected]>
show more ...
|
| #
59f3a8ac |
| 20-Oct-2021 |
Gregory Etelson <[email protected]> |
app/testpmd: add flex item commands
Network port hardware is shipped with fixed number of supported network protocols. If application must work with a protocol that is not included in the port hardw
app/testpmd: add flex item commands
Network port hardware is shipped with fixed number of supported network protocols. If application must work with a protocol that is not included in the port hardware by default, it can try to add the new protocol to port hardware.
Flex item or flex parser is port infrastructure that allows application to add support for a custom network header and offload flows to match the header elements.
Application must complete the following tasks to create a flow rule that matches custom header:
1. Create flow item object in port hardware. Application must provide custom header configuration to PMD. PMD will use that configuration to create flex item object in port hardware.
2. Create flex patterns to match. Flex pattern has a spec and a mask components, like a regular flow item. Combined together, spec and mask can target unique data sequence or a number of data sequences in the custom header. Flex patterns of the same flex item can have different lengths. Flex pattern is identified by unique handler value.
3. Create a flow rule with a flex flow item that references flow pattern.
Testpmd flex CLI commands are:
testpmd> flow flex_item create <port> <flex_id> <filename>
testpmd> set flex_pattern <pattern_id> \ spec <spec data> mask <mask data>
testpmd> set flex_pattern <pattern_id> is <spec_data>
testpmd> flow create <port> ... \ / flex item is <flex_id> pattern is <pattern_id> / ...
The patch works with the jansson library API. A new optional dependency on jansson library is added for testpmd. If jansson not detected the flex item functionality is disabled. Jansson development files must be present: jansson.pc, jansson.h libjansson.[a,so]
Signed-off-by: Gregory Etelson <[email protected]> Reviewed-by: Viacheslav Ovsiienko <[email protected]>
show more ...
|
| #
b563c142 |
| 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.
Instead of drivers announce this capability, application can deduct the capability by checking reported 'dev_in
ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.
Instead of drivers announce this capability, application can deduct the capability by checking reported 'dev_info.max_mtu' or 'dev_info.max_rx_pktlen'.
And instead of application setting this flag explicitly to enable jumbo frames, this can be deduced by driver by comparing requested 'mtu' to 'RTE_ETHER_MTU'.
Removing this additional configuration for simplification.
Suggested-by: Konstantin Ananyev <[email protected]> Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Reviewed-by: Rosen Xu <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Hyong Youb Kim <[email protected]> Acked-by: Michal Krawczyk <[email protected]>
show more ...
|
| #
1bb4a528 |
| 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_p
ethdev: fix max Rx packet length
There is a confusion on setting max Rx packet length, this patch aims to clarify it.
'rte_eth_dev_configure()' API accepts max Rx packet size via 'uint32_t max_rx_pkt_len' field of the config struct 'struct rte_eth_conf'.
Also 'rte_eth_dev_set_mtu()' API can be used to set the MTU, and result stored into '(struct rte_eth_dev)->data->mtu'.
These two APIs are related but they work in a disconnected way, they store the set values in different variables which makes hard to figure out which one to use, also having two different method for a related functionality is confusing for the users.
Other issues causing confusion is: * maximum transmission unit (MTU) is payload of the Ethernet frame. And 'max_rx_pkt_len' is the size of the Ethernet frame. Difference is Ethernet frame overhead, and this overhead may be different from device to device based on what device supports, like VLAN and QinQ. * 'max_rx_pkt_len' is only valid when application requested jumbo frame, which adds additional confusion and some APIs and PMDs already discards this documented behavior. * For the jumbo frame enabled case, 'max_rx_pkt_len' is an mandatory field, this adds configuration complexity for application.
As solution, both APIs gets MTU as parameter, and both saves the result in same variable '(struct rte_eth_dev)->data->mtu'. For this 'max_rx_pkt_len' updated as 'mtu', and it is always valid independent from jumbo frame.
For 'rte_eth_dev_configure()', 'dev->data->dev_conf.rxmode.mtu' is user request and it should be used only within configure function and result should be stored to '(struct rte_eth_dev)->data->mtu'. After that point both application and PMD uses MTU from this variable.
When application doesn't provide an MTU during 'rte_eth_dev_configure()' default 'RTE_ETHER_MTU' value is used.
Additional clarification done on scattered Rx configuration, in relation to MTU and Rx buffer size. MTU is used to configure the device for physical Rx/Tx size limitation, Rx buffer is where to store Rx packets, many PMDs use mbuf data buffer size as Rx buffer size. PMDs compare MTU against Rx buffer size to decide enabling scattered Rx or not. If scattered Rx is not supported by device, MTU bigger than Rx buffer size should fail.
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Huisong Li <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Rosen Xu <[email protected]> Acked-by: Hyong Youb Kim <[email protected]>
show more ...
|
| #
655eae01 |
| 14-Oct-2021 |
Jie Wang <[email protected]> |
app/testpmd: fix RSS hash offload display
The driver may change RSS hash offloads in dev->data->dev_conf during dev_configure which may cause port->dev_conf and port->rx_conf contain outdated values
app/testpmd: fix RSS hash offload display
The driver may change RSS hash offloads in dev->data->dev_conf during dev_configure which may cause port->dev_conf and port->rx_conf contain outdated values. Since testpmd uses its configuration structures to display offloads configuration, it doesn't display RSS hash offload.
This patch updates the testpmd offloads from device configuration to fix this issue.
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Signed-off-by: Jie Wang <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
63b72657 |
| 14-Oct-2021 |
Ivan Ilchenko <[email protected]> |
app/testpmd: add option to display extended statistics
Add 'display-xstats' option for using in accompanying with Rx/Tx statistics (i.e. 'stats-period' option or 'show port stats' interactive comman
app/testpmd: add option to display extended statistics
Add 'display-xstats' option for using in accompanying with Rx/Tx statistics (i.e. 'stats-period' option or 'show port stats' interactive command) to display specified list of extended statistics.
Signed-off-by: Ivan Ilchenko <[email protected]> Signed-off-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
1179f05c |
| 14-Oct-2021 |
Ivan Malov <[email protected]> |
ethdev: query proxy port to manage transfer flows
Not all DPDK ports in a given switching domain may have the privilege to manage "transfer" flows. Add an API to find a port with sufficient privileg
ethdev: query proxy port to manage transfer flows
Not all DPDK ports in a given switching domain may have the privilege to manage "transfer" flows. Add an API to find a port with sufficient privileges by any port in the domain.
Signed-off-by: Ivan Malov <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Acked-by: Ori Kam <[email protected]>
show more ...
|
| #
f6d8a6d3 |
| 12-Oct-2021 |
Ivan Malov <[email protected]> |
ethdev: negotiate delivery of packet metadata from HW to PMD
Provide an API to let the application control the NIC's ability to deliver specific kinds of per-packet metadata to the PMD.
Checks for
ethdev: negotiate delivery of packet metadata from HW to PMD
Provide an API to let the application control the NIC's ability to deliver specific kinds of per-packet metadata to the PMD.
Checks for the NIC's ability to set these kinds of metadata in the first place (support for the flow actions) belong in flow API responsibility domain (flow validate mechanism). This topic is out of scope of the new API in question.
The PMD's ability to deliver received metadata to the user by virtue of mbuf fields should be covered by mbuf library. It is also out of scope of the new API in question.
Signed-off-by: Ivan Malov <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Reviewed-by: Andy Moreton <[email protected]> Acked-by: Ray Kinsella <[email protected]> Acked-by: Jerin Jacob <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Somnath Kotur <[email protected]> Acked-by: Ori Kam <[email protected]> Acked-by: Wisam Jaddo <[email protected]>
show more ...
|
| #
c1ba6c32 |
| 11-Oct-2021 |
Huisong Li <[email protected]> |
app/testpmd: retain all original dev conf when config DCB
When configuring DCB, testpmd retains the rx_mode/tx_mode configuration in rte_port->dev_conf. But some configurations, such as the link_spe
app/testpmd: retain all original dev conf when config DCB
When configuring DCB, testpmd retains the rx_mode/tx_mode configuration in rte_port->dev_conf. But some configurations, such as the link_speed, were not saved if they were set before configuring DCB.
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Cc: [email protected]
Signed-off-by: Huisong Li <[email protected]> Signed-off-by: Min Hu (Connor) <[email protected]> Acked-by: Xiaoyun Li <[email protected]>
show more ...
|
| #
a78040c9 |
| 23-Sep-2021 |
Alvin Zhang <[email protected]> |
app/testpmd: update forward engine beginning
For each forward engine, there may be some special conditions must be met before the forwarding runs.
Adding checks for these conditions in configuring
app/testpmd: update forward engine beginning
For each forward engine, there may be some special conditions must be met before the forwarding runs.
Adding checks for these conditions in configuring is not suitable, because one condition may rely on multiple configurations, and the conditions required by each forward engine is not general.
The best solution is each forward engine has a callback to check whether these conditions are met, and then testpmd can call the callback to determine whether the forwarding can be started.
There was a void callback 'port_fwd_begin' in forward engine, it did some initialization for forwarding, this patch updates its return value then we can add some checks in it to confirm whether the forwarding can be started. In addition, this patch calls the callback before the forwarding stats is reset and then launches the forwarding engine.
Bugzilla ID: 797 Cc: [email protected]
Signed-off-by: Alvin Zhang <[email protected]> Acked-by: Xiaoyun Li <[email protected]>
show more ...
|
| #
a7db3afc |
| 25-Aug-2021 |
Aman Deep Singh <[email protected]> |
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: A
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: Aman Deep Singh <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|