From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7TO4-0005Vu-18 for qemu-devel@nongnu.org; Fri, 11 Dec 2015 14:29:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7TO0-0005my-PM for qemu-devel@nongnu.org; Fri, 11 Dec 2015 14:29:51 -0500 Received: from domu-toccata.ens-lyon.fr ([140.77.166.138]:38187 helo=sonata.ens-lyon.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7TO0-0005mt-Ir for qemu-devel@nongnu.org; Fri, 11 Dec 2015 14:29:48 -0500 Date: Fri, 11 Dec 2015 20:29:44 +0100 From: Samuel Thibault Message-ID: <20151211192944.GI2764@var.home> References: <20151211001505.GV2905@var.home> <1449792930-27293-1-git-send-email-samuel.thibault@ens-lyon.org> <1449792930-27293-6-git-send-email-samuel.thibault@ens-lyon.org> <566AE66E.1030902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <566AE66E.1030902@redhat.com> Subject: Re: [Qemu-devel] [PATCH 06/18] slirp: Factorizing and cleaning solookup() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: zhanghailiang , Li Zhijian , Stefan Hajnoczi , Jason Wang , qemu-devel@nongnu.org, Vasiliy Tolstov , Dave Gilbert , Gonglei , Jan Kiszka , Huangpeng , Yang Hongyang , Guillaume Subiron Thomas Huth, on Fri 11 Dec 2015 16:06:22 +0100, wrote: > On 11/12/15 01:15, Samuel Thibault wrote: > > From: Guillaume Subiron > > > > This patch makes solookup() compatible with varying address families. Also, > > this function was only compatible with TCP. Having the socket list in > > argument, it is now compatible with UDP too. Finally, some optimization > > code is factorized inside the function (the function look at the last > > returned result before browsing the complete socket list). > > > > This also adds a sockaddr_equal() function to compare two > > sockaddr_storage. > > I'd maybe also split this patch into two - first introduce the > sockaddr_equal() function, then do the other changes. If you do too much > stuff in one patch, it gets more difficult to read. Actually I think I'll do the converse. solookup doesn't take a sockaddr first, so introducing sockaddr_equal just to make it take separate in_addr and lport would make both patches clumsy. Making solookup access sockaddr first is however not too bad. Samuel