Skip to content

Commit

Permalink
dpif-netdev: Reorder elements in dp_netdev_rxq structure.
Browse files Browse the repository at this point in the history
By reordering elements in dp_netdev_rxq structure, pad bytes and a hole
can be removed.

Before: structure size: 104, sum holes: 1, sum padbytes:4, cachelines:2
After : structure size:  96, sum holes: 0, sum padbytes:0, cachelines:2

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
Bhanuprakash Bodireddy authored and blp committed Nov 3, 2017
1 parent 85e16a4 commit ee42dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dpif-netdev.c
Expand Up @@ -366,14 +366,14 @@ struct dp_netdev_rxq {
pinned. OVS_CORE_UNSPEC if the
queue doesn't need to be pinned to a
particular core. */
unsigned intrvl_idx; /* Write index for 'cycles_intrvl'. */
struct dp_netdev_pmd_thread *pmd; /* pmd thread that polls this queue. */

/* Counters of cycles spent successfully polling and processing pkts. */
atomic_ullong cycles[RXQ_N_CYCLES];
/* We store PMD_RXQ_INTERVAL_MAX intervals of data for an rxq and then
sum them to yield the cycles used for an rxq. */
atomic_ullong cycles_intrvl[PMD_RXQ_INTERVAL_MAX];
unsigned intrvl_idx; /* Write index for 'cycles_intrvl'. */
};

/* A port in a netdev-based datapath. */
Expand Down

0 comments on commit ee42dd7

Please sign in to comment.