netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: David Miller <davem@davemloft.net>, <Jose.Abreu@synopsys.com>
Cc: <netdev@vger.kernel.org>, <Joao.Pinto@synopsys.com>,
	<Vitor.Soares@synopsys.com>, <peppe.cavallaro@st.com>,
	<alexandre.torgue@st.com>
Subject: Re: [PATCH net-next 01/10] net: stmmac: Let descriptor code set skbuff address
Date: Fri, 11 May 2018 10:09:24 +0100	[thread overview]
Message-ID: <cb1f62fb-fde1-58f3-0a2f-e27b3923e74f@synopsys.com> (raw)
In-Reply-To: <20180510.150613.1334467102643804220.davem@davemloft.net>

On 10-05-2018 20:06, David Miller wrote:
> From: Jose Abreu <Jose.Abreu@synopsys.com>
> Date: Tue,  8 May 2018 15:45:24 +0100
>
>> Stop using if conditions depending on the GMAC version for setting the
>> the descriptor skbuff address and use instead a helper implemented in
>> the descriptor files.
>>
>> Signed-off-by: Jose Abreu <joabreu@synopsys.com>
> With Spectre mitigations, indirect calls are extremely expensive.  Much
> more expensive than conditional checks.
>
> And since this is the descriptor setup in the fast paths of the driver,

Hmm, no. This is only done in HW setup. The only patch in this
series that can impact performance because of what you mentioned
is 09.

> I advise that you keep these conditionals.

I see your point but I'm trying to make the code more flexible
because we will add support for XGMAC soon. This XGMAC will need
a similar structure to what we have in GMAC.

By removing this conditionals we make stmmac_main totally
agnostic of HW and we will prevent patterns like this in the future:

if (priv->has_xgmac)
    do_stuff()
else if (priv->synopsys_id > GMAC_SOME_VERSION)
    do_other_stuff()
else
    do_other_other_stuff()

Thanks and Best Regards,
Jose Miguel Abreu

  reply	other threads:[~2018-05-11  9:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 14:45 [PATCH net-next 00/10] net: stmmac: Be less dependent on Synopsys ID Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 01/10] net: stmmac: Let descriptor code set skbuff address Jose Abreu
2018-05-10 19:06   ` David Miller
2018-05-11  9:09     ` Jose Abreu [this message]
2018-05-08 14:45 ` [PATCH net-next 02/10] net: stmmac: Let descriptor code clear the descriptor Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 03/10] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 04/10] net: stmmac: Remove uneeded checks for GMAC version Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 05/10] net: stmmac: Move PTP and MMC base address calculation to hwif.c Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 06/10] net: stmmac: Uniformize the use of dma_init_* callbacks Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 07/10] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice Jose Abreu
2018-05-10 14:33   ` Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 09/10] net: stmmac: Let descriptor code get skbuff address Jose Abreu
2018-05-08 14:45 ` [PATCH net-next 10/10] net: stmmac: Remove if condition by taking advantage of hwif return code Jose Abreu
2018-05-10 19:06 ` [PATCH net-next 00/10] net: stmmac: Be less dependent on Synopsys ID David Miller

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=cb1f62fb-fde1-58f3-0a2f-e27b3923e74f@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Vitor.Soares@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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).