From owner-freebsd-mips@FreeBSD.ORG Mon Dec 30 19:38:36 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 955857CA for ; Mon, 30 Dec 2013 19:38:36 +0000 (UTC) Received: from mail-qe0-x22c.google.com (mail-qe0-x22c.google.com [IPv6:2607:f8b0:400d:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53E5F17E6 for ; Mon, 30 Dec 2013 19:38:36 +0000 (UTC) Received: by mail-qe0-f44.google.com with SMTP id nd7so11769609qeb.17 for ; Mon, 30 Dec 2013 11:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=jxrcMvAmOL2+Y0cr7bkhwGvBZYktG0I3a88Mv32VhlY=; b=GqPqdKVetCMQ6IisdDpNHCda7slzGqCv07hnH+Cr9g5TQYj1Pwm5j3njY1B82EwTat PBbxJpNn+VxLvR0yN5tD5dHlufIiOMwlRNwOFlST8eBRxae1qlcCoQAQyqoyuPkCjSEf NruZIp8m6o3Namua8CpaxYndajdFme0m+1O3ze+hIGZbw3dY9kAq6/Gtz+bUCQkhOUo0 jdzD12v0JPBwa6gkqPKHoeQWwsut7MzVdy/JN45Pds5mh6k/nDQ6d0/Xb9W572fNMIpp LXopFlZDporfuD6tFovrFqM7zkk4PflKu2HJVpSd5pKMNeXlFRbzQIVZv0kFQvIokUy7 Bvpw== MIME-Version: 1.0 X-Received: by 10.49.34.207 with SMTP id b15mr113272602qej.49.1388432315610; Mon, 30 Dec 2013 11:38:35 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Mon, 30 Dec 2013 11:38:35 -0800 (PST) In-Reply-To: <1388404360.131024714@f310.i.mail.ru> References: <1388404360.131024714@f310.i.mail.ru> Date: Mon, 30 Dec 2013 11:38:35 -0800 X-Google-Sender-Auth: zrxg-B49LxsJmAj3VHA6nxN_v8Q Message-ID: Subject: Re: RB450G compiling the kernel From: Adrian Chadd To: =?KOI8-R?B?4c7Uz84g8MXU1cjP1w==?= Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 19:38:36 -0000 On 30 December 2013 03:52, =E1=CE=D4=CF=CE =F0=C5=D4=D5=C8=CF=D7 wrote: > > Hi, > Can you help me? How can I use AR7161 + AR8316 as two interfaces availabl= e to the kernel? Etherswitch is very good solution, but he's black box for = me. If I try to compile kernel with switch - all is Ok, but in this case sy= stem have only one arge1. > I need to route traffic between arge0 and arge1 ports... How, how can I d= o it? :) Well, it depends on how it's wired up. The AR8316 (and other atheros switches) have an option to peel off one of the ports as a dedicated PHY port, for situations where you have two MACs on the SoC and you want to have a WAN port and multiple LAN ports. Theres three ways to do it: * have one MAC port, map all switch ports to it, then peel off lan/wan via VLAN ids * have two MAC ports, have one port dedicated as a pass-through PHY for the WAN port and the rest be switch ports for the LAN (vlan or otherwise) * a hybrid - have two MAC ports, and just map them using vlan ids or per-port vlans as required. So it boils down to whether the RB450G wires both arge interfaces to the switch. If so, you can peel off a dedicated WAN PHY/port by configuring up the 'phy4cpu' option in the hints file. Otherwise it's vlans all the way down. -adrian