Re: Adding setfib support to rc.d/routing

2012-01-22 Thread Hiroki Sato
Sergey Matveychuk  wrote
  in <4f196d64.6020...@semmy.ru>:

se> 20.01.2012 10:52, Attila Nagy wrote:
se> > Hi,
se> >
se> > Having multiple routing tables is a very nice and (was a) long awaited
se> > capability in FreeBSD. Having it since years is even more cool,
se> > because
se> > we can assume it's stable now.
se> > But not having infrastructure support for it sucks, this makes people
se> > hacking with rc.local or various scripts in various places.
se> >
se> > There is a(t least one) PR about it: conf/145440, which proposes a
se> > standard method for setting up different FIBs in a seems to be logical
se> > way, which is compatible with the current single routing table method
se> > of
se> > static_routes.
se> >
se> > Are there any objections about this PR? Is there something we can do
se> > to
se> > get it committed?
se> >
se>
se>
se> JFYI conf/132476

 I'll take a look at these patches and try to merge.

-- Hiroki


pgpPagYsRO1qy.pgp
Description: PGP signature


Re: Unnecessary sleep in network.subr: ipv6_up()

2012-01-22 Thread Hiroki Sato
Dennis Kögel  wrote
  in <9bbb9ab2-4f60-4dcb-8d25-fdec83f62...@neveragain.de>:

dk> Am 16.01.2012 um 20:45 schrieb Hiroki Sato:
dk> > Can you try the attached patch and let me know if it works fine on
dk> > your system?
dk> 
dk> It does indeed.

 Thank you for your report.  I committed the change into HEAD.  It
 will be merged to 9-STABLE if there is no major problem with it.

-- Hiroki


pgpEKFSYPO8mJ.pgp
Description: PGP signature


Re: kern/164369: [bridge] [patch] two STP bridges have the same id

2012-01-22 Thread adrian
Synopsis: [bridge] [patch] two STP bridges have the same id

Responsible-Changed-From-To: freebsd-net->adrian
Responsible-Changed-By: adrian
Responsible-Changed-When: Sun Jan 22 19:48:49 UTC 2012
Responsible-Changed-Why: 
I'll poke this.


http://www.freebsd.org/cgi/query-pr.cgi?pr=164369
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


vimage recursions?

2012-01-22 Thread Adrian Chadd
Hi,

I've just started testing vimage and I've received this:

CURVNET_SET() recursion in unp_connect() line 1321, prev in soconnect()
(ptr -> ptr)

are these a big deal?


Adrian
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kern/164369: [bridge] [patch] two STP bridges have the same id

2012-01-22 Thread linimon
Old Synopsis: [patch] two STP bridges have the same id
New Synopsis: [bridge] [patch] two STP bridges have the same id

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: linimon
Responsible-Changed-When: Sun Jan 22 18:35:36 UTC 2012
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164369
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Ethernet Switch Framework

2012-01-22 Thread Aleksandr Rybalko
On Sun, 22 Jan 2012 16:31:06 +0100
Stefan Bethke  wrote:

> Am 20.01.2012 um 21:13 schrieb Aleksandr Rybalko:
> 
> > It include sys/mips/conf/AR7240, that together with hints file is
> > good example for typical AR7240 setup.
> 
> IÄm heaving trouble getting this to work.  The patch applies cleanly
> and I can get a kernel compiled and booted, but neither arge0 nor
> arge1 appear to be functional.  I had to roll my own kernel config as
> your AR7240 hangs before printing anything on my TL-MR3420.

Yeah, I know where is problem, to proper attach switch framework to
arge, arge must be regular NIC. Here is the patch for that:
http://my.ddteam.net/files/2012-01-22_arge.patch
Hope it will apply cleanly.

Patch have fixed both arge problems (problem for allocation of ring
buffer, and stray interrupts) + remove most phymask bits + whitespace
cleanup.

Thank you for testing that Stefan.

P.S. I can't test clear SoC config on my board, because my board id
D-Link DIR-615_E4 with modified U-Boot in it, which able to load only
FW images, but not ELF kernel. So I test it with ZRouter.org FW image
instead.

P.P.S. can you also show me network part of your config and hints files.

P.P.P.S. still working on your previous question about subj, already
begin work on more wide documentation on wiki, but still far enough :)
"http://wiki.freebsd.org/AleksandrRybalko/Switch Framework"

> 
> dmesg and devinfo below.
> 
> 
> Stefan
> 
> CPU platform: Atheros AR7241 rev 1
> CPU Frequency=400 MHz
> CPU DDR Frequency=400 MHz
> CPU AHB Frequency=200 MHz
> platform frequency: 4
> arguments: 
>   a0 = 0008
>   a1 = a1f87fb0
>   a2 = a1f88470
>   a3 = 0004
> Cmd line:argv is invalid
> Environment:
> envp is invalid
> Cache info:
>   picache_stride= 4096
>   picache_loopcount = 16
>   pdcache_stride= 4096
>   pdcache_loopcount = 8
> cpu0: MIPS Technologies processor v116.147
>   MMU: Standard TLB, 16 entries
>   L1 i-cache: 4 ways of 512 sets, 32 bytes per line
>   L1 d-cache: 4 ways of 256 sets, 32 bytes per line
>   Config1=0x9ee3519e
>   Config3=0x20
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> Copyright (c) 1992-2012 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
> 1994 The Regents of the University of California. All rights reserved.
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 10.0-CURRENT #1: Thu Jan  1 01:00:00 CET 1970
> 
> stb@dummy:/home/stb/working/fe/obj/mipseb/mips.mipseb/home/stb/working/fe/freebsd/sys/TL-MR3420D
> mips WARNING: WITNESS option enabled, expect reduced performance.
> real memory  = 33554432 (32768K bytes)
> avail memory = 25567232 (24MB)
> random device not loaded; using insecure entropy
> nexus0: 
> nexus0: failed to add child: arge0
> nexus0: failed to add child: arge1
> clock0:  on nexus0
> Timecounter "MIPS32" frequency 2 Hz quality 800
> Event timer "MIPS32" frequency 2 Hz quality 800
> apb0 at irq 4 on nexus0
> uart0: <16550 or compatible> on apb0
> uart0: console (115200,n,8,1)
> gpio0:  on apb0
> gpio0: [GIANT-LOCKED]
> gpio0: function_set: 0x0
> gpio0: function_clear: 0x0
> gpio0: gpio pinmask=0x1943
> gpioc0:  on gpio0
> gpiobus0:  on gpio0
> gpioled0:  at pin(s) 0 on gpiobus0
> gpioled1:  at pin(s) 1 on gpiobus0
> gpioled2:  at pin(s) 3 on gpiobus0
> ehci0:  at mem
> 0x1b000100-0x1bff irq 1 on nexus0 usbus0: set host controller mode
> usbus0: EHCI version 1.0
> usbus0: set host controller mode
> usbus0:  on ehci0
> arge0:  at mem
> 0x1900-0x19000fff irq 2 on nexus0 arge0: Overriding MAC from
> EEPROM arge0: No PHY specified, using mask 16
> miibus0:  on arge0
> floatphy0 PHY 0 on miibus0
> floatphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> 1000baseSX, 1000baseSX-FDX, 1000baseT, 1000baseT-master,
> 1000baseT-FDX, 1000baseT-FDX-master, auto switch0 PHY 1 on miibus0
> switch0:  100baseTX, 100baseTX-FDX, 1000baseSX, 1000baseSX-FDX,
> 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master
> ar8x16_switch0:  on
> switch0 arge0: Ethernet address: ff:ff:ff:ff:ff:ff arge1:  AR71xx built-in ethernet interface> at mem 0x1a00-0x1a000fff irq
> 3 on nexus0 arge1: No PHY specified, using mask 15 arge1: Ethernet
> address: ff:ff:ff:ff:ff:00 spi0:  at mem
> 0x1f00-0x1f0f on nexus0 spibus0:  on spi0 mx25l0:
>  at cs 0 on spibus0 mx25l0: s25s1032, sector
> 65536 bytes, 64 sectors ar71xx_wdog0: 
> on nexus0 ar71xx_wdog0: Previous reset was due to watchdog timeout
> Timecounters tick every 1.000 msec
> usbus0: 480Mbps High Speed USB v2.0
> ugen0.1:  at usbus0
> uhub0:  on
> usbus0 WARNING: WITNESS option enabled, expect reduced performance.
> uhub0: 1 port with 1 removable, self powered
> Root mount waiting for: usbus0
> Root mount waiting for: usbus0
> Root mount waiting for: usbus0
> ugen0.2:  at usbus0
> umass0: 
> on usbus0 umass0:  SCSI over Bulk-Only; quirks = 0x0100
> umass0:0:0:-1: Attached to scbus0
> Trying to mount root from ufs:map/

