From owner-freebsd-transport@freebsd.org Wed Jul 20 19:50:06 2016 Return-Path: Delivered-To: freebsd-transport@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F31C6B9E9BC for ; Wed, 20 Jul 2016 19:50:06 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB65518A9 for ; Wed, 20 Jul 2016 19:50:06 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-io0-x231.google.com with SMTP id q83so57315735iod.1 for ; Wed, 20 Jul 2016 12:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DvhbfvdPhjnV4SVTGL0w86RMKPhk6niejJun6mexl2U=; b=u3z4PoQ/d1pd9/25+Dd0j9ejXgf6u/M2IjE2gjF5OsGSuBaHoN1ev6dQA+7VkOu1sJ KCyepATLhkXuKPL8w6WJGfaXAGl42A6t+6qFuOhsVYlWe84P3QjECkU/MEEcTufjSm6l 38fjXBpWfJ8i5zsvC5RNQj48tb80mjZ34zeyjp3B8C4zOKViLzRAahZMh4+x7bJp4p5B Qa9qKrma4sC+VIyctLB7YC2OYCyW2ajq+A/Po3A2DLXG2DCfNBXbyTE1XyltJ8Fr+CHD WzBEjG+iZdUsdu2JvHg+OZyMqZpzDWhFcl+5l4qjucFCIFRGQoF7yZT0VotYbaTVq+TB wP7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DvhbfvdPhjnV4SVTGL0w86RMKPhk6niejJun6mexl2U=; b=fR0hzpnmBg7GHd403GGKoQ+rMTEkTgyv9U05Dm+VSuSt28oUYjAoMLxZxdy9ciBf/H NJ2+KygMmGNzKPcYPRFcNYolxNdTid8vHYHdivyI9sp9vdWCnVugFyINjDsYNLLIgYk3 xgUIc1OX4ydzPI6xon/9wQzviU0IhNwQRNsO0PAEA8dPkq548zJ3lFszT4b0EatPaE47 9KXqUPFhHlEPgV4vPp0VmRBz9WO9WleECBD/BepZG8Mp5JtqZVSfVB7jDZ2RXHNPABKG xwbj9Pki9FVzqj+Oux3yvOejlrWJoutrR5b9N2tp9MT+D1pyp0TokAYoQ/d2NO5JYwSR ahKA== X-Gm-Message-State: ALyK8tIpdIulTAmoNLvcxzMEzWTQa4UhbjQRrE9akTFfYJ0BrmTaUWOxrUx+/kytm+e+hsNX/tk2YyICFcg5Nw== X-Received: by 10.107.159.147 with SMTP id i141mr17681132ioe.29.1469044206271; Wed, 20 Jul 2016 12:50:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.200.71 with HTTP; Wed, 20 Jul 2016 12:50:05 -0700 (PDT) In-Reply-To: <559f1d0e-9d35-f458-bff5-b69a03297cf0@netflix.com> References: <559f1d0e-9d35-f458-bff5-b69a03297cf0@netflix.com> From: Ryan Stone Date: Wed, 20 Jul 2016 15:50:05 -0400 Message-ID: Subject: Re: in_broadcast() called for almost every packet in ip_output() To: Andrew Gallatin Cc: freebsd-transport@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions of transport level network protocols in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 19:50:07 -0000 On Wed, Jul 20, 2016 at 3:22 PM, Andrew Gallatin wrote: > Caching sounds reasonable, but.. won't the lock still add overhead > to paths like unconnected udp and packet forwarding? > Forwarded packets will never be broadcast, so checking for a broadcast address would just be redundant. Unconnected UDP would get overhead, but I'm honestly not sure how many people care about the performance of unconnected UDP.