From owner-freebsd-mips@FreeBSD.ORG Tue Apr 21 00:58:51 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C682A36 for ; Tue, 21 Apr 2015 00:58:51 +0000 (UTC) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10FC3E98 for ; Tue, 21 Apr 2015 00:58:50 +0000 (UTC) Received: by pdbqa5 with SMTP id qa5so224453077pdb.1 for ; Mon, 20 Apr 2015 17:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z5Lqv2ltpPzeKzUxFyvVwmTB6F1i6irWCQDtNQoA9l8=; b=KUAUjTPXGOf65UaEUfWjfv1lZ2P9bKT35hWYVRYHL9/ziWjCBYde3+TGS4jc2BNalB di/MAw9vvh0iafagIE5JU/HIBCTGWr9OOmGx64w29UKWorSVoOW7TXX5oslbJm9vcUjQ J/y5SQnK4+AW9lwG7dMQy0mdQ4BHAJ9Nkw1ZObd/SjI8J+i6aSyg+e2N3GCfpYeGJSLd KNBqafUvTLxU+P5VkykH/+TyO72DF3biRQ20U10nuFtUTtpxK4hncH5PXL/wRqesAP7y mRhSnGBvVBGV/uzrA2dXtf/IT75En7BZWiX8wHrUgNfjiMCkRi8ft5oLV7vtQPgsx1eM Iouw== X-Gm-Message-State: ALoCoQla+HblhhASkEhmPU9vb1I7nsfgRwD1sDiHfLZ4Pna6d4+FGwGj9RN8/+TuC9Hs9VZ7Xn2l MIME-Version: 1.0 X-Received: by 10.70.108.137 with SMTP id hk9mr16040505pdb.105.1429577924423; Mon, 20 Apr 2015 17:58:44 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.70.76.229 with HTTP; Mon, 20 Apr 2015 17:58:44 -0700 (PDT) In-Reply-To: <1429577274.20150.35.camel@gmail.com> References: <1429572177.20150.28.camel@gmail.com> <1429576261.20150.31.camel@gmail.com> <1429577274.20150.35.camel@gmail.com> Date: Tue, 21 Apr 2015 12:58:44 +1200 X-Google-Sender-Auth: rbacTPkJ21-3Tp4EisV-fEZQWj4 Message-ID: Subject: Re: Control over the RSTP functionality of the AR8327 switch engine From: Andrew Thompson To: Petko Bordjukov Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 00:58:51 -0000 On 21 April 2015 at 12:47, Petko Bordjukov wrote: > On =D0=BF=D0=BD, 2015-04-20 at 17:35 -0700, Adrian Chadd wrote: > > Oh. > > > > So, I think the point here is that you can control the port STP mode > > (blocked, learning, active, etc) - you then glue that into the > > existing bridge code in software that's speaking STP. > > > > I don't know if the AR8327 speaks STP/RSTP itself. I know it manages > > its own learning. > > I came to that conclusion as well. It looks like AR8327 only gives you > the tools to control the mode of the port and you have to implement > RSTP yourself. Which brings us back to square one in the other thread. > We already have a standalone RSTP implemetation in net/bridgestp.c, it does not depend on the bridge code. If you look in bridgestp.h there are only a couple of functions you need to call. You could hook in to bstp_set_port_state() to set the chip register to the correct discard/learn/forward state and somehow pass up the PDUs to bstp_input(). Not sure if its worth it but the hard part is done. cheers, Andrew