From: Ondrej Zary <linux@rainbow-software.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list
Date: Wed, 18 Nov 2015 09:10:40 +0100 [thread overview]
Message-ID: <201511180910.40728.linux@rainbow-software.org> (raw)
In-Reply-To: <20151117225403.GA3362@electric-eye.fr.zoreil.com>
On Tuesday 17 November 2015, Francois Romieu wrote:
> Ondrej Zary <linux@rainbow-software.org> :
> > If memory allocation fails in alloc_list(), free the already allocated
> > memory and return -ENODEV. In rio_open(), call alloc_list() first and
> > abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list().
> >
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
>
> ENODEV vs ENOMEM aside, it's ok with me.
Will fix the description in v2.
> The driver may avoid depleting the receive ring when
> netdev_alloc_skb_ip_align fails in receive_packet (drop and increase
> stats->rx_dropped).
>
> Then you may replace the pci_* dma helpers with the plain dma_* ones (they
> can fail).
>
> And perform a plain napi conversion.
NAPI is on the todo list. Thanks for suggestions.
--
Ondrej Zary
prev parent reply other threads:[~2015-11-18 8:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 17:28 [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list Ondrej Zary
2015-11-17 17:28 ` [PATCH 2/3] dl2k: Reorder and cleanup initialization Ondrej Zary
2015-11-17 17:28 ` [PATCH 3/3] dl2k: Implement suspend Ondrej Zary
2015-11-17 22:56 ` Francois Romieu
2015-11-18 9:10 ` Ondrej Zary
2015-11-17 22:54 ` [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list Francois Romieu
2015-11-18 8:10 ` Ondrej Zary [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=201511180910.40728.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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).