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 AA5DFA00BE; Tue, 25 Jan 2022 15:05:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5901E426ED; Tue, 25 Jan 2022 15:05:15 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 44926426E4 for ; Tue, 25 Jan 2022 15:05:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643119514; x=1674655514; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=w2uBzz9PKohquB0YWZSqcwOaPEw5yzUWivdnCkLuSrY=; b=CGndvSE/8trDETIh2p465jR3bOgVs2A3OGjgqCxrwR45OSmJf4SiTuHi 5YW++ztmNAw3LER4/NJCxXp3IAuNNzSGyG02cxPh92YB4xRoHPTGf6Ua5 cpNDYhHteHApoXa9ePbpzSHDbvSStbrqyqEyUu3MJhs7goGbxTnzkQaX/ EDYCsyt28Bw76ror33AKXw3b4ka7DDjjsublFZKYOLhIEGp6tSj9OK2WK ts2gDDJnd6BvNVjlInPliREWy+36Zr96dsAH+X7fAfuJQaF97/INy7M+r q498yP4ZnwD1YnVrgTbLJudE0sa5cvaCKqoSLmD7wUNb49dPo4tfb/8N6 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="270750764" X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="270750764" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 06:02:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,315,1635231600"; d="scan'208";a="627936754" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 25 Jan 2022 06:02:47 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 25 Jan 2022 06:02:46 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 25 Jan 2022 06:02:46 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 25 Jan 2022 06:02:46 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.45) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 25 Jan 2022 06:02:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HDmrIs7J5fvMgihrj4Kh1LfF0Gw7wfEg96H50Jkz2w9xaUpSp8CqbsAE8X+aklnhgZo6k/+IbSEsQFGJ4SZNmooAdiOk7uHcnv5d83ZYo+wv3oX/lsZ7+ZghnjSotvTwUyTC+uYzfGuXAUVBHnTffrQjH4r1ERCPcVl7IOXqjFD7l6qU34DYgQUt/et6Rch84A7CMM79Sgpjc3tQ458jcjpV/+p2gzPt8aild2ZHVe5ap8vaKVpUzwhqz41wSO87N9BpMw1sQ+CoKeoPWUI1DW5z81oHmYOjF1ZUFzM5bV05MBtW2vVLPeRiI7OrURHbfQIoEOWsYwvb5DjdjdjYhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vtIiFoJ7C06ARLm8KSQC3DxdIdF/TULiV3L8MMLqWRo=; b=Tk8jsE8yUuazWqTF80BnnFzK/VTj/qt7z2NzCg49LjN59Qs+FSABiAfZjdmxnVv0YKQ8uh9kiUQ/Wir6yece2gCXwJmUtN6lUBGT302KR3FTE+4AOnM4dC6P2vWUHBY81kikMnWGrXgpIHCo2h09FqmnRY/HMtYYqGu+k1hPK+Vu+OlOiUdgZTu6YLc0LyKPE7Z0iWb/E3rpiebcdE2DRAh5Ys8076V5K9Z1Lep9G+4jAVaO1EJoHZCeoyJglf2sVNN3i2HJa50OBeVX3gH54P+sLl4Wxl6iI3TC4VN0F3oYKsgaJUYSGSsgQNo9kFWJYrUkCPSlOdwplhPmd5LCQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by CH0PR11MB5234.namprd11.prod.outlook.com (2603:10b6:610:e1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Tue, 25 Jan 2022 14:02:45 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::7de4:731c:cee2:49c2]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::7de4:731c:cee2:49c2%3]) with mapi id 15.20.4909.019; Tue, 25 Jan 2022 14:02:45 +0000 From: "Ananyev, Konstantin" To: Zhiheng Chen CC: "dev@dpdk.org" Subject: RE: [PATCH] examples/l3fwd-acl:memset the acl matching result array Thread-Topic: [PATCH] examples/l3fwd-acl:memset the acl matching result array Thread-Index: AQHYEb1kjk613ERCy0uO9F9MkjTK5qxzxDag Date: Tue, 25 Jan 2022 14:02:44 +0000 Message-ID: References: <20220125072915.17083-1-chenzhiheng0227@gmail.com> In-Reply-To: <20220125072915.17083-1-chenzhiheng0227@gmail.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0fe2c628-f5f3-4322-8d32-08d9e00b5c85 x-ms-traffictypediagnostic: CH0PR11MB5234:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:302; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WAKVHolZ0ua/KbfKXHzyIP6vgD+SzfqQe8NZB17h6fAPwOxgRGFXnnW4LF6LYUbzyGlee0QyRRHzS/QfYFXNK25ttS6dZ9vRmvzwKnKhzbC6WwqNIPK6/XYmiErLSnBcV5Yt1m7VASx5Sf1hlwWCMcDrGIqCNY5SOfL8pFE5JsTrF9Ble4OrP8kVrOKEi1KebqyDcx+gUZ4zJTb8ZmPaI7xznYVBJUH9zJdYcKG/2/lNYJKFO3Sp538qraLdMTaKv70FEERp+A7wVwNPmu6RVQey1REaxigzm3ysYB9fJxqfSnWtc8FBVS0Y8dwZfTqS5s7GQxaxTM5dSPHE0nEL+B8eBYs56AM9BTcZXAD5ZNvP09I2I0k2biSFhjGkHe+4HIahjefErFMc3bVqEIYN/BhDwHWzujNIz95nMLS8DCo0G5s2M+47ZA3lFLOBcJg3Z3ey7fGpVbsufMRlXaxJHQ/2grDHZi0Mi77HeccgZI7XP8NswY/VScfV2Apt+vhahi3yuW6exBAJs4iU2Lv8/qoLzVc1OQtUFwZBe2JrrWVT1+MsEH6N6gXc5uskj12cCt5oOcZTbajCk9cNgFVuqjYd+22K5eYR4JsD7B+MHXHWZ588M6olNJBvW/HA4y35i877Po1iuTSEB6hEu93iC5+YXogA/PisVw+WHwLLJ5NhBJbC2grks9ixKF7y/GUyd9PVv7kl1bl3XnZaVUPGNA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(86362001)(5660300002)(76116006)(186003)(4744005)(8676002)(66946007)(316002)(66556008)(66446008)(66476007)(26005)(64756008)(38070700005)(6506007)(38100700002)(122000001)(7696005)(2906002)(55016003)(8936002)(508600001)(6916009)(9686003)(52536014)(4326008)(33656002)(71200400001)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BSrZNHLWEnEd0ob4NlMJVTqiTQFZqxAxzRsn1fnnhg8i1oxtj2FzQY2L4kNr?= =?us-ascii?Q?2kI5HN9yX9u8yNpk+LCOHis4VIOqlOi7MiKxARvWOFUGXRBwsQSgD3x1uzhS?= =?us-ascii?Q?idDb0fV8uX3fr2QbWBzHl1bHGeM2ERiDr6jCp52wG6ae8N6t64ZO6ik4j3Qb?= =?us-ascii?Q?F+8Vsfuq/bsTpfmP+fhKvqsVoQ/3Z48dos1QYpakfngHhc0FBZYAectLa3pB?= =?us-ascii?Q?PqULjRvGCGh4ZRjDOfB7CkD05Y216Q+7QOWzmVOpzS5wjQHhw3+9BSw0uxtx?= =?us-ascii?Q?jkSSoRsuol9pRbALQmQOHwQwTKeG4wYlO/Oy2nLd1kj7MgaQ9j+RjxXFK3cl?= =?us-ascii?Q?qpRi1IDI1qCSzIiRs56ke86X/gQudlsR7eLRiNOE/FIw6cS3QDyB14z+IyVQ?= =?us-ascii?Q?aGS0azoVpnLx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BVhs?= =?us-ascii?Q?N8jHZVFRfOVfWI3CP4GoDsuD64o7zSLs+siOLWALchPkfxpblAdoaP7N7l4O?= =?us-ascii?Q?9zz+Qap+0AvIs6LZWRfBTp5Psrw9M58CwMqg+K/wewHvnE1/NAHo3Z1XKos8?= =?us-ascii?Q?8UUV/ylgx0VVZITQOTv+j5yvusDFwPYCCC7GKvWtc9/rLTVwn3K0oP9/u0WY?= =?us-ascii?Q?LgqZy6qjobZ+MzPUkVFUy3oZYA0zAGVq7+mKzGoYS+VgOpr+fEHq5MemtPA6?= =?us-ascii?Q?20bfEb1Y7rAawWRRKHZxgG1sdfKvnVkhn8Xex8MwTPD1zFdtqXwbwfn5b0bZ?= =?us-ascii?Q?PI9Ut8rGl10/ERuEE2MJzs88C8GXkbxRDhBZB2iTg5eqeChmnBzujZpx4e1c?= =?us-ascii?Q?F8RW9w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fe2c628-f5f3-4322-8d32-08d9e00b5c85 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2022 14:02:44.8185 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7/ctqFA3ZXebV8DVzXKAdqF6uQb4ruvYCdtZFUe75eD5eu61iHHx0sWnmv166oPKA4Nz9MR77yR1DZYCsPtJqM3KHBCGoEncVYWHrkibySc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5234 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > If we don't memset acl result array before matching, > we can get arbitrary dirty data from memory. I don't think it is the case. acl_classify() on successful completion will always populate result array. The only exception - user provided ivalid input parameters, or acl ctx is n= ot build, etc. So no need to do memset() here. =20 > Signed-off-by: Zhiheng Chen > --- > examples/l3fwd-acl/main.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c > index 1fb1807235..7b9539b3ca 100644 > --- a/examples/l3fwd-acl/main.c > +++ b/examples/l3fwd-acl/main.c > @@ -738,6 +738,9 @@ prepare_acl_parameter(struct rte_mbuf **pkts_in, stru= ct acl_search_t *acl, > acl->num_ipv4 =3D 0; > acl->num_ipv6 =3D 0; >=20 > + memset(acl->res_ipv4, 0, sizeof(acl->res_ipv4)); > + memset(acl->res_ipv6, 0, sizeof(acl->res_ipv6)); > + > /* Prefetch first packets */ > for (i =3D 0; i < PREFETCH_OFFSET && i < nb_rx; i++) { > rte_prefetch0(rte_pktmbuf_mtod( > -- > 2.32.0