Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: maxime.chevallier@bootlin.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	antoine.tenart@bootlin.com, thomas.petazzoni@bootlin.com,
	gregory.clement@bootlin.com, miquel.raynal@bootlin.com,
	nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com,
	mw@semihalf.com
Subject: Re: [PATCH net-next 0/2] net: mvpp2: Remove unnecessary dynamic allocs
Date: Tue, 27 Mar 2018 10:47:41 -0400 (EDT)	[thread overview]
Message-ID: <20180327.104741.346276694485778787.davem@davemloft.net> (raw)
In-Reply-To: <20180326133423.14779-1-maxime.chevallier@bootlin.com>

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: Mon, 26 Mar 2018 15:34:21 +0200

> Some utility functions in mvpp2 make use of dynamic alloc to exchange temporary
> objects representing Parser Entries (which are generic filtering entries in the
> PPv2 controller).
> 
> These objects are small (44 bytes each), we can use the stack to exchange them.
> 
> Some previous discussion on this topic showed that the mvpp2_prs_hw_read, which
> initializes a struct mvpp2_prs_entry based on one of its fields, can easily lead
> to erroneous code if we don't zero-out the struct beforehand :
> 
> https://lkml.org/lkml/2018/3/21/739
> 
> To fix this, I propose to rename mvpp2_prs_hw_read into mvpp2_prs_init_from_hw,
> make it zero-out the struct and take the index as a parameter. That's what's
> done in the first patch of the series.
> 
> The second patch is the V3 of
> ("net: mvpp2: Don't use dynamic allocs for local variables"), making use of
> mvpp2_prs_init_from_hw and taking previous comments into account.

Series applied, thank you.

      parent reply	other threads:[~2018-03-27 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 13:34 [PATCH net-next 0/2] net: mvpp2: Remove unnecessary dynamic allocs Maxime Chevallier
2018-03-26 13:34 ` [PATCH net-next 1/2] net: mvpp2: Make mvpp2_prs_hw_read a parser entry init function Maxime Chevallier
2018-03-26 13:34 ` [PATCH net-next 2/2] net: mvpp2: Don't use dynamic allocs for local variables Maxime Chevallier
2018-03-27 14:47 ` David Miller [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=20180327.104741.346276694485778787.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=antoine.tenart@bootlin.com \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanc@marvell.com \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox