From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Yan Markman <ymarkman@marvell.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Antoine Tenart <antoine.tenart@bootlin.com>,
"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>,
"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
Nadav Haklai <nadavh@marvell.com>,
"Stefan Chulski" <stefanc@marvell.com>,
"mw@semihalf.com" <mw@semihalf.com>
Subject: Re: [PATCH net-next v2] net: mvpp2: Don't use dynamic allocs for local variables
Date: Wed, 21 Mar 2018 22:14:48 +0100 [thread overview]
Message-ID: <20180321221448.7b3ecae8@bootlin.com> (raw)
In-Reply-To: <b97e76e64d494912ae09efcc64d612ff@IL-EXCH01.marvell.com>
Hello Yan,
On Wed, 21 Mar 2018 19:57:47 +0000,
Yan Markman <ymarkman@marvell.com> wrote :
> Hi Maxime
Please avoid top-posting on this list.
> Please check the TWO points:
>
> 1). The mvpp2_prs_flow_find() returns TID if found
> The TID=0 is valid FOUND value
> For Not-found use -ENOENT (just like your mvpp2_prs_vlan_find)
This is actually what is used in this patch. You might be refering to
a previous draft version of this patch.
> 2). The original code always uses "mvpp2_prs_entry *pe" storage
> Zero-Allocated Please check the correctnes of new "mvpp2_prs_entry
> pe" without memset(pe, 0, sizeof(pe));
> in all procedures where pe=kzalloc() has been replaced
I think we're good on that regard. On places where I didn't memset the
prs_entry, the pe.index field is set, and this is followed by a read
from TCAM that will initialize the prs_entry to the correct value :
pe.index = tid;
mvpp2_prs_hw_read(priv, &pe);
> Thanks
> Yan Markman
[...]
Thanks,
Maxime
next prev parent reply other threads:[~2018-03-21 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 15:14 [PATCH net-next v2] net: mvpp2: Don't use dynamic allocs for local variables Maxime Chevallier
2018-03-21 19:57 ` Yan Markman
2018-03-21 21:14 ` Maxime Chevallier [this message]
2018-03-22 18:47 ` David Miller
2018-03-22 19:14 ` Maxime Chevallier
2018-03-22 19:43 ` David Miller
2018-03-22 19:53 ` Maxime Chevallier
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=20180321221448.7b3ecae8@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).