From owner-freebsd-net@FreeBSD.ORG Mon Aug 20 19:19:10 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 40C0F10656A4; Mon, 20 Aug 2012 19:19:10 +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 4F0C78FC1A; Mon, 20 Aug 2012 19:19:04 +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 q7KJI5f1019376; Mon, 20 Aug 2012 21:18:07 +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 q7KJHwPa019373; Mon, 20 Aug 2012 21:18:01 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 20 Aug 2012 21:17:58 +0200 (CEST) From: Wojciech Puchar To: Warner Losh In-Reply-To: Message-ID: References: <50324DB4.6080905@cabletv.dp.ua> 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]); Mon, 20 Aug 2012 21:18:10 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, Mitya , 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: Mon, 20 Aug 2012 19:19:10 -0000 >> or use ++. >> >> i think it is always aligned to 2 bytes and this should produce usable code on any CPU? should be 6 instructions on MIPS and PPC IMHO. > > We should tag it as __aligned(2) then, no? If so, then the compiler should generate the code you posted. should is the most important word in Your post. what it actually do - i don't know.