From owner-freebsd-transport@freebsd.org Wed Jul 20 20:28:59 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 61733B9F823 for ; Wed, 20 Jul 2016 20:28:59 +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 24DD2199D for ; Wed, 20 Jul 2016 20:28:59 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-io0-x231.google.com with SMTP id b62so57978741iod.3 for ; Wed, 20 Jul 2016 13:28:59 -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=bGNbzuhqDKpVnkIqJYkAEszjlCgpx4RDp8eeMWHFmKc=; b=RRwHpWK6gCRoYys6M1zO8XT/lNHBXiUYZLLAuIGy75kZAtgyjrXhn2P+VBivs3QclY MPT8LX3cQxKgyxTggRY3BVxda4X1SfKrDtbc2bR30tTR4KzXvgtnwGXk9+1vWCF9aIBJ 7o19DxnNtsm1eqm/IroFHPa+NrieYSqye5ZDPOy/4m8dIp0sfwOQmD40nzxgsNOtMRV1 XJdQ4yBA2V7AeaeG8K6qmZJjBjXiNH2RGx5N3UQTcp96YhOqU2gaeir71iJ9TSvwLt3c 5nSUjDtLFWJ/1555iSbPlT2w/+bOFBZp+gdopHvhhgUNz73R24F/lDz0L/up9Of85ml1 dFyQ== 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=bGNbzuhqDKpVnkIqJYkAEszjlCgpx4RDp8eeMWHFmKc=; b=kqT2y0LB05j5HQxwGn5mcrBzz0bPjjr7YWLLUWF/qV4R3agLDFF74uxlZGhvtEaY0Y iFVvRmW2TLbU7hq7lmC+6JiAMu/mR1DK+Up10W69pOpVJJpndxbLdJ76654jQdmsRlbP Q0YziUIXczKZAuQbMZ0G35NJ3miXYrSU28DcIgqop4xCyJscdIcMO1z4R858z6GhCmJ3 wHPDU8/sTwA9W7Kb+4lznqfiEae/FPrn+IgFga4/7rFwHrZlt4axqgx7PTaMjRMqG0nI TbZCzw1B6ov3usENqURpyCowqY/W7go2Zz9lYTpP+sIG7r6rplcDGqxL6ff4cC03yxib EPRQ== X-Gm-Message-State: ALyK8tJKzGc9QDnM4N0ZihT5khBWsHCx6NweZYGNV/00W0UL/9ItRDC9lkt+d/SD0NYOTOjOsKuNZuTljpmwZQ== X-Received: by 10.107.159.147 with SMTP id i141mr17830341ioe.29.1469046538613; Wed, 20 Jul 2016 13:28:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.200.71 with HTTP; Wed, 20 Jul 2016 13:28:58 -0700 (PDT) In-Reply-To: References: <559f1d0e-9d35-f458-bff5-b69a03297cf0@netflix.com> From: Ryan Stone Date: Wed, 20 Jul 2016 16:28:58 -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 20:28:59 -0000 Hang on a sec. At this point in ip_output(), we already have the route. Can't we just calculate the broadcast address using the route and then skip in_broadcast() entirely?