[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <002da677314734dedd31be1e1b199dd4f1ae8457.camel@mellanox.com>
Date:   Mon, 5 Nov 2018 19:13:59 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "davem@...emloft.net" <davem@...emloft.net>
CC:     Jason Gunthorpe <jgg@...lanox.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "eric.dumazet@...il.com" <eric.dumazet@...il.com>,
        Eran Ben Elisha <eranbe@...lanox.com>,
        Leon Romanovsky <leonro@...lanox.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [RFC PATCH] net/mlx5e: Temp software stats variable is not
 required
On Sat, 2018-11-03 at 19:36 -0700, David Miller wrote:
> From: Saeed Mahameed <saeedm@...lanox.com>
> Date: Fri,  2 Nov 2018 18:54:22 -0700
> 
> > +static void mlx5e_fold_sw_stats(struct mlx5e_priv *priv, struct
> > rtnl_link_stats64 *s)
> > +{
> > +	int i;
> > +
> > +	/* not required ? */
> > +	memset(s, 0, sizeof(*s));
> 
> Why wouldn't this be required?
> 
I just checked it is already done by the stack @dev_get_stats()
> I can see that perhaps you can only zero out the statistics that are
> used in
> 
> the ndo_get_stats64() code path, but that's different.
mlx5e_fold_sw_stats can only be called from ndo_get_stats64().
The "s" pointer i am trying to zero out here is the same pointer we
receive from ndo_get_stats64().
Powered by blists - more mailing lists
 
