From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 0AB611A8F7B for ; Wed, 15 Jul 2026 05:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784093474; cv=none; b=RomSC2oYBSgZuPyyY4ndYmrC13iJml6EFSWo/XXl6oUw1GQwIbvFrdOAphQzczkFFuT8E32SJI1NnbtvqTrJxNrunOaAD66mU54ZGqIiKrSddocqKoqlFjuv5VdVgnT0pgQkHMiP1bu6Lwb+o1VkpcZNGK5mr+TEiPoaDWx2YR8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784093474; c=relaxed/simple; bh=ugJnAwMrZudP5W6/NCbvXshsTfn6ZgiR1yUWNFxBKDk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=C/LGKVgDiefmHZkf3dPH/anekuvQcjLfKMulCFW1D5tqK946YDfCt5CfYlLyQ0cK9VkQwPiWu52nSg18LgdotTH3QhjmU0ofPnzBLLlq2ZIqrFBPxjJthUQ8k7MDVXLV3+Z6FPEViGRamH88UIkzC7NeVxomlcO8Uw91+nR50b4= 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.171 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: linux-ppp@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