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 BE17BA0C4C; Tue, 28 Sep 2021 14:18:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEBCF410DC; Tue, 28 Sep 2021 14:18:55 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A65A440DF6; Tue, 28 Sep 2021 14:18:53 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="285697656" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="285697656" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 05:18:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="438053547" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga003.jf.intel.com with ESMTP; 28 Sep 2021 05:18:52 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 05:18:52 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 05:18:52 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 28 Sep 2021 05:18:52 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 28 Sep 2021 05:18:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e2NBEj1HstsQ2F9zCQyvWCUIheaLn8eeNHW7iwZEEDYmViyttR5w99Q2SXIxNGv+GXsMwjia7AoMSH4WsuNIW2v6GyN7Le6IaCjYuauvVaZLJfqBv6nhEfzGyevEgTy7rEKLHdqitVtrEwP3kpG96n8uXn4safofYyHK7kDrlih7bA3Ia4zVzfah3RXnP1RSNGXbKDBpFouX+1QORs2z1empcPNghoZhNN/LbaohkLEkiSQMdrpcV+g6HQdMgZcgM8siTrJ2+dGMk5MhSLpErjneoDByzgxvzSYXy7JIHl/fhmPzPfHZ4b23cbB1VjTcrfreGLWRZogUh2i89KL9jg== 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; bh=8ONb6mHDjCNVZ21KPmG6eawLtSNKbEqbIQ+CPEWwvUw=; b=Zk//dcclXpfGYEuHjt+ZewGMN1eSIhqrtoSJ3EXNjBMoFV3S4ZS22rgpKkoYctUnQAD77pnSkSxDFFtROtlHlvB0X6k4Ar8UXm9Zt3iqpmJ2Wi+HQGQCNIFgUURl03OXoqUt+0dO7bASimR/qlcZqUoG4aFdAPbOG3jEiqVS2cevHgxRkYQjjl23BLCWRkvS2dlV26TNf9SN4x78747N3CurYRn2/GQ1W88nIek89C2HRXOTt6s82/aNcdXYD52cDMbRFLugBZ0c+UqMvuPoJrx9YOcOLl0Y9BecCw0Aj2/anApzJMAbIa1n3MnM7hfwHwpRbAGiI7rTsOsJ7QAznw== 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=8ONb6mHDjCNVZ21KPmG6eawLtSNKbEqbIQ+CPEWwvUw=; b=FUk6Dw7WN+eitpYNquwicgIwz1t7LOmOvBH3Jowf6v/RzvZBSOp8Xgr/V6f9EfVekBzU9hq9ZyTQLYrJeOqg30pSbW+3SuKYJSyHZPS5xMZLQinr8qhzcdrR9T8zPRw1DC1PDIDNerqfmtTgYd8XRtd7WYtkro0y3tkVl4ZWY7s= Received: from DM4PR11MB5518.namprd11.prod.outlook.com (2603:10b6:5:39f::18) by DM6PR11MB2699.namprd11.prod.outlook.com (2603:10b6:5:ce::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.18; Tue, 28 Sep 2021 12:18:49 +0000 Received: from DM4PR11MB5518.namprd11.prod.outlook.com ([fe80::a1a3:f5ec:2121:415c]) by DM4PR11MB5518.namprd11.prod.outlook.com ([fe80::a1a3:f5ec:2121:415c%7]) with mapi id 15.20.4544.022; Tue, 28 Sep 2021 12:18:49 +0000 From: "Wang, Haiyue" To: "Meunier, Julien" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Richardson, Bruce" Thread-Topic: [PATCH v2] net/ixgbe: fix RxQ/TxQ release Thread-Index: AQHXtEC3yQZLxkReiUW8oWJDRCKcyKu5XUOg Date: Tue, 28 Sep 2021 12:18:48 +0000 Message-ID: References: <20210927171815.16216-1-julien.meunier@nokia.com> <20210928081238.16782-1-julien.meunier@nokia.com> In-Reply-To: <20210928081238.16782-1-julien.meunier@nokia.com> Accept-Language: zh-CN, 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: nokia.com; dkim=none (message not signed) header.d=none;nokia.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: df3fcf19-0bfb-42f9-15f6-08d9827a2060 x-ms-traffictypediagnostic: DM6PR11MB2699: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qchvCbqZJZ+csN6OE6+i0azsM4ox8C/q3lycAvtu+PB6lsjDvfnfrQkLlQeOeZ2JBszcOn6dy580GJkOXE3uVNBo3rjT1LlXIUSqoa0fIe5OCJEdWT2tqoKOnEs6zeeR7LK/UYqD1OzGNrFPcAdj+URj8L96yLsZ8B6VxzKFjdyTPDfGYTtXfogS9yh+ows8By7Xg4g9AmQVZP4fyjLZaw/gt/fx0bO3fh+fv0AYLCvpmSLLQHdiHJqg3fparV3GytIzXqYlnbhQMNa6HIjPm+87Tmip32J0rrpCHuA5cpACmOY0FRN4LZac/8D/MqJwlrtnSO4+07sqpBemr2xwN6/7trH7SMAqmhVGHnDk9xbxudo6mu86pnnoRn3aTF77b2NuwlCEK+8hEajRrixOt/m81XJCVkqJXhgQUB84LXc5Gdc6JzGSElC3Go+7k1RTzCkOJh6ugiLhcf3ZX5Ws+Q9JU4euxw/nhJHNDxsCoX/8YF5pn8/UvxePDc23w/7GavDX4VzSaf8J18pjXkT8LRb+c8bGa0HvRBqPGK9dnCwUMlfrQug0INrjczAzcZLdXTharBktIzZ6OUMlmCZ5ZmardHwWNQdErniDEuKD/6a1WDsKzsLdNLohEhAYUA4zxuE0q8UvM81BLcmmktEFmYcYK5Pi687VdVpiLNpjgTAFPxtnceZ4LimAAxwjM+txw7WFNJN8bbq534Y29bFV3g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5518.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(2906002)(110136005)(38100700002)(6506007)(33656002)(107886003)(8676002)(83380400001)(9686003)(508600001)(54906003)(38070700005)(86362001)(8936002)(296002)(316002)(186003)(122000001)(55016002)(5660300002)(71200400001)(53546011)(76116006)(66946007)(66556008)(64756008)(52536014)(66446008)(66476007)(7696005)(26005)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BZJ+rmQUk7/74ZNUCfd5j8Q+U0/HwduqaE8Qhwsxxjs5Swi/hBuKgGXrQ/3G?= =?us-ascii?Q?1TbD1gX7sKa2YdZu5GQnTpq+BE+pyNu+geFtDzLzHUQkaYqo8ZRyo/qDfRJZ?= =?us-ascii?Q?RzDqOX8HKEIu7Xdxpn7zU4QbVt4YbSBPEO8Twht0QVg60rjnzj7uSiNXrN8M?= =?us-ascii?Q?viUzmb2CXDgGVqRGT9qByyHdvDG5OSQfZbcwGpQxX3OVmq0Twa86Ak/CPB/4?= =?us-ascii?Q?1gpGOUo+JHvyWQnr3R+7B5EH6NXYsQ4iMN+NOzxOYDUGBgIflojIJ+NPr6K2?= =?us-ascii?Q?JakXm45vfLuCHyDiEfCwIhRECOMxb/6wgKs7webgfPkNa952vWAz11pCdFuz?= =?us-ascii?Q?HVIQGHEWmhqc+q1ubkDYY3Av2GY6kA6M2tCsiLk3RMngEVoqTONYEH9VRmod?= =?us-ascii?Q?tbOB3ReXOfXlq7Ys1AtuzNzES8oqh/iajnH+oOc8rX4zMs7Pvtb+3sWjAu1k?= =?us-ascii?Q?FMYxHvvxJJT/HtxwdU/4Hz90H7xNmT52ATetsSxf2rJkvRwVaHe2XdARTUgk?= =?us-ascii?Q?G+ioKq5zAdQuYTMVBLJszhULg8mbTszzjakHF+qSxNV3loxso1EmmEMWd3SB?= =?us-ascii?Q?s9CvvrNGMIw7UAdNobFbJ79jSOb9AS+of68bDfFgbPL3QyodEfzQaHcYHnLl?= =?us-ascii?Q?T3WL3LUDxOCQySmQQzoYpLQ/bLFUDZBnwfow6bplevSBvWuXSpUIDv6fP5rM?= =?us-ascii?Q?m5CSfa1SnfwCmc9fgMtS8lZP8y5C252vGYyxq+5+Q1AAtIRhLs3TLI7m8Rgo?= =?us-ascii?Q?tbYcxC3ULO/IzcsqgoqxAqB65iKSCzX8615wrSl1Sdy8i1nh5qIhKOBl5q53?= =?us-ascii?Q?0k07IRrQbMHfXLsdynp5NWp05wJdl6crWgXqzjjGA57Bb9DJu2sQvRYmE8IX?= =?us-ascii?Q?W28nP41JMXN4eZjzzSWPshcvDZvrowYAD+cXf6uRWavqdOezZHS9pOt3QsYG?= =?us-ascii?Q?PR39hDtuvKQaiu0oVvhNtO6wIc6+oDENT2GWKdfuwaAVVtioE6cPYcN0X2cb?= =?us-ascii?Q?V/noavRErMLGnhlP5zNwJlIZEgrP3f1ZhKOIn1Ym4X0J3FMiua1YmeE9wCYE?= =?us-ascii?Q?/e+zX9ZvJcwz4QhltIY7hIpDee8feDEroQ907RywguWgIhoA1+hJLDqYGhoW?= =?us-ascii?Q?hFFpl0tVXxAVMXRzhxNTYoRJ37AbInjM7nQuNboyLUd4MD5sbIzyOe+Hp4GA?= =?us-ascii?Q?j/ETAGdtW+P9Tl5Ktlt+eQ/OUycr5VUW5XXrZcm7VRE74r+wmKZOjDJwKOLO?= =?us-ascii?Q?nHI1uSi93Z01mbbOavA8XSg10R6GO39BKDG1ASnx+a1PVH9BN7/Q5g3gU6me?= =?us-ascii?Q?WYKlj+VNtx9zWFrXXbogunRw?= 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: DM4PR11MB5518.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: df3fcf19-0bfb-42f9-15f6-08d9827a2060 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2021 12:18:48.9329 (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: B/Cd3e99SyA6cZwOm/qyxmrSBtC32s/f2EhH5lVm8z5/JoI+3w3dxfPXX287eB2IFF7ey5ccOCfQYk3YREl7Qg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2699 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release 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 Sender: "dev" > -----Original Message----- > From: Julien Meunier > Sent: Tuesday, September 28, 2021 16:13 > To: dev@dpdk.org > Cc: stable@dpdk.org; Richardson, Bruce ; Wang= , Haiyue > > Subject: [PATCH v2] net/ixgbe: fix RxQ/TxQ release >=20 > On the vector implementation, during the tear-down, the mbufs not > drained in the RxQ and TxQ are freed based on an algorithm which > supposed that the number of descriptors is a power of 2 (max_desc). > Based on this hypothesis, this algorithm uses a bitmask in order to > detect an index overflow during the iteration, and to restart the loop > from 0. >=20 > However, there is no such power of 2 requirement in the ixgbe for the > number of descriptors in the RxQ / TxQ. The only requirement is to have > a number correctly aligned. >=20 > If a user requested to configure a number of descriptors which is not a > power of 2, as a consequence, during the tear-down, it was possible to > be in an infinite loop, and to never reach the exit loop condition. >=20 > By removing the bitmask and changing the loop method, we can avoid this > issue, and allow the user to configure a RxQ / TxQ which is not a power > of 2. >=20 > Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") > Cc: bruce.richardson@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Julien Meunier > --- > drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 Acked-by: Haiyue Wang > -- > 2.17.1