| 2c9cd45d | 02-Nov-2021 |
Dmitry Kozlyuk <[email protected]> |
ethdev: add capability to keep shared objects on restart
rte_flow_action_handle_create() did not mention what happens with an indirect action when a device is stopped and started again. It is natura
ethdev: add capability to keep shared objects on restart
rte_flow_action_handle_create() did not mention what happens with an indirect action when a device is stopped and started again. It is natural for some indirect actions, like counter, to be persistent. Keeping others at least saves application time and complexity. However, not all PMDs can support it, or the support may be limited by particular action kinds, that is, combinations of action type and the value of the transfer bit in its configuration.
Add a device capability to indicate if at least some indirect actions are kept across the above sequence. Without this capability the behavior is still unspecified, and application is required to destroy the indirect actions before stopping the device. In the future, indirect actions may not be the only type of objects shared between flow rules. The capability bit intends to cover all possible types of such objects, hence its name.
Declare that the application can test for the persistence of a particular indirect action kind by attempting to create an indirect action of that kind when the device is stopped and checking for the specific error type. This is logical because if the PMD can to create an indirect action when the device is not started and use it after the start happens, it is natural that it can move its internal flow shared object to the same state when the device is stopped and restore the state when the device is started.
Indirect action persistence across a reconfigurations is not required. In case a PMD cannot keep the indirect actions across reconfiguration, it is allowed just to report an error. Application must then flush the indirect actions before attempting it.
Signed-off-by: Dmitry Kozlyuk <[email protected]> Acked-by: Ori Kam <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|
| 4852c647 | 22-Oct-2021 |
Andrew Rybchenko <[email protected]> |
ethdev: replace single bit masks with macros
The macros RTE_BIT32 and RTE_BIT64 are used to replace single bit masks.
Do not switch VLAN offload flags since type is not fixed size.
Signed-off-by:
ethdev: replace single bit masks with macros
The macros RTE_BIT32 and RTE_BIT64 are used to replace single bit masks.
Do not switch VLAN offload flags since type is not fixed size.
Signed-off-by: Andrew Rybchenko <[email protected]> Reviewed-by: Ferruh Yigit <[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 ...
|
| 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 ...
|