From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A8B61A8F7B for ; Wed, 15 Jul 2026 05:31:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784093482; cv=none; b=NUTwyCHLhcPreET8bU59qJoWRy3KGlb2EuQQiwdE/UK4kdyj1B/Bw46xvVJgvc0Zds1WvXtUrh9NdIpOemMj7bviGpRcblTZrlSEd6KaWgSkTVW1oJ29BtcCw2dhw3wJqvpaZo8/YPijB5++EHknp5SZxtf/AGAU+7l0fsYlwJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784093482; c=relaxed/simple; bh=ugJnAwMrZudP5W6/NCbvXshsTfn6ZgiR1yUWNFxBKDk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oRQJIvxrPWSZtwCfaRwn+mMnyCk1RvTt2fVqdUjFmpqOg2NrxxX9AIiRMLIKkmRTmSIGZzEGBJ8VIoLja8p3Omyc633ngnjUqr76Ovlw0WqyN7qgJ0Tq45iLHhet0JFbT0Nbqn6Zmu9Vuc3VExB+1ovWDE9LFxRTo+hSGYYyC2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SEVXk03s; arc=none smtp.client-ip=91.218.175.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SEVXk03s" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784093468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OnBUbq3k1b9tRTWvCLJ4zc2zppxBtgM0T1Bl95+DRd0=; b=SEVXk03sXpdnZ9KQ8ppgRaStRmjskPj2AxKXL6+3L/TrMPZAuiB86HoGkcllnBSMlqhnKC zecO0CGARsqgWXgVV4BhyACqxg71cJLpBC62wFIcSzsJMElWDIX7Cf7tmr5l+g2nuQaFjq CV1XjC+xxQlU45r3XuOvSUosyXjyklk= Date: Wed, 15 Jul 2026 13:30:39 +0800 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next] ppp: reuse ppp_get_stats64() for ioctl stats To: Zhixing Chen , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-ppp@vger.kernel.org, netdev@vger.kernel.org References: <20260714091941.33783-1-running910@gmail.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Qingfang Deng In-Reply-To: <20260714091941.33783-1-running910@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi, On 2026/7/14 17:19, Zhixing Chen wrote: > ppp_get_stats() open-codes the per-cpu tstats aggregation even though > ppp_get_stats64() already collects the packet, byte and error counters > needed by the legacy SIOCGPPPSTATS ioctl path. > > Reuse ppp_get_stats64() when filling struct ppp_stats. This keeps the > ioctl stats path consistent with the netdev stats64 path and removes the > open-coded per-cpu stats aggregation from the ioctl path. > > Signed-off-by: Zhixing Chen > --- > > This is meant as a small cleanup. The ioctl path and the netdev stats64 > path already use the same underlying counters, so this just makes the > ioctl path reuse ppp_get_stats64() instead of open-coding the per-cpu > aggregation locally. On a 32-bit architecture, this will introduce unnecessary seqlock overhead to get the upper 32-bit of a counter, which would then be immediately discarded. Regards, Qingfang