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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3110C87FC9 for ; Tue, 29 Jul 2025 16:07:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 59E1640B4D; Tue, 29 Jul 2025 16:07:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id XCMG0O5TCneK; Tue, 29 Jul 2025 16:07:35 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5C20C4140D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1753805255; bh=AojRXkOOFjA2N/3VnYTbAXR8Q5lK8XT727nyCzSJxAg=; h=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Nf0eCM/mDE2iipMA5JJYqzlH7hHvtT4QX9gvXtkWLfY28d15dwm6mpZRiUExsLAZH Pw8EKlZPuhI5Roh/g/z8h0vCYjJBehFsFpk5gp2UV+U4eAfFyq4fgmdcksfg0R7e+9 sKzZHDJwV4AgTBT/Lh6Nf5/iTw0YVN4eISKuX8jeNFzfCIhSDxZnHjEt/3LVWoU8fQ 6wKNDVU8HAzUeLJq9/O/aHZD5LlRLAo5X4LUFJobfd9s0WSsD1GG+MJ7xeNnxLp2XG DQb3DLAipAHoXt3p/E3Hey6VmdYbJIZ6oW0fxonxUj89PBdnfAmknbB8g6kuAPQvib 2grG3piP9Crqg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 5C20C4140D; Tue, 29 Jul 2025 16:07:35 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 47C291BE for ; Tue, 29 Jul 2025 16:07:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2E12181137 for ; Tue, 29 Jul 2025 16:07:34 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 5hrqoRW4SJk2 for ; Tue, 29 Jul 2025 16:07:33 +0000 (UTC) X-Greylist: delayed 380 seconds by postgrey-1.37 at util1-new.osuosl.org; Tue, 29 Jul 2025 16:07:32 UTC DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 8338E81120 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8338E81120 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:41d0:1004:224b::ab; helo=out-171.mta0.migadu.com; envelope-from=vadim.fedorenko@linux.dev; receiver= Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [IPv6:2001:41d0:1004:224b::ab]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8338E81120 for ; Tue, 29 Jul 2025 16:07:32 +0000 (UTC) Message-ID: <1a7f0aa0-47ae-4936-9e55-576cdf71f4cc@linux.dev> Date: Tue, 29 Jul 2025 17:01:06 +0100 MIME-Version: 1.0 To: Andrew Lunn Cc: Michael Chan , Pavan Chebbi , Tariq Toukan , Gal Pressman , intel-wired-lan@lists.osuosl.org, Donald Hunter , Jakub Kicinski , Paolo Abeni , Simon Horman , netdev@vger.kernel.org References: <20250729102354.771859-1-vadfed@meta.com> <982c780a-1ff1-4d79-9104-c61605c7e802@lunn.ch> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <982c780a-1ff1-4d79-9104-c61605c7e802@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1753804868; 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=AojRXkOOFjA2N/3VnYTbAXR8Q5lK8XT727nyCzSJxAg=; b=NyG2hHb5rIWP/mgK34lv6MFiSQFSSkv1SDG/UzC3R3zDbkdKl+7OClSATXiKAlhwpmX1pT 18n4YBWsvGXxAaznHbrvPMPXhQ0T4hzMelJUv5jNthW54oAJ3gNE2xtnqfiUz8qnz9RlaC q01oatMv2xEv8kauF8+LWXyuxpvVAbM= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=NyG2hHb5 Subject: Re: [Intel-wired-lan] [RFC PATCH] ethtool: add FEC bins histogramm report X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 29/07/2025 14:48, Andrew Lunn wrote: >> + name: fec-hist-bin-low >> + type: s32 > > Signed 32 bit > >> +struct ethtool_fec_hist_range { >> + s16 low; > > Signed 16 bit. > >> + if (nla_put_u32(skb, ETHTOOL_A_FEC_STAT_FEC_HIST_BIN_LOW, >> + ranges[i].low) || > > Unsigned 32 bit. > > Could we have some consistency with the types. Yeah, it looks a bit messy. AFAIK, any type of integer less than 32 bits will be extended to 32 bits anyway, so I believe it's ok to keep smaller memory footprint for the histogram definition in the driver but still use s32 as netlink attr type. I'll change the code to use nla_put_s32() to keep sign info. Does it look OK? > > Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 EDE31293C7F for ; Tue, 29 Jul 2025 16:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753804873; cv=none; b=Gw+UZy+ph5v6OABa2SZyF2vae1I3w4k28zrtXK2lXJmcCuWW05GeplLCLauk4rGSpp8Z1VzjeBKjKCuKlZTgNW8i0VS3CDf54K/2zquPmpTURxPszzCJRcbSm+31psQ7qE0fETeULvL1NEvioypOD5RLsTDDqvoapZ/EKTw4gMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753804873; c=relaxed/simple; bh=9pRCQ+Odukp8ehudDc+xKX6IjB9IT4bSCQS53eHoyVQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Gf/SnDPqYpArUiRxbX48S/jpDk8L9eXEn+kBAEY7R2s3XjQsXQHriIrrVHh3WHPdDnW+L1egZN0KJvtVKq5Fn02bj3dPe+lSCmlyiAc1GbaNtAGB9fZ05axNTWaSmMa+CP5wNELgMm0F7u4Lftb+8hah0utncU2QJssTAxOrdRI= 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=NyG2hHb5; arc=none smtp.client-ip=91.218.175.173 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="NyG2hHb5" Message-ID: <1a7f0aa0-47ae-4936-9e55-576cdf71f4cc@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1753804868; 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=AojRXkOOFjA2N/3VnYTbAXR8Q5lK8XT727nyCzSJxAg=; b=NyG2hHb5rIWP/mgK34lv6MFiSQFSSkv1SDG/UzC3R3zDbkdKl+7OClSATXiKAlhwpmX1pT 18n4YBWsvGXxAaznHbrvPMPXhQ0T4hzMelJUv5jNthW54oAJ3gNE2xtnqfiUz8qnz9RlaC q01oatMv2xEv8kauF8+LWXyuxpvVAbM= Date: Tue, 29 Jul 2025 17:01:06 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [RFC PATCH] ethtool: add FEC bins histogramm report To: Andrew Lunn Cc: Michael Chan , Pavan Chebbi , Tariq Toukan , Gal Pressman , intel-wired-lan@lists.osuosl.org, Donald Hunter , Jakub Kicinski , Paolo Abeni , Simon Horman , netdev@vger.kernel.org References: <20250729102354.771859-1-vadfed@meta.com> <982c780a-1ff1-4d79-9104-c61605c7e802@lunn.ch> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <982c780a-1ff1-4d79-9104-c61605c7e802@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 29/07/2025 14:48, Andrew Lunn wrote: >> + name: fec-hist-bin-low >> + type: s32 > > Signed 32 bit > >> +struct ethtool_fec_hist_range { >> + s16 low; > > Signed 16 bit. > >> + if (nla_put_u32(skb, ETHTOOL_A_FEC_STAT_FEC_HIST_BIN_LOW, >> + ranges[i].low) || > > Unsigned 32 bit. > > Could we have some consistency with the types. Yeah, it looks a bit messy. AFAIK, any type of integer less than 32 bits will be extended to 32 bits anyway, so I believe it's ok to keep smaller memory footprint for the histogram definition in the driver but still use s32 as netlink attr type. I'll change the code to use nla_put_s32() to keep sign info. Does it look OK? > > Andrew