Would equivalent packing be achieved by moving the line down before the bool 
instead? If yes, it would be preferable.

Acked-by: Jarno Rajahalme <ja...@ovn.org>

> On Oct 7, 2016, at 9:17 AM, Bhanuprakash Bodireddy 
> <bhanuprakash.bodire...@intel.com> wrote:
> 
> By reordering the data elements in dp_netdev_port structure, pad bytes
> can be reduced and there by saving a cache line.
> 
> Before: structure size:136, holes:3, sum padbytes:15, cachelines:3
> After: structure size:128, holes:1, sum padbytes:7, cachelines:2
> 
> Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com>
> Signed-off-by: Antonio Fischetti <antonio.fische...@intel.com>
> ---
> lib/dpif-netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index dfc9cbd..262f4de 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -284,10 +284,10 @@ struct dp_netdev_rxq {
> /* A port in a netdev-based datapath. */
> struct dp_netdev_port {
>     odp_port_t port_no;
> +    unsigned n_rxq;             /* Number of elements in 'rxq' */
>     struct netdev *netdev;
>     struct hmap_node node;      /* Node in dp_netdev's 'ports'. */
>     struct netdev_saved_flags *sf;
> -    unsigned n_rxq;             /* Number of elements in 'rxq' */
>     struct dp_netdev_rxq *rxqs;
>     bool dynamic_txqs;          /* If true XPS will be used. */
>     unsigned *txq_used;         /* Number of threads that uses each tx queue. 
> */
> -- 
> 2.4.11
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to