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 8BF294324D; Tue, 31 Oct 2023 09:15:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01DB9402D5; Tue, 31 Oct 2023 09:15:44 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 227B440282 for ; Tue, 31 Oct 2023 09:15:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698740143; x=1730276143; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=y7NAUPJIeSPQ/LqEZB1qvzDTGQhmiIEwwTMpalSA2vc=; b=TX5HvZZexeQrgzAcgpG/vv6H7iMjBmCAOr+95sB9UEo+x+gE6dvKLU1+ 4Yc1qpwBJXd1DgG9Ei49PUMu+mISLZSefSLxgcvPTMGwS055isMPFpq86 vWKdq1vY6K1oJIyd27Z9CRNmjyQeCr6toRIubEUk1x4pPPCOSVOyQdi5s jhlBMbu/c2i7JmxmHqyPnsMyrAstU9i7rfVmkzW52foK6qzHol6RZlBvb Q4iHbmfgZwaU4S80m7yxmzO7TU203xZgqHpTOVb1gGKJIwdSd6pezYFLu +PrvkjKNd+jewY8WZvhEy+vS2XP3v8FoSaAWw71AdQbkqdDbrnMWn7x6o g==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="1083953" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="1083953" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 01:15:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="710349535" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="710349535" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Oct 2023 01:15:41 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 31 Oct 2023 01:15:41 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Tue, 31 Oct 2023 01:15:41 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 31 Oct 2023 01:15:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aH+qWQ5FhOzntirAJTjAJqshYThKuc9gQUOKSslMFyuEs9hrIylnXIILnkZDdHAbYvrF1XuLgDs0xfmA1LQo0RBlPhXbERtqRiP9ZtzY7NBvDMkBSnCH6wHN/mMerdIQ2IuHcPEeI7cLKJm4MgeMMH3be+P4mB8KoOtH2DfBspjRFP/uL7WTGePjc/bjTggsBY6Wec+fiYsfay+YEElySdSqkFm2PNk1yFSPkq3AngysQY5wPbcsbIBR17ecfCS9e/bikoCUKGknCM3pL2LUVWA/wZchRcsZCxklubdwVatw4IC9jsQpfqQ3ctsN/3ZRj1NVj2yTzJr7IKHVq644ug== 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=/gtJiWHN+LlMRxkMSZwI145VV6aXcPNHV0bABdoSnog=; b=T0wr8hykLaxu3qv4qOAhr8MvE0gfCe64xQWaCK/rtMngbMBOwoj3Wz+7ZtoqiZaIY5R7UCs96nSMRiaHiq6pyBIi4Q/VTP69Maac4j8FNjj8gn++K3/IgBASCMsB21L+BsUvONKr1quGHDwKIRZDu2wtaaXlCDbH21nw69IU5EgUAw4SjEA+ihenY+ddNQJcWgzRgu7q1kJ6cWag70XYrNgGRczt3Gc/Ml+WpypIDGflOL8488bjRctzdZ+A5akD7OaEkISVmrFRhIcepSYOBufZpjkALK9p8RPQXw3Kl1mFl6d/x0WipTIxaeltRuVjtpMbnJQFSfeUuufC1NhDwQ== 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 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by DS0PR11MB8763.namprd11.prod.outlook.com (2603:10b6:8:1bb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Tue, 31 Oct 2023 08:15:37 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::fccd:acb8:20c7:e756]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::fccd:acb8:20c7:e756%4]) with mapi id 15.20.6933.026; Tue, 31 Oct 2023 08:15:37 +0000 From: "Zhang, Qi Z" To: "Deng, KaiwenX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Zhou, YidingX" , "Deng, KaiwenX" , "Wu, Jingjing" , "Xing, Beilei" , "Lu, Wenzhuo" , "Richardson, Bruce" Subject: RE: [PATCH] net/iavf: fix core dump when exiting testpmd Thread-Topic: [PATCH] net/iavf: fix core dump when exiting testpmd Thread-Index: AQHaB++K2GmAI6Mo9EewOa4NO2YaibBjkWRA Date: Tue, 31 Oct 2023 08:15:36 +0000 Message-ID: References: <20231026085444.497296-1-kaiwenx.deng@intel.com> In-Reply-To: <20231026085444.497296-1-kaiwenx.deng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|DS0PR11MB8763:EE_ x-ms-office365-filtering-correlation-id: f52b67d5-e1f4-4855-6cef-08dbd9e98fb6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iP+mcnYhp4kjj2dkCzeDbzuLzvY3IzVhaTYBkCnD5l3U7+qU5gSVFMpAZH9JiGfHx7jccfjKgMPrHu5rZoOlBKnFXlCPVjYIBGZTTIxVxO8mvj7c2kMaKNqqAQ9tjnoTATpxJzOaApAmTqramZbgCOoI53wC17Whp99cfDgOlp/tKi0hd5TZD6ISZPpdR7bl6QD9AwicLuPieX2l8tKFUuqrKTgRt1ALL3hR1L0KGOn4YyqK71m6q0BoVYBs2lv2REIT+VUMlYzQ/X186xn/IDM4yq0uJDUfyMg5xWFuCY1g1HHqKA3pr6SNqgfRj/DqgdSr2YrgfCrQS8idWqPg1eIUY74EAOpYlnzFFcEM5ZWBsKOQqlYQ8TG8/N678Dlh8sY+NJRF3GxK+wjmL4WqC7WWweQYL4gJvPjIxvTFoddnEYBhN5ZW+OdrIEWLY5RGn92bX8ClEJTGyXRC1XjwWg81XtFqhfd+Kq03kuKv6d6u3Udkc1Oy0LEoaRjFczAHNnyF/6AREBSXLM2uZg2LuWYWjxzRSYyaRxOoJsHwp7dXYii3Yg/9NP9ZgH+zVyCPA1HZwCtzZoSQ+p0hnCne3vZPK5fP/jm36IpwqP9eAvhIdJMtY2zL2SIzxvOxeVH0 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(346002)(396003)(136003)(376002)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(52536014)(66556008)(41300700001)(110136005)(5660300002)(54906003)(66946007)(66446008)(66476007)(64756008)(316002)(76116006)(8676002)(4326008)(8936002)(55016003)(82960400001)(83380400001)(122000001)(478600001)(2906002)(26005)(53546011)(9686003)(6506007)(7696005)(86362001)(107886003)(33656002)(38100700002)(38070700009)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?h4tsK69LqajDOxe2lwfOnTU2hH1BexytqpPf1KzW/tiDHM7kBwUUzo3coT/E?= =?us-ascii?Q?AC2vyivVqFz3ODQ3IGrnFx+g9LxyyrfrbvMhLC0aHoxx8QxfR1fUu3XLqta9?= =?us-ascii?Q?9+CO41ZwxrRBXl4hHaZrIx+vGVITK+2ZMJzXLmPZKbzDwHsvMxosGa3qkR/p?= =?us-ascii?Q?Y70w9lGVxsNQmpf0E0YiHfYm/c8C+z4idy0atzO4u3Okwc1Ds0T0g0t83I+V?= =?us-ascii?Q?Px1pf/Y9QK92wfgWH6i+S8Miq2bWjse4wPfHSSybSQq75+ZH0h/3nJlD6owU?= =?us-ascii?Q?IOu4SOHKsGNfFFF0QLx/i+z/iSewJIosi5e+YmRKoVj/tpc7A15SjVPt8ltL?= =?us-ascii?Q?CJ/HsIhSGzcQXa259F4ayTXJPvq2pYqUqVmezA9s+EgjYpS/04AJrp6vVAQv?= =?us-ascii?Q?5PyozfG7pJacG2R0hg5ZUROxqvDJpRuGWMX2AF7/zn+zoQ+nVkRSwUIDeOc1?= =?us-ascii?Q?1KmsQz33yR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?us-ascii?Q?K//HKUO0ouw8cMomuaDl7imL+ho2Ut12Hio81lQ24F3UrBmlpkc0/PYUlr/u?= =?us-ascii?Q?Owh3JxG2ohV1C5FDngVLoLEWxuuqzc8nJuME4ViTbjGyzGG2S7Ou2zoQJuQT?= =?us-ascii?Q?S7GIn85zEmKCeHzkR2l7DpNtIE4AYORyzkoSR48ag9Tv33TKdzZYNsZv14v1?= =?us-ascii?Q?nrMqNd5ST6g7e9taFZFgtq6iIixKXOK/zyLss8e/?= 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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f52b67d5-e1f4-4855-6cef-08dbd9e98fb6 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2023 08:15:36.4137 (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: D5qKGWzdF2XAe6Eu7JpsPBwhrOAhSzIjFmmb/DfBLpl8ViJjhfcCI62ScUxRoN6ox7rjByuSJ8LkfTKPhMNKzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8763 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 > -----Original Message----- > From: Kaiwen Deng > Sent: Thursday, October 26, 2023 4:55 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Zhou, YidingX > ; Deng, KaiwenX ; Wu, > Jingjing ; Xing, Beilei ; L= u, > Wenzhuo ; Richardson, Bruce > > Subject: [PATCH] net/iavf: fix core dump when exiting testpmd >=20 > release null mbuf results coredump. > This commit adding mbuf check before releasing. >=20 > Fixes: 12016895fcf3 ("net/iavf: fix buffer leak on Tx queue stop") >=20 > Signed-off-by: Kaiwen Deng > --- > drivers/net/iavf/iavf_rxtx_vec_common.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h > b/drivers/net/iavf/iavf_rxtx_vec_common.h > index e18cdc3f11..f50a500536 100644 > --- a/drivers/net/iavf/iavf_rxtx_vec_common.h > +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h > @@ -187,8 +187,11 @@ _iavf_tx_queue_release_mbufs_vec(struct > iavf_tx_queue *txq) >=20 > i =3D txq->next_dd - txq->rs_thresh + 1; > while (i !=3D txq->tx_tail) { > - rte_pktmbuf_free_seg(txq->sw_ring[i].mbuf); > - txq->sw_ring[i].mbuf =3D NULL; > + if (txq->sw_ring[i].mbuf) { > + rte_pktmbuf_free_seg(txq->sw_ring[i].mbuf); > + txq->sw_ring[i].mbuf =3D NULL; > + } Could you explain how to reproduce this issue in the commit log. Looks like it is to fix the scenario that queue stop and start again and so= me mbuf will be double free at some time? > + > if (++i =3D=3D txq->nb_tx_desc) > i =3D 0; > } > -- > 2.34.1