From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BE3A4555B for ; Wed, 3 Jul 2024 12:11:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E882427AD; Wed, 3 Jul 2024 12:11:08 +0200 (CEST) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 49BB840E7C; Wed, 3 Jul 2024 12:11:06 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4WDbBW26Wjz6JB6j; Wed, 3 Jul 2024 18:10:27 +0800 (CST) Received: from frapeml500006.china.huawei.com (unknown [7.182.85.219]) by mail.maildlp.com (Postfix) with ESMTPS id 865CA140B2F; Wed, 3 Jul 2024 18:11:05 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml500006.china.huawei.com (7.182.85.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 3 Jul 2024 12:11:05 +0200 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.039; Wed, 3 Jul 2024 12:11:05 +0200 From: Konstantin Ananyev To: Kaiwen Deng , "dev@dpdk.org" CC: "stable@dpdk.org" , "yidingx.zhou@intel.com" , Sean Morrissey Subject: RE: [PATCH] examples/l3fwd: Fix core dump with multiple socket Thread-Topic: [PATCH] examples/l3fwd: Fix core dump with multiple socket Thread-Index: AQHazSXpdBP4z8dqTkKuttWUkmyaErHkyBew Date: Wed, 3 Jul 2024 10:11:05 +0000 Message-ID: References: <20240703075038.1594523-1-kaiwenx.deng@intel.com> In-Reply-To: <20240703075038.1594523-1-kaiwenx.deng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.206.138.42] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org >=20 > Setting acl will clear the acl config of other sockets, which > will result in core dump. >=20 > This commit will no longer clear the acl config when setting acl. >=20 > Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example") > Cc: stable@dpdk.org >=20 > Signed-off-by: Kaiwen Deng > --- > examples/l3fwd/l3fwd_acl.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > 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); >=20 > - memset(&acl_config, 0, sizeof(acl_config)); > - > /* Check sockets a context should be created on */ > if (socket_id >=3D NB_SOCKETS) { > acl_log("Socket %d is out " > @@ -973,6 +971,9 @@ setup_acl(const int socket_id) > return; > } >=20 > + rte_acl_free(acl_config.acx_ipv4[socket_id]); > + rte_acl_free(acl_config.acx_ipv6[socket_id]); > + > acl_config.acx_ipv4[socket_id] =3D app_acl_init(route_base_ipv4, > acl_base_ipv4, route_num_ipv4, acl_num_ipv4, > 0, socket_id); > -- Acked-by: Konstantin Ananyev =20 > 2.34.1