[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <158b4b42-ab90-87b3-7345-646e9cd3844e@omp.ru>
Date: Fri, 24 Nov 2023 20:27:21 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: claudiu beznea <claudiu.beznea@...on.dev>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<p.zabel@...gutronix.de>, <yoshihiro.shimoda.uh@...esas.com>,
<geert+renesas@...der.be>, <wsa+renesas@...g-engineering.com>,
<biju.das.jz@...renesas.com>,
<prabhakar.mahadev-lad.rj@...renesas.com>,
<sergei.shtylyov@...entembedded.com>,
<mitsuhiro.kimura.kc@...esas.com>, <masaru.nagai.vx@...esas.com>
CC: <netdev@...r.kernel.org>, <linux-renesas-soc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Subject: Re: [PATCH 06/13] net: ravb: Let IP specific receive function to
interrogate descriptors
On 11/23/23 8:15 PM, claudiu beznea wrote:
[...]
>>> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>>>
>>> ravb_poll() initial code used to interrogate the first descriptor of the
>>> RX queue in case gptp is false to know if ravb_rx() should be called.
>>> This is done for non GPTP IPs. For GPTP IPs the driver PTP specific
>>
>> It's called gPTP, AFAIK.
>>
>>> information was used to know if receive function should be called. As
>>> every IP has it's own receive function that interrogates the RX descriptor
>>
>> Its own.
>>
>>> list in the same way the ravb_poll() was doing there is no need to double
>>> check this in ravb_poll(). Removing the code form ravb_poll() and
>>
>> From ravb_poll().
>>
>>> adjusting ravb_rx_gbeth() leads to a cleaner code.
>>>
>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>>> ---
>>> drivers/net/ethernet/renesas/ravb_main.c | 18 ++++++------------
>>> 1 file changed, 6 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
>>> index 588e3be692d3..0fc9810c5e78 100644
>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>>> @@ -771,12 +771,15 @@ static bool ravb_rx_gbeth(struct net_device *ndev, int *quota, int q)
>>> int limit;
>>>
>>> entry = priv->cur_rx[q] % priv->num_rx_ring[q];
>>> + desc = &priv->gbeth_rx_ring[entry];
>>> + if (desc->die_dt == DT_FEMPTY)
>>> + return false;
>>> +
>>
>> I don't understand what this buys us, the following *while* loop will
>> be skipped anyway, and the *for* loop as well, I think... And ravb_rx_rcar()
>
> Yes, I kept it because of the for loop and the update of the *quota.
>
> As commit specifies the code has been moved in IP specific RX function
> keeping the initial functionality.
Please pull this perplexed code out completely instead. It's not needed
according to Biju.
>> doesn't have that anyway...
[...]
MBR, Sergey
Powered by blists - more mailing lists