fwe(4) and polling(4)

Ulrich Spoerlein q at uni.de
Mon Sep 27 01:21:20 PDT 2004


On Sun, 26.09.2004 at 23:29:23 +0900, Hidetoshi Shimokawa wrote:
> Interrput rate should be dropped in polling mode.
> 
> To enable polling mode, after you set sysctl variables, you have
> to down the interface once and then up.
> (ifconfig fwe0 down; ifconfig fwe0 up)

Aha! Thanks for the tip, polling is now working on roadrunner and the
load dropped. However the performance dropped too (9MB/s). I think this
is due to NFS and the increased latency. But I have to get polling
working on coyote first, before I investigate further. Read on...

This is the output from 5.3
fwe0: flags=118943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,POLLING> mtu 1500
        options=8<VLAN_MTU>
        inet 192.168.2.148 netmask 0xffffff00 broadcast 192.168.2.255
        inet6 fe80::344f:c0ff:fe67:9830%fwe0 prefixlen 64 scopeid 0x2 
        ether 36:4f:c0:67:98:30
        ch 1 dma 0
and this from 5.2.1
fwe0: flags=18943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::2000:ff:fe00:52cf%fwe0 prefixlen 64 scopeid 0x3 
        inet 192.168.2.151 netmask 0xffffff00 broadcast 192.168.2.255
        ether 22:00:00:00:52:cf
        ch 1 dma 0

Note that POLLING is absent. I up/downed the interface several times and
toggled kern.polling.enable several times too. Is there a bug with
respect to 5.2.1R?

> > PS: I'm somewhat puzzled by this:
> > fwohci0: EUI64 20:00:00:00:04:00:52:cf
> > if_fwe0: Fake Ethernet address: 22:00:00:00:52:cf
> > and
> > fwohci0: EUI64 35:4f:c0:00:35:67:98:30
> > if_fwe0: Fake Ethernet address: 36:4f:c0:67:98:30
> 
> if_fwe is a non-standard ethernet emulation and need to
> generate fake macaddress. As far as I remember, 0x02 is
> added to the first byte to represent it is private address.

if_fwe.c:186
#define LOCAL (0x02)
#define GROUP (0x01)
        eaddr[0] = (FW_EUI64_BYTE(eui, 0) | LOCAL) & ~GROUP;

I'm not good at C but this code seems to always zero the least
significant bit, making the first byte of the address even. Is that an
ethernet requirement? (I checked all NICs I have access to, but they all
have 0x00 as the first byte)

Ulrich Spoerlein
-- 
PGP Key ID: F0DB9F44				Get it while it's hot!
PGP Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."	-- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040927/a1055466/attachment.bin


More information about the freebsd-current mailing list