Re: kern/120304: [netgraph] [patch] netgraph source assumes 32-bit timeval on AMD64

2013-05-13 Thread Mitya
The following reply was made to PR kern/120304; it has been noted by GNATS. From: Mitya To: bug-follo...@freebsd.org, m...@engarde.com Cc: Subject: Re: kern/120304: [netgraph] [patch] netgraph source assumes 32-bit timeval on AMD64 Date: Mon, 13 May 2013 11:01:20 +0300 This is a multi-part

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: 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-21 Thread Mitya
21.08.2012 14:26, Marius Strobl написал: On Mon, Aug 20, 2012 at 01:20:29PM -0600, Warner Losh wrote: 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 PP

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Mitya
22.08.2012 05:07, Bruce Evans написал: On Mon, Aug 20, 2012 at 05:46:12PM +0300, 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*&

Re: speed tests (Re: Replace bcopy() to update ether_addr)

2012-08-22 Thread Mitya
22.08.2012 17:36, Luigi Rizzo написал: On Wed, Aug 22, 2012 at 02:32:21AM +, Bruce Evans wrote: luigi wrote: even more orthogonal: I found that copying 8n + (5, 6 or 7) bytes was much much slower than copying a multiple of 8 bytes. For n=0, 1,2,4,8 bytes are efficient, other cases are slo

IFF_RENAMING interface flag

2011-07-05 Thread Mitya
Where I can see IFF_RENAMING interface flag ? /usr/include/net/if.h [skipped...] #define IFF_MONITOR 0x4 /* (n) user-requested monitor mode */ #define IFF_STATICARP 0x8 /* (n) static ARP */ #define IFF_DYING 0x20/* (n) interface is winding down *