[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6f1f1fb-21c3-ca5f-2585-8d1c3a4f571d@ti.com>
Date: Wed, 26 Jun 2019 17:47:20 +0300
From: grygorii <grygorii.strashko@...com>
To: <netdev@...r.kernel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Andrew Lunn <andrew@...n.ch>,
"David S . Miller" <davem@...emloft.net>,
Jiri Pirko <jiri@...nulli.us>,
Florian Fainelli <f.fainelli@...il.com>,
Sekhar Nori <nsekhar@...com>, <linux-kernel@...r.kernel.org>,
<linux-omap@...r.kernel.org>,
Murali Karicheri <m-karicheri2@...com>,
Ivan Vecera <ivecera@...hat.com>,
Rob Herring <robh+dt@...nel.org>, <devicetree@...r.kernel.org>
Subject: Re: [RFC PATCH v4 net-next 06/11] net: ethernet: ti: introduce cpsw
switchdev based driver part 1 - dual-emac
On 26/06/2019 12:58, Ivan Khoronzhuk wrote:
> Hi Grygorii
>
> Too much code, but I've tried pass thru.
> Probably expectation the devlink to be reviewed, but several
> common replies that should be reflected in non RFC v.
>
> On Fri, Jun 21, 2019 at 09:13:09PM +0300, Grygorii Strashko wrote:
>> From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
>>
>> Part 1:
>> Introduce basic CPSW dual_mac driver (cpsw_new.c) which is operating in
>> dual-emac mode by default, thus working as 2 individual network interfaces.
>> Main differences from legacy CPSW driver are:
>>
>> - optimized promiscuous mode: The P0_UNI_FLOOD (both ports) is enabled in
>> addition to ALLMULTI (current port) instead of ALE_BYPASS. So, Ports in
>> promiscuous mode will keep possibility of mcast and vlan filtering, which
>> is provides significant benefits when ports are joined to the same bridge,
>> but without enabling "switch" mode, or to different bridges.
>> - learning disabled on ports as it make not too much sense for
>> segregated ports - no forwarding in HW.
>> - enabled basic support for devlink.
>>
>> devlink dev show
>> platform/48484000.ethernet_switch
>>
>> devlink dev param show
>> platform/48484000.ethernet_switch:
>> name ale_bypass type driver-specific
>> values:
>> cmode runtime value false
>>
>> - "ale_bypass" devlink driver parameter allows to enable
>> ALE_CONTROL(4).BYPASS mode for debug purposes.
>> - updated DT bindings.
>>
>> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@...aro.org>
>> Signed-off-by: Murali Karicheri <m-karicheri2@...com>
>
[...]
>> +
>> + /* setup host port priority mapping */
>> + writel_relaxed(CPDMA_TX_PRIORITY_MAP,
>> + &cpsw->host_port_regs->cpdma_tx_pri_map);
>> + writel_relaxed(0, &cpsw->host_port_regs->cpdma_rx_chan_map);
>
> ----
>> +
>> + /* disable priority elevation */
>> + writel_relaxed(0, &cpsw->regs->ptype);
>> +
>> + /* enable statistics collection only on all ports */
>> + writel_relaxed(0x7, &cpsw->regs->stat_port_en);
>> +
>> + /* Enable internal fifo flow control */
>> + writel(0x7, &cpsw->regs->flow_control);
> ---
>
> Would be nice to do the same in old driver.
> I mean moving it from ndo_open
> Also were thoughts about this.
I have no plans to perform any kind of optimization in old driver any more.
Agree with other comments.
[...]
Thank you.
--
Best regards,
grygorii
Powered by blists - more mailing lists