From owner-freebsd-net@freebsd.org Thu Aug 3 18:04:14 2017 Return-Path: Delivered-To: freebsd-net@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 25D75DCB600 for ; Thu, 3 Aug 2017 18:04:14 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-qt0-f171.google.com (mail-qt0-f171.google.com [209.85.216.171]) (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 E136764FD2 for ; Thu, 3 Aug 2017 18:04:13 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-qt0-f171.google.com with SMTP id p3so12187566qtg.2 for ; Thu, 03 Aug 2017 11:04:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Yi93Mk50YsXe8aLGKhNuOSZTSu7C+Rt2/kJhXmhT4CU=; b=fcK7wLYwvpFvD2rOrwkhyjj3xIjIKfoGrTgmNsWgUr5Ao6wmQHL/bbGUlyEU/hlwYf j1vXaoioSKHHfAnOKUNoTQr7wfirZsnAWvHLZTCb5CihKNLwq/7aJxRf/il7IAZ79jVm CRs2uZ+WdBWHau+nAnhjUn3GGylq8C62CexhZTAcUyY69IdynTZhsZgHyq85+f5qUy0o 09dkNVOuQ7jFlOcp6B1J/6yeCjJ7KFts6G2XIvkWLHRv3lNYB7NqGM1FE+sHPQjhExY+ cxSvZGs0JQ9jEzIDktAoSeHm/kdafRJ8TlaXLGP+VO9ZYNgtDwkwrzzhlKIo+kdD9T16 lS1A== X-Gm-Message-State: AIVw1117G8xBkHuRYeckCdxKvcBvs69/MCQOtbeSCH71RFdBL5SAhSxB /rnd3ATgaF6A0bvhmtQ= X-Received: by 10.200.43.177 with SMTP id m46mr3216433qtm.189.1501783098849; Thu, 03 Aug 2017 10:58:18 -0700 (PDT) Received: from [192.168.2.122] (71-212-70-173.tukw.qwest.net. [71.212.70.173]) by smtp.gmail.com with ESMTPSA id h47sm8189962qte.67.2017.08.03.10.58.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 10:58:17 -0700 (PDT) To: freebsd-net@freebsd.org From: Matt Joras Subject: Request for comments/discussion on listen queue overflow logging Message-ID: Date: Thu, 3 Aug 2017 10:58:16 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 18:04:14 -0000 Hello, Some of you may have noticed a review I posed on Phabricator: https://reviews.freebsd.org/D11725. The general problem this is trying to solve is the lack of information about which application's listen queue has overflowed. As mentioned in the review, there is no good way to implement this where the message is currently logged, as it is at the generic socket layer. The approach I take in the review is to construct an additional more verbose log message (the TCP 4-tuple) at call point of sonewconn in the syncache code. I'd appreciate any feedback on the review or suggestions of alternative approaches. An approach I did think about, but discarded, was to add a protocol function to struct protosw, something like int pr_getsockdescr(struct socket *, char *, size_t) which would fill in a "human-readable" description of the socket based on whatever is appropriate. Thanks, Matt Joras