From owner-freebsd-net@freebsd.org Thu Jan 7 20:02:18 2016 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 8D50CA675FF for ; Thu, 7 Jan 2016 20:02:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 073C01944 for ; Thu, 7 Jan 2016 20:02:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u07K2DHf033361 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 7 Jan 2016 22:02:13 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u07K2DHf033361 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u07K2B9f033360; Thu, 7 Jan 2016 22:02:11 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 7 Jan 2016 22:02:11 +0200 From: Konstantin Belousov To: Luigi Rizzo Cc: Boris Astardzhiev , Mark Delany , "freebsd-net@freebsd.org" Subject: Re: Does FreeBSD have sendmmsg or recvmmsg system calls? Message-ID: <20160107200211.GG3625@kib.kiev.ua> References: <20160104101747.58347.qmail@f5-external.bushwire.net> <20160104194044.GD3625@kib.kiev.ua> <20160104210741.32812.qmail@f5-external.bushwire.net> <20160107161213.GZ3625@kib.kiev.ua> <20160107192840.GF3625@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 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, 07 Jan 2016 20:02:18 -0000 On Thu, Jan 07, 2016 at 11:46:35AM -0800, Luigi Rizzo wrote: > The libc API obviously needs to be conforming to the existing > sendmmsg/recvmmsg. I thought your point was that the underlying > syscall might possibly need a different set of parameters, so we could > as well experiment a bit to see what is needed before freezing it. Right, this is a correct representation of my position. This is why I do not want to provide a kernel interface for backing the functions. > > Regarding patching the application(s): of course it is not scalable > if there are many applications that will refuse to compile if > the *mmsg() functions are absent. However I expect this set of > application to be minuscule if not empty, and if they exist they > are probably plagued by other portability issues. I have an opposite impression. I think people who proposed the addition of the API, should weight in there. > > So (and using *mmsg() vs *msg() is about performance) I think that > until we have an underlying performant implementation of the *mmsg() > calls, there is no urgency in implementing the libc functions, > because we might later have to change then libc->syscall wrapper > anyways. If only libc functions are implemented, with the loop in usermode, we do not need any syscall layer and can provide whatever tilt in the kernel interface which would be found by experiments.