[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 4 Apr 2023 11:29:19 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, alexanderduyck@...com, roman.gushchin@...ux.dev,
kuba@...nel.org
Subject: Re: [RFC net-next 1/3] net: provide macros for commonly copied
lockless queue stop/wake code
Jakub Kicinski <kuba@...nel.org> wrote:
>
> +#define netif_tx_queue_try_stop(txq, get_desc, start_thrs) \
> + ({ \
> + int _res; \
> + \
> + netif_tx_stop_queue(txq); \
> + \
> + smp_mb(); \
We should never have an smp_mb by itself. It must come with a
comment indicating which other barrier (possibly implicit) it
pairs with.
I know that you're just copying old code around, but by turning
it into a helper, we should treat it as new code and apply the
current requirements.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists