From nobody Mon Nov 28 17:29:09 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NLXWp3PH9z4jRQ5; Mon, 28 Nov 2022 17:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NLXWp2b6xz47tF; Mon, 28 Nov 2022 17:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669656550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VceScVwokWm3fBFolMQoJx33ADY23Hl+dUj/m8kJ4sw=; b=gUBfSYtrV2twXuJNVXxd2UjFasz0h+0Ao4As3/MERkthu154u8XPlyd9G3MREdhLbH2a9Y Vl1TFamFatVMtLaksgTBFs9mbgMBiJwjY5pRB3AORbyATOAXkHhlxvho4DhtOiE821I0oR BsFKLyHpBvclGqpHh0bfpPi01jiKt6pbhOfyNmiqYTFXKMIjGbMj8PpnsWAn3M+3rB9Isp 10E+p9HeqbM0PUd7qDEpXNw//bLW1QCXLxjE6IhMTAeaBPd3LPx9RFHSzEaA45fhKI9iyS z9rBWN7HeslfCtHbO5lI9kZorvPvquKCNY2Aii9FGAiuCWtMlLbVQKCCm/ZL6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669656550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VceScVwokWm3fBFolMQoJx33ADY23Hl+dUj/m8kJ4sw=; b=yivxjLdM8WXRgogQ4FH7zgRff01VO25k6gksMr9EI8Exu30fgKzs5/OoxywHWvyLX5Ubjl Kugvd4RxmhQqPlziz2QEcdE6S3ZheRJJHzGjtxTTtIvRraghtvk1jwdkgQj5Te9hIqL3ly KN4HpdbDDm+YrKbkCukwDRo8RXeOBGJU/ZCmgDEdVh9VV6VL83t9WX6TJKJv5Lu0+YVSWQ Q0Cz1LQk/AXgcTHtPbPCmd31NK+A7/9T6ZXZ6UM86+SMnqnzUfyaYWzUFxs9wF1dde4jCJ lqDyJXe3CF/VzGHuWzJ/vDsk4c9DUjlsIvN5cZnJjdwM7oLNiv478sk0CaBgLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669656550; a=rsa-sha256; cv=none; b=yL6oMtnBBgqmYaDX/KLzjWO8ucLLT4F8IsB4K/tR8y9wvP+qGlQak5X5LZ0T8onH21dXP2 1yEWLVXzyZaDU6agdHtJAS5KTK3T3jz0qLDA7aKL7FCGKgwP8hUdIYZqL/Fdhry2MXtRcq qEgGN+f5VTbdxJupu1M5unEdNjlPw5m7wlgLbKhph1niSFB60tkBvaPuNVQ/OElOwsbbIK n5Ip8H7G1zRY0Zd8hhbJPC6M4Bj9nbiaqjdW307LpvXFAlv/l1q/0uNfdJ2zbQ4Rj9oANh W7U0HJgVhX2fH12Gm2rsDOx89Z3VEKtdGG5PRFRTQt7/Peg0tMOyNhb85RPARw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NLXWn72X4zlpm; Mon, 28 Nov 2022 17:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ASHT9rB081920; Mon, 28 Nov 2022 17:29:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ASHT9KP081919; Mon, 28 Nov 2022 17:29:09 GMT (envelope-from git) Date: Mon, 28 Nov 2022 17:29:09 GMT Message-Id: <202211281729.2ASHT9KP081919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1b91eba37b29 - main - LinuxKPI: ethtool.h add more definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b91eba37b294fd191a9dc79a80f52495af9418d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1b91eba37b294fd191a9dc79a80f52495af9418d commit 1b91eba37b294fd191a9dc79a80f52495af9418d Author: Bjoern A. Zeeb AuthorDate: 2022-10-30 17:07:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-11-28 17:25:58 +0000 LinuxKPI: ethtool.h add more definitions While we do not currently use ethtool, add the definitions to avoid other longer-term maintenance problems with drivers. Also migrate ETH_GSTRING_LEN into here from if_ether.h as it seems this is where it belongs. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D37214 --- sys/compat/linuxkpi/common/include/linux/ethtool.h | 20 +++++++++++++++++++- sys/compat/linuxkpi/common/include/linux/if_ether.h | 2 -- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ethtool.h b/sys/compat/linuxkpi/common/include/linux/ethtool.h index 9195766f752d..99f5219d0187 100644 --- a/sys/compat/linuxkpi/common/include/linux/ethtool.h +++ b/sys/compat/linuxkpi/common/include/linux/ethtool.h @@ -32,10 +32,28 @@ #include -#define ETHTOOL_FWVERS_LEN 64 +#define ETH_GSTRING_LEN (2 * IF_NAMESIZE) /* Increase if not large enough */ + +#define ETHTOOL_FWVERS_LEN 32 struct ethtool_stats { uint8_t __dummy[0]; }; +enum ethtool_ss { + ETH_SS_STATS, +}; + +struct ethtool_drvinfo { + char driver[32]; + char version[32]; + char fw_version[ETHTOOL_FWVERS_LEN]; + char bus_info[32]; +}; + +struct net_device; +struct ethtool_ops { + void(*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *); +}; + #endif /* _LINUXKPI_LINUX_ETHTOOL_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/if_ether.h b/sys/compat/linuxkpi/common/include/linux/if_ether.h index c27583e62ebd..cb3e34a0823f 100644 --- a/sys/compat/linuxkpi/common/include/linux/if_ether.h +++ b/sys/compat/linuxkpi/common/include/linux/if_ether.h @@ -71,6 +71,4 @@ struct ethhdr { uint16_t h_proto; } __packed; -#define ETH_GSTRING_LEN (2 * IF_NAMESIZE) /* Increase if not large enough */ - #endif /* _LINUXKPI_LINUX_IF_ETHER_H_ */