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 3F8C2A0A0B; Mon, 1 Feb 2021 09:44:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C645716064D; Mon, 1 Feb 2021 09:44:30 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id B781240693 for ; Mon, 1 Feb 2021 09:44:29 +0100 (CET) IronPort-SDR: XpYyIEtK87s+6479V358WflwpWd8Qlc1szJUIMVP2CZIciArnTEWb+O3pAb0m65Hr3VqjH332X bKW6Z2lIS7Eg== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="167756970" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="167756970" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 00:44:27 -0800 IronPort-SDR: EPRoDYk6gNe3KiR+5z09VCEGTX26VOaIP8xMf2u7qr8jnVeQL4UudRLV+g4yR5yptk67Xuh4kH 25z8jGSifyYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="369353717" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga008.fm.intel.com with ESMTP; 01 Feb 2021 00:44:27 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 1 Feb 2021 00:44:26 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 1 Feb 2021 00:44:26 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) 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.1713.5; Mon, 1 Feb 2021 00:44:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDW/uCTyA9eIwNYR9S7rltFe417ForgtigqjanIhxXBPDtW0qhat+y1xeFRlrpYjrb8pXmGwMD0wcSwJy4meDSPvTm5MdvPt1OVMkBTYmxklgk8DMDUZt/1cATcs31kBhyCS5kNSmebDwbZfRuQ7SezfNlX2JQsV5CiMtlxTdPXgj+0vELPVHnaX+3gUCp8M5lEzufNrlTWfzwH7iHEgiVuaiDIsvDNCCr9Dp7+JOtSjOj2p4MWBg4AK0jTf4OnhEvBtXa4M9PRTekw8UMLQFNuFdTzACRCz+nZQWHHNxkKGM4PIsccEjWg90XnU7tERydEQJ1ZKMaYzBLbNJlHVAw== 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=cRtiMUvZROwDaANRPmEQoQBKIeWV5YKemd7ABCPuzH4=; b=MMLDYklnU/e8jd8YJgKFR3Kffm2FiCaiTDBx34Mlkb0ghFbwDt8C/nczVKt2hkcdJX0FYOKGy7dvqzGwclUBSdnWB1C1UUe+i19mZfT/v8oGiZ13UcDrO8LMzQI2ikpxv26LrvCgEkPG3YChLwShF2WC9j0kQ5KhA+XBRc6qigBLAZ/s5VcgENWx/deYd3Ny3R6k/uKh+vbj6lXI/IRgw9iyHU2TuLr/HfC+b1JLgt7mX+ARvs4lFGHfn0pdoDdrB8ysm9tRf/O3PgN2bsAWQc4ZZ/NuLzovAoq1c0CTgnNdQH83VjpmYUktXhOCCpw0P2f/IK7uyUocsYJmKUMs/w== 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=cRtiMUvZROwDaANRPmEQoQBKIeWV5YKemd7ABCPuzH4=; b=DDQbVCEuhUh8KZZjg8RKxu542p6NApBvIX2p6EWfdQHcY6LbboxMpwQYd4dY0jLEE2/ZCihCF8Mmu/DqSeFv3+ktlB72fHdgEBv6yix5+8jTsp883loUIg8d7vKGSFMfLRk3zGpQGac+giCJSbHhUs3xALMhrxC6ZG+WwL+dVtA= Received: from BYAPR11MB2648.namprd11.prod.outlook.com (2603:10b6:a02:c7::10) by SJ0PR11MB5118.namprd11.prod.outlook.com (2603:10b6:a03:2dd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.22; Mon, 1 Feb 2021 08:44:22 +0000 Received: from BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::281e:c126:2abc:b2a]) by BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::281e:c126:2abc:b2a%4]) with mapi id 15.20.3805.024; Mon, 1 Feb 2021 08:44:22 +0000 From: "Wang, Yinan" To: Maxime Coquelin , "dev@dpdk.org" , "Xia, Chenbo" , "olivier.matz@6wind.com" , "amorenoz@redhat.com" , "david.marchand@redhat.com" CC: "Ling, WeiX" , "Jiang, YuX" Thread-Topic: [dpdk-dev] [PATCH v4 00/44] net/virtio: Virtio PMD rework Thread-Index: AQHW88xvl3P/dCQQg0q59E1JmWPy4KpDA+gw Date: Mon, 1 Feb 2021 08:44:22 +0000 Message-ID: References: <20210126101639.250481-1-maxime.coquelin@redhat.com> In-Reply-To: <20210126101639.250481-1-maxime.coquelin@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e1e5bb3c-c6ae-4687-377f-08d8c68d927f x-ms-traffictypediagnostic: SJ0PR11MB5118: 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:3631; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: edKBQTU0KaY+HKm65Lk7m1QXHHIFdKWl+37uYp7EUFsW4x32ERODODt5i8NSbiQLUlEaHUbkhCYtFWGUVO5gQ86GBb4vKTAPtNz9/tBd+264iVtRGL97V9vnrdMFMACK8f0g7Bp6M283VOd/zLDGTXY7KOz0ldPAuELl9JIGUmQGlz9lt4R9d52PqVi66kXJ0+Bc6LMYNgkP+0Fs3T2B6U1CkvQSvRfhIYbFMrTd/W/tmxlOeiaSO7uwOIMrXSC5IGVxFJrvQOi+5SAxiNjxryLDrBjlVKUmd1h41AmiytsDvRSFGccbnYlOz7CEe6eoJ8LeC0gJY8/xpiWgpJDQFjJUQ/NaY1qqK7FnUNy5rjiWa1yzpJra38ymhFP24cBeGmd7Hwdfy5LGTVTqS+kt9QqCc08BxQ9uwg0RWsiowbNhXnR7Ukut724h4C+oW6kLVM+LMB6qn1LiQ/r4YvOoQ8zUiNa1rM86G4Z5cF5o7HmiQ5YNVYRP9izz/oaqlWlW5XjeDMHLPGJn44juksQqCzjwOMVY37iUJtXPgGQPbiDBaECJi20zsD3TbwHTnJlaupsML0JO8Cl7wBSNPjDE3Ev7XpyOfJI6EZ4NtbRu2zQ= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2648.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(366004)(396003)(346002)(39860400002)(86362001)(4326008)(9686003)(107886003)(5660300002)(55016002)(66476007)(66556008)(64756008)(66446008)(52536014)(66946007)(8676002)(76116006)(110136005)(54906003)(316002)(478600001)(966005)(33656002)(186003)(7696005)(2906002)(71200400001)(8936002)(26005)(6506007)(83380400001)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?Windows-1252?Q?GxgWJZsplni8cFHkktg4td4J3pqC0IaKs6Kev3+bJDiU42yFPokserDx?= =?Windows-1252?Q?33+DdIxi/6Ehmto4gc6yU6pexYBNdZHfurVDw/9T/c6NyYYDK7VfsUKn?= =?Windows-1252?Q?IUx26YLhlYFEiXTfdI/UcR3RwziSQy7lQ1oDozs7M6zwqe5drrebAzqA?= =?Windows-1252?Q?P9AfIiyXMKVHZ9ttWRJwQNsdn0H8j8rVi9OiSjWYdHwprTYeA2ZHOb9e?= =?Windows-1252?Q?yADrahQvZ7rJa0tM+ij74efc9ylRL4pYWVRqAVtMIr+ZyNC/pjs2B81/?= =?Windows-1252?Q?DZsY9s9bGeH+PWr0KEACch//YGTcgRqvxK73eY2ghJJRuYnNh4NNIfSz?= =?Windows-1252?Q?znJRDhxzJXHOjJTn3KU0vQgzS+Tg+2rje1Tr9/sXkNK5oTJdhJr+3XJL?= =?Windows-1252?Q?5J7o9U7xhIcu0KkNo6FsoxHCiGoet1CIuixN9Lm0SwPpK5JWP0ve8yok?= =?Windows-1252?Q?d7ZBuWHuZGvJA1OeY/LQMBHLAGTIQRRTtIF0pct2aKUtORjCUiTRG4gk?= =?Windows-1252?Q?Fdjgr61smGBW/ROt3yOExmNQEiqZdAv0r3owqY+T5ep1IrahfYIKMgEf?= =?Windows-1252?Q?HBYPe4H+pz7LiI48wZ3K1dBkZgXWTajyzOLlg8ka0Q6/XQfNdja7dLk9?= =?Windows-1252?Q?VFvLMPzGwfZcyPvFGIYNiSkAoBJ7oAxDEJIuolaLggSZTm/Dco6rvv6u?= =?Windows-1252?Q?Rk110fI+V6Q8u/034h22cDmw1LY17dXlfPQvK0amTr0D27KWFxEiuhU/?= =?Windows-1252?Q?pmuNJAEUXcOf1XzCMUAgD9qTwmUZWIfkjduBqOI4IrMuJVZJa8iqtqil?= =?Windows-1252?Q?8SytbOc/m90BczNRBDQ65QQd0b3rpO0pYJiWKi8xNlwao5qeGxQyZp/G?= =?Windows-1252?Q?IfQ4KbgaY05PeJP39c5FtupJ+ik+UBRYfulOdBjypWrtt7gMKj0k/mnU?= =?Windows-1252?Q?c4jHuUCCAuDJc4RnCZdhOXEWe6AUgNGLRlrzAZn2f7D8ENtt4a+3ZrbZ?= =?Windows-1252?Q?Dr4Bbua2FIieavqqvTwzRlXGnKmiQZ71t/AHPjNvYxuBzFKCHcVpw+M7?= =?Windows-1252?Q?oeDAQ4OyW8SGo5JPl4iIcZKIms7YcJbrgFexelq18Lgx84hXBjJ3i+Kn?= =?Windows-1252?Q?uXtkbxciQqLg1QQqMkRIZl9d?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2648.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1e5bb3c-c6ae-4687-377f-08d8c68d927f X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2021 08:44:22.1695 (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: 1DNltf8uTj+5K5sQsLZvmwNW2BfJgeVYzNrUntJeqH1e72OHfbcLy0yG1x0dJF0NtjBx13F/vHom8DLSIEnarQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5118 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 00/44] net/virtio: Virtio PMD rework 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" Hi Maxime. We found three virtio issues and bad commit is this patch set. Could you he= lp to take a look? https://bugs.dpdk.org/show_bug.cgi?id=3D631 Issue1: vdev_primary_secondary/Virtio_primary_and_secondary_process: start = dpdk-symmetric_mp occur core dumped in vm Issue2: start testpmd occur core dumped in vm when use more than 1 virtio-p= md. https://bugs.dpdk.org/show_bug.cgi?id=3D630 issue3: hotplug_mp/attach_detach_virtio_user: The host display is abnormal = after dpdk-hotplug_mp exits BR, Yinan > -----Original Message----- > From: dev On Behalf Of Maxime Coquelin > Sent: 2021?1?26? 18:16 > To: dev@dpdk.org; Xia, Chenbo ; > olivier.matz@6wind.com; amorenoz@redhat.com; > david.marchand@redhat.com > Cc: Maxime Coquelin > Subject: [dpdk-dev] [PATCH v4 00/44] net/virtio: Virtio PMD rework >=20 > This V3 fixes comments from Chenbo on patch 44 and > implements the ABI exception in patch 2. >=20 > This series significantly rework Virtio PMD to improve > the Virtio-user PMD and its backends integration. >=20 > First part of the series removes the dependency of > Virtio-user ethdev on Virtio PCI, by creating generic > files, adding per-bus meta data, ... >=20 > Main (if not single) functionnal change of this first > part is to remove the hack for Virtio-user to work in > IOVA as PA mode, this hack being very fragile. >=20 > Second part of the series reworks Virtio-user internal, > by reworking the requests handling so that vDPA and Kernel > backends no more hack into being Vhost-user backend. It > implies implementing new ops for all the request types. > Also, all the backend specific actions are moved from the > virtio_user_dev.c and virtio_user_ethdev.c to their > backend files. >=20 > Only functionnal change in this second part is making the > Vhost-user server mode blocking at init time, as long as > a client is not connected. The goal of this change is to > make the Vhost-user support much more robust, as without > blocking, the driver has to assume features that are going > to be supported by the client, which is very fragile and > error prone. As a side-effect, it also simplifies the > logic nin several place of the virtio-user PMD. >=20 > Main changes in v4: > - Add ABI exception (David) > - Close FDs only up to max_queue_pairs > - virtio_user_dev_uninit_notify() to return void >=20 > Main changes in v3: > - Rename .intr_event to .intr_detect > - Rework last patch, properly clean allocated resources > on failure. > - Rebase on top of latest net-next/main > - Minor typo fixes in comments and log improvements >=20 > Main changes in v2: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > - Introduce vdev driver flag for drivers to require IOVA VA mode > - Rebase on top of -rc1 changes > - Fix regressions introduced in V1 (vhost-kernel broken, vhost-user > reconnect...) > - Various minor issues & typos fixed > - Fix status feature issue introduced in v20.11, only reproduceable now t= hat > server > mode is made blocking > - Improve failure handling in Virtio-user > - Improve logging >=20 > Testing coverage (All passed) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > - Virtio-pci PMD > * Virtio PMD in guest with Vhost-user backend in host > * Virtio PMD in guest with Vhost-kernel backend in host > - Virtio-user PMD with Vhost-user backend > * Vhost-user PMD server <-> Virtio-user client PMD IO loopback > * Vhost-user PMD client <-> Virtio-user server PMD IO loopback > * Vhost-user PMD client <-> Virtio-user server PMD reconnect > - Virtio-user PMD with Vhost-kernel backend > * iperf test case > * Txonly testpmd > - Virtio-user PMD with Vhost-vDPA backend > * vdpa-sim (IO loopback) > * CX-6 DX Kernel vDPA (Tx only) >=20 > Maxime Coquelin (44): > bus/vdev: add helper to get vdev from ethdev > bus/vdev: add driver IOVA VA mode requirement > net/virtio: fix getting old status on reconnect > net/virtio: introduce Virtio bus type > net/virtio: refactor virtio-user device > net/virtio: introduce PCI device metadata > net/virtio: move PCI device init in dedicated file > net/virtio: move PCI specific dev init to PCI ethdev init > net/virtio: move MSIX detection to PCI ethdev > net/virtio: force IOVA as VA mode for Virtio-user > net/virtio: store PCI type in Virtio device metadata > net/virtio: add callback for device closing > net/virtio: validate features at bus level > net/virtio: remove bus type enum > net/virtio: move PCI-specific fields to PCI device > net/virtio: pack virtio HW struct > net/virtio: move legacy IO to Virtio PCI > net/virtio: introduce generic virtio header > net/virtio: move features definition to generic header > net/virtio: move virtqueue defines in generic header > net/virtio: move config definitions to generic header > net/virtio: make interrupt handling more generic > net/virtio: move vring alignment to generic header > net/virtio: remove last PCI refs in non-PCI code > net/virtio: make Vhost-user request sender consistent > net/virtio: add Virtio-user ops to set owner > net/virtio: add Virtio-user features ops > net/virtio: add Virtio-user protocol features ops > net/virtio: add Virtio-user memory tables ops > net/virtio: add Virtio-user vring setting ops > net/virtio: add Virtio-user vring file ops > net/virtio: add Virtio-user vring address ops > net/virtio: add Virtio-user status ops > net/virtio: remove useless request ops > net/virtio: improve Virtio-user errors handling > net/virtio: move Vhost-user requests to Vhost-user backend > net/virtio: make server mode blocking > net/virtio: move protocol features to Vhost-user > net/virtio: introduce backend data > net/virtio: move Vhost-user specifics to its backend > net/virtio: move Vhost-kernel data to its backend > net/virtio: move Vhost-vDPA data to its backend > net/virtio: improve Vhost-user error logging > net/virtio: handle Virtio-user setup failure properly >=20 > devtools/libabigail.abignore | 2 + > drivers/bus/vdev/rte_bus_vdev.h | 6 + > drivers/bus/vdev/vdev.c | 29 + > drivers/net/virtio/meson.build | 6 +- > drivers/net/virtio/virtio.c | 71 ++ > drivers/net/virtio/virtio.h | 246 +++++ > drivers/net/virtio/virtio_ethdev.c | 457 +++------ > drivers/net/virtio/virtio_ethdev.h | 6 +- > drivers/net/virtio/virtio_pci.c | 448 +++++---- > drivers/net/virtio/virtio_pci.h | 286 +----- > drivers/net/virtio/virtio_pci_ethdev.c | 226 +++++ > drivers/net/virtio/virtio_ring.h | 2 +- > drivers/net/virtio/virtio_rxtx.c | 90 +- > drivers/net/virtio/virtio_rxtx_packed.h | 10 +- > drivers/net/virtio/virtio_rxtx_packed_avx.h | 10 +- > drivers/net/virtio/virtio_rxtx_packed_neon.h | 10 +- > drivers/net/virtio/virtio_rxtx_simple.h | 3 +- > drivers/net/virtio/virtio_user/vhost.h | 79 +- > drivers/net/virtio/virtio_user/vhost_kernel.c | 461 ++++++--- > .../net/virtio/virtio_user/vhost_kernel_tap.c | 25 +- > .../net/virtio/virtio_user/vhost_kernel_tap.h | 1 + > drivers/net/virtio/virtio_user/vhost_user.c | 898 ++++++++++++++---- > drivers/net/virtio/virtio_user/vhost_vdpa.c | 323 +++++-- > .../net/virtio/virtio_user/virtio_user_dev.c | 573 ++++++----- > .../net/virtio/virtio_user/virtio_user_dev.h | 21 +- > drivers/net/virtio/virtio_user_ethdev.c | 301 +----- > drivers/net/virtio/virtqueue.c | 6 +- > drivers/net/virtio/virtqueue.h | 45 +- > 28 files changed, 2742 insertions(+), 1899 deletions(-) > create mode 100644 drivers/net/virtio/virtio.c > create mode 100644 drivers/net/virtio/virtio.h > create mode 100644 drivers/net/virtio/virtio_pci_ethdev.c >=20 > -- > 2.29.2