From owner-freebsd-net@FreeBSD.ORG Tue Aug 21 15:20:42 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 35036106564A for ; Tue, 21 Aug 2012 15:20:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id D611E8FC16 for ; Tue, 21 Aug 2012 15:20:41 +0000 (UTC) Received: by ghrr13 with SMTP id r13so7176041ghr.13 for ; Tue, 21 Aug 2012 08:20:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=cacyrk3J+IwdSKDlz7T2ePwBidhF7kPNpUh4nz7UdIA=; b=PtHRcwS5AE6c3OVZ44KSTsPsLQ3hUxB6cuvYT1KrPW+aGAKwHljgWBOJbLDaC2epEF MnKrEFHgJKlwDoONI71DYrbZEqdUAuiDGmIvcqymzehmjDZr5QrxfYsnqHL2KxE9hMXz GzgWnmFVJgNFDGRErHbe8yzmzsxsX50Q0/n2PQueYlsnqd7tOrnASRVpHIpcDFObvMqg LqC1l96k8ZPNzXv/jztx3/L4ds2BVJAXAeiNJ+u4Kez9H31dYgehlCfhiWEg4YfrZJA2 OBAI5dy3I636X8UhDVy4Ek4GrJbaIX+rBdREKJ4aN6P2sk1T0I6FEKQE5gwT/WZ1sY5W aSpA== Received: by 10.68.232.138 with SMTP id to10mr7286064pbc.77.1345562440844; Tue, 21 Aug 2012 08:20:40 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([216.51.42.66]) by mx.google.com with ESMTPS id sr3sm1634505pbc.44.2012.08.21.08.20.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 08:20:40 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Tue, 21 Aug 2012 09:20:38 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <420BA06C-C776-47DB-B3BB-F1414C115F99@bsdimp.com> References: <50324DB4.6080905@cabletv.dp.ua> <5452BF37-3658-4C1F-B965-CE3EA28B6EA5@bsdimp.com> To: Wojciech Puchar X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlCamnODPW6QwVFzTQDCYg7tFKh2MWZ2/8yRObtUuZKrWK0TuRI2yuDDmC9+roJC8QF7Fn2 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: Tue, 21 Aug 2012 15:20:42 -0000 On Aug 21, 2012, at 1:42 AM, Wojciech Puchar wrote: >>=20 >> Even without this tagging, the code to do a structure level copy of 6 = bytes is going to be tiny... >=20 > true. >=20 > just to make sure it will be absolutely portable how about >=20 > bcopymacaddress(dst,src) >=20 > and then define it whatever you find it fastest on any architecture? How about just changing it to the *dst =3D *src, compiling it on all = architectures and then deciding if the improvement of the code from a = hand-tweaked thing is worth that uglification? Warner