From patchwork Tue May 12 08:16:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hante Meuleman X-Patchwork-Id: 471194 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 036551400B7 for ; Tue, 12 May 2015 18:16:40 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CE470283CCD; Tue, 12 May 2015 10:15:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 101652800EB for ; Tue, 12 May 2015 10:15:10 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-gw3-out.broadcom.com (mail-gw3-out.broadcom.com [216.31.210.64]) by arrakis.dune.hu (Postfix) with ESMTP for ; Tue, 12 May 2015 10:15:09 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.13,413,1427785200"; d="scan'208";a="64438856" Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw3-out.broadcom.com with ESMTP; 12 May 2015 01:25:25 -0700 Received: from SJEXCHCAS07.corp.ad.broadcom.com (10.16.203.16) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.235.1; Tue, 12 May 2015 01:16:22 -0700 Received: from SJEXCHMB15.corp.ad.broadcom.com ([fe80::ade7:c955:4805:f845]) by SJEXCHCAS07.corp.ad.broadcom.com ([::1]) with mapi id 14.03.0235.001; Tue, 12 May 2015 01:16:22 -0700 From: Hante Meuleman To: OpenWrt Development List Thread-Topic: [OpenWrt-Devel] [PATCH] Vlan configuration, limit the used ports Thread-Index: AdCMiKFCUBLOIf/JS4ivwMt5HalFtg== Date: Tue, 12 May 2015 08:16:21 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.16.203.100] MIME-Version: 1.0 Subject: [OpenWrt-Devel] [PATCH] Vlan configuration, limit the used ports X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Do not mimic the vlan configuration in some devices like R8000 as the configuration is to be used with SW accelerators not available in OpenWRT. It is not possible to use the switch with vlan port configuration 0 1 2 3 5 7 8, without making some huge modifications. When this configuration is used the packets received will be without vlan tag (identified by status field in gmac). This mode is used for an optimization which is not easily to be used within the current OpenWRT driver framework. The patch below will modify the existing vlanport configuration so it will work on the r8000 with the existing opensource drivers. diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 644d3d9..18958b8 100755 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -23,10 +23,6 @@ if echo "$vlan1ports" | egrep -q "^1 2 3 4 5" && \ echo "$vlan2ports" | egrep -q "^0 5"; then ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5t" ucidef_add_switch_vlan "switch0" "2" "0 5t" -elif echo "$vlan1ports" | egrep -q "^0 1 2 3 5 7 8" && \ - echo "$vlan2ports" | egrep -q "^4 8"; then - ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5 7 8t" - ucidef_add_switch_vlan "switch0" "2" "4 8t" else ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t" ucidef_add_switch_vlan "switch0" "2" "4 5t"