Re: AR8316 Switch Support

Ok, but when i try increase MTU got error smile

Best regards
http://openwrt.pl - Polish OpenWrt Wiki
http://digi-led.pl - Electronic Parts

Re: AR8316 Switch Support

What type of error?
I tested the switch part of my RB450G. It is wirerate gigabitethernet switch and it can switch L2 frames over 9000 byte (9028byte) with ~220microseconds latency but the CPU connection to the switch can't handle jumbo frames...

Re: AR8316 Switch Support

root@OpenWrt:/# ifconfig eth1 mtu 9000
ifconfig: SIOCSIFMTU: Invalid argument
root@OpenWrt:/# ifconfig eth0 mtu 9000
ifconfig: SIOCSIFMTU: Invalid argument
Best regards
http://openwrt.pl - Polish OpenWrt Wiki
http://digi-led.pl - Electronic Parts

Re: AR8316 Switch Support

Yes, it is the cpu's interface. It haven't jumbo frame support. Only the switch can handle jumbo frames between them ports.

Re: AR8316 Switch Support

I'm currently working with a RB-493G. The driver loads and attaches to eth0, however there are two switch chips on this board and only half the ports are working. Anyone have any ideas?

Re: AR8316 Switch Support

i want to AR8236 Switch Support ,but i don't how to do .someone help?

207

Re: AR8316 Switch Support

Hi guys,
I've tried to configure switch on my RSPro and after some playing around lost connection to router.
From console i can see that the port facing to the switch is down, swconfig shows:

swconfig dev eth1 show                                                                                                
Failed to connect to the switch

and dmesg shows:

dmesg | grep -i PHY                                                                                                   
Determined physical RAM map:                                                                                                               
eth0: connected to PHY at ag71xx-mdio:04 [uid=004dd041, driver=Atheros AR8216/AR8316]                                                      
eth1: connected to PHY at ag71xx-mdio:00 [uid=004dd041, driver=Generic PHY]                                                                
ath5k 0000:00:13.0: registered as 'phy0'                                                                                                   
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'                                                                              
ath5k phy0: Atheros AR2413 chip found (MAC: 0x78, PHY: 0x45)                                                                               
ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'                                                                              
Registered led device: ath9k-phy1                                                                                                          
ieee80211 phy1: Atheros AR9160 MAC/BB Rev:1 AR5133 RF Rev:b0 mem=0xb0000000, irq=49

I guess somehow router stopped initializing the switch. Is there any way to force initialization?
Thank You.

P.S.
How to know version of swconfig?

opkg list-installed | grep swconfig                                                                                   
swconfig - 7

Re: AR8316 Switch Support

Is it possible changed the maximum VLANs from 128 to 256 ???
someone can help this???

Thanks.

Re: AR8316 Switch Support

pigsign wrote:

Is it possible changed the maximum VLANs from 128 to 256 ???
someone can help this???
Thanks.

If you really need to have more than 128 VLANs (and not just use VIDs > 127, for these you can just set the property "vid" of the vlans),
edit this line https://dev.openwrt.org/browser/trunk/target/linux/generic/files/drivers/net/phy/ar8216.c#L38.

IIRC the maximum is around ~500, after that you will get a stack overflow on registration (this is a software limitation, not a hardware limitation).

Re: AR8316 Switch Support

KM, thank you!!!
It's working. :-)

211 (edited by BizarroSephiroth 2012-06-09 13:44:06)

Re: AR8316 Switch Support

Hi!

I have a problem with setting default vlan for port (for untagged frames) on ar8316 switch in jjPlus ja76pf2 device on backfire trunk version r32050
It seams that packets are not directed to defined vlan. All work fine when packets are sent form vlan tagged interface.

/etc/config/network
config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.123.20'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option peerdns '0'
        option type 'bridge'
        option ifname 'eth0.1'

config switch 'eth0'
        option reset '1'
        option enable '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth0'
        option ports '0t 1t'
        option vid '1'
        option vlan '0'

config switch_port
        option port '1'
        option pvid '1'

pvid set to both 0 and 1 failed. Also mangling with network.lan.ifname by setting it to eth0, eth0.0 and eth0.1 failed.

root@OpenWrt:/# swconfig dev eth0 show
Global attributes:
        enable_vlan: 1
Port 0:
        pvid: 1
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
        pvid: 1
        link: port:1 link:up speed:1000baseT full-duplex auto
Port 2:
        pvid: 0
        link: port:2 link:down
Port 3:
        pvid: 0
        link: port:3 link:down
Port 4:
        pvid: 0
        link: port:4 link:down
VLAN 0:
        vid: 1
        ports: 0t 1t

212 (edited by rmax 2013-09-06 15:11:16)

Re: AR8316 Switch Support

KanjiMonster, if you're still reading here:

Is it a hardware limitation or a driver problem, that a port can't be tagged on one VLAN and untagged on another at the same time?

When I try to do this:

swconfig dev switch0 vlan 3 set ports "0 3 4 5"
swconfig dev switch0 vlan 2 set ports "0t 2"

I end up with port 0 being tagged not only on vlan 2, but also on vlan 3. When I reverse the order of the two lines, port 0 gets removed from vlan 2 and is untagged on vlan 3.

This is on a Buffalo WBMR-HP-G300H with OpenWRT trunk as of today.