From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 23 20:45:37 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5C83106566B; Thu, 23 Aug 2012 20:45:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 791B08FC12; Thu, 23 Aug 2012 20:45:37 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so2221055pbb.13 for ; Thu, 23 Aug 2012 13:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=eTs2PDCvXo7HJ4XyB3Z7nXzztmeJZO27snyZbgEdlj4=; b=qUu9nVbvlEtvRhOXcVR/7/WsbrLdmN91xKPJ6kf/ZdqCNXgdJIQQTftCM4Lo0LHhN5 spYO9JsLOkRhXXqThR5otK6SceocRLgzETNJ3gEql8NjBzeSa/lUw6ho6fdrkmMRej1P ZfUWl1PycXy0ov5H2ZgzJTtEng0D93LtnKwT78dL+VTnvnNjNeguusQ6gbBh6V+JIV66 1PHZ9crCEYy/MWCwbsA5G7JJ7n+f5JgBPVmGezKwGoZqZ0B18SSaydMfpuUYk9CBpj7G fFdH7+D4LS83kXDtV2EXXXgY5PacQuxa+c6IhgQLEIr5RaWihkqcZAQME60d4hQyVvQN Sa2g== MIME-Version: 1.0 Received: by 10.68.238.74 with SMTP id vi10mr7562884pbc.48.1345754737174; Thu, 23 Aug 2012 13:45:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.36.106 with HTTP; Thu, 23 Aug 2012 13:45:37 -0700 (PDT) In-Reply-To: <20120822215244.GC67796@onelab2.iet.unipi.it> References: <50324DB4.6080905@cabletv.dp.ua> <201208220802.14588.jhb@freebsd.org> <201208221521.06954.jhb@freebsd.org> <20120822215244.GC67796@onelab2.iet.unipi.it> Date: Thu, 23 Aug 2012 13:45:37 -0700 X-Google-Sender-Auth: cEMIlt1cCvnwt95ul82zb1EHs6E Message-ID: From: Adrian Chadd To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Wojciech Puchar , Mitya , freebsd-net@freebsd.org Subject: Re: Replace bcopy() to update ether_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2012 20:45:37 -0000 You can't assume the ethernet addresses will be aligned. For wifi headers you're definitely going to have at least one address be non-dword aligned, even if the header itself is dword aligned. The whole point of using a macro is so it becomes really easy to change the copy type at compile time. Otherwise I'll have to go through the code, find all the (CPU intensive/stalling) places where those 6 byte copies are occuring and replace them. Adrian