From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Vecera Subject: Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver Date: Wed, 20 Jun 2018 15:54:23 +0200 Message-ID: <94f304d1-1136-384d-7e1d-8fc4aeaf70fb@redhat.com> References: <1528974690-31600-1-git-send-email-ilias.apalodimas@linaro.org> <1528974690-31600-5-git-send-email-ilias.apalodimas@linaro.org> <20180614113028.GB2518@nanopsycho.orion> <20180614113404.GB32505@apalos> <20180614113958.GC2518@nanopsycho.orion> <20180614114300.GA416@apalos> <071f7595-aad3-7c16-88ab-8a881d1acf69@ti.com> <20180620070808.GA2119@nanopsycho> <77627ca3-3e24-ea0b-7ba6-55f1f2a1114e@redhat.com> <20180620125929.GA8582@apalos> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Jiri Pirko , Grygorii Strashko , netdev@vger.kernel.org, ivan.khoronzhuk@linaro.org, nsekhar@ti.com, andrew@lunn.ch, f.fainelli@gmail.com, francois.ozog@linaro.org, yogeshs@ti.com, spatton@ti.com, Jose.Abreu@synopsys.com To: Ilias Apalodimas Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48668 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754184AbeFTNy0 (ORCPT ); Wed, 20 Jun 2018 09:54:26 -0400 In-Reply-To: <20180620125929.GA8582@apalos> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 20.6.2018 14:59, Ilias Apalodimas wrote: > On Wed, Jun 20, 2018 at 02:53:47PM +0200, Ivan Vecera wrote: >> On 20.6.2018 09:08, Jiri Pirko wrote: >>> Tue, Jun 19, 2018 at 01:19:00AM CEST, grygorii.strashko@ti.com wrote: >>>> >>>> >>>> On 06/14/2018 06:43 AM, Ilias Apalodimas wrote: >>>>> On Thu, Jun 14, 2018 at 01:39:58PM +0200, Jiri Pirko wrote: >>>>>> Thu, Jun 14, 2018 at 01:34:04PM CEST, ilias.apalodimas@linaro.org wrote: >>>>>>> On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: >>>>>>>> Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodimas@linaro.org wrote: >>>>>>>> >>>>>>>> [...] >>>>>>>> >>>>>>>>> @@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, >>>>>>>>> if (of_property_read_bool(node, "dual_emac")) >>>>>>>>> data->switch_mode = CPSW_DUAL_EMAC; >>>>>>>>> >>>>>>>>> + /* switchdev overrides DTS */ >>>>>>>>> + if (IS_ENABLED(CONFIG_TI_CPSW_SWITCHDEV)) >>>>>>>>> + data->switch_mode = CPSW_SWITCHDEV; >>>>>>>> >>>>>>>> So you force CPSW_SWITCHDEV mode if the CONFIG_TI_CPSW_SWITCHDEV is >>>>>>>> enabled. That does not sound right. I think that user should tell what >>>>>>>> mode does he want regardless what the kernel config is. >>>>>>> We discussed this during the V1 of the RFC. Yes it doesn't seem good, but the >>>>>>> device currently configures the modes using DTS (which is not correct). I choose >>>>>>> the .config due to that. I can't think of anything better, but i am open to >>>>>>> suggestions >>>>>> >>>>>> Agreed that DTS does fit as well. I think that this might be a job for >>>>>> devlink parameters (patchset is going to be sent upstream next week). >>>>>> You do have 1 bus address for the whole device (both ports), right? >>>>>> >>>>> Yes devlink sounds reasonable. I thyink there's only one bus for it, but then >>>>> again i am far from an expert on the hardware interrnals. Grygorii can correct >>>>> me if i am wrong. >>>> >>>> Devlink and NFS boot are not compatible as per my understanding, so .. >>> >>> ? Why do you say so? >> >> Why aren't they compatible?? You can have devlink binary in initramfs and >> configure the ASIC and ports via devlink batch file - prior mounting NFS root. > This is doable but, are we taking into consideration device reconfiguration > (which was the reason for creating the minimal filesystem) or are we just > talking about device booting/initial config? Devlink calls should be placed in setup.sh I.