From nobody Wed Jan 18 16:24:45 2023 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 4Nxrgx2w7Hz2yJLP; Wed, 18 Jan 2023 16:24:45 +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 4Nxrgx23HPz3Ddr; Wed, 18 Jan 2023 16:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674059085; 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=fqKKorZ69JUqLSFxwgRV+2A0f/XNvDDgSsJp+UwgnuI=; b=v6QzCX/ii+YPN+2Po9NyzYWPnxfr6ykRR8wD7hZX+TYjcu8ByW7LjQsS8WMeHExKWh9LV/ lQGxFAGDubJ6Nzu1bgQWJUBhQHHwk7x9Tz2CjTC8ohntll/rspijZuxfgOBcERqI+5TTeg y+h8ybR8PUZPNpROTiHujPbHX613ERNR1X5nU+JQU2cMuVbuIkb/QZpeQ8QMmhKTLtp7dB p8o47Qlh812a6vgk9EUSKSdU54WM4RmUlEQNTDqlxW1GpQcXdp+vbUriOxv067ynOTZZhS 9MLWsHmheCqa80opNeiDl+oi4YKxap1iilZ0yX1in3n2QY57Kx19tiL2XexsfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674059085; 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=fqKKorZ69JUqLSFxwgRV+2A0f/XNvDDgSsJp+UwgnuI=; b=gomfYZhUEKEyPwoKwfTAqBAn6+ZmWrbyXJYTtwbH+Hu8AsLtFWoAV739ZnWmjTS0La2w/q mPvqdpgqAeKJdu41iI30h7PseEDxHgE9BeUnwsgM7d9AGceUrRgSqdpK42Lp90UK0B7Udz WaIzSSLnm7C6q3V+H6YH9336DrP2KaXSmpbw1aXur1hXlGKCxV8ovW+kAiH9BBYRAOEm3t CJkvQS2wvL7IKTuvr7TqdQGHzmtXlA16MCzn/Ohybh7k7odxIBK0+kPv0pFrQ1FoAtz4Io pE+MZwCdq7kyxyUgCmOpVDKrE/OML4s646nVdMShizobZWSq/UTg2/Oo4fF1Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674059085; a=rsa-sha256; cv=none; b=OT+dhvHPx4yTmHIQ+lY/WbKCID8G8Ivr8s+zIMTkZeYvdCWri8e4PN2YEtuXEbW6snSpNz 2f+UzxF4ciajwpUKtYujuUWysznLylZVmM/5gw9KA5+yjH0FV78ebTj7QTsl/xCnbD8S0/ GptM3SoH0J6H6XwmDGms+KLy+BT/2/Cb9qYohTTB2ike+8CHcY/myEHewoj82j6DivZFF5 N3lgbRDhoM8iUlx8vBeeWZ33UjYhBu8v/1FhcRAcrRUJJ6fnTQg3DdDxmtYh8tVuWg2638 tXfb9CKR/n67zQrpI1eJpZeFf7uiNjtsWWYAnK1qHinnhntN46zKsG/frFWXNw== 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 4Nxrgx0v6HzJ3b; Wed, 18 Jan 2023 16:24:45 +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 30IGOjTh037835; Wed, 18 Jan 2023 16:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IGOjsu037834; Wed, 18 Jan 2023 16:24:45 GMT (envelope-from git) Date: Wed, 18 Jan 2023 16:24:45 GMT Message-Id: <202301181624.30IGOjsu037834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2078d0ea1e9f - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2078d0ea1e9f3c18422c30725687e7f861c2e560 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2078d0ea1e9f3c18422c30725687e7f861c2e560 commit 2078d0ea1e9f3c18422c30725687e7f861c2e560 Author: Bjoern A. Zeeb AuthorDate: 2022-10-30 17:07:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-01-18 13:23:55 +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. Differential Revision: https://reviews.freebsd.org/D37214 (cherry picked from commit 1b91eba37b294fd191a9dc79a80f52495af9418d) --- 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_ */