patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Kaiwen Deng <kaiwenx.deng@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"yidingx.zhou@intel.com" <yidingx.zhou@intel.com>,
	Sean Morrissey <sean.morrissey@intel.com>
Subject: RE: [PATCH] examples/l3fwd: Fix core dump with multiple socket
Date: Wed, 3 Jul 2024 10:11:05 +0000	[thread overview]
Message-ID: <a32e58c26a2e4992b10cf0475df0e0c8@huawei.com> (raw)
In-Reply-To: <20240703075038.1594523-1-kaiwenx.deng@intel.com>



> 
> Setting acl will clear the acl config of other sockets, which
> will result in core dump.
> 
> This commit will no longer clear the acl config when setting acl.
> 
> Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> ---
>  examples/l3fwd/l3fwd_acl.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
> index 401692bcec..c8958f59fc 100644
> --- a/examples/l3fwd/l3fwd_acl.c
> +++ b/examples/l3fwd/l3fwd_acl.c
> @@ -962,8 +962,6 @@ setup_acl(const int socket_id)
>  	acl_log("IPv6 ACL entries %u:\n", acl_num_ipv6);
>  	dump_ipv6_rules((struct acl6_rule *)acl_base_ipv6, acl_num_ipv6, 1);
> 
> -	memset(&acl_config, 0, sizeof(acl_config));
> -
>  	/* Check sockets a context should be created on */
>  	if (socket_id >= NB_SOCKETS) {
>  		acl_log("Socket %d is out "
> @@ -973,6 +971,9 @@ setup_acl(const int socket_id)
>  		return;
>  	}
> 
> +	rte_acl_free(acl_config.acx_ipv4[socket_id]);
> +	rte_acl_free(acl_config.acx_ipv6[socket_id]);
> +
>  	acl_config.acx_ipv4[socket_id] = app_acl_init(route_base_ipv4,
>  		acl_base_ipv4, route_num_ipv4, acl_num_ipv4,
>  		0, socket_id);
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
 
> 2.34.1


  reply	other threads:[~2024-07-03 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03  7:50 Kaiwen Deng
2024-07-03 10:11 ` Konstantin Ananyev [this message]
2024-07-23 16:09   ` 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=a32e58c26a2e4992b10cf0475df0e0c8@huawei.com \
    --to=konstantin.ananyev@huawei.com \
    --cc=dev@dpdk.org \
    --cc=kaiwenx.deng@intel.com \
    --cc=sean.morrissey@intel.com \
    --cc=stable@dpdk.org \
    --cc=yidingx.zhou@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).