Re: Ethernet Switch Framework

2012-01-22 Thread Stefan Bethke
Am 20.01.2012 um 21:13 schrieb Aleksandr Rybalko:

> It include sys/mips/conf/AR7240, that together with hints file is good
> example for typical AR7240 setup.

IÄm heaving trouble getting this to work.  The patch applies cleanly and I can 
get a kernel compiled and booted, but neither arge0 nor arge1 appear to be 
functional.  I had to roll my own kernel config as your AR7240 hangs before 
printing anything on my TL-MR3420.

dmesg and devinfo below.


Stefan

CPU platform: Atheros AR7241 rev 1
CPU Frequency=400 MHz
CPU DDR Frequency=400 MHz
CPU AHB Frequency=200 MHz
platform frequency: 4
arguments: 
  a0 = 0008
  a1 = a1f87fb0
  a2 = a1f88470
  a3 = 0004
Cmd line:argv is invalid
Environment:
envp is invalid
Cache info:
  picache_stride= 4096
  picache_loopcount = 16
  pdcache_stride= 4096
  pdcache_loopcount = 8
cpu0: MIPS Technologies processor v116.147
  MMU: Standard TLB, 16 entries
  L1 i-cache: 4 ways of 512 sets, 32 bytes per line
  L1 d-cache: 4 ways of 256 sets, 32 bytes per line
  Config1=0x9ee3519e
  Config3=0x20
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #1: Thu Jan  1 01:00:00 CET 1970

stb@dummy:/home/stb/working/fe/obj/mipseb/mips.mipseb/home/stb/working/fe/freebsd/sys/TL-MR3420D
 mips
