Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5499381rdb; Wed, 13 Dec 2023 10:16:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYS7Th7ypBq9AeAhYG5Dz8+KnNpE8UtVCGPdAPJF01wbsJxRM4aQ1KxHkd89Jyp41YnuEl X-Received: by 2002:a05:6358:6f14:b0:170:5b7c:26ac with SMTP id r20-20020a0563586f1400b001705b7c26acmr12076756rwn.59.1702491393255; Wed, 13 Dec 2023 10:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702491393; cv=none; d=google.com; s=arc-20160816; b=aQn/7lgk2rbRLJwMT15uSbz2qI97pNXtNW6qJoM6hokPcXzP706APNs4q0eUIIlPS0 ++3TenaOO25CNg/XfPnJnd8J/SgNfoKly47YjOB5RXj+Qx7zDmeCSeO0GLm3nsMvNjsr 5DEWhubWYBEeA8L//Ely0zsf9KN/9G93yy8acwaNAGg+36eJRszLFKo1YQrCduCFWyVb kj5V+Rti9Etr4sSwljrtBNZQ/8Hag06gPysGGDUhHztMxzIL9WI3UkZeFDgGa3nx7JKr yWdqs17i41nMb++Vx3AW2A6mf7LIXUn9EjCdKqTIsn01GyjlV67NNm2jANwe46J7Y+mA yfpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=XWFAx4kAF7hKrrXw5IZi1qHuzEkNqyvfaO25OJOU7sA=; fh=p6UE9/XeFdVcez2P5EpH3VpeppOo7ov8vHzRKEaMwWo=; b=TYDXIRcrXD6a/nlMlFSo+d9e+FULD3vItseMJUfvyIz19amwTWWxTHlzzYonXBhV/w RQPnaKNwDX/tnXvXoCOqrmHZGLxoBFSa9ZL/D0S3B0OwauqNXd1hLasT5oDL660eE/WA Pz2Vfn/bFOxvzcW1RgAB692n7gtJ3WnA3AggR/Qrzw1Av18OJRFuROZ++DvPkCii1jyS UJcXjkINdW4dVLOidVJ6hJFriIWmL2w/QSkBqDbGrf6P5djHyvyL/ffKO0Tsbv4PtE8L ebz5FLqGvOfWO3Z880VRJUANLmPG6j0opHn+0JUmhE63qEJ4Rz/x1cgVLHLfp1kI6F25 R0Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dZyeq8Qf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id by3-20020a056a02058300b005b9a467330esi10314097pgb.707.2023.12.13.10.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:16:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dZyeq8Qf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 89FAD80A730A; Wed, 13 Dec 2023 10:16:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442148AbjLMSQD (ORCPT + 99 others); Wed, 13 Dec 2023 13:16:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233807AbjLMSP4 (ORCPT ); Wed, 13 Dec 2023 13:15:56 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72ADAF3; Wed, 13 Dec 2023 10:16:02 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3360ae1b937so3694112f8f.0; Wed, 13 Dec 2023 10:16:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702491361; x=1703096161; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XWFAx4kAF7hKrrXw5IZi1qHuzEkNqyvfaO25OJOU7sA=; b=dZyeq8QfVckkss0cDgsppzOC5CyNkvPCZgbub7jwwbBaGTHKlXOYChgbLNf2+QBLN0 1+uPcWl9aKr2DvDU8jbmD8ZnMv2zW5IzGSY9Bvx3VrWIfu8k/3DsRZ1bMUdAMGCZ1gly EkDPWUPio+t1o755n7YKZZb8OX+oq/sO4DJY/aN2ItvHoAd8reKhgdQEYQGJa2LVeQ1t OSDKuuQn0z002xv1rulQjYOUEsIJaSiR39UPp4OUQQy/04GX1qHd0iv/8KIgpBUXEnTW nqDaHZ7VNh4dVIi/1qLGKil+NMaSZ43fGM8sAB5+5IZ4VOETdJWVD8Bp2DVbuBcaCcta d57A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702491361; x=1703096161; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XWFAx4kAF7hKrrXw5IZi1qHuzEkNqyvfaO25OJOU7sA=; b=np6YiJy4Whs5sDbILvdaWeWKTiAyPol9nlnggGGhwqHjilMY9VGHAiai4grEoS30Xt eDg/WTasSpqvlSbsVgH6rULWqrHzLIvSm/kzZqT2Jvh3Px0+kN6sDHpsZELJUGxb+hag cYFPU/gvD5wrkjLjZ+2ths9msdz2uoF86i34YT8U1k0P+PmR8MLI/zaf+BVuN7hReAld xXpjqWP9BounwEQzGnyDhvw9iFR+tDnrVpNMZ4wTNPXvL2PLCxt2vLr3mj8PAEK2jRd6 EQRMMp7OhPWev4TGNtpmkx8W25Hr53cKh3wt0q9iR5JCorJUVOzlnqN7KW4GW7V4+gRs qrrw== X-Gm-Message-State: AOJu0YwM6cBqRie2f6sPZeQJZa43z5c1uXYy3KQcyINsE/iCHTgNoHOf xWKqI65p3kYGuJ5Atg8ACN8= X-Received: by 2002:adf:fb43:0:b0:334:b1f4:5d59 with SMTP id c3-20020adffb43000000b00334b1f45d59mr4781640wrs.40.1702491360826; Wed, 13 Dec 2023 10:16:00 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id e33-20020a5d5961000000b0033346fe9b9bsm13947762wri.83.2023.12.13.10.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:16:00 -0800 (PST) From: Christian Marangi To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Vincent Mailhol , Kees Cook , Christian Marangi , Piergiorgio Beruto , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next PATCH 1/2] net: ethtool: add define for link speed mode number Date: Wed, 13 Dec 2023 19:15:53 +0100 Message-Id: <20231213181554.4741-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231213181554.4741-1-ansuelsmth@gmail.com> References: <20231213181554.4741-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Dec 2023 10:16:30 -0800 (PST) Add define to reference the number of link speed mode defined in the system. This can be handy for generic parsing of the different link speed mode. Signed-off-by: Christian Marangi --- include/uapi/linux/ethtool.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index f7fba0dc87e5..59f394a663ab 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -1884,6 +1884,28 @@ enum ethtool_link_mode_bit_indices { * Update drivers/net/phy/phy.c:phy_speed_to_str() and * drivers/net/bonding/bond_3ad.c:__get_link_speed() when adding new values. */ +enum ethtool_link_speeds { + SPEED_10 = 0, + SPEED_100, + SPEED_1000, + SPEED_2500, + SPEED_5000, + SPEED_10000, + SPEED_14000, + SPEED_20000, + SPEED_25000, + SPEED_40000, + SPEED_50000, + SPEED_56000, + SPEED_100000, + SPEED_200000, + SPEED_400000, + SPEED_800000, + + /* must be last entry */ + __LINK_SPEEDS_NUM, +}; + #define SPEED_10 10 #define SPEED_100 100 #define SPEED_1000 1000 -- 2.40.1