From owner-freebsd-net@FreeBSD.ORG Wed Aug 22 20:28:48 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 693D1106566B; Wed, 22 Aug 2012 20:28:48 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 0B77E8FC1B; Wed, 22 Aug 2012 20:28:37 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q7MJsdZ0061881; Wed, 22 Aug 2012 21:54:40 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q7MJsWkq061878; Wed, 22 Aug 2012 21:54:36 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Wed, 22 Aug 2012 21:54:32 +0200 (CEST) From: Wojciech Puchar To: Adrian Chadd In-Reply-To: Message-ID: References: <50324DB4.6080905@cabletv.dp.ua> <420BA06C-C776-47DB-B3BB-F1414C115F99@bsdimp.com> <201208220802.14588.jhb@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Wed, 22 Aug 2012 21:54:42 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, Mitya , Warner Losh , John Baldwin , freebsd-net@freebsd.org Subject: Re: Replace bcopy() to update ether_addr X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 20:28:48 -0000 > but wonder whether the same does hold for MIPS/ARM. Getting it wrong > there will lead to some very very poor performing code. > 1) do - as already pointed out - standard copy of structure in C. 2) if compiler is found to generate bad code on some archs put assembly. 1 even if compiler is not smart is already far better than calling a function to copy 6 bytes that is plain stupid.