WARNING: WITNESS option enabled, expect reduced performance.
real memory  = 33554432 (32768K bytes)
avail memory = 25567232 (24MB)
random device not loaded; using insecure entropy
nexus0: 
nexus0: failed to add child: arge0
nexus0: failed to add child: arge1
clock0:  on nexus0
Timecounter "MIPS32" frequency 2 Hz quality 800
Event timer "MIPS32" frequency 2 Hz quality 800
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> on apb0
uart0: console (115200,n,8,1)
gpio0:  on apb0
gpio0: [GIANT-LOCKED]
gpio0: function_set: 0x0
gpio0: function_clear: 0x0
gpio0: gpio pinmask=0x1943
gpioc0:  on gpio0
gpiobus0:  on gpio0
gpioled0:  at pin(s) 0 on gpiobus0
gpioled1:  at pin(s) 1 on gpiobus0
gpioled2:  at pin(s) 3 on gpiobus0
ehci0:  at mem 0x1b000100-0x1bff irq 
1 on nexus0
usbus0: set host controller mode
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0:  on ehci0
arge0:  at mem 
0x1900-0x19000fff irq 2 on nexus0
arge0: Overriding MAC from EEPROM
arge0: No PHY specified, using mask 16
miibus0:  on arge0
floatphy0 PHY 0 on miibus0
floatphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX, 
1000baseSX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 
1000baseT-FDX-master, auto
switch0 PHY 1 on miibus0
switch0:  100baseTX, 100baseTX-FDX, 1000baseSX, 1000baseSX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master
ar8x16_switch0:  on switch0
arge0: Ethernet address: ff:ff:ff:ff:ff:ff
arge1:  at mem 
0x1a00-0x1a000fff irq 3 on nexus0
arge1: No PHY specified, using mask 15
arge1: Ethernet address: ff:ff:ff:ff:ff:00
spi0:  at mem 0x1f00-0x1f0f on nexus0
spibus0:  on spi0
mx25l0:  at cs 0 on spibus0
mx25l0: s25s1032, sector 65536 bytes, 64 sectors
ar71xx_wdog0:  on nexus0
ar71xx_wdog0: Previous reset was due to watchdog timeout
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
ugen0.1:  at usbus0
uhub0:  on usbus0
WARNING: WITNESS option enabled, expect reduced performance.
uhub0: 1 port with 1 removable, self powered
Root mount waiting for: usbus0
Root mount waiting for: usbus0
Root mount waiting for: usbus0
ugen0.2:  at usbus0
umass0:  on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:0:0:-1: Attached to scbus0
Trying to mount root from ufs:map/rootfs.uzip []...
mountroot: waiting for device map/rootfs.uzip ...
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0:  Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: 15252MB (31236096 512 byte sectors: 255H 63S/T 1944C)
Trying to mount root from ufs:da0s1a []...
warning: no time-of-day clock registered, system time will not be set accurately
Setting hostuuid: aed4c502-193a-11e1-b662-74ea3ae4d920.
Setting hostid: 0x6a714343.
Entropy harvesting: interrupts ethernet point_to_point kickstart.
Starting file system checks:
/dev/da0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da0s1a: clean, 3849245 free (1085 frags, 481020 blocks, 0.0% fragmentation)
lock order reversal:
 1st 0x8095691c ufs (ufs) @ 
/home/stb/working/fe/freebsd/sys/kern/vfs_mount.c:1245
 2nd 0x80956e94 devfs (devfs) @ 
/home/stb/working/fe/freebsd/sys/kern/vfs_subr.c:2167
KDB: stack backtrace:
db_trace_thread+30 (?,?,?,?) ra c3f597c00018 sp 0 sz 0
db_trace_self+1c (?,?,?,?) ra c3f597d80018 sp 0 sz 0
800776d8+34 (?,?,?,?) ra c3f597f001a0 sp 0 sz 0
kdb_backtrace+44 (?,?,?,?) ra c3f599900018 sp 0 sz 0
801b3bbc+34 (?,?,?,?) ra c3f599a80020 sp 0 sz 0
witness_c

Re: STP id selection

2012-01-22 Thread Nikos Vassiliadis

On 1/22/2012 9:29 AM, Adrian Chadd wrote:

On 21 January 2012 05:37, Nikos Vassiliadis  wrote:


Hi,

The current code in bridgestp.c finds the lower MAC address from all
available ethernets and uses it as the STP id. This is problematic when
more than one STP bridges participate in the same STP domain because
more than one bridges will use the same id. A similar fix was applied
to the OpenBSD version of the code[1]. Could you review the attached
patch?

1.http://www.openbsd.org/cgi-**bin/cvsweb/src/sys/net/**
bridgestp.c?rev=1.33

Thanks, Nikos



.. that sounds sensible enough. Sure, please create a PR and then tell me
what the ID is.

I keep finding myself knee deep in the bridge code so this is something I
can test out locally.



Here it is:
http://www.freebsd.org/cgi/query-pr.cgi?pr=164369

Thanks for looking into this,

Nikos
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"