Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp598261ybt; Fri, 19 Jun 2020 09:02:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNIcE4G1B7wfhYC9pUrNvYIy1DSs5WpzTVoFSWjlgR5hVYFGjblXG9RqFcDgjCbznvvJJs X-Received: by 2002:a50:fc0d:: with SMTP id i13mr3981434edr.260.1592582544238; Fri, 19 Jun 2020 09:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592582544; cv=none; d=google.com; s=arc-20160816; b=Zfh/UUSXMGtcJlYXrgroyT05lqd7kqr/uK5AXVpKK9H3RHJe5wjtB4DQs5/UNrMBZA bZpoCyLPSmnLntQQDTBE4me7iANVqDf6bdQYfCY2XIsecTk3FWSgJ+gnFVNPu81SJ2SU 4sGzIPQ2IyJj1Jd9vKBt4lO+dDR16wcut2KgdMiCpnMlM32BbwIaBl4ZTBQZmwoDZCfc 6M/OmIZvKs85K5zx/Cc8x1MFOHugOpGWzY26Q9hXf2wlWGuyDk2txhExmATMbvx4Axxf XYdIJVmwW03CD/0won5WQsCmUd/gVXGtrxYupN24BkaO2IfDBQbAR02+YafwydzxEV24 /4rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nARyNylL9tkuW/DZ3FGoElr6vIGUIn0BqVGfo/1HeUY=; b=NcEfe20aml337mHeTPl6zaMchs5Bgoab2SDVrfJy2bco2LHMwCsbB8kFE5Luf3B1lv Fcl+77Ct73WpzpjgaeHj1509wZIXfJ9rwSCRG8VHuwGaJuzuVt+MkK7Bo4GUUGFRMAMV 8Rt+c8sAAaIiunlwuTCL/YZ1pEPheSUPB1DnmXGw4qvLwpqsHVy0CtYCOlO/LNN1RN1G a+Pc98Gp6GpnyddSq5Nlf6bk4jb9wzqpGqL5HGpVethbM3clnv44eFPttKzU8S01e4dB H+YEM6EqKIDd8JUwTSTmiThBiMLhHsJkNFE/XAIByJor/7LI5oFAvYZ7BF8L4956bZi+ x3ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="K1/EApPn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu2si3941965ejb.89.2020.06.19.09.02.00; Fri, 19 Jun 2020 09:02:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="K1/EApPn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392863AbgFSP7U (ORCPT + 99 others); Fri, 19 Jun 2020 11:59:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:50100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392231AbgFSPTN (ORCPT ); Fri, 19 Jun 2020 11:19:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A402206DB; Fri, 19 Jun 2020 15:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592579952; bh=gumFx8A5m9fNWLYnCaEu3mPXlkEB5qOQe53IV6HBUdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1/EApPnkQCuD6aat2G/dz9EfYZ8Chg0FmpSyX5vVcvcpnB7RpooYl2Evm7OCWGCG UP5XUTc7OjuksVD8N1VM/gkm4RMTgcT/3qBug6bRnjq9yDAvNGScqE7mK67VKhddeq EC7apRz2TG6V+RhWS8FPUW+ZXaY6s8H1LA1m1MEg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Schiffer , Sven Eckelmann , Simon Wunderlich , Sasha Levin Subject: [PATCH 5.7 066/376] batman-adv: Revert "disable ethtool link speed detection when auto negotiation off" Date: Fri, 19 Jun 2020 16:29:44 +0200 Message-Id: <20200619141713.479391020@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141710.350494719@linuxfoundation.org> References: <20200619141710.350494719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Eckelmann [ Upstream commit 9ad346c90509ebd983f60da7d082f261ad329507 ] The commit 8c46fcd78308 ("batman-adv: disable ethtool link speed detection when auto negotiation off") disabled the usage of ethtool's link_ksetting when auto negotation was enabled due to invalid values when used with tun/tap virtual net_devices. According to the patch, automatic measurements should be used for these kind of interfaces. But there are major flaws with this argumentation: * automatic measurements are not implemented * auto negotiation has nothing to do with the validity of the retrieved values The first point has to be fixed by a longer patch series. The "validity" part of the second point must be addressed in the same patch series by dropping the usage of ethtool's link_ksetting (thus always doing automatic measurements over ethernet). Drop the patch again to have more default values for various net_device types/configurations. The user can still overwrite them using the batadv_hardif's BATADV_ATTR_THROUGHPUT_OVERRIDE. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Sasha Levin --- net/batman-adv/bat_v_elp.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 1e3172db7492..955e0b8960d6 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -127,20 +127,7 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) rtnl_lock(); ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings); rtnl_unlock(); - - /* Virtual interface drivers such as tun / tap interfaces, VLAN, etc - * tend to initialize the interface throughput with some value for the - * sake of having a throughput number to export via ethtool. This - * exported throughput leaves batman-adv to conclude the interface - * throughput is genuine (reflecting reality), thus no measurements - * are necessary. - * - * Based on the observation that those interface types also tend to set - * the link auto-negotiation to 'off', batman-adv shall check this - * setting to differentiate between genuine link throughput information - * and placeholders installed by virtual interfaces. - */ - if (ret == 0 && link_settings.base.autoneg == AUTONEG_ENABLE) { + if (ret == 0) { /* link characteristics might change over time */ if (link_settings.base.duplex == DUPLEX_FULL) hard_iface->bat_v.flags |= BATADV_FULL_DUPLEX; -- 2.25.1