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*", and
I've run into a problem where the ARP table on several of my hosts is
apparently spontaneously replacing correct entries with incorrect MAC
addresses. I've done some digging with tcpdump and can't identify the
cause. I've tried to look in the code but lost my way since ARP and
IP routing seem to
jhb wrote:
> On Monday, August 20, 2012 10:46:12 am Mitya wrote:
> > ...
> > I propose this solution.
> >
> > In file /usr/src/include/net/ethernet.h add this lines:
> >
> > static inline void ether_addr_copy(ether_addr* src, ether_addr* dst) {
> > #if defined(__i386__) || defined(__amd64__)
> >
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 slow (turned into 2 or 3 different writes).
>
> The netmap code uses a pkt_copy routine that doe
> 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*", and ETHER_ADDR_LEN
On Fri, Aug 17, 2012 at 7:23 AM, Barney Cordoba
wrote:
>
> --- On Thu, 8/9/12, Jason Wolfe wrote:
>>
>> Ever since r235553 the 82574L has been stable for me,
>> collectively
>> passing ~1.2Tb/s for the past 4 months without issue.
>> We did have
>> some issues with switches not liking the fallout
Scenario : freebsd 9 stable (yesterday) amd64 on HP server with 4 nic (igb)
1 nic is connected standalone to the management switch, the 3 other nics
are connected to a switch configured for aggregation.
If I configure the first nic (igb0) there is no problem, I can operate
as I normally do and s
Hi,
What about just creating an ETHER_ADDR_COPY(dst, src) and putting that
in a relevant include file, then hide the ugliness there?
The same benefits will likely appear when copying wifi MAC addresses
to/from headers.
Thanks, I'm glad someone noticed this.
Adrian
___
On Aug 21, 2012, at 1:42 AM, Wojciech Puchar wrote:
>>
>> Even without this tagging, the code to do a structure level copy of 6 bytes
>> is going to be tiny...
>
> true.
>
> just to make sure it will be absolutely portable how about
>
> bcopymacaddress(dst,src)
>
> and then define it whatev
On Monday, August 20, 2012 10:46:12 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 c
On Aug 21, 2012, at 5:26 AM, Marius Strobl wrote:
> 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 C
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
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 PPC IMHO.
> >>
On Tue, Aug 21, 2012 at 12:26:30PM +0200, Marius Strobl wrote:
...
> > Why we are use bcopy(), to copy only 6 bytes?
> > Answer - in some architectures we are can not directly copy unaligned data.
> >
> > I propose this solution.
> >
> > In file /usr/src/include/net/ethernet.h add this lines:
> >
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*", and ETHER_ADDR_LEN equal 6.
> Thi
Even without this tagging, the code to do a structure level copy of 6 bytes is
going to be tiny...
true.
just to make sure it will be absolutely portable how about
bcopymacaddress(dst,src)
and then define it whatever you find it fastest on any architecture?
_
16 matches
Mail list logo