From patchwork Thu Mar 4 22:58:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1447584 X-Patchwork-Delegate: mail@david-bauer.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=fail (SPF fail - not authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=NO0VpIOy; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Ds5v660lWz9sW1 for ; Fri, 5 Mar 2021 10:00:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ewa7H3hqReFiWfitzc4zwu4sX65ejhbY/G2lE8/1AWE=; b=NO0VpIOydVQ6qO xC5f6FBCjyKDElyJXmXKwCp9jH9pmgIwt7rPcqOh/2S6c2KQwBRvFdbYLabG0m8Z6VQb0pCWd8kQf qW7GlCknoiaaY3WUNpEqmTMqjAO5P+TCyFXdhZ3eRDOz/+5NL8bzIey2hwqXlj/I6GX14L5lMqp4w 50ZZJqkWzVxAH4klT0KMdtlE7k9z9dGPDlRef5v8H9kT34ZGgxuPw4HE4TPwqm4oYpk5Pomi0ngQ/ +PJPkowMO7jc9MVR8bR5s2hMuW5+YH15Rv8AfrmbUbNgMTkdR013Q1xlU0f/PxuB0UAHPdOOuyxmM /wwoey6Gc1NWDyvN+1kQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHwvm-00Ac55-AL; Thu, 04 Mar 2021 22:58:54 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHwvZ-00Abyr-1m for openwrt-devel@lists.openwrt.org; Thu, 04 Mar 2021 22:58:43 +0000 Received: from localhost.localdomain (p200300e53f1a16009b41b895368e6b56.dip0.t-ipconnect.de [IPv6:2003:e5:3f1a:1600:9b41:b895:368e:6b56]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id 00C0326714 for ; Thu, 4 Mar 2021 23:58:35 +0100 (CET) From: David Bauer To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/2] ethtool: add netlink build variant Date: Thu, 4 Mar 2021 23:58:19 +0100 Message-Id: <20210304225820.56006-1-mail@david-bauer.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Netlink support is required for using the virtual cable tester functionality. Thus, add a build variant with enabled netlink support. Signed-off-by: David Bauer --- package/network/utils/ethtool/Makefile | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Netlink support is required for using the virtual cable tester functionality. Thus, add a build variant with enabled netlink support. Signed-off-by: David Bauer --- package/network/utils/ethtool/Makefile | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index 3efc90490b..ab068b9c20 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool PKG_VERSION:=5.10 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -34,28 +34,46 @@ define Package/ethtool URL:=http://www.kernel.org/pub/software/network/ethtool/ endef +define Package/ethtool-netlink + $(Package/ethtool) + TITLE += (netlink support) + VARIANT:=netlink + PROVIDES:=ethtool + CONFLICTS:=ethtool + DEPENDS:=+libmnl +endef + define Package/ethtool/description ethtool is a small utility for examining and tuning your ethernet-based network interface endef +Package/ethtool-netlink/description:=$(Package/ethtool/description) + define Package/ethtool/config config ETHTOOL_PRETTY_DUMP - depends on PACKAGE_ethtool + depends on PACKAGE_ethtool || PACKAGE_ethtool-netlink bool "Enable pretty printing" endef -CONFIGURE_ARGS += --disable-netlink - ifeq ($(CONFIG_ETHTOOL_PRETTY_DUMP),y) CONFIGURE_ARGS += --enable-pretty-dump else CONFIGURE_ARGS += --disable-pretty-dump endif +ifeq ($(BUILD_VARIANT),netlink) +CONFIGURE_ARGS += --enable-netlink +else +CONFIGURE_ARGS += --disable-netlink +endif + define Package/ethtool/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin endef +Package/ethtool-netlink/install=$(Package/ethtool/install) + $(eval $(call BuildPackage,ethtool)) +$(eval $(call BuildPackage,ethtool-netlink)) From patchwork Thu Mar 4 22:58:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1447583 X-Patchwork-Delegate: mail@david-bauer.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=fail (SPF fail - not authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=DZJ7gZkn; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Ds5v45HkLz9sVt for ; Fri, 5 Mar 2021 10:00:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NLnVNDcVVmCFEoo986ZYaxbBJRy0J06OI/Wa0CDZu0c=; b=DZJ7gZknFdKvey868R+RtSDvx 3Ib+zyHVjOFOlC4X1nc45GKxTQSqvEowDsyJB3cPCskIh450fBy8r1Lx3k7XY1Lz0/dloDb1c9A5R f/ieUaYN1ouSFtuv53fFHIXfQuCJY6PMdgTN1Yl6fA6zoUgqO3voq+mZf1Ftse/5QiMZPzN6WXWx1 b1muqdd0j3U2c/oAIZj7a2EZJRi5I70EE1ti/zWfgGdzvtGqFySAA5+ClflIVNuDNaxlrYHoXpZ4j 6DsLBQCK0u1hTXFxZKt/2FFsBSNiGak0mQqmQhFwdpVZC1zF5JqobiOOC8Ylqe8cDUaJg4NA/H8Qp NgKnmBHFw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHwvf-00Ac2e-Et; Thu, 04 Mar 2021 22:58:47 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHwvZ-00Abyl-2y for openwrt-devel@lists.openwrt.org; Thu, 04 Mar 2021 22:58:42 +0000 Received: from localhost.localdomain (p200300e53f1a16009b41b895368e6b56.dip0.t-ipconnect.de [IPv6:2003:e5:3f1a:1600:9b41:b895:368e:6b56]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id 8BD3026AD1 for ; Thu, 4 Mar 2021 23:58:36 +0100 (CET) From: David Bauer To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/2] generic: enable netlink ethtool interface Date: Thu, 4 Mar 2021 23:58:20 +0100 Message-Id: <20210304225820.56006-2-mail@david-bauer.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210304225820.56006-1-mail@david-bauer.net> References: <20210304225820.56006-1-mail@david-bauer.net> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The virtual cable tester depends on the netlink interface for ethtool. Thus, enable it in the generic kernel configuration. Signed-off-by: David Bauer --- target/linux/generic/config-5.10 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The virtual cable tester depends on the netlink interface for ethtool. Thus, enable it in the generic kernel configuration. Signed-off-by: David Bauer --- target/linux/generic/config-5.10 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 0fd3e0f5a8..a51605592d 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -1715,7 +1715,7 @@ CONFIG_EPOLL=y # CONFIG_ET131X is not set CONFIG_ETHERNET=y # CONFIG_ETHOC is not set -# CONFIG_ETHTOOL_NETLINK is not set +CONFIG_ETHTOOL_NETLINK=y CONFIG_EVENTFD=y # CONFIG_EVM is not set # CONFIG_EXFAT_FS is not set