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 37873A00C3; Wed, 21 Sep 2022 20:14:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D06C940691; Wed, 21 Sep 2022 20:14:46 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9A9D44067C; Wed, 21 Sep 2022 20:14:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663784086; x=1695320086; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=X4oaFkCz+HTDvSNxFJ5fDdm/Y1evS2abgbFqXlppAVE=; b=Vq1C4mo1Xjemm4/hFrd0M+qG/wmEEjn0zUVZ5trd1R1U9bOFEiyu6kVV dG3RgaYF48Lmd+js/rB1u4DmW9KrFdE15ZAx8scLIWiyxHsVHdbB0hOct ZnIQrQhl264+S4xeo8yWTHIH6lskfBqVz3wlIOXuPg4XEexuLZnoE341h Vwp62r2+d1lHBRLgtQ8pIjV+QPUsBdlHVpqHab5c6gZ63J/okC52qg14X C1SJKNJmXIDuoj1hLoWDYD6VbG+dwB8UlPhJvsf+9fIiosvUhCCtJSGcy n+7lUShsTu07bknhiC+8i3PaLdzis2E53qPJuShkQa/euwiol3epKLRO3 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="298802553" X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="298802553" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 11:14:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="619465996" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2022 11:14:35 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 11:14:35 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 11:14:35 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 21 Sep 2022 11:14:35 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 21 Sep 2022 11:14:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LhFPLUOafSmhHeyfVZCFa4ksguhvMw3rfbiND+0teTC7gIxL4gLg21+7N6iwSRHb4Im7PIGiTK29vP+BQXH6R49Jc7LhFkT+A9vN5U+nzszX3XwNkeRIXx2dkd7TVGTq+ybb8nIfPKXBADzHCm5HhiECoePUwzisBqhymio4UX9O1g/tIoBNeKRolIle9txH/wAeZAiPp0bofbGl61LMNYJ2M7Gj7WS+EJUOUBwj9g5mlYXcwLxJtvSLxTQ0hwRJHz7uPfzc1+hd2+5UNhe1rhMaNmXREL9x/kl8z/LXzX3iUhE/aakjD6F+X+02G/b7k/l25PnYtlBEhXQyCaa/Og== 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=Q58vvrfK0gi5zBb58hwrXaJX3GDELK7QCOrbQqNjfBI=; b=hUHmZ2BOgQRIN9l2lPK9uYlY/vsy6+M4/GhHwXPZJRWQAYzW0rfRthtqwmEUu5VXY8yBDuGPKQKFDrr0r03He2bLsX3VRvBZCM09Yybnq7ZMf6SpL0N6gosA+FXlL0gAjA95JHJGfMsj86fHcONu8BfxnO4eRzSGZByOueendPcNQMCIFbXjL71u2kMiMj3c0oqNlHoCI2hqq6RJHeAiHEMGyKRwc33gqvHF8e/rET+s47cbYrm2S7zLnf8NONvpsPwXGj55J/NKxGBqG07LlDQOjIZorhN+ymDaeFruqFl2Y6PYVd2Dclid0xen5v19SOx5kStaUrkGDANIiWLG8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by DS7PR11MB5968.namprd11.prod.outlook.com (2603:10b6:8:73::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.16; Wed, 21 Sep 2022 18:14:33 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::c58:bb03:629b:3787]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::c58:bb03:629b:3787%7]) with mapi id 15.20.5654.016; Wed, 21 Sep 2022 18:14:33 +0000 Message-ID: <51e09ee2-2776-bfd8-ad7c-d658fe3f62cc@intel.com> Date: Wed, 21 Sep 2022 19:14:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1] examples/l3fwd: fix core dump after packet match Content-Language: en-US To: Sean Morrissey , Konstantin Ananyev CC: , References: <20220907113354.1443744-1-sean.morrissey@intel.com> From: "Medvedkin, Vladimir" In-Reply-To: <20220907113354.1443744-1-sean.morrissey@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0609.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:314::11) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|DS7PR11MB5968:EE_ X-MS-Office365-Filtering-Correlation-Id: b3c5dff1-2c46-44f2-61e5-08da9bfd223d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: raqfWyTH4gT9SmBbNvYZMe24IJc5/5JBUL/l/96hXCc8fTNSgHgdDdvQtM1anAutbKznHjEFWZXg8m6WYHy4dabPxEzy2B3so0zoMEwSWm80ERuMyRjFMr22C9S7D7eHGozgdLh9lMP7nF6ezU33GpUL9p43eZX0iERKbYu6Ey6KBSobsbSnCNC7ZNfUjXI++yVRyC+nIMeMFjRbjryFcz0DzNE6iGwwY1LF/8GaAKy8jrbQD5F54iZNbxVPOr2CwE2fAHTPwMN/d3BYlpo3wLUgnM2mK4hIjGpClYBl0EIrGcvJofclMvI9tFwVXwJFmtM0mKqpI3ZFryF8eo0vBWXiGswReCXi4a3kh8pNgUp/mphi806d2kSsTOkKSShJeyuomuB43wv8t5PeGay9qYT6qvVGh9rZOVzZ2jReLnE/rzBLtPKqzyoG6U+qci0PELhh73KPAtdokgc2NlPylVHe0e2d1v0j/1emTACFZxIH7fed85iRc0+9jWTNFbYgdh75MOhutzeeKFqtWLc5DimAnF/r/2iycbT7SRodDokjPRakTYtf6aVsA35kGAp4ccgQFMfddSeajNXV9321Hd4Wzizn171gjCXIuq6mjJj7Z9EVv64u68cZ8ue3djqJaUXuVM7JozatdQ3K1b4PWIHF8IecLygIvixZCA2gfntP4097XCnWB9AAAxX7Ifsl6pGgrJhFy6+2Hr8lz2W7Tc6gOqNsq2cTy8I7LgSy7B8KTvRT/87FEotEs+tVyrmpxz7CiUw8/XAptOf4jYDcx9iNm+41zGjQMsJv1qD59Ec= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(346002)(136003)(376002)(39860400002)(366004)(396003)(451199015)(8676002)(36756003)(6486002)(31686004)(82960400001)(8936002)(38100700002)(186003)(2616005)(83380400001)(31696002)(478600001)(6512007)(41300700001)(6506007)(110136005)(86362001)(450100002)(6636002)(316002)(26005)(53546011)(5660300002)(6666004)(66946007)(66556008)(66476007)(2906002)(4326008)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S3lCSkM5dm1WQUE3RXU1NGNTWU4wNS91VEZaRDVBbXBMZjZDSER6UlFrYTRm?= =?utf-8?B?RFhWZ0E4aU8zWkxLOGVWYVIxT2xjQXdQVmNVUjVTZVhLWVhDM2lkazduTWYy?= =?utf-8?B?OWJ1R29XK3ZNUnlrTGJKV2syQ0JtV2IyYk5mVTRWcWZBYXMrTmhkeWFQWjEz?= =?utf-8?B?cTdJWnhsSFlibE9Ic0F1amQ4NElHL2U3N2pCRHNxUC9XdnBuOXpsY2t2VjdY?= =?utf-8?B?YWVVUmY0b3NSNmF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kL2FrVnFMR2djUHFY?= =?utf-8?B?dW5HNU14NUVWdDAyYXQ1ZzdJSUZiYk5uajMxQzJrV0pycTlMSGJDWVRwN3JS?= =?utf-8?B?cC9ZT2xnOFEwb3BSclBZT0JkY2FJZnlZVW9EaTN1VENrVTM0dmdkVkE3b0Nk?= =?utf-8?B?Z2c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: b3c5dff1-2c46-44f2-61e5-08da9bfd223d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2022 18:14:33.2794 (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: 3Vz0sNX2IyhWmd1KmHseSqxvYr/4mRzNfz1j/9XILc6osn3+iHXZuwu9s+itUvS1vjVtHQti6TbexQlwklMseiIdQkkHIa0YbK7hS/XcYHY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB5968 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 Acked-by: Vladimir Medvedkin On 07/09/2022 12:33, Sean Morrissey wrote: > This patch fixes a core dump which occurs on 32-bit-builds > after sending a matched packet due to overrunning an array. > > Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example") > Cc: sean.morrissey@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Sean Morrissey > --- > examples/l3fwd/l3fwd_acl_scalar.h | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/examples/l3fwd/l3fwd_acl_scalar.h b/examples/l3fwd/l3fwd_acl_scalar.h > index cd99f8594a..542c303d3b 100644 > --- a/examples/l3fwd/l3fwd_acl_scalar.h > +++ b/examples/l3fwd/l3fwd_acl_scalar.h > @@ -70,15 +70,12 @@ send_packets_single(struct lcore_conf *qconf, struct rte_mbuf *pkts[], uint16_t > > /* Set MAC addresses. */ > eth_hdr = rte_pktmbuf_mtod(pkts[j], struct rte_ether_hdr *); > - *(uint64_t *)ð_hdr->dst_addr = dest_eth_addr[hops[j]]; > - rte_ether_addr_copy(&ports_eth_addr[hops[j]], > - ð_hdr->src_addr); > - } > - > - for (j = 0; j != nb_tx; j++) { > - if (hops[j] != BAD_PORT) > + if (hops[j] != BAD_PORT) { > + *(uint64_t *)ð_hdr->dst_addr = dest_eth_addr[hops[j]]; > + rte_ether_addr_copy(&ports_eth_addr[hops[j]], > + ð_hdr->src_addr); > send_single_packet(qconf, pkts[j], hops[j]); > - else > + } else > rte_pktmbuf_free(pkts[j]); > } > } -- Regards, Vladimir