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 BF04CA0540; Mon, 20 Jul 2020 09:05:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87FE41BEE4; Mon, 20 Jul 2020 09:05:01 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2064.outbound.protection.outlook.com [40.107.21.64]) by dpdk.org (Postfix) with ESMTP id 37EA61BEE3 for ; Mon, 20 Jul 2020 09:05:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dvmUGejteIvs7qDo52cdUyiilZp5I+Gcw/8C89f816ujwDQ4pA1erYZnTSP38+WpOq9S3C5qZbmJLLQ3OP+hsq+uyBn35cMJxXHfIZpnBma0Jv5HQUxgZ9c4cJyZedXYyvWzRlvU8raJ1qm9Gfty/mCf1+kC9Q07bEjLrob/xRxYo8LOn4CAR05CqMTa4SCOnIgr8qHBBNQUMWmNjdv6WPvK6QbXNV1JP0rdiyB003AoNRhWLtXkD0swPKLfQKnEj2DUPSEhZEM8a8cDtFBafMSpiLPbx3cPcoRT5Wuy7b/OTA4urpmFkiQfu/JCaKYHQBnk2hk7aEmAIlN1z5v/sg== 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=unJbI6vkYRvnW8hYlRMEtwmZLK3EsZf5tAJKWUGvjxI=; b=bz+Lvh8+p7mHCTGHh2IF0fZcoNu59XvvXySWBxADkhWNj7h4iRVJ7dketaxhXf/aqksF9rGLBWp15OuKGYeyUCNJ7n9724RDYGsWkJ0Ji3wJQFRJydaP44SOSVh57XGBAnA4t86YY67WF3q6aOBF7vbN0GlFMGPmR0FIe4iKIXN+drEZORa+6rd21r78qLUbEb0Y7i/GTE2J/JFkMiIHLoO/AV2AZvOpHROfHM0+7YfwAaXwac26Pl6PjJ8mZ0OosVPoicLL+KR5jFfXIWpVuacQ7ZMwi851TJGYV3kRjWkQui3x7ilk4W+X/YJXz9/xk0Z7D/862Ye6cJxq5R7Pzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=unJbI6vkYRvnW8hYlRMEtwmZLK3EsZf5tAJKWUGvjxI=; b=fuPz6YpGuqYuw3rk05fMZxTgpncNwnXApphdbA6qg4Jb705cYOMCBaXUYt/dGKmXNIdaI0tt1XZJT2LjKrVYmMxnJLJX453ApfgeQdUV/CHxPDCgWJoVk5PeATueELmXotUfyBu1qxvABJVrihLgv4YCrDLtoUC/kKrypaDGEQ8= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM4PR0501MB2161.eurprd05.prod.outlook.com (2603:10a6:200:51::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.23; Mon, 20 Jul 2020 07:04:58 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012%5]) with mapi id 15.20.3195.025; Mon, 20 Jul 2020 07:04:58 +0000 From: Raslan Darawsheh To: Slava Ovsiienko , "dev@dpdk.org" CC: Matan Azrad , Thomas Monjalon Thread-Topic: [PATCH v2] net/mlx5: add queue start and stop feature Thread-Index: AQHWXeJHksItvqxuuku5Vpr16o67nqkQDB3A Date: Mon, 20 Jul 2020 07:04:58 +0000 Message-ID: References: <1594996628-25657-1-git-send-email-viacheslavo@mellanox.com> <1595172937-21424-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1595172937-21424-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [84.242.49.134] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6b077654-6dfc-4f31-44af-08d82c7b36d0 x-ms-traffictypediagnostic: AM4PR0501MB2161: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NMie11SmUwBFgU/t2gIn6PN9yMfWPeIVA9BFbZhgxnlgFc7lgJ24t+kyjGYsmQcWzDZ46OERd3YS0kzGT6+KRnosO4vCP+6OnhjMo+pevrNtGrLkN8XwEJzbhj9BawTRei/wB2Ns5QbxtwcYpUfhN3nFFH/hJ3PM4pmv1r3NMFXNW2Mr31LWCIpev6YEFPSg7dfmyatviNd+5uUD0ULo3CrQC52bNsQzWV5Sd/GqbZ4GVjYt8swPy15BbsC4M33FRkhzI34H+ToAmVL+zV5q2n1gtrVOc805ue/xrWmwl1+2K8Wg2n83mkBmxwVJ/qv6 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(396003)(376002)(346002)(39860400002)(366004)(4326008)(9686003)(86362001)(478600001)(76116006)(52536014)(186003)(64756008)(66556008)(66476007)(66946007)(2906002)(54906003)(110136005)(8676002)(316002)(8936002)(7696005)(66446008)(71200400001)(6506007)(53546011)(83380400001)(26005)(55016002)(5660300002)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: pME2pB+1ceinvvcseNfFaPWv+2OAq6aMx9ueQATNU/fGGUEOJ7Pu+cxuZZwyYoXWn9krBrii1H3iKh8b7HQu5pE1ynh44uPJ/W8bGHHBt2ghBh8Hqvn9jyym8+kfr+G4zt1naiW1aLKzeqqHpYR3CaYMprNO7XuHcyTvcEkWWVwF/T7zsS//B04NOSLWezMh1Dgy9/+IVHn6NdlAQ+pFa5ShA2E+kpye5KboE2TKtbnFMZ+2GGvycIYm9MN8+L9NyKdXiX5all6PHv0n3Sbf55V3vYznzApB5OYnBCg2XFywt0tkfkSNu/80FiXRAvRyvEgaPWJuSVn3EYijSq9b4vH8Fq8cmBr6ac7Bmr3En+mS/2DeMedeIniQZrz8BMKV0b/Nnshk9UXsY9U6ZD446w9lB9l8Jrw9SIjoC+eDi1EvrEI6Ngs5+Z2fdhqdn9B26PHC6We57Sp0zk0NSEHxRR5knqXnt0Pc0cE6Dzsh3c+BPTL1kDlg/dk9uQiZ/sl1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB6707.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b077654-6dfc-4f31-44af-08d82c7b36d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2020 07:04:58.3859 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jLHYesJBXgOCGtMNmah+lp3JjJlxux81S34iD9XjBpL7nWVSdEVlWQHBbiz7s6mEh2E7TBl/zwTPI1JPtSg9Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2161 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: add queue start and stop feature 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" Hi, > -----Original Message----- > From: Viacheslav Ovsiienko > Sent: Sunday, July 19, 2020 6:36 PM > To: dev@dpdk.org > Cc: Matan Azrad ; Raslan Darawsheh > ; Thomas Monjalon > Subject: [PATCH v2] net/mlx5: add queue start and stop feature >=20 > The mlx5 PMD did not support queue_start and queue_stop eth_dev API > routines, queue could not be suspended and resumed during device > operation. >=20 > There is the use case when this feature is crucial for applications: >=20 > - there is the secondary process handling the queue > - secondary process crashed/aborted > - some mbufs were allocated or used by secondary application > - some mbufs were allocated by Rx queues to receive packets > - some mbufs were placed to send queue > - queue goes to undefined state >=20 > In this case there was no reliable way to recovery queue handling > by restarted secondary process but reset queue to initial state > freeing all involved resources, including buffers involved in queue > operations, reset the mbuf pools, and then reinitialize queue > to working state: >=20 > - reset mbuf pool, allocate all mbuf to initialize pool into > safe state after the crush and allow safe mbuf free calls > - stop queue, free all potentially involved mbufs > - reset mbuf pool again > - start queue, reallocate mbufs needed >=20 > This patch introduces the queue start/stop feature with some > limitations: >=20 > - hairpin queues are not supported > - it is application responsibility to synchronize start/stop > with datapath routines, rx/tx_burst must be suspended during > the queue_start/queue_stop calls > - it is application responsibility to track queue usage and > provide coordinated queue_start/queue_stop calls from > secondary and primary processes. > - Rx queues with vectorized Rx routine and engaged CQE > compression are not supported by this patch currently >=20 > Signed-off-by: Viacheslav Ovsiienko > --- >=20 > v2: - rebase > - address comments for commit messages >=20 >=20 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh