Date: Thu, 23 Aug 2012 13:45:37 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Luigi Rizzo <rizzo@iet.unipi.it> Cc: freebsd-hackers@freebsd.org, Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, Mitya <mitya@cabletv.dp.ua>, John Baldwin <jhb@freebsd.org>, freebsd-net@freebsd.org Subject: Re: Replace bcopy() to update ether_addr Message-ID: <CAJ-Vmoncq9ww5J69a4ihwzHQ2SbsV1q4ZYmanuQZ1AMo6JCu-g@mail.gmail.com> In-Reply-To: <20120822215244.GC67796@onelab2.iet.unipi.it> References: <50324DB4.6080905@cabletv.dp.ua> <201208220802.14588.jhb@freebsd.org> <CAJ-Vmo=1cbJn3pkSvoCq7y-kEGig-h1Vxo6M5V0=b9=MkfuMRA@mail.gmail.com> <201208221521.06954.jhb@freebsd.org> <20120822215244.GC67796@onelab2.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmoncq9ww5J69a4ihwzHQ2SbsV1q4ZYmanuQZ1AMo6JCu-g>