Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Mitya
20.08.2012 22:20, Warner Losh написал: On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: 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

Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Bakul Shah
On Mon, 20 Aug 2012 13:05:51 MDT Warner Losh wrote: > > On Aug 20, 2012, at 10:48 AM, Wojciech Puchar wrote: > > >> #if defined(__i386__) || defined(__amd64__) > >> *dst =3D *src; > >> #else > >> bcopy(src, dst, ETHER_ADDR_LEN); > > #else > > short *tmp1=3D((*short)src),*tmp2=3D((*short)dst

Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Warner Losh
On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: >>> 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 shoul

Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Wojciech Puchar
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

Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Warner Losh
On Aug 20, 2012, at 10:48 AM, Wojciech Puchar wrote: >> #if defined(__i386__) || defined(__amd64__) >> *dst = *src; >> #else >> bcopy(src, dst, ETHER_ADDR_LEN); > #else > short *tmp1=((*short)src),*tmp2=((*short)dst); > *tmp2=*tmp1; *(tmp2+1)=*(tmp1+1); *(tmp2+2)=*(tmp1+2); > > or use ++. >

Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Wojciech Puchar
#if defined(__i386__) || defined(__amd64__) *dst = *src; #else bcopy(src, dst, ETHER_ADDR_LEN); #else short *tmp1=((*short)src),*tmp2=((*short)dst); *tmp2=*tmp1; *(tmp2+1)=*(tmp1+1); *(tmp2+2)=*(tmp1+2); or use ++. i think it is always aligned to 2 bytes and this should produce usable co

Re: Replace bcopy() to update ether_addr

2012-08-20 Thread Warner Losh
On Aug 20, 2012, at 8:46 AM, Mitya wrote: > Hi. > I found some overhead code in /src/sys/net/if_ethersubr.c and > /src/sys/netgraph/ng_ether.c > > It contains strings, like bcopy(src, dst, ETHER_ADDR_LEN); > When src and dst are "struct ether_addr*", and ETHER_ADDR_LEN equal 6. > This code call

Replace bcopy() to update ether_addr

2012-08-20 Thread Mitya
Hi. I found some overhead code in /src/sys/net/if_ethersubr.c and /src/sys/netgraph/ng_ether.c It contains strings, like bcopy(src, dst, ETHER_ADDR_LEN); When src and dst are "struct ether_addr*", and ETHER_ADDR_LEN equal 6. This code call every time, when we send Ethernet packet. On example, o

Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP

2012-08-20 Thread John Baldwin
On Friday, August 17, 2012 6:58:58 pm Peter Jeremy wrote: > On 2012-Aug-17 11:48:17 -0400, John Baldwin wrote: > >Hmm, I think I see the issue. It doesn't export the existing lease info to > >the script when running the FAIL action. I just tested this change and it > >removed the old IP on my la

Current problem reports assigned to freebsd-net@FreeBSD.org

2012-08-20 Thread FreeBSD bugmaster
Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker

Re: kern/170701: [ppp] killl ppp or reboot with active ppp connection cause panic when HISADDR set

2012-08-20 Thread linimon
Old Synopsis: killl ppp or reboot with active ppp connection cause panic when HISADDR set New Synopsis: [ppp] killl ppp or reboot with active ppp connection cause panic when HISADDR set Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-Whe

Re: wpa_supplicant wpa peap gtc connection - gtc failing?

2012-08-20 Thread Bernhard Schmidt
On Mon, Aug 20, 2012 at 10:27 AM, Da Rock wrote: > On 08/19/12 03:23, Bernhard Schmidt wrote: >> >> On Saturday 18 August 2012 13:47:29 Da Rock wrote: >>> >>> On 08/18/12 13:32, Adrian Chadd wrote: Is there any reason we don't build with that option? >>> >>> You know, I was wondering tha

Re: wpa_supplicant wpa peap gtc connection - gtc failing?

2012-08-20 Thread Da Rock
On 08/19/12 03:23, Bernhard Schmidt wrote: On Saturday 18 August 2012 13:47:29 Da Rock wrote: On 08/18/12 13:32, Adrian Chadd wrote: Is there any reason we don't build with that option? You know, I was wondering that myself but I wasn't exactly sure whether to ask or not :) Historical reasons

Re: kern/168742: detaching of ethernet adapter with configured vlans leads to panic

2012-08-20 Thread Andrey V. Elsukov
On 16.08.2012 16:16, John Baldwin wrote: >> This fixes the problem, thanks. > > Can you actually try this patch instead? I think I'd rather fix it this way > (this reworks how I originally tried to fix this): > > Index: if_vlan.c >