DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Mrzyglod, DanielX T" <danielx.t.mrzyglod@intel.com>,
	"Kerlin, MarcinX" <marcinx.kerlin@intel.com>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipline: fix memory initialization in firewall bulk functions
Date: Fri, 13 May 2016 09:36:04 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479BD3C3@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1462557284-213903-1-git-send-email-danielx.t.mrzyglod@intel.com>



> -----Original Message-----
> From: Mrzyglod, DanielX T
> Sent: Friday, May 6, 2016 6:55 PM
> To: Kerlin, MarcinX <marcinx.kerlin@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> Cc: dev@dpdk.org; Mrzyglod, DanielX T <danielx.t.mrzyglod@intel.com>
> Subject: [PATCH] examples/ip_pipline: fix memory initialization in firewall
> bulk functions
> 
> bulk functions expect that all memory is set with zeros
> 
> Fixes: 67ebdbef0c31 ("examples/ip_pipeline: add bulk update of firewall
> rules")
> 
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
>  examples/ip_pipeline/pipeline/pipeline_firewall_be.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> index e7a8a4c..4edca66 100644
> --- a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> +++ b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
> @@ -732,7 +732,7 @@ pipeline_firewall_msg_req_add_bulk_handler(struct
> pipeline *p, void *msg)
>  	n_keys = req->n_keys;
> 
>  	for (i = 0; i < n_keys; i++) {
> -		entries[i] = rte_malloc(NULL,
> +		entries[i] = rte_zmalloc(NULL,
>  				sizeof(struct firewall_table_entry),
>  				RTE_CACHE_LINE_SIZE);
>  		if (entries[i] == NULL) {
> @@ -740,7 +740,7 @@ pipeline_firewall_msg_req_add_bulk_handler(struct
> pipeline *p, void *msg)
>  			return rsp;
>  		}
> 
> -		params[i] = rte_malloc(NULL,
> +		params[i] = rte_zmalloc(NULL,
>  				sizeof(struct
> rte_table_acl_rule_add_params),
>  				RTE_CACHE_LINE_SIZE);
>  		if (params[i] == NULL) {
> @@ -814,7 +814,7 @@ pipeline_firewall_msg_req_del_bulk_handler(struct
> pipeline *p, void *msg)
>  	n_keys = req->n_keys;
> 
>  	for (i = 0; i < n_keys; i++) {
> -		params[i] = rte_malloc(NULL,
> +		params[i] = rte_zmalloc(NULL,
>  				sizeof(struct
> rte_table_acl_rule_delete_params),
>  				RTE_CACHE_LINE_SIZE);
>  		if (params[i] == NULL) {
> --
> 2.5.5


Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

  reply	other threads:[~2016-05-13  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 17:54 Daniel Mrzyglod
2016-05-13  9:36 ` Dumitrescu, Cristian [this message]
2016-05-16 18:18   ` Thomas Monjalon

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=3EB4FA525960D640B5BDFFD6A3D89126479BD3C3@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=danielx.t.mrzyglod@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=marcinx.kerlin@intel.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).