From: Joao Pinto <Joao.Pinto@synopsys.com>
To: David Miller <davem@davemloft.net>, <clabbe.montjoie@gmail.com>
Cc: <Joao.Pinto@synopsys.com>, <peppe.cavallaro@st.com>,
<alexandre.torgue@st.com>, <thierry.reding@gmail.com>,
<sergei.shtylyov@cogentembedded.com>, <f.fainelli@gmail.com>,
<niklas.cassel@axis.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll
Date: Mon, 27 Mar 2017 18:44:22 +0100 [thread overview]
Message-ID: <c8ec25cb-0369-a1b3-9f5b-dfd1ed6f9148@synopsys.com> (raw)
In-Reply-To: <20170327.102831.1248194814523871799.davem@davemloft.net>
Às 6:28 PM de 3/27/2017, David Miller escreveu:
> From: Corentin Labbe <clabbe.montjoie@gmail.com>
> Date: Mon, 27 Mar 2017 19:00:58 +0200
>
>> On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote:
>>> Hi David,
>>>
>>> Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu:
>>>> On Fri, Mar 24, 2017 at 05:16:45PM +0000, Joao Pinto wrote:
>>>>> For cores that have more than 1 TX queue configured, the kernel would crash,
>>>>> since only one TX queue is permitted by default.
>>>>>
>>>>> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
>>>>> ---
>>>>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>>>>> index 3827952..1eab084 100644
>>>>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>>>>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>>>>> @@ -3429,7 +3429,7 @@ static int stmmac_poll(struct napi_struct *napi, int budget)
>>>>> struct stmmac_rx_queue *rx_q =
>>>>> container_of(napi, struct stmmac_rx_queue, napi);
>>>>> struct stmmac_priv *priv = rx_q->priv_data;
>>>>> - u32 tx_count = priv->dma_cap.number_tx_queues;
>>>>> + u32 tx_count = priv->plat->tx_queues_to_use;
>>>>> u32 chan = rx_q->queue_index;
>>>>> u32 work_done = 0;
>>>>> u32 queue = 0;
>>>>> --
>>>>> 2.9.3
>>>>>
>>>>
>>>> This patch fix the performance issue on dwmac-sun8i only.
>>>> The dwmac-sunxi is still broken.
>>>>
>>>
>>> This patch series can be upstreamed please, since they make 2 fixes, one of them
>>> solving the problem in dwmac-sun8i.
>>>
>>> Thanks.
>>
>> As I said in a previous answer, finaly dwmac-sun8i is still broken.
>> Adding thoses 2 patch will just made the revert harder.
>
> I agree.
For what I am understanding, SoCs base on Core versions >= 4.00 are working
properly and for some reason SoCs based on older versions are not working.
This fix is necessary, since if you have a diferent configured tx_queues_to_use
in the driver and priv->dma_cap.number_tx_queues in the core, this can lead to
kernel crashes.
The other fix (netdev resources release) is also necessary, since when you
release the driver its crashes, because the rx queue struct is freed before
releasing the netdevs.
We can revert, but I think it might not solve the issue. We can break the
"multiple buffers" patch into "rx multilple buffers" and "tx multiple buffers",
but will that actually work? We can give it a try, I don't mind making a new
multiple buffers patch broken into 2, that can be tested by new cores and older
cores.
Joao
next prev parent reply other threads:[~2017-03-27 17:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 17:16 [PATCH net-next 0/2] net: stmmac: multiple queue fixes Joao Pinto
2017-03-24 17:16 ` [PATCH net-next 1/2] net: stmmac: fix netdev release Joao Pinto
2017-03-24 17:16 ` [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll Joao Pinto
2017-03-25 7:26 ` Corentin Labbe
2017-03-27 9:04 ` Joao Pinto
2017-03-27 9:09 ` Corentin Labbe
2017-03-27 9:12 ` Joao Pinto
2017-03-27 13:28 ` Niklas Cassel
2017-03-27 13:34 ` Joao Pinto
2017-03-27 13:36 ` Joao Pinto
2017-03-27 15:26 ` Joao Pinto
2017-03-27 17:00 ` Corentin Labbe
2017-03-27 17:06 ` Joao Pinto
2017-03-27 18:43 ` Corentin Labbe
2017-03-27 17:28 ` David Miller
2017-03-27 17:44 ` Joao Pinto [this message]
2017-03-27 18:49 ` Corentin Labbe
2017-03-27 21:00 ` David Miller
2017-03-28 13:34 ` Niklas Cassel
2017-03-28 13:56 ` Thierry Reding
2017-03-28 13:57 ` [PATCH 1/3] net: stmmac: Remove unneeded checks for NULL pointer Thierry Reding
2017-03-28 13:57 ` [PATCH 2/3] net: stmmac: Always use the number of configured TX queues Thierry Reding
2017-03-28 14:10 ` Niklas Cassel
2017-03-28 14:29 ` Thierry Reding
2017-03-28 13:57 ` [PATCH 3/3] net: stmmac: Prefer kcalloc() over kmalloc_array() Thierry Reding
2017-03-29 8:51 ` Niklas Cassel
2017-03-28 11:23 ` [PATCH net-next 0/2] net: stmmac: multiple queue fixes Niklas Cassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8ec25cb-0369-a1b3-9f5b-dfd1ed6f9148@synopsys.com \
--to=joao.pinto@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.cassel@axis.com \
--cc=peppe.cavallaro@st.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).