From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Mitsyanko Subject: Re: [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults Date: Mon, 12 Mar 2018 12:03:10 -0700 Message-ID: <9eba43b1-347f-f66a-2eef-999e249b3661@quantenna.com> References: <20180310030308.12947-1-igor.mitsyanko.os@quantenna.com> <20180310030308.12947-2-igor.mitsyanko.os@quantenna.com> <20180310083234.47db5f06@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: ivecera@redhat.com, jiri@resnulli.us, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, sergey.matyukevich.os@quantenna.com, ashevchenko@quantenna.com, smaksimenko@quantenna.com, dlebed@quantenna.com To: Stephen Hemminger Return-path: In-Reply-To: <20180310083234.47db5f06@xeon-e3> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org On 03/10/2018 08:32 AM, Stephen Hemminger wrote: > Yes hardware devices may come it with different default values. > But the user experience on Linux needs to be consistent. > > Instead, it makes more sense to me for each device driver using switchdev > to program to the values that it sees in the bridge. > > Please revise this. > Right, it does change default user view, setting flags instead of querying makes more sense then. However there is a problem that switchdev may not support all flags that bridge code sets by default. For example, looking at spectrum_switchdev.c, it only advertises support for BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD. Currently, I assume that even though some flags are shown as set by default on a new bridge port, some of them are not actually working in switchdev? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: References: <20180310030308.12947-1-igor.mitsyanko.os@quantenna.com> <20180310030308.12947-2-igor.mitsyanko.os@quantenna.com> <20180310083234.47db5f06@xeon-e3> From: Igor Mitsyanko Message-ID: <9eba43b1-347f-f66a-2eef-999e249b3661@quantenna.com> Date: Mon, 12 Mar 2018 12:03:10 -0700 MIME-Version: 1.0 In-Reply-To: <20180310083234.47db5f06@xeon-e3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [PATCH net-next 1/5] bridge: initialize port flags with switchdev defaults List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stephen Hemminger Cc: ivecera@redhat.com, jiri@resnulli.us, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, sergey.matyukevich.os@quantenna.com, ashevchenko@quantenna.com, smaksimenko@quantenna.com, dlebed@quantenna.com On 03/10/2018 08:32 AM, Stephen Hemminger wrote: > Yes hardware devices may come it with different default values. > But the user experience on Linux needs to be consistent. > > Instead, it makes more sense to me for each device driver using switchdev > to program to the values that it sees in the bridge. > > Please revise this. > Right, it does change default user view, setting flags instead of querying makes more sense then. However there is a problem that switchdev may not support all flags that bridge code sets by default. For example, looking at spectrum_switchdev.c, it only advertises support for BR_LEARNING | BR_FLOOD | BR_MCAST_FLOOD. Currently, I assume that even though some flags are shown as set by default on a new bridge port, some of them are not actually working in switchdev?