From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6085C04E84 for ; Thu, 16 May 2019 16:32:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DC8020833 for ; Thu, 16 May 2019 16:32:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=appleguru.org header.i=@appleguru.org header.b="DKBXUR2w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbfEPQcs (ORCPT ); Thu, 16 May 2019 12:32:48 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:35412 "EHLO mail-qk1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbfEPQcs (ORCPT ); Thu, 16 May 2019 12:32:48 -0400 Received: by mail-qk1-f175.google.com with SMTP id c15so2671244qkl.2 for ; Thu, 16 May 2019 09:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=appleguru.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sNULc9LftB44W2Iv6y2pLvz98UIco3dfz8kKHtwH93Q=; b=DKBXUR2wqnuD72MIOLMRSswoI82bascRFl5Vq2cQ8rvIIzkgnvFVVuV83TU+Ml0JlO +Spqis8eC0OuxWtxREoQ0GKk1pTOVYQsSzh/gJsXsBH/V5SEecqk1mbA5xIDud2NhdhZ aLbdpCK2zFB7xYPbqTCk1wC/my8vvxRF39r1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sNULc9LftB44W2Iv6y2pLvz98UIco3dfz8kKHtwH93Q=; b=n1AHsfwrfWbxZCxpoVaXFb1ApwLRv8X2bKJ3iJ3uuBtXqB8F3ZSA5uj8fWWfdrDh6g 3ypc1AQYH1MtcmPQpJVBg0Bce5VZQUserZEteLCsP4TiHKOTCWuUXsdigZOxVKdJEeTv l+dXag4DBhGQsKH7k60RGLIr4IJwGOicZCAFy+voRR1OcudAqfs4Xf+Tf6hkhCnWmOjB dcPNnHr8hwFCpRwLgf6zh5qbq+hZ4AybAXWyVG670o+ko90Bjc8reV1gRlfHrdWBwRVX nZLR4ZNnlonGI+cBAwgvx80e8dUjkg9VbhlJzkANVcsu24x5F25Ce634Okoi6Qpwuy6U XY2Q== X-Gm-Message-State: APjAAAVQKC4i/IQGdwleToZoh81z4Hyjc+rJViicX66iWECTqjshMF5c +d/s02SnC9XzOZj3Cz1TZTrUfzBDJzqdEg== X-Google-Smtp-Source: APXvYqxnTpy/SXnLPEwmnzzg57cCST9yJ1CzcVctvB64RVe2PvxCu3RVS80u6XZMFhQ7sza/g06WAw== X-Received: by 2002:a05:620a:1012:: with SMTP id z18mr39372110qkj.205.1558024367327; Thu, 16 May 2019 09:32:47 -0700 (PDT) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com. [209.85.160.182]) by smtp.gmail.com with ESMTPSA id j10sm2630209qth.8.2019.05.16.09.32.46 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 09:32:46 -0700 (PDT) Received: by mail-qt1-f182.google.com with SMTP id h1so4689955qtp.1 for ; Thu, 16 May 2019 09:32:46 -0700 (PDT) X-Received: by 2002:aed:2471:: with SMTP id s46mr43407208qtc.144.1558024366210; Thu, 16 May 2019 09:32:46 -0700 (PDT) MIME-Version: 1.0 References: <0d50023e-0a3b-b92b-59d6-39d0c02fa182@gmail.com> <18aefee7-4c47-d330-c6c1-7d1442551fa6@gmail.com> In-Reply-To: <18aefee7-4c47-d330-c6c1-7d1442551fa6@gmail.com> From: Adam Urban Date: Thu, 16 May 2019 12:32:35 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Kernel UDP behavior with missing destinations To: Eric Dumazet Cc: Willem de Bruijn , Network Development Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Eric, thanks. Increasing wmem_default from 229376 to 2293760 indeed makes the issue go away on my test bench. What's a good way to determine the optimal value here? I assume this is in bytes and needs to be large enough so that the SO_SNDBUF doesn't fill up before the kernel drops the packets. How often does that happen? On Thu, May 16, 2019 at 12:14 PM Eric Dumazet wrote: > > > > On 5/16/19 9:05 AM, Eric Dumazet wrote: > > > We probably should add a ttl on arp queues. > > > > neigh_probe() could do that quite easily. > > > > Adam, all you need to do is to increase UDP socket sndbuf. > > Either by increasing /proc/sys/net/core/wmem_default > > or using setsockopt( ... SO_SNDBUF ... ) >