From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13DE3C7EE37 for ; Sat, 10 Jun 2023 03:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231804AbjFJDrk (ORCPT ); Fri, 9 Jun 2023 23:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjFJDrh (ORCPT ); Fri, 9 Jun 2023 23:47:37 -0400 Received: from mail-m11875.qiye.163.com (mail-m11875.qiye.163.com [115.236.118.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69A83272A; Fri, 9 Jun 2023 20:47:34 -0700 (PDT) Received: from [IPV6:240e:3b7:3279:1440:9db:41ed:be98:62d0] (unknown [IPV6:240e:3b7:3279:1440:9db:41ed:be98:62d0]) by mail-m11875.qiye.163.com (Hmail) with ESMTPA id 9DE07280E6E; Sat, 10 Jun 2023 11:47:27 +0800 (CST) Message-ID: Date: Sat, 10 Jun 2023 11:47:40 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH net-next] net: ethtool: Fix out-of-bounds copy to user To: Alexander Duyck , Jakub Kicinski Cc: Andrew Lunn , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, pengdonglin@sangfor.com.cn, huangcun@sangfor.com.cn References: <20230601112839.13799-1-dinghui@sangfor.com.cn> <6110cf9f-c10e-4b9b-934d-8d202b7f5794@lunn.ch> <6e28cea9-d615-449d-9c68-aa155efc8444@lunn.ch> <44905acd-3ac4-cfe5-5e91-d182c1959407@sangfor.com.cn> <20230602225519.66c2c987@kernel.org> <5f0f2bab-ae36-8b13-2c6d-c69c6ff4a43f@sangfor.com.cn> <20230604104718.4bf45faf@kernel.org> <20230605113915.4258af7f@kernel.org> <034f5393-e519-1e8d-af76-ae29677a1bf5@sangfor.com.cn> <9c1fecc1-7d17-c039-6bfa-c63be6fcf013@sangfor.com.cn> <20230609101301.39fcb12b@kernel.org> From: Ding Hui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkaSUxNVk0eTBhJQ0tKGk1CGFUTARMWGhIXJBQOD1 lXWRgSC1lBWUlPSx5BSBlMQUhJTEJBSk9PS0FCHxlBT0oeH0EZHkJDQU1JH0tZV1kWGg8SFR0UWU FZT0tIVUpKS0hKTFVKS0tVS1kG X-HM-Tid: 0a88a36a888b2eb1kusn9de07280e6e X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Nk06LAw5HT1DTSM3MC0rMUoe EBUwCyJVSlVKTUNNSE1DQ09DT0tDVTMWGhIXVR8SFRwTDhI7CBoVHB0UCVUYFBZVGBVFWVdZEgtZ QVlJT0seQUgZTEFISUxCQUpPT0tBQh8ZQU9KHh9BGR5CQ0FNSR9LWVdZCAFZQU9IQ043Bg++ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/6/10 1:59, Alexander Duyck wrote: > On Fri, Jun 9, 2023 at 10:13 AM Jakub Kicinski wrote: >> >> On Fri, 9 Jun 2023 23:25:34 +0800 Ding Hui wrote: >>> drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c: .get_sset_count = nfp_net_get_sset_count, >>> drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c: .get_sset_count = nfp_port_get_sset_count, >> >> Not sure if your research is accurate, NFP does not change the number >> of stats. The number depends on the device and the FW loaded, but those >> are constant during a lifetime of a netdevice. Sorry, my research is rough indeed. > > Yeah, the value doesn't need to be a constant, it just need to be constant. > > So for example in the ixgbe driver I believe we were using the upper > limits on the Tx and Rx queues which last I recall are stored in the > netdev itself. > Thanks to point that, the examples NFP and ixgbe do help me. -- Thanks, -dinghui