mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
dpif-netdev: Reorder elements in dp_netdev_port structure.
By reordering the elements in dp_netdev_port structure, pad bytes can be reduced there by saving a cache line. Marginal performance improvement is also observed with this change. Before: structure size: 136, holes: 7, sum padbytes:7, cachelines:3 After : structure size: 128, holes: 6, sum padbytes:0, cachelines:2 Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com> Tested-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
committed by
Ben Pfaff
parent
ded30c74b1
commit
ca62bb16ab
@@ -355,17 +355,17 @@ struct dp_netdev_rxq {
|
||||
/* A port in a netdev-based datapath. */
|
||||
struct dp_netdev_port {
|
||||
odp_port_t port_no;
|
||||
bool dynamic_txqs; /* If true XPS will be used. */
|
||||
bool need_reconfigure; /* True if we should reconfigure netdev. */
|
||||
struct netdev *netdev;
|
||||
struct hmap_node node; /* Node in dp_netdev's 'ports'. */
|
||||
struct netdev_saved_flags *sf;
|
||||
struct dp_netdev_rxq *rxqs;
|
||||
unsigned n_rxq; /* Number of elements in 'rxqs' */
|
||||
bool dynamic_txqs; /* If true XPS will be used. */
|
||||
unsigned *txq_used; /* Number of threads that use each tx queue. */
|
||||
struct ovs_mutex txq_used_mutex;
|
||||
char *type; /* Port type as requested by user. */
|
||||
char *rxq_affinity_list; /* Requested affinity of rx queues. */
|
||||
bool need_reconfigure; /* True if we should reconfigure netdev. */
|
||||
};
|
||||
|
||||
/* Contained by struct dp_netdev_flow's 'stats' member. */
|
||||
|
||||
Reference in New Issue
Block a user