From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C33FA051A; Sat, 20 Jun 2020 05:27:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 032931BF80; Sat, 20 Jun 2020 05:27:53 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BB3B61BF7F for ; Sat, 20 Jun 2020 05:27:51 +0200 (CEST) IronPort-SDR: M+2ZHDOFhGwTkyhDzdQJb3uBUdRI4HEwzGoeJCkBxEUI+54UkCKF6HpR1H7eKLCHdhZSU1ci24 3Pa/5uB8c14A== X-IronPort-AV: E=McAfee;i="6000,8403,9657"; a="141486183" X-IronPort-AV: E=Sophos;i="5.75,257,1589266800"; d="scan'208";a="141486183" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 20:27:50 -0700 IronPort-SDR: uNDFJBK6L05ds+kHYt8cRRmqYDlAw+fShtCehjg+xLUAskCtKoFGr3wGWo31SOgAVrqUWccf6t GraROEM8GrPg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,257,1589266800"; d="scan'208";a="267258283" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 19 Jun 2020 20:27:50 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jun 2020 20:27:49 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jun 2020 20:27:49 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jun 2020 20:27:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g8I05tbcmxFbsHBtXZt1AOHDizKbJj0/7aOHwRxpYyksbPFfEimJTukXRh4hMW1n7JYvQkLTpMdUoXkBmamGNujV0TZU27KL7kruZUbwPQhfNHvIaWxNFIIL1FhE7+xewRLJG1BpQ9OT2SI/UPEjmuZ0VG0vXHZej5UightXmNxKDmZZFAJdUXx+W3silEV8zxyFHtynR9cykv+GughxJWOGWFm84rrM0Y6fyR4sF8o7YHnIiIZ1KHk1yk1VlItjnJa3SyCLRjDbtGBhhKI4tm2Pen+0ZHq+2kLBnOIfkA+eKMeWlGqEC/h8uvLsxHXqO6/RbWPkiywFhSxVOMYVXQ== 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-SenderADCheck; bh=uoAZcCjlxZvOoF0bLGOkgVbKPgxRwpCEYKeuds5znMA=; b=akxtup8NkGUiU5QlP0ht6WfbSWzgv+WKqLCmnY6oYpTQz8rVFIVMTqHEZeyCpGPyaMYSST7K8TZNF1YgNufpu+dVpvjv7X2oGnTEvlCNIPI7QaUgOxgEhKlIucG1CMfvpI6Jcc2mkiZe0rhp+CvIqJ1eTAyGmIZFIxRNL5scQjFJ3WkNGuzReFcV7uQmrQEgWcSZnB8zFNj+OlXs+pc0UVVN4i8z+Fos/qLRA17ENeomaDVJtkI3kW7TgeUfjoAHPq6+mVP5KmrfnntrpG4qyZwezAece0RSA8GpP5JVJX7rB6Lx3UtbHbU0adE8kAY4R85iD9L3VG5rv0Ghnnfeog== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uoAZcCjlxZvOoF0bLGOkgVbKPgxRwpCEYKeuds5znMA=; b=Q4uvqMQEijOH9AqRLILEFhchY6iiS7QShTUN37+1Y+Q87OwfS6p5DWXvXapUsHJwEFFAYfUA3vCkpBRVOH1i8mTqGFZQYoW8ActoWnhxwmL63Dj81I/a34SQUVctHqRGaKD1ML6kQ6IDtUwW2nScCdSzT3UBU/ZKPoJ67gSET74= Received: from MWHPR11MB1391.namprd11.prod.outlook.com (2603:10b6:300:23::15) by MWHPR11MB1597.namprd11.prod.outlook.com (2603:10b6:301:d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Sat, 20 Jun 2020 03:27:47 +0000 Received: from MWHPR11MB1391.namprd11.prod.outlook.com ([fe80::f8f5:b48c:be92:ac17]) by MWHPR11MB1391.namprd11.prod.outlook.com ([fe80::f8f5:b48c:be92:ac17%3]) with mapi id 15.20.3109.021; Sat, 20 Jun 2020 03:27:46 +0000 From: "Zhao1, Wei" To: Renata Saiakhova , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings allocation Thread-Index: AQHWKSipAAQRDuVoKk2ZXAAXRJKYdKjhEx+A Date: Sat, 20 Jun 2020 03:27:46 +0000 Message-ID: References: <20200513131425.27817-1-Renata.Saiakhova@ekinops.com> In-Reply-To: <20200513131425.27817-1-Renata.Saiakhova@ekinops.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTljY2MwODMtNTZlMy00MThlLWIwZGUtNjExMzU1N2YzMzI4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUFNzUDRwd2VcL051eUpaRGpKclArNDg2ZVwvdTkrSnNYRm5OYUtoU2pSZ1V4UWphM0pkQjN2bzVyXC9idnl0UVVxWSJ9 dlp-version: 11.0.600.7 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action authentication-results: ekinops.com; dkim=none (message not signed) header.d=none;ekinops.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.219] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 70a25aed-245c-4af2-3c33-08d814c9e701 x-ms-traffictypediagnostic: MWHPR11MB1597: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0440AC9990 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ehv/Lit+leA75sJpMHdxfjwpFwn2AtImOzSvFMPo3buJGLS3scIQj1c5LOgtwrL4xpJeZfBNkkd4ca4K+gabkGAEKbI9vMEcHR14noVIUGd3Gz3BqiFCc+zXRngWeuy2rZct0B3MP5xV9PPT9Nb67FG5p9hN8aIqBXeHMO691flrJxSElFsZsEPQwaM1EsFAVJBSIHThJFJYYa++rYPBe0TzaLNGIVkc0PoMQmMPElCDA+5B/1EdBVsP1I5L/zbHPaksZuzu4zO/e3wcFtSeedWzvgt0vWcEq6tBURFS6kdlWArWbE2h4WdBpinHI065u5ShHywfjerDH3BgECPhww== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1391.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(136003)(376002)(396003)(39860400002)(110136005)(5660300002)(2906002)(71200400001)(478600001)(8936002)(52536014)(9686003)(55016002)(316002)(83380400001)(66946007)(66476007)(66446008)(66556008)(64756008)(76116006)(7696005)(26005)(186003)(33656002)(53546011)(6506007)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: xtKNFIp+9DSM524jQkyByNpS5DliNN2swistXQthn/RknxR9I124xivNSpycirJbrH+gOp1gzJbB3uV/br0XooU/GZim9JFC6l8Y8WBC655am1NAXaNBas7s4FCF87upscfJZwJulxdBl8wPRfefEuZXpnh7Ey7p+WD1u3Va4i/zcDVvd/8p+gSPXSJoUG1AnexrxntkmiXEWnGuW20I8/TdvRwebKbUovmeJUVrg0mC31MeGMr1ZyUMFw9r7IfEie0R4I/l/EZbYdxERogRDsEbW4Eu6aS/2j6qUUx52s3hTvHytXsLnjjvwN8d1KcKlYa+lZvH11rKs83nQ0D+XKQXjP2gcCTzVAqx+AtHcywI1u9GyyhusWkAPNCttyRjf+KYFUVs9kiuJumTz6COiQGfrSyEKV2UcxBX5G8Z2ux9TFBDnLhbDBe+XfSj4oh/LDDCRLkh+ttZhwl+a/XATg5AHvOVgSWAyHJdMV3h0QeS+gR4gGS5rEm/HuMFrIZi x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 70a25aed-245c-4af2-3c33-08d814c9e701 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2020 03:27:46.7136 (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: G3DomGPzPB9g+EzZg0zDPB/ZeuAuddx8MdQSWrgkbpQxEZ9NZPaMpRjDhdRc36CKkc6g5PQN3No0NSkjiiZ2Jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1597 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings allocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Reviewed-by: Wei Zhao > -----Original Message----- > From: dev On Behalf Of Renata Saiakhova > Sent: Wednesday, May 13, 2020 9:14 PM > To: dev@dpdk.org > Cc: Renata Saiakhova > Subject: [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings > allocation >=20 > igb and ixgbe and some other drivers allocate HW rings using > rte_eth_dma_zone_reserve(), which checks first if the memzone exists for = a > given name, consisting of port id, queue_id, rx/tx direction, but not for= the size, > alignment, and socket_id. > If the memzone with a given name exists it is returned, otherwise it is > allocated. > Disconnecting dpdk port from one type of interface (igb) and connecting i= t to > another type of interface (ixgbe) for the same port id, potentially creat= es > memory overlap and corruption, because it may require memzone of bigger > size. > That's what is happening from switching from igb to ixgbe having the same= port > id. >=20 > v2->v3: Remove #undef ETH_DMA_MZONE_NAME and minor changes in code > v2->standard > v1->v2: Minor changes on code standard and additional fixes in i40e em > v1->and ice drivers >=20 > Renata Saiakhova (4): > librte_ethdev: Introduce a function to release HW rings > drivers/net: Fix in igb and ixgbe HW rings memory > drivers/net: Fix in i40e HW rings memory overlap > drivers/net: Fix in em and ice HW rings memory overlap >=20 > drivers/net/e1000/em_rxtx.c | 2 ++ > drivers/net/e1000/igb_rxtx.c | 2 ++ > drivers/net/i40e/i40e_rxtx.c | 2 ++ > drivers/net/ice/ice_rxtx.c | 2 ++ > drivers/net/ixgbe/ixgbe_rxtx.c | 2 ++ > lib/librte_ethdev/rte_ethdev.c | 28 ++++++++++++++++++++++-- > lib/librte_ethdev/rte_ethdev_driver.h | 20 +++++++++++++++++ > lib/librte_ethdev/rte_ethdev_version.map | 1 + > 8 files changed, 57 insertions(+), 2 deletions(-) >=20 > -- > 2.17.2