mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpif-netdev: Add function pointer for netdev input.
This commit adds a function pointer to the pmd thread data structure, giving the pmd thread flexibility in its dpif-input function choice. This allows choosing of the implementation based on ISA capabilities of the runtime CPU, leading to optimizations and higher performance. 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
5930dfeeb2
commit
e540499e4f
@@ -47,6 +47,13 @@ struct dp_netdev_pmd_thread_ctx {
|
||||
uint32_t emc_insert_min;
|
||||
};
|
||||
|
||||
/* Forward declaration for typedef. */
|
||||
struct dp_netdev_pmd_thread;
|
||||
|
||||
typedef void (*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
|
||||
@@ -101,6 +108,9 @@ struct dp_netdev_pmd_thread {
|
||||
/* Current context of the PMD thread. */
|
||||
struct dp_netdev_pmd_thread_ctx ctx;
|
||||
|
||||
/* Function pointer to call for dp_netdev_input() functionality. */
|
||||
ATOMIC(dp_netdev_input_func) netdev_input_func;
|
||||
|
||||
struct seq *reload_seq;
|
||||
uint64_t last_reload_seq;
|
||||
|
||||
|
Reference in New Issue
Block a user