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 AADD7A0545; Mon, 20 Jun 2022 14:34:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D35B4069C; Mon, 20 Jun 2022 14:34:47 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id AB3CA40151 for ; Mon, 20 Jun 2022 14:34: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=1655728485; x=1687264485; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BQm5fBPLBO0RPwDctFp2qvCaRkqrtz+NOFg+y043CqQ=; b=lXMUbKDszTqbhVBaBaxjRS6htkjXO6OCxw8KdvKRMKXFen+dwznBlMH8 DMoNQ88JEY2219+kJw6YE1Bd8p8Qt7OjUdlZTeCyIlksPslVg3xPZ8d+3 AT+o6a3oHE1KZX0Nv05snqqNlzEMp6s8MuJvHHridKKFslo9QfcMGdGVx z7k8DHChG2mvoVDley+qvgQmBGXM7URdJWET887/lwBumfslcVJFBasL6 u0soC1kKOtUcUg3NkFAWxrMpKyIQVulLnmq9K3yTN3HzPO3chvZLUAh1S Quj4OuPwSiLTuF42sEzCt7iJ3T1xtDRkE/c277zcP7e5Zkk0CxAzV5SBO A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="343875957" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="343875957" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 05:34:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="689442725" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga002.fm.intel.com with ESMTP; 20 Jun 2022 05:34:23 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 20 Jun 2022 05:33:39 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 20 Jun 2022 05:33:39 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 20 Jun 2022 05:33:39 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 20 Jun 2022 05:33:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aaZS9RZimVbqTcpuP5Hg5WXdzx4NLd+sBJTXVOpYvXiU8GiWZ2u+mvDrDaPLxmtX61T+g4tqF6FTIte66JCsyn6NpxAjLetFAKEoT3GOPfx55RDOlg56Nl8xTiFWRhQV9IX366mkUWbdACbHH6tSiRWXQ2otkZI3QVQ+mr19UlAWHRBM+eAn300RlJdi6Qmlg6efgGfv2l9AlF2+C8hIyOjDwsEroYa+7XDrB5M+RgHHQ4NcqN1cWGcaBq5pgwa+zh+v++d/SFYzt+CnfnGMoNxwNg0bpoaRnkoa/GIr0pFlX9xQjq3vCgZLyx4AEaHq1tUwmbNbDXqepkLlpoN2Jw== 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=TdHSH+HaawtbPOBJqjC87mGi150hhECP/91FGCZxcJE=; b=nKL65+SzQt22jMBo4I2toubEOd1enMsmkKquH+2c37ApavW29IYoL+jUV5NFBYf5yPsGjS64/Mwwv1c8TfKk768ihxmqCFNZ8LvJq/i1mykgqAQdej5pZ7pxfoFYXMktDZzYUaUxvxZ0ECeEekdicIDvDfjYs4vp9ZNzPlIoheL9pp3tb/WqVwAUGVmYYOMDh6R14R2FVVEHDYtX+grbCqRqhB1prifQc8fAioS0cnTy66Kp13FNxgTiuJLv49FyFXL69DIsxqoTX/0hFB6LRhfeE5BBwhegEIdpspnTtmKHa7RJjsOEvFpDzbTmfv/epnJ+tN9ahmVxW+SqNblUoQ== 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 BL0PR11MB3187.namprd11.prod.outlook.com (2603:10b6:208:67::19) by BYAPR11MB3592.namprd11.prod.outlook.com (2603:10b6:a03:fb::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.20; Mon, 20 Jun 2022 12:33:31 +0000 Received: from BL0PR11MB3187.namprd11.prod.outlook.com ([fe80::914f:e4e5:adad:3551]) by BL0PR11MB3187.namprd11.prod.outlook.com ([fe80::914f:e4e5:adad:3551%6]) with mapi id 15.20.5353.022; Mon, 20 Jun 2022 12:33:31 +0000 From: "Jiang, Cheng1" To: Maxime Coquelin , "Xia, Chenbo" CC: "dev@dpdk.org" , "Hu, Jiayu" , "Ding, Xuan" , "Ma, WenwuX" , "Wang, YuanX" , "Yang, YvonneX" Subject: RE: [PATCH] add support for async vhost packed ring dequeue Thread-Topic: [PATCH] add support for async vhost packed ring dequeue Thread-Index: AQHYfwOuJ1jbxdpi/0u6GyoAC8gT761Tn7MAgASlHKA= Date: Mon, 20 Jun 2022 12:33:31 +0000 Message-ID: References: <20220613082159.40077-1-cheng1.jiang@intel.com> <1737263f-55b6-2116-b57f-c700a48c3967@redhat.com> In-Reply-To: <1737263f-55b6-2116-b57f-c700a48c3967@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ded888ae-0c44-422a-c3a7-08da52b915b8 x-ms-traffictypediagnostic: BYAPR11MB3592:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bKu13rVrimuhEsPJE9GvlIq6OdBgy9JP2RrFUMAAyYvj6hDkXt51Bm3sFIeqMVDBtpstcC8ysXrfk3BC9gpIo5mLTMgsZoj96wsIfHcIiYWgA8LjiyhhLPLgd9f6Qsap54V3CGGsgyPfBno44u3ZN7uGLL0FGQv7DajQ3bQ+NOSr//zZkLdizVn0MsaJazeQd9EWt1GhKTA4koWFVX+Gnv52Aw1WqVQyBy2jPGJsGf5RlHVZs7NSGhz8CzRkus6kdeMyzpyiU6YA/MdUs+WlClJcLGsGjpdeFAMyKwyTqM6UQnSBgwhhAF+D/4DQOtRcKmjETiws81e4qUzFfrFFXIy0F+ZnAS8bXODzEQhIRx2NtjICit0BAVCbT1pA+fhFAkECXj2mtV6gCTVz8pszEFofaLRx9ay4h/1Q9rPWONcyL6bNELJdLh6JFgLvltER7XVwoTgm0lsWvOULci88WY+mn9O/hAuotUAFFt9vR0pDsNyEzdZk/5L6FCzG2no/pmuyDOTrAF/Dm63VF+Lj82WeuvsyIk2ENScFD1SOMsBXXPGt1A5uxB2MTPg5na0Dxu0faZltQmBzUlNim3IWPSnq1kHmoSwd/StVSqqd4fA5MOQBHDCUgQfgGQ5q8rh7gIzHjHwXYiedsF8v/bfKQZCP+GdFybC9YqbGOiu+ETMxBJo0RUbrDRPuEspX8rArNanjlLgNr4ExqFmyZBOQNw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3187.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(53546011)(4326008)(6506007)(71200400001)(6636002)(54906003)(7696005)(2906002)(86362001)(110136005)(26005)(66556008)(9686003)(64756008)(8676002)(122000001)(38070700005)(82960400001)(66476007)(76116006)(66946007)(66446008)(83380400001)(33656002)(8936002)(52536014)(5660300002)(186003)(498600001)(38100700002)(316002)(107886003)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VF2syxa7Ur7hEIHsIIxkRpqodFsd1AodrRcQZI2QbuXBDdL/C20oPLXQD9HN?= =?us-ascii?Q?/Hp35cLQkEzj+1Ws+lvDptel4U9LpDppMDK5snrFvAQp8O2dp8v14npM3Lrj?= =?us-ascii?Q?NgnEg3D4kQP0FmFaNWErNx6EBMq78uwbs+AWHiEpwEdIdesCd8uVrW9OJrJ7?= =?us-ascii?Q?kHcGHyhAuZFUpQzHiPLnyBDkcN0tdd/MV7RXwaNxFjXXm+lWaGGGDaDwN3IY?= =?us-ascii?Q?tXw1zWcgrHcR2WmpoLcET7OMuKmr2U4wxMvzOZ1yBQsM/ZeQDifcdVi85S1n?= =?us-ascii?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ejbpKR?= =?us-ascii?Q?E3mqTH3UEo1n5RwqeqRY9NqmrdVXtK27Jh0sHsrcD54BoLbBZU2LXz+q6Vu2?= =?us-ascii?Q?hhlgxSnma7vNW3j94gv8SIhJSMnTtZ5JuTYIzQZ8XCja+CBYkuaLteeSt2CR?= =?us-ascii?Q?M3IViIm1BhHkGV67vnkFFuzN0bdZXJcLRrSx0OXLeVsOULyL31tTDTFExtAM?= =?us-ascii?Q?C8PNT6OUqOO7scMC5jqGefMhr1I2E4IQsklyJwl7a0w2VrBHgIv2ltgB6YBX?= =?us-ascii?Q?NQSxfKCgJdO719mOeycw9g5RBqRUvrESLP80htRUtcWM9udczldft2WN87Av?= =?us-ascii?Q?/PjpR5Ui8CG4dGO4SLIncY1cdqcWgVmOMd5L1TXpiun922HL0cIrfxjM4e8u?= =?us-ascii?Q?iINbn/QJZYiyhaonO529JMUTptikPYuwAk2mQL6r+euwhA/DB2W2CtKy9Mu3?= =?us-ascii?Q?kcmfzfoFqVdyJeUiQT58+hBRzcBmbt+qxo9vYQn+4+7BSsSLd4y11X8UjMZK?= =?us-ascii?Q?DEbDVaWhP8Ds2qGNsWTMfBYt363dSUwEhCdsNvxvwPEIBxKKf+zLwJ3JJx7+?= =?us-ascii?Q?znCs1SkOGg=3D=3D?= 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: BL0PR11MB3187.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ded888ae-0c44-422a-c3a7-08da52b915b8 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2022 12:33:31.2579 (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: PWZyokD4IIpPFrSI6sfmjri7w5HZUms8CIsP0IxGmoTfQtCA6S/6YjfsDz4EEc5QDGV35izvIRYjpJCbGFL5dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3592 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 Hi Maxime, Sorry for the late reply. I missed this email somehow. > -----Original Message----- > From: Maxime Coquelin > Sent: Friday, June 17, 2022 9:34 PM > To: Jiang, Cheng1 ; Xia, Chenbo > > Cc: dev@dpdk.org; Hu, Jiayu ; Ding, Xuan > ; Ma, WenwuX ; Wang, > YuanX ; Yang, YvonneX > Subject: Re: [PATCH] add support for async vhost packed ring dequeue >=20 > Hi Cheng, >=20 > On 6/13/22 10:21, Cheng Jiang wrote: > > This patch implements packed ring dequeue data path for asynchronous > > vhost. > > > > Signed-off-by: Cheng Jiang > > Reviewed-by: Maxime Coquelin > > --- > > lib/vhost/virtio_net.c | 218 > ++++++++++++++++++++++++++++++++++++----- > > 1 file changed, 192 insertions(+), 26 deletions(-) > > >=20 > I had to do below changes so that it builds with the series clearing infl= ight > packets for async dequeue. >=20 > Does that look good to you? >=20 Yes, it looks good to me. Thanks a lot. Cheng > Thanks, > Maxime >=20 >=20 > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index > 0d41e850d2..229e6b32f4 100644 > --- a/lib/vhost/virtio_net.c > +++ b/lib/vhost/virtio_net.c > @@ -27,7 +27,7 @@ > #define MAX_BATCH_LEN 256 >=20 > static __rte_always_inline uint16_t > -async_poll_dequeue_completed_split(struct virtio_net *dev, struct > vhost_virtqueue *vq, > +async_poll_dequeue_completed(struct virtio_net *dev, struct > vhost_virtqueue *vq, > struct rte_mbuf **pkts, uint16_t count, int16_t dma_id, > uint16_t vchan_id, bool legacy_ol_flags); >=20 > @@ -2207,12 +2207,7 @@ rte_vhost_clear_queue_thread_unsafe(int vid, > uint16_t queue_id, > n_pkts_cpl =3D vhost_poll_enqueue_completed(dev, queue_i= d, > pkts, count, dma_id, vchan_id); > else { > - if (unlikely(vq_is_packed(dev))) > - VHOST_LOG_DATA(ERR, > - "(%s) %s: async dequeue does not > support packed ring.\n", > - dev->ifname, __func__); > - else > - n_pkts_cpl =3D > async_poll_dequeue_completed_split(dev, vq, pkts, count, > + n_pkts_cpl =3D async_poll_dequeue_completed(dev, vq, pkts= , > count, > dma_id, vchan_id, dev->flags & > VIRTIO_DEV_LEGACY_OL_FLAGS); > } >=20 > @@ -2271,12 +2266,7 @@ rte_vhost_clear_queue(int vid, uint16_t queue_id, > struct rte_mbuf **pkts, > n_pkts_cpl =3D vhost_poll_enqueue_completed(dev, queue_i= d, > pkts, count, dma_id, vchan_id); > else { > - if (unlikely(vq_is_packed(dev))) > - VHOST_LOG_DATA(ERR, > - "(%s) %s: async dequeue does not > support packed ring.\n", > - dev->ifname, __func__); > - else > - n_pkts_cpl =3D > async_poll_dequeue_completed_split(dev, vq, pkts, count, > + n_pkts_cpl =3D async_poll_dequeue_completed(dev, vq, pkts= , > count, > dma_id, vchan_id, dev->flags & > VIRTIO_DEV_LEGACY_OL_FLAGS); > }