From: Jakub Kicinski <kuba@kernel.org>
To: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] net: fec: Avoid to allocate rx buffer using ATOMIC in ndo_open
Date: Tue, 17 May 2022 15:27:53 -0700 [thread overview]
Message-ID: <20220517152753.78685d6c@kernel.org> (raw)
In-Reply-To: <20220517100544.2326499-1-michael@amarulasolutions.com>
On Tue, 17 May 2022 12:05:44 +0200 Michael Trimarchi wrote:
> Subject: [RFC PATCH] net: fec: Avoid to allocate rx buffer using ATOMIC in ndo_open
nit: "Avoid allocating"
We need a commit message, guessing your motivation something like this
would be enough IMHO:
Make ndo_open less sensitive to memory pressure.
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 9f33ec838b52..09eb6ea9a584 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3076,7 +3076,7 @@ fec_enet_alloc_rxq_buffers(struct net_device *ndev, unsigned int queue)
> rxq = fep->rx_queue[queue];
> bdp = rxq->bd.base;
> for (i = 0; i < rxq->bd.ring_size; i++) {
> - skb = netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE);
> + skb = __netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE, GFP_KERNEL);
> if (!skb)
> goto err_alloc;
>
The patch LGTM, feel free to repost as non-RFC.
prev parent reply other threads:[~2022-05-17 22:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 10:05 [RFC PATCH] net: fec: Avoid to allocate rx buffer using ATOMIC in ndo_open Michael Trimarchi
2022-05-17 22:27 ` Jakub Kicinski [this message]
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=20220517152753.78685d6c@kernel.org \
--to=kuba@kernel.org \
--cc=edumazet@google.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@amarulasolutions.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qiangqing.zhang@nxp.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).