Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1950598AbdDYPkF (ORCPT ); Tue, 25 Apr 2017 11:40:05 -0400 Received: from mout.gmx.net ([212.227.15.15]:52555 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1948756AbdDYPjy (ORCPT ); Tue, 25 Apr 2017 11:39:54 -0400 MIME-Version: 1.0 Message-ID: From: "Lino Sanfilippo" To: "Alexander Duyck" Cc: "Singh, Krishneil K" , "Song, Liwei (Wind River)" , "Kirsher, Jeffrey T" , "netdev@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: Aw: Re: [Intel-wired-lan] [PATCH] ixgbe: initialize u64_stats_sync structures early at ixgbe_probe Content-Type: text/plain; charset=UTF-8 Date: Tue, 25 Apr 2017 17:39:35 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: <1480909244-16460-1-git-send-email-liwei.song@windriver.com> , X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:oR7uy1mbPMCdwOp8j9xYt0ZlBpnQi2y1OX3TGxb2Qt2 n9gVHLwQp47IjShZ/j/6fWFVrkyouvoV10fA1WjEpssPlRk3fA NoIwwPrMv985gK2/euCcQ3j2AtoBP3Ck5qWaAxSg+St8CGrAAy R5FJPexH7zLhdLMzsF2eZjIZM0GAScalxPY56Veg1jVWhaWXjj uR2UUbIGRD0R0yXRWt0CFPYjygVNtRF3qcMy3A/wpZvhkutmoK UetREpgLo1aLMWwPXF+41DY2nIkUyPBTnk8N40x4gUHEMUaUQx 6slht4= X-UI-Out-Filterresults: notjunk:1;V01:K0:4hgcA73Xli4=:ViQ40iYSF+b4pS9sVLlGyU GTf0rzJcWjLfPZfxc3sAns6ZfR1fZE9mRCL4lEhnIEzmSu0/eXH+AOuyTnT9K0FzwwmQr1EIu GHFw8TNb5HwzZU5zbafKlD0yKZERsG79k2GxhntoP7QCaXsmw+LG8od5bPE1fBdCSctgQcqOK tfRnhLp8rzSmH8fWzbYo2RxDvoLs4H3vgs8H5KehEBRV+V+32iZlkLv2LLuBj+4oVV5wEMo0h 2Iu11aBCCBnZeePJv7jqi3HWsACKdgWYZvKUxhFayqQdkL0pREQKLiPikOSe8ka7HPytCo4Rt jYgSYn3dMG9nYUAah9IM13Qarh+J6f3dpjRMAQXuvL8Mcsj8FexPxrZ3qv5zskpll+vVK/QBU pWPoNH0iCJKc5WquVaOhZAWa/hQtOMBnnSb493qX6TLYHSq27Ma54lKkYUjCe6HiUQ0qlRFns SarbK3nkdw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 758 Lines: 21 Hi, > This patch doesn't look right to me. I would suggest rejecting it. > > The call to initialize the stats should be done when the ring is > allocated, not in ixgbe_probe(). This should probably be done in > ixgbe_alloc_q_vector() instead. > AFAICS ixgbe_alloc_q_vector() is also called in probe() (by ixgbe_init_interrupt_scheme()). Furthermore it is also called in resume() which would lead to multiple initialization of the u64_stats_sync in case of resume. IMHO the u64_stats_sync variables have to be initialized before register_netdev() is called since this is the point from which userspace can call ixgbe_get_stats64(). I would say the best place to do so is the probe() function as it is done in this patch. Just my 2 cents. Regards, Lino