All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sven Eckelmann <sven@narfation.org>,
	Matthias Schiffer <mschiffer@universe-factory.net>,
	Simon Wunderlich <sw@simonwunderlich.de>,
	Sasha Levin <sashal@kernel.org>,
	b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 025/106] batman-adv: Revert "disable ethtool link speed detection when auto negotiation off"
Date: Mon,  8 Jun 2020 19:21:17 -0400	[thread overview]
Message-ID: <20200608232238.3368589-25-sashal@kernel.org> (raw)
In-Reply-To: <20200608232238.3368589-1-sashal@kernel.org>

From: Sven Eckelmann <sven@narfation.org>

[ 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 <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 5da183b2f4c9..af3da6cdfc79 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -132,20 +132,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


  parent reply	other threads:[~2020-06-08 23:58 UTC|newest]

Thread overview: 140+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 23:20 [PATCH AUTOSEL 4.19 001/106] ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb Sasha Levin
2020-06-08 23:20 ` [PATCH AUTOSEL 4.19 002/106] ath9k: Fix use-after-free Write in ath9k_htc_rx_msg Sasha Levin
2020-06-08 23:20 ` [PATCH AUTOSEL 4.19 003/106] drm: bridge: adv7511: Extend list of audio sample rates Sasha Levin
2020-06-08 23:20   ` Sasha Levin
2020-06-08 23:20 ` [PATCH AUTOSEL 4.19 004/106] crypto: ccp -- don't "select" CONFIG_DMADEVICES Sasha Levin
2020-06-08 23:20 ` [PATCH AUTOSEL 4.19 005/106] media: si2157: Better check for running tuner in init Sasha Levin
2020-06-08 23:20 ` [PATCH AUTOSEL 4.19 006/106] objtool: Ignore empty alternatives Sasha Levin
2020-06-08 23:20 ` [PATCH AUTOSEL 4.19 007/106] spi: pxa2xx: Apply CS clk quirk to BXT Sasha Levin
2020-06-08 23:20   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 008/106] net: atlantic: make hw_get_regs optional Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 009/106] net: ena: fix error returning in ena_com_get_hash_function() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 010/106] efi/libstub/x86: Work around LLVM ELF quirk build regression Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 011/106] arm64: cacheflush: Fix KGDB trap detection Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 012/106] spi: dw: Zero DMA Tx and Rx configurations on stack Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 013/106] x86/cpu/amd: Make erratum #1054 a legacy erratum Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 014/106] arm64: insn: Fix two bugs in encoding 32-bit logical immediates Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 015/106] ixgbe: Fix XDP redirect on archs with PAGE_SIZE above 4K Sasha Levin
2020-06-08 23:21   ` [Intel-wired-lan] " Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 016/106] MIPS: Loongson: Build ATI Radeon GPU driver as module Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 017/106] Bluetooth: Add SCO fallback for invalid LMP parameters error Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 018/106] kgdb: Disable WARN_CONSOLE_UNLOCKED for all kgdb Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 019/106] kgdb: Prevent infinite recursive entries to the debugger Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 020/106] spi: dw: Enable interrupts in accordance with DMA xfer mode Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 021/106] clocksource: dw_apb_timer: Make CPU-affiliation being optional Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 022/106] clocksource: dw_apb_timer_of: Fix missing clockevent timers Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 023/106] btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 024/106] ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` Sasha Levin [this message]
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 026/106] mmc: meson-mx-sdio: trigger a soft reset after a timeout or CRC error Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 027/106] spi: dw: Fix Rx-only DMA transfers Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 028/106] x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 029/106] net: vmxnet3: fix possible buffer overflow caused by bad DMA value in vmxnet3_get_rss() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 030/106] staging: android: ion: use vmap instead of vm_map_ram Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 031/106] ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 032/106] ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 033/106] brcmfmac: fix wrong location to get firmware feature Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 034/106] tools api fs: Make xxx__mountpoint() more scalable Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 035/106] e1000: Distribute switch variables for initialization Sasha Levin
2020-06-08 23:21   ` [Intel-wired-lan] " Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 036/106] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 037/106] audit: fix a net reference leak in audit_send_reply() Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 038/106] media: dvb: return -EREMOTEIO on i2c transfer failure Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 039/106] media: platform: fcp: Set appropriate DMA parameters Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 040/106] MIPS: Make sparse_init() using top-down allocation Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 041/106] Bluetooth: btbcm: Add 2 missing models to subver tables Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 042/106] audit: fix a net reference leak in audit_list_rules_send() Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 043/106] netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supported Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 044/106] selftests/bpf: Fix memory leak in extract_build_id() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 045/106] net: bcmgenet: set Rx mode before starting netif Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 046/106] lib/mpi: Fix 64-bit MIPS build with Clang Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 047/106] perf: Add cond_resched() to task_function_call() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 048/106] exit: Move preemption fixup up, move blocking operations down Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 049/106] sched/core: Fix illegal RCU from offline CPUs Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 050/106] drivers/perf: hisi: Fix typo in events attribute array Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 051/106] net: lpc-enet: fix error return code in lpc_mii_init() Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 052/106] media: cec: silence shift wrapping warning in __cec_s_log_addrs() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 053/106] net: allwinner: Fix use correct return type for ndo_start_xmit() Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 054/106] powerpc/spufs: fix copy_to_user while atomic Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 055/106] ath9k_htc: Silence undersized packet warnings Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 056/106] xfs: clean up the error handling in xfs_swap_extents Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 057/106] Crypto/chcr: fix for ccm(aes) failed test Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 058/106] MIPS: Truncate link address into 32bit for 32bit kernel Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 059/106] mips: cm: Fix an invalid error code of INTVN_*_ERR Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 060/106] kgdb: Fix spurious true from in_dbg_master() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 061/106] xfs: reset buffer write failure state on successful completion Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 062/106] xfs: fix duplicate verification from xfs_qm_dqflush() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 063/106] platform/x86: intel-vbtn: Use acpi_evaluate_integer() Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 064/106] platform/x86: intel-vbtn: Split keymap into buttons and switches parts Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 065/106] platform/x86: intel-vbtn: Do not advertise switches to userspace if they are not there Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 066/106] platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Portable" chassis-types Sasha Levin
2020-06-08 23:21 ` [PATCH AUTOSEL 4.19 067/106] nvme: refine the Qemu Identify CNS quirk Sasha Levin
2020-06-08 23:21   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 068/106] ath10k: Remove msdu from idr when management pkt send fails Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 069/106] wcn36xx: Fix error handling path in 'wcn36xx_probe()' Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 070/106] net: qed*: Reduce RX and TX default ring count when running inside kdump kernel Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 071/106] mt76: avoid rx reorder buffer overflow Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 072/106] md: don't flush workqueue unconditionally in md_open Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 073/106] net: dsa: mt7530: set CPU port to fallback mode Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 074/106] veth: Adjust hard_start offset on redirect XDP frames Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 075/106] net/mlx5e: IPoIB, Drop multicast packets that this interface sent Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 076/106] rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup() Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 077/106] mwifiex: Fix memory corruption in dump_station Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 078/106] x86/boot: Correct relocation destination on old linkers Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 079/106] mips: MAAR: Use more precise address mask Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 080/106] mips: Add udelay lpj numbers adjustment Sasha Levin
2020-07-11 10:01   ` Aurelien Jarno
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 081/106] crypto: stm32/crc32 - fix ext4 chksum BUG_ON() Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 082/106] crypto: stm32/crc32 - fix run-time self test issue Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 083/106] crypto: stm32/crc32 - fix multi-instance Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 084/106] x86/mm: Stop printing BRK addresses Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 085/106] m68k: mac: Don't call via_flush_cache() on Mac IIfx Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 086/106] btrfs: qgroup: mark qgroup inconsistent if we're inherting snapshot to a new qgroup Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 087/106] net: ethernet: fec: move GPR register offset and bit into DT Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 088/106] macvlan: Skip loopback packets in RX handler Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 089/106] PCI: Don't disable decoding when mmio_always_on is set Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 090/106] MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe() Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 091/106] bcache: fix refcount underflow in bcache_device_free() Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 092/106] xfs: gut error handling in xfs_trans_unreserve_and_mod_sb() Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 093/106] xfs: measure all contiguous previous extents for prealloc size Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 094/106] mmc: sdhci-msm: Set SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 quirk Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 095/106] staging: greybus: sdio: Respect the cmd->busy_timeout from the mmc core Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 096/106] mmc: via-sdmmc: " Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 097/106] ixgbe: fix signed-integer-overflow warning Sasha Levin
2020-06-08 23:22   ` [Intel-wired-lan] " Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 098/106] mmc: sdhci-esdhc-imx: fix the mask for tuning start point Sasha Levin
2020-06-08 23:22   ` Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 099/106] spi: dw: Return any value retrieved from the dma_transfer callback Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 100/106] cpuidle: Fix three reference count leaks Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 101/106] platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32() Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 102/106] platform/x86: intel-hid: Add a quirk to support HP Spectre X2 (2015) Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 103/106] platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 104/106] vxlan: Avoid infinite loop when suppressing NS messages with invalid options Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 105/106] net_failover: fixed rollback in net_failover_open() Sasha Levin
2020-06-08 23:22 ` [PATCH AUTOSEL 4.19 106/106] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200608232238.3368589-25-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschiffer@universe-factory.net \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sven@narfation.org \
    --cc=sw@simonwunderlich.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.