From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roopa Prabhu Subject: Re: [patch net-next v3 08/17] bridge: call netdev_sw_port_stp_update when bridge port STP status changes Date: Fri, 28 Nov 2014 08:23:32 -0800 Message-ID: <5478A184.90405@cumulusnetworks.com> References: <1416911328-10979-1-git-send-email-jiri@resnulli.us> <1416911328-10979-9-git-send-email-jiri@resnulli.us> <5475073E.70503@cumulusnetworks.com> <547848D8.1060203@cumulusnetworks.com> <547875F1.9080204@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Scott Feldman , Jiri Pirko , Netdev , "David S. Miller" , "nhorman@tuxdriver.com" , Andy Gospodarek , Thomas Graf , "dborkman@redhat.com" , "ogerlitz@mellanox.com" , "jesse@nicira.com" , "pshelar@nicira.com" , "azhou@nicira.com" , "ben@decadent.org.uk" , "stephen@networkplumber.org" , "Kirsher, Jeffrey T" , "vyasevic@redhat.com" , Cong Wang , "Fastabend, John R" , Eric Dumazet , Florian Fainelli , John Linville , To: Jamal Hadi Salim Return-path: Received: from ext3.cumulusnetworks.com ([198.211.106.187]:41771 "EHLO ext3.cumulusnetworks.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbaK1QXn (ORCPT ); Fri, 28 Nov 2014 11:23:43 -0500 In-Reply-To: <547875F1.9080204@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: On 11/28/14, 5:17 AM, Jamal Hadi Salim wrote: > On 11/28/14 05:51, Scott Feldman wrote: >> On Fri, Nov 28, 2014 at 2:05 AM, Roopa Prabhu >> wrote: >>> On 11/25/14, 5:35 PM, Scott Feldman wrote: >>>> >>>> The >>>> bridge driver or external STP process (msptd) is still controlling STP >>>> state for the port and processing the BPDUs. When the state changes >>>> on the port, the bridge driver is letting HW know, that's it. >>> >>> >>> I understand that. In which case, we should not call it stp state. >>> It is just port state. >> >> Sure, call it port state but it takes on BR_STATE_xxx values which >> just so happen to correspond exactly to STP states. >> >>> And since it is yet another port attribute like port >>> priority, >>> we should be able to use the same api to offload it to hw just like the >>> other port attributes. >> >> Well it does...see ndo_bridge_setlink in bridge driver, br_setport >> where IFLA_BRPORT_STATE is handled...it calls br_set_port_state(), >> which calls into the swdev port driver. That's for the case where >> user or external processing is setting STP state. For the case where >> the bridge itself is managing the STP state, the bridge will make the >> same br_set_port_state() call to adjust the port state. >> > > What Roopa is requesting for if i am not mistaken is the same issue i > raised earlier as well. We need an opaque way to set and get these > attributes. We cant afford an ndo ops per bridge or the next thing. > Its a port level issue - what it is depends on what the underlying > hardware does. yep, Ack...