Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1422BC2CA for ; Sat, 14 Sep 2013 19:20:04 +0000 (UTC) Received: (qmail 52159 invoked by uid 500); 14 Sep 2013 19:19:59 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 52104 invoked by uid 500); 14 Sep 2013 19:19:58 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 52096 invoked by uid 99); 14 Sep 2013 19:19:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Sep 2013 19:19:57 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivan@visualsvn.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Sep 2013 19:19:53 +0000 Received: by mail-wg0-f54.google.com with SMTP id m15so2309408wgh.33 for ; Sat, 14 Sep 2013 12:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=visualsvn.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=aZvKzktmSzrxHqwCg6ethwX6LrC8jDhbR8SDeWjWJZM=; b=eTE9RNNrnoPk7jaEXjg2WrGIjgSkSoLNxTwNzg+U5BdhUdIpxvR0Q4tncSu5pY9vF+ JSWcygpOPiMklFe61aXiSP6ADFDEkMprugjTyDzEwyZm5SZM9MDKfx5Htob9MoT6k4Hd YV2CGvB6xelpXTRhjApsLGFk+l1BCodqZ9CDs= 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:content-type; bh=aZvKzktmSzrxHqwCg6ethwX6LrC8jDhbR8SDeWjWJZM=; b=JSuYqbxMVtP1D/Buy87onkyriBkoW8q5PgPCn8xdo6iSAX7E4b2B+unlML+4aHWJ/H sic+aMuV0qRooyctgeG4KQ3M8A4R2bMrnM/B8KHWbBV9HPH3Bu2M4Hf1CrzaIMoAiKW5 xXD/bVFGFxWTP6NsK0SNTUeqHyeheCGyeQJV9iVATRf3but6uklHYrEB7othDIeVZ7qf vr2pPIJyme/MKZAN9RlRuduzDKlN4pWmXTFXMc29isVdaKBTzweG4k7L4CcOeTpzXvYX IdTtd3pkunhlkiREfMFwJNGebDPxX0T0XQfoQrkHpL2LOM68aQ0ZmCFDhgvk39G09g7a IjYg== X-Gm-Message-State: ALoCoQmfqoX2VoCI4Kw06Jr4MT1c5piJm6FCZdlYS+NIferCj7XkvdaQ/tEPfLGVrP21n9BaJyby X-Received: by 10.180.183.3 with SMTP id ei3mr7253066wic.9.1379186372099; Sat, 14 Sep 2013 12:19:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.56.35 with HTTP; Sat, 14 Sep 2013 12:19:12 -0700 (PDT) In-Reply-To: References: <5230D81C.60701@wanadoo.fr> From: Ivan Zhakov Date: Sat, 14 Sep 2013 23:19:12 +0400 Message-ID: Subject: Re: Using AcceptEx on Windows To: dev@httpd.apache.org, kyanha@kyanha.net, christophe.jaillet@wanadoo.fr Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Sep 14, 2013 at 10:26 PM, Kyle Hamilton wrote: >>> Hi, >>> >>> The mpm_winnt uses AcceptEx API call to accept incoming connections. >>> But MSDN documentation states [1] that consumer should use WSAIoctl() >>> to get pointer to AcceptEx function instead calling it directly: >>> [[[ >>> Note The function pointer for the AcceptEx function must be obtained >>> at run time by making a call to the WSAIoctl function with the >>> SIO_GET_EXTENSION_FUNCTION_POINTER opcode specified. The input buffer >>> passed to the WSAIoctl function must contain WSAID_ACCEPTEX, a >>> globally unique identifier (GUID) whose value identifies the AcceptEx >>> extension function. On success, the output returned by the WSAIoctl >>> function contains a pointer to the AcceptEx function. The >>> WSAID_ACCEPTEX GUID is defined in the Mswsock.h header file. >>> ]]] >>> >>> Is any reason why WSAIoctl() is not used or just mistake and I should >>> prepare the patch to fix it?> > Calling WSAIoctl is necessary and useful in certain circumstances to > reduce duplicate work performed on every AcceptEx call (i.e., AcceptEx > calls WSAIoctl on every call, to ensure that the proper implementation > of AcceptEx for the given socket through the proper network provider > is property routed). > > Calling WSAIoctl and using AcceptEx through the pointer returned > bypasses this duplicate work. But, if httpd ever allows a single > instance to be used across multiple network providers (my presumption > is, like IPv4 and IPv6), this duplicate work cannot be avoided, and so > it's easiest and most effective to simply use AcceptEx without the > pointer and let the system figure out how to route it. > > This is digested solely from documentation, and I have done no testing > of the assumptions or validity of the documentation. > I was looking to httpd 2.4.x source code, while trunk code already resolves AcceptEx pointer dynamically using WSAIoctl() since r1363312 [1]. Sorry for noise :( [1] http://svn.apache.org/r1363312 -- Ivan Zhakov