| #
93e1ea6d |
| 06-Apr-2022 |
Huisong Li <[email protected]> |
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag is not set in dev_configure, RSS will be not configured and enabled. However, RSS h
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag is not set in dev_configure, RSS will be not configured and enabled. However, RSS hash and reta can still be configured by ethdev ops to enable RSS if the flag isn't set. The behavior is inconsistent.
Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names") Cc: [email protected]
Signed-off-by: Huisong Li <[email protected]> Signed-off-by: Min Hu (Connor) <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2 |
|
| #
ffe77e91 |
| 16-Feb-2022 |
David Marchand <[email protected]> |
ethdev: fix MAC address in telemetry device info
The right size for a human readable MAC is RTE_ETHER_ADDR_FMT_SIZE. While at it, the net library provides a helper for MAC address formatting. Prefer
ethdev: fix MAC address in telemetry device info
The right size for a human readable MAC is RTE_ETHER_ADDR_FMT_SIZE. While at it, the net library provides a helper for MAC address formatting. Prefer it.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info") Cc: [email protected]
Reported-by: Christophe Fontaine <[email protected]> Signed-off-by: David Marchand <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v22.03-rc1 |
|
| #
4b4f810e |
| 11-Feb-2022 |
Ferruh Yigit <[email protected]> |
ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and library, these APIs are declared in the rte_ethdev.h public header. Other in
ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and library, these APIs are declared in the rte_ethdev.h public header. Other interface is between drivers and library, these functions are declared in ethdev_driver.h and marked as internal.
But all functions are defined in rte_ethdev.c file. This patch moves functions for drivers to its own file, ethdev_driver.c for cleanup, no functional change in functions.
Some public APIs and driver helpers call common internal functions, which were mostly static since both were in same file. To be able to move driver helpers, common functions are moved to ethdev_private.c. (ethdev_private.c is used for functions that are internal to the library and shared by multiple .c files in the ethdev library.)
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| #
edcf22c6 |
| 11-Feb-2022 |
Min Hu (Connor) <[email protected]> |
ethdev: introduce dump API
Added the ethdev dump API which provides querying private info from device. There exists many private properties in different PMD drivers, such as adapter state, Rx/Tx fun
ethdev: introduce dump API
Added the ethdev dump API which provides querying private info from device. There exists many private properties in different PMD drivers, such as adapter state, Rx/Tx func algorithm in hns3 PMD. The information of these properties is important for debug. As the information is private, the new API is introduced.
Signed-off-by: Min Hu (Connor) <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Ray Kinsella <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
8b8dd445 |
| 09-Feb-2022 |
Yunjian Wang <[email protected]> |
ethdev: remove unnecessary null check
This NULL check is unnecessary, 'eth_dev' is never NULL.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info") Cc: [email protected]
Signed-off
ethdev: remove unnecessary null check
This NULL check is unnecessary, 'eth_dev' is never NULL.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info") Cc: [email protected]
Signed-off-by: Yunjian Wang <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
3c059b2c |
| 08-Feb-2022 |
Akhil Goyal <[email protected]> |
ethdev: add mbuf dynfield for incomplete IP reassembly
Hardware IP reassembly may be incomplete for multiple reasons like reassembly timeout reached, duplicate fragments, etc. To save application cy
ethdev: add mbuf dynfield for incomplete IP reassembly
Hardware IP reassembly may be incomplete for multiple reasons like reassembly timeout reached, duplicate fragments, etc. To save application cycles to process these packets again, a new mbuf dynflag is added to show that the mbuf received is not reassembled properly.
Now if this dynflag is set, application can retrieve corresponding chain of mbufs using mbuf dynfield set by the PMD. Now, it will be up to application to either drop those fragments or wait for more time.
Signed-off-by: Akhil Goyal <[email protected]>
show more ...
|
| #
a75ab6e5 |
| 08-Feb-2022 |
Akhil Goyal <[email protected]> |
ethdev: introduce IP reassembly offload
IP Reassembly is a costly operation if it is done in software. The operation becomes even more costlier if IP fragments are encrypted. However, if it is offlo
ethdev: introduce IP reassembly offload
IP Reassembly is a costly operation if it is done in software. The operation becomes even more costlier if IP fragments are encrypted. However, if it is offloaded to HW, it can considerably save application cycles.
Hence, a new offload feature is exposed in eth_dev ops for devices which can attempt IP reassembly of packets in hardware. - rte_eth_ip_reassembly_capability_get() - to get the maximum values of reassembly configuration which can be set. - rte_eth_ip_reassembly_conf_set() - to set IP reassembly configuration and to enable the feature in the PMD (to be called before rte_eth_dev_start()). - rte_eth_ip_reassembly_conf_get() - to get the current configuration set in PMD.
Now when the offload is enabled using rte_eth_ip_reassembly_conf_set(), the resulting reassembled IP packet would be a typical segmented mbuf in case of success.
And if reassembly of IP fragments is failed or is incomplete (if fragments do not come before the reass_timeout, overlap, etc), the mbuf dynamic flags can be updated by the PMD. This is updated in a subsequent patch.
Signed-off-by: Akhil Goyal <[email protected]>
show more ...
|
| #
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 ...
|
| #
0de345e9 |
| 08-Feb-2022 |
Jerin Jacob <[email protected]> |
ethdev: support queue-based priority flow control
Based on device support and use-case need, there are two different ways to enable PFC. The first case is the port level PFC configuration, in this c
ethdev: support queue-based priority flow control
Based on device support and use-case need, there are two different ways to enable PFC. The first case is the port level PFC configuration, in this case, rte_eth_dev_priority_flow_ctrl_set() API shall be used to configure the PFC, and PFC frames will be generated using based on VLAN TC value.
The second case is the queue level PFC configuration, in this case, Any packet field content can be used to steer the packet to the specific queue using rte_flow or RSS and then use rte_eth_dev_priority_flow_ctrl_queue_configure() to configure the TC mapping on each queue. Based on congestion selected on the specific queue, configured TC shall be used to generate PFC frames.
Signed-off-by: Jerin Jacob <[email protected]> Signed-off-by: Sunil Kumar Kori <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
961fb402 |
| 31-Jan-2022 |
Kumara Parameshwaran <[email protected]> |
ethdev: add internal function to device struct from name
The PMDs would need a function to access the rte_eth_devices without accessing the global rte_eth_device array.
Cc: [email protected]
Signed-
ethdev: add internal function to device struct from name
The PMDs would need a function to access the rte_eth_devices without accessing the global rte_eth_device array.
Cc: [email protected]
Signed-off-by: Kumara Parameshwaran <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
52b49ea0 |
| 08-Jan-2022 |
Yunjian Wang <[email protected]> |
ethdev: fix Rx queue telemetry memory leak on failure
In eth_dev_handle_port_info() allocated memory for rxq_state, we should free it when error happens, otherwise it will lead to memory leak.
Fixe
ethdev: fix Rx queue telemetry memory leak on failure
In eth_dev_handle_port_info() allocated memory for rxq_state, we should free it when error happens, otherwise it will lead to memory leak.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info") Cc: [email protected]
Signed-off-by: Yunjian Wang <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3 |
|
| #
64be0e77 |
| 09-Nov-2021 |
Dmitry Kozlyuk <[email protected]> |
ethdev: fix device capability to string translation
Add support for RTE_ETH_DEV_CAPA_FLOW_{RULE,SHARED_OBJECT}_KEEP to rte_eth_dev_capability_name(), missed when adding the capabilities.
Fixes: 1d5
ethdev: fix device capability to string translation
Add support for RTE_ETH_DEV_CAPA_FLOW_{RULE,SHARED_OBJECT}_KEEP to rte_eth_dev_capability_name(), missed when adding the capabilities.
Fixes: 1d5a3d68c0f9 ("ethdev: add capability to keep flow rules on restart") Fixes: 2c9cd45de7e6 ("ethdev: add capability to keep shared objects on restart")
Reported-by: Ali Alnubani <[email protected]> Signed-off-by: Dmitry Kozlyuk <[email protected]> Acked-by: Xueming Li <[email protected]> Tested-by: Ali Alnubani <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc2 |
|
| #
b7ade5d3 |
| 04-Nov-2021 |
Ferruh Yigit <[email protected]> |
ethdev: fix crash on owner delete
'eth_dev->data' can be null before ethdev allocated. The API walks through all eth devices, at least for some data can be null.
Adding 'eth_dev->data' null check b
ethdev: fix crash on owner delete
'eth_dev->data' can be null before ethdev allocated. The API walks through all eth devices, at least for some data can be null.
Adding 'eth_dev->data' null check before accessing it.
Fixes: 33c73aae32e4 ("ethdev: allow ownership operations on unused port") Cc: [email protected]
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Chenbo Xia <[email protected]> Acked-by: Thomas Monjalon <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc1 |
|
| #
c2bd9367 |
| 22-Oct-2021 |
Harman Kalra <[email protected]> |
lib: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the libraries access
lib: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the libraries access the interrupt handle fields.
Signed-off-by: Harman Kalra <[email protected]> Signed-off-by: David Marchand <[email protected]> Tested-by: Raslan Darawsheh <[email protected]>
show more ...
|
| #
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 ...
|
| #
b26bee10 |
| 22-Oct-2021 |
Ivan Ilchenko <[email protected]> |
ethdev: forbid MTU set before device configure
rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu or RTE_ETHER_MTU if application doesn't provide the value. So, there is no point
ethdev: forbid MTU set before device configure
rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu or RTE_ETHER_MTU if application doesn't provide the value. So, there is no point to allow rte_eth_dev_set_mtu() before since set value will be overwritten on configure anyway.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Signed-off-by: Ivan Ilchenko <[email protected]> Signed-off-by: Andrew Rybchenko <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
93e441c9 |
| 21-Oct-2021 |
Xueming Li <[email protected]> |
ethdev: get device capability name as string
This patch adds API to return name of device capability.
Signed-off-by: Xueming Li <[email protected]> Reviewed-by: Andrew Rybchenko <andrew.rybchenko
ethdev: get device capability name as string
This patch adds API to return name of device capability.
Signed-off-by: Xueming Li <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| #
dd22740c |
| 21-Oct-2021 |
Xueming Li <[email protected]> |
ethdev: introduce shared Rx queue
In current DPDK framework, each Rx queue is pre-loaded with mbufs to save incoming packets. For some PMDs, when number of representors scale out in a switch domain,
ethdev: introduce shared Rx queue
In current DPDK framework, each Rx queue is pre-loaded with mbufs to save incoming packets. For some PMDs, when number of representors scale out in a switch domain, the memory consumption became significant. Polling all ports also leads to high cache miss, high latency and low throughput.
This patch introduces shared Rx queue. Ports in same Rx domain and switch domain could share Rx queue set by specifying non-zero sharing group in Rx queue configuration.
Shared Rx queue is identified by share_rxq field of Rx queue configuration. Port A RxQ X can share RxQ with Port B RxQ Y by using same shared Rx queue ID.
No special API is defined to receive packets from shared Rx queue. Polling any member port of a shared Rx queue receives packets of that queue for all member ports, port_id is identified by mbuf->port. PMD is responsible to resolve shared Rx queue from device and queue data.
Shared Rx queue must be polled in same thread or core, polling a queue ID of any member port is essentially same.
Multiple share groups are supported. PMD should support mixed configuration by allowing multiple share groups and non-shared Rx queue on one port.
Example grouping and polling model to reflect service priority: Group1, 2 shared Rx queues per port: PF, rep0, rep1 Group2, 1 shared Rx queue per port: rep2, rep3, ... rep127 Core0: poll PF queue0 Core1: poll PF queue1 Core2: poll rep2 queue0
PMD advertise shared Rx queue capability via RTE_ETH_DEV_CAPA_RXQ_SHARE.
PMD is responsible for shared Rx queue consistency checks to avoid member port's configuration contradict each other.
Signed-off-by: Xueming Li <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]> Acked-by: Ajit Khaparde <[email protected]>
show more ...
|
| #
5906be5a |
| 20-Oct-2021 |
Andrew Rybchenko <[email protected]> |
ethdev: fix ID spelling in comments and log messages
Signed-off-by: Andrew Rybchenko <[email protected]> Acked-by: Ori Kam <[email protected]> Reviewed-by: Ferruh Yigit <ferruh.yigit@inte
ethdev: fix ID spelling in comments and log messages
Signed-off-by: Andrew Rybchenko <[email protected]> Acked-by: Ori Kam <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
5b49ba65 |
| 20-Oct-2021 |
Andrew Rybchenko <[email protected]> |
ethdev: fix VLAN spelling including VLAN ID case
Signed-off-by: Andrew Rybchenko <[email protected]> Acked-by: Ori Kam <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]
ethdev: fix VLAN spelling including VLAN ID case
Signed-off-by: Andrew Rybchenko <[email protected]> Acked-by: Ori Kam <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| #
0d9f56a8 |
| 20-Oct-2021 |
Andrew Rybchenko <[email protected]> |
ethdev: fix Ethernet spelling
Signed-off-by: Andrew Rybchenko <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
|
| #
09fd4227 |
| 20-Oct-2021 |
Andrew Rybchenko <[email protected]> |
ethdev: fix Rx/Tx spelling
Fix it everywhere in ethdev including log messages.
Signed-off-by: Andrew Rybchenko <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
|
| #
e1823e08 |
| 20-Oct-2021 |
Thomas Monjalon <[email protected]> |
ethdev: replace bit shifts with macros
The macros RTE_BIT32 and RTE_BIT64 are used to replace bit shifts. The macro UINT64C is also used to replace remaining occurrences of ULL.
The bit shifts of E
ethdev: replace bit shifts with macros
The macros RTE_BIT32 and RTE_BIT64 are used to replace bit shifts. The macro UINT64C is also used to replace remaining occurrences of ULL.
The bit shifts of ETH_RSS_LEVEL_* are kept for aesthetic reason.
The API of rte_mtr and rte_tm is using enums for 64-bit variables. As they are enums, unsigned bit cannot be used.
Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]>
show more ...
|
| #
febc855b |
| 20-Oct-2021 |
Andrew Rybchenko <[email protected]> |
ethdev: forbid closing started device
Ethernet device must be stopped first before close in accordance with the documentation.
Fixes: 980995f8cc56 ("ethdev: improve API comments of close and detach
ethdev: forbid closing started device
Ethernet device must be stopped first before close in accordance with the documentation.
Fixes: 980995f8cc56 ("ethdev: improve API comments of close and detach functions") Cc: [email protected]
Signed-off-by: Andrew Rybchenko <[email protected]> Acked-by: Thomas Monjalon <[email protected]> Acked-by: Ajit Khaparde <[email protected]>
show more ...
|
| #
990912e6 |
| 18-Oct-2021 |
Ferruh Yigit <[email protected]> |
ethdev: unify MTU checks
Both 'rte_eth_dev_configure()' & 'rte_eth_dev_set_mtu()' sets MTU but have slightly different checks. Like one checks min MTU against RTE_ETHER_MIN_MTU and other RTE_ETHER_M
ethdev: unify MTU checks
Both 'rte_eth_dev_configure()' & 'rte_eth_dev_set_mtu()' sets MTU but have slightly different checks. Like one checks min MTU against RTE_ETHER_MIN_MTU and other RTE_ETHER_MIN_LEN.
Checks moved into common function to unify the checks. Also this has benefit to have common error logs.
Default 'dev_info->min_mtu' (the one set by ethdev if driver doesn't provide one), changed to ('RTE_ETHER_MIN_LEN' - overhead). Previously it was 'RTE_ETHER_MIN_MTU' which is min MTU for IPv4 packets. Since the intention is to provide min MTU corresponding minimum frame size, new default value suits better.
Suggested-by: Huisong Li <[email protected]> Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Konstantin Ananyev <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|