Roman Yeryomin wrote: > On 2 September 2012 23:28, Tobias Diedrich <ranma+open...@tdiedrich.de> wrote: > > Use doubletagging to disable ramips_esw vlan by default, it seems > > more reliable. > > > > Daniel Golle found an issue where sometimes (possibly only for > > RT3352) the default vlan disable method (clearing en_vlan, untag, > > doubletag and putting all ports into vlan 0) doesn't work and the > > packets get sent out vlan-tagged with vlan 0. > > > > Instead switch to using the doubletagging method (allow doubletagged > > packets, put all ports into vlan 0 with untag enabled) by default. > > > > Unless someone figures out a way to really globally disable vlan for > > this switch, this seems like the best (most reliable) option. > > > > I did some tests regarding maximum packet size and did not see any > > difference between the two methods, both allow for slightly bigger packets > > than the ramips_main.c ethernet driver (ping stops going through > > above "ping -s 1472" (1514 bytes), on the switch packets are recv_good until > > "ping -s 1490", or about 1532 bytes). > > > > Signed-off-by: Tobias Diedrich <ranma+open...@tdiedrich.de> > > > > > > Index: > > openwrt-ralink-swconfig/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_esw.c > > =================================================================== > > --- > > openwrt-ralink-swconfig.orig/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_esw.c > > 2012-09-02 22:15:49.770899684 +0200 > > +++ > > openwrt-ralink-swconfig/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_esw.c > > 2012-09-02 22:16:57.970994947 +0200 > > @@ -559,7 +559,7 @@ > > untag |= esw->ports[i].untag << i; > > pvid = esw->ports[i].pvid; > > } else { > > - int x = esw->alt_vlan_disable ? 1 : 0; > > + int x = esw->alt_vlan_disable ? 0 : 1; > > doubletag |= x << i; > > en_vlan |= x << i; > > untag |= x << i; > > > > I think I've stumbled upon this issue more than 6 months ago. I've > sent patches for belkin board and I was using double tagging. Gabor > then tried to fix it but his patches didn't work for me. > Double tagging works perfectly though. > Belkin soc is 3052F.
I think that maybe some register not touched by the switch driver or maybe differences between hardware revisions play into this. Both methods seem to work fine on the hardware I have (RT3050 DIR-300 with internal switch and RT3052 WL-351 with external RTL8366RB). -- Tobias PGP: http://8ef7ddba.uguu.de _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel