mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpif-netdev: Add command to switch dpif implementation.
This commit adds a new command to allow the user to switch the active DPIF implementation at runtime. A probe function is executed before switching the DPIF implementation, to ensure the CPU is capable of running the ISA required. For example, the below code will switch to the AVX512 enabled DPIF assuming that the runtime CPU is capable of running AVX512 instructions: $ ovs-appctl dpif-netdev/dpif-impl-set dpif_avx512 A new configuration flag is added to allow selection of the default DPIF. This is useful for running the unit-tests against the available DPIF implementations, without modifying each unit test. The design of the testing & validation for ISA optimized DPIF implementations is based around the work already upstream for DPCLS. Note however that a DPCLS lookup has no state or side-effects, allowing the auto-validator implementation to perform multiple lookups and provide consistent statistic counters. The DPIF component does have state, so running two implementations in parallel and comparing output is not a valid testing method, as there are changes in DPIF statistic counters (side effects). As a result, the DPIF is tested directly against the unit-tests. Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Co-authored-by: Cian Ferriter <cian.ferriter@intel.com> Signed-off-by: Cian Ferriter <cian.ferriter@intel.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
committed by
Ian Stokes
parent
9ac84a1a36
commit
abb807e27d
@@ -50,16 +50,6 @@ struct dp_netdev_pmd_thread_ctx {
|
||||
bool smc_enable_db;
|
||||
};
|
||||
|
||||
/* Forward declaration for typedef. */
|
||||
struct dp_netdev_pmd_thread;
|
||||
|
||||
/* Typedef for DPIF functions.
|
||||
* Returns a bitmask of packets to handle, possibly including upcall/misses.
|
||||
*/
|
||||
typedef int32_t (*dp_netdev_input_func)(struct dp_netdev_pmd_thread *pmd,
|
||||
struct dp_packet_batch *packets,
|
||||
odp_port_t port_no);
|
||||
|
||||
/* PMD: Poll modes drivers. PMD accesses devices via polling to eliminate
|
||||
* the performance overhead of interrupt processing. Therefore netdev can
|
||||
* not implement rx-wait for these devices. dpif-netdev needs to poll
|
||||
|
Reference in New Issue
Block a user