Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4390862imm; Sat, 21 Jul 2018 18:32:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeaSwUjWR4X4F5K/0lGkKHGz8u/EuTkvqyvUNQrS2TL78xhirOzhkAkQCd01ZgX55T8wKdM X-Received: by 2002:a62:444d:: with SMTP id r74-v6mr7726984pfa.96.1532223153856; Sat, 21 Jul 2018 18:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532223153; cv=none; d=google.com; s=arc-20160816; b=0heZ2NbJ7SUCmAYp48TtBs2sfxkPNjMuf3HfrKfs9ukdJ58BQ62leWAZFB4gseIcVL E4GaKAk3Gd3wnQvYICn1WxckpzvU1UTVk2qbHIPQbCZ33UaK6SN7EfFhl9Pmh/sthadN 5rAg2nSsv8OWT+2Hv+udqD2dgqC36NrhKGeH0si7lh5nP/Mjk+v6KmBg9r/24cVro2mB vRFOllU7T1r806V6jgNCjYICnLekMaPhaFivr6Ld33PaHSx73RWZKbQ28/AdZF632IGj CdqR3bfyXHVNra0GPyh1yePGPIrSybvuueJMV3jt35GiFG+h1WNED4j7t+O4VrcN4LqJ 84nA== 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 :content-language:mime-version:user-agent:date:message-id:subject :openpgp:from:to:dkim-signature:arc-authentication-results; bh=kVBXgTPSLF9g5RPKucwZ+AnSU0ZHpFNQyYURJQ2jeig=; b=lscN/iHsAcoPwpXE5TzOKPxrioIpB1suaCyziHWVDFCGmAv68uOizsyL1mgokU17vI pnqF++Lb1KIPgmKAFtIkdTf1kKtz4w69JErVpIgbEyn/T7wWwZp0DEZfnV9NlQXxGKn4 KYHvDrOh0oWWfc1eJQLphOfL5OWryVR5vjnX7Fuv/8k9dcRIydZwahvbDlkdeRkcKefv VWK7r9Bw9LDvrXf2SMJGGaUCw6AXr+nD42gvzWhKZuJgBhlVaCHw7OHFBp6CUiIJ3/U4 t60CBxAdDoY/jJm0OOVbQbbuu5xgzAezKEcrJS/JSxUZ3XizjtGuxq8JZiwTLVaOEDHB LFlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ka9q-net.20150623.gappssmtp.com header.s=20150623 header.b=wSOnDTAC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si5474762pfb.316.2018.07.21.18.32.17; Sat, 21 Jul 2018 18:32:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ka9q-net.20150623.gappssmtp.com header.s=20150623 header.b=wSOnDTAC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728313AbeGVC0N (ORCPT + 99 others); Sat, 21 Jul 2018 22:26:13 -0400 Received: from mail-pl0-f46.google.com ([209.85.160.46]:34368 "EHLO mail-pl0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728175AbeGVC0M (ORCPT ); Sat, 21 Jul 2018 22:26:12 -0400 Received: by mail-pl0-f46.google.com with SMTP id f6-v6so6729837plo.1 for ; Sat, 21 Jul 2018 18:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ka9q-net.20150623.gappssmtp.com; s=20150623; h=to:from:openpgp:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=kVBXgTPSLF9g5RPKucwZ+AnSU0ZHpFNQyYURJQ2jeig=; b=wSOnDTACOZOVc3dNrqFHi5pjG0avEjBCt4aC7jHUOSUDRDW5lprAl42jIud1WUT/ku 6f9FDv5Oc9Hgt7uJGihjLPzqXn+wQyfKVJdPgQS5oqrHEgiULO31NVGbDzCSf/wa4iMC dW29/yOVRXuPnm+T4sAmKFDnmA3mxoP5svwboH4712N2WgZIN1zT6DelMUCqmZwsWyYx kBoT5uGdZvxWgFFP71G9dqwTEZ9TM8Foa8ct4KXFmPUI8MW4/KW0481MrRRkGP+nFQSq YJYQsiPYyQJCIOKYc3g6x8oDtAVd+KfbJikFVhhHLVBBGs/9Xi00WvfY4U7QAX0sFfcA MOpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:openpgp:subject:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=kVBXgTPSLF9g5RPKucwZ+AnSU0ZHpFNQyYURJQ2jeig=; b=qvpVBVeSNmQuZVBhgPacfELonr40hsbaplLQY8nErV/epFVymV5hJ47Ae/JNc6GERB rVPDQhsObz7YA9/yooA5l3dd6yA+2MCkDp5oz4wZ6pMWLtrgAIQ/A37jQJL9jfEtGYJh g/h7iEl5Ht/hyX6h4wAbo5tWP2DIHYgnlFbAqKBTtUK/OskRbLWNh8D8FxvpTLfpE+Ac 5XIDHecY3Gfl9t2KAsuGthi21guQj3sDRBgcriovKpNIFaqYBWJhxMC/TjKi/oXtxEmF UYhL69+eoRdbSahIjs32GH/NunkDae8YKxkmd8ImCXspogeCyd3wSN/TKGsU8svX1Bay O3Sg== X-Gm-Message-State: AOUpUlGUHrw241nBc1Q8AppgiZuo91bFuMM5QZrr8xsXejkzveub2LKK SeCsclm+FHn40OvukA6JUmrugkd5rhw= X-Received: by 2002:a17:902:6845:: with SMTP id f5-v6mr7483595pln.173.1532223084799; Sat, 21 Jul 2018 18:31:24 -0700 (PDT) Received: from patty.ka9q.net ([2605:e000:1c0e:4055:980f:3b53:4381:3284]) by smtp.gmail.com with ESMTPSA id 70-v6sm8382218pfz.55.2018.07.21.18.31.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jul 2018 18:31:23 -0700 (PDT) To: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Phil Karn Openpgp: preference=signencrypt Subject: hard-coded limit on unresolved multicast route cache in ipv4/ipmr.c causes slow, unreliable creation of multicast routes on busy networks Message-ID: <147f730b-8cbf-b76d-f693-b3fdaf72a89c@ka9q.net> Date: Sat, 21 Jul 2018 18:31:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm running pimd (protocol independent multicast routing) and found that on busy networks with lots of unresolved multicast routing entries, the creation of new multicast group routes can be extremely slow and unreliable, especially when the group in question has little traffic. A google search revealed the following conversation about the problem from the fall of 2015: https://github.com/troglobit/pimd/issues/58 Note especially the comment by kopren on Sep 13, 2016. The writer traced the problem to function ipmr_cache_unresolved() in file net/ipmr.c, in the following block of code: /* Create a new entry if allowable */ if (atomic_read(&mrt->cache_resolve_queue_len) >= 10 || (c = ipmr_cache_alloc_unres()) == NULL) { spin_unlock_bh(&mfc_unres_lock); kfree_skb(skb); return -ENOBUFS; } This imposes a hard-wired limit of 10 multicast route entries with unresolved source addresses and upstream interfaces. My problem system sits on a busy subnet at UC San Diego, and when I run the command 'ip mroute show' there are almost always exactly 10 unresolved multicast routes. The authors reported that removing this limit solved their problem, but I still see the test in the just-released kernel version 4.17.8. I don't have this problem on my home network or on a small network at a local high school, both networks having fewer active multicast groups. The problem only shows up at UCSD. The problem is most acute with a multicast group that generates only one packet (decoded ham radio location tracking packets) every 10 seconds or so. The multicast route *never* resolves and traffic never gets through. The problem is also severe with a multicast group generating intermittent bursts of traffic with seconds of idle time between bursts (audio PCM from a software defined FM receiver with a squelch that stops the traffic when there's no signal). However, when the receiver is tuned to NOAA Weather Radio (which generates a continuous stream of traffic) multicast routing generally worked. The *only* difference between these three cases was the intensity of traffic in the multicast groups. Does this hard-coded limit serve any purpose? Can it be safely increased to a much larger value, or better yet, removed altogether? If it can't be removed, can it at least be made configurable through a /proc entry? Thanks, Phil Karn, KA9Q