All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antoine Tenart <antoine.tenart@free-electrons.com>
To: David Miller <davem@davemloft.net>
Cc: antoine.tenart@free-electrons.com,
	gregory.clement@free-electrons.com,
	thomas.petazzoni@free-electrons.com,
	miquel.raynal@free-electrons.com, nadavh@marvell.com,
	mw@semihalf.com, stefanc@marvell.com, ymarkman@marvell.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/6] net: mvpp2: only free the TSO header buffers when it was allocated
Date: Fri, 8 Dec 2017 09:28:39 +0100	[thread overview]
Message-ID: <20171208082839.GC4359@kwain> (raw)
In-Reply-To: <20171207.145329.1140922105125090186.davem@davemloft.net>

On Thu, Dec 07, 2017 at 02:53:29PM -0500, David Miller wrote:
> From: Antoine Tenart <antoine.tenart@free-electrons.com>
> Date: Thu,  7 Dec 2017 09:48:58 +0100
> 
> > This patch adds a check to only free the TSO header buffer when its
> > allocation previously succeeded.
> > 
> > Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> 
> No, please keep this as a failure to bring up.
> 
> Even if you emit a log message, it is completely unintuitive to
> have netdev features change on the user just because of a memory
> allocation failure.

One thing I forgot, this patch still is needed for a proper error path
handling. We can't be sure all buffers were allocated correctly when
calling mvpp2_txq_deinit() (e.g. if one of them was the reason of the
fail).

I'll send a v2 without the patch 2/6, but I'll keep this one.

Thanks,
Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  parent reply	other threads:[~2017-12-08  8:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  8:48 [PATCH net-next 0/6] net: mvpp2: various improvements Antoine Tenart
2017-12-07  8:48 ` [PATCH net-next 1/6] net: mvpp2: only free the TSO header buffers when it was allocated Antoine Tenart
2017-12-07 19:53   ` David Miller
2017-12-08  8:24     ` Antoine Tenart
2017-12-08  8:28     ` Antoine Tenart [this message]
2017-12-07  8:48 ` [PATCH net-next 2/6] net: mvpp2: disable TSO if its buffers cannot be allocated Antoine Tenart
2017-12-07  8:49 ` [PATCH net-next 3/6] net: mvpp2: split the max ring size from the default one Antoine Tenart
2017-12-07  8:49 ` [PATCH net-next 4/6] net: mvpp2: align values in ethtool get_coalesce Antoine Tenart
2017-12-07  8:49 ` [PATCH net-next 5/6] net: mvpp2: report the tx-usec coalescing information to ethtool Antoine Tenart
2017-12-07  8:49 ` [PATCH net-next 6/6] net: mvpp2: adjust the coalescing parameters Antoine Tenart

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=20171208082839.GC4359@kwain \
    --to=antoine.tenart@free-electrons.com \
    --cc=davem@davemloft.net \
    --cc=gregory.clement@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@free-electrons.com \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanc@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=ymarkman@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.