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 2CF6DA04DC; Tue, 20 Oct 2020 03:52:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 887C7BAB8; Tue, 20 Oct 2020 03:52:40 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9D0A0BA7A for ; Tue, 20 Oct 2020 03:52:35 +0200 (CEST) IronPort-SDR: 9mCHcEdVtKlM2xkNSPFnVp2Ba7vnWwhqEZcmtUrnfWl9ojYnQDyrBmi5GcZ7U6TxTw+6J8eh7i X9pE7nJWhs3w== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="167226299" X-IronPort-AV: E=Sophos;i="5.77,395,1596524400"; d="scan'208";a="167226299" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2020 18:52:33 -0700 IronPort-SDR: PzMfNdZnGv5LNfRiQxIiQX6BygVdNAZ+Rx+miiEbyO+no+zQevyBCpLVl9prS6m6RKgG4kyfWH m3/pcwWXsPJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,395,1596524400"; d="scan'208";a="465747618" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 19 Oct 2020 18:52:32 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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.1713.5; Mon, 19 Oct 2020 18:52:32 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 19 Oct 2020 18:52:31 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 19 Oct 2020 18:52:31 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 19 Oct 2020 18:52:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L2Psf+/lbkb6kh6uhvH35qDFCOF9SqyDOONQo1ieG5wrAqTsXMeG7KCPXRWfGn1qhNfbkOHqEXDCKcKpS9at6Y0q2pO5ZIRcYHE3iw/FCVNCzfWJbHixwXCtXeH1R0VxdZhQVvIz5AQxC3mfVw1lrA6cxZssq679JCW2dt7TxgRk2fn68nUPMgbvpVO0hIyhfMj+S3Bh98DUOWoCV7GSGtC7VyB/zYkaS5+/xZzFWtu0Yo0vLE10nJIyvLeeto07nTRZ40MYN/qavE9+pM9CXNK/aTDFrZheFd9EoGmaSLuJU9cW2wuxyBN+QSD1vtfqT6oIOR248NEdyzNf+BiF9Q== 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=u5MUO5bqbcJViP060g19HUUnUsvhyqxX3h+nxU4SIx0=; b=FPY9NMbdnU4d68W/rpzq5RGOWx1jjoLvMKAmsygUS4dVs3CX4awFb7cAgf3cy3PSdUC4bUX26WfiQ3PlvYmQEeGljxphGiCxtgFFeiuXsLahGUcUYMH2Sg6u6P3pyQEYmrqouQbG2b/XXrBuz6MJkwrod78iZKlB9woK89ZEhe1InTrMI6NtbG7gbDO84mmfT7i9EbDFHfK6C+QagnZ7Nx27qyMmivE7kRLgdSoxSiMZbmkkRuRZpckQTllJsR3751DjbrjJ/D+QqhTFfZUGxERJ4WwC6zhGifc2nqhcOt7h/jr4ZZd5cM6TtZj5xQ/Cdvi911U062gqrFYyNhDOOw== 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=u5MUO5bqbcJViP060g19HUUnUsvhyqxX3h+nxU4SIx0=; b=jg6XzvqAT2Fk9Vul0M7uVcWeQFaicOuhuwj3U1Hw8gBaJEXJmssWhc1r6enqxo9990KPnEu7vkwdt909AG8vIJD7LVBFnI/1zUa1IYrG21jQ0pvnYpczjhxMqXC3b3QoZQlMoJOON1VZ+zLWV8S9Q+uitamHK6sfS0pHC+5wH88= Received: from BYAPR11MB2648.namprd11.prod.outlook.com (2603:10b6:a02:c7::10) by BYAPR11MB3431.namprd11.prod.outlook.com (2603:10b6:a03:8d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.25; Tue, 20 Oct 2020 01:52:29 +0000 Received: from BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::990c:c0a1:b470:1916]) by BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::990c:c0a1:b470:1916%6]) with mapi id 15.20.3477.028; Tue, 20 Oct 2020 01:52:29 +0000 From: "Wang, Yinan" To: Maxime Coquelin , "dev@dpdk.org" , "Xia, Chenbo" , "Fu, Patrick" , "amorenoz@redhat.com" Thread-Topic: [dpdk-dev] [PATCH v3 3/8] net/virtio: move backend type selection to ethdev Thread-Index: AQHWlnvV8UzSLAoMzEaf98ns6JWpQKmZzMXggAYM2aA= Date: Tue, 20 Oct 2020 01:52:29 +0000 Message-ID: References: <20200929161404.124580-1-maxime.coquelin@redhat.com> <20200929161404.124580-4-maxime.coquelin@redhat.com> In-Reply-To: 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: ed2163ac-a9e1-42d1-9968-08d8749acd8d x-ms-traffictypediagnostic: BYAPR11MB3431: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5KBqRyPAmRm7OGLVezG0E7Uj0nGh2oKpegXgeBZfOeIxPxL9VI/NKyNwMx/bQEeMm9wTLYRrRuEjFTbSNrq86EIiI6YKYxa/Vx+yegg8n1U5vLugtwMv0U+WGvyh9OurjUqmoARR5udy74OWtog+nKAbm4TLtNVKNPsxwd4ZxlS8MAQttvlda34aLNSSuUVeL/SpJtCO9teAZA9t88XxJubmSrSoqhd15r4Bby3DSeNBO4YxaSs8g8G/dGKfZ3H59JdYp+0/Wo786NJR6Nv2mxuiL58cPt72FL2xLgnrvQXQ3sKNFCu1UhX5cVoTnLdUP304sUD7IOdJkiepp9OWRs0l59veKuh1QSXAWDSqwoiVEDpbMA7S/kSbfR+4vOsHNDEXXM+R8ToGRcm53FNXJQ== 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)(39860400002)(396003)(366004)(346002)(136003)(376002)(110136005)(316002)(966005)(2906002)(478600001)(8936002)(55016002)(83380400001)(186003)(66556008)(64756008)(66446008)(86362001)(66946007)(66476007)(76116006)(9686003)(5660300002)(71200400001)(33656002)(52536014)(26005)(7696005)(53546011)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: RQ8FQzzBqZHNOjhBywX5SKQgmsySbHOTLHRkdV+6X80Yxl9oBVTju8oNdV6XCtpgEN7ofz3mARZ2UFB3V0Ar2ejQAcXf6qtvRnhI9PNxKjn5f+N6OqIDNchM89P3nABnS1ILsW5k8COdHwSaR5o5CGf5i0VTkOVtNVWQgZAjzYxBcxYx5d5H+s9KWTUUYw6a6+9v5Ty10HN+VYrQM6mg+sAqt+HI51M6mK6o5j75d0v1taaRn3ymYZ0jWbvWTMqvGiDz0MT/gpKPQbjU/a7sLqz0Pt/eRX9Ac4XAz3yAqXFRgf/5gUK4ixUWqIc7hTFQt6Dyp0YS3k/bFKvn8Ult3FcvjeZyRcmigtyziRQ4znwjT0U//9O4ZSu2m2YdUIAWRFwPSbcjP+LtFKYRgUtPuV3Yj0Vh7zaufiNZ9PtaOFOV/QvrxADWbGEaHZhBbKM++hztn9F7/uxnELtxU4OSE3pieudX9HK+bPGh0SO7LgxEozq+kM4/6uGzDstr7wM5+9ExJSJS3bCqEpRlDEXFulDJBxrgP1aXZoqBV+eZO1BPxCwUTljrVs6lBrzWhNcCk3Mtrr60Mfxx1q+QKgYDttZCE1ECjY09k+2bWE4+2J1YZ9e8gT9rvGjPylNDLNDT9kKRw4dwuWdCPSWX9aENsg== 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: ed2163ac-a9e1-42d1-9968-08d8749acd8d X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2020 01:52:29.3750 (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: a5B9iAXcSUP/i8cmL5KM41gdZasIDrFhSrUXtB+niGjRsM7VOJnmrdcgLMN3gDqR4NeA/TY+kP8dGlRmOCduWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3431 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/8] net/virtio: move backend type selection to ethdev 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 Adrian/Maxime, Could you help to take a look at this issue? Most of automated regression c= ases will be blocked due to this issue in 20.11 RC1 test. Thanks in advance! BR, Yinan > -----Original Message----- > From: Wang, Yinan > Sent: 2020?10?16? 13:42 > To: Maxime Coquelin ; dev@dpdk.org; Xia, > Chenbo ; Fu, Patrick ; > amorenoz@redhat.com > Subject: RE: [dpdk-dev] [PATCH v3 3/8] net/virtio: move backend type sele= ction > to ethdev >=20 > Hi Adrian, >=20 > This patch introduce a regression issue that vhost-user can't launch with= server > mode, details in https://bugs.dpdk.org/show_bug.cgi?id=3D559. > This issue blocked amount of regression cases, could you help to take a l= ook? > Thanks in advance! >=20 >=20 > BR, > Yinan >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Maxime Coquelin > > Sent: 2020?9?30? 0:14 > > To: dev@dpdk.org; Xia, Chenbo ; Fu, Patrick > > ; amorenoz@redhat.com > > Cc: Maxime Coquelin > > Subject: [dpdk-dev] [PATCH v3 3/8] net/virtio: move backend type select= ion to > > ethdev > > > > From: Adrian Moreno > > > > This is a preparation patch with no functional change. > > > > Use an enum instead of a boolean for the backend type. > > Move the detection logic to the ethdev layer (where it is needed for th= e > > first time). > > The virtio_user_dev stores the backend type in the virtio_user_dev > > struct so the type is only determined once > > > > Signed-off-by: Maxime Coquelin > > Signed-off-by: Adrian Moreno > > --- > > .../net/virtio/virtio_user/virtio_user_dev.c | 37 ++++++++----------- > > .../net/virtio/virtio_user/virtio_user_dev.h | 11 +++++- > > drivers/net/virtio/virtio_user_ethdev.c | 28 +++++++++++++- > > 3 files changed, 50 insertions(+), 26 deletions(-) > > > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c > > b/drivers/net/virtio/virtio_user/virtio_user_dev.c > > index 2a0c861085..b79a9f84aa 100644 > > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > > @@ -111,17 +111,6 @@ virtio_user_queue_setup(struct virtio_user_dev *de= v, > > return 0; > > } > > > > -int > > -is_vhost_user_by_type(const char *path) > > -{ > > - struct stat sb; > > - > > - if (stat(path, &sb) =3D=3D -1) > > - return 0; > > - > > - return S_ISSOCK(sb.st_mode); > > -} > > - > > int > > virtio_user_start_device(struct virtio_user_dev *dev) > > { > > @@ -144,7 +133,8 @@ virtio_user_start_device(struct virtio_user_dev *de= v) > > rte_mcfg_mem_read_lock(); > > pthread_mutex_lock(&dev->mutex); > > > > - if (is_vhost_user_by_type(dev->path) && dev->vhostfd < 0) > > + if (dev->backend_type =3D=3D VIRTIO_USER_BACKEND_VHOST_USER && > > + dev->vhostfd < 0) > > goto error; > > > > /* Step 0: tell vhost to create queues */ > > @@ -360,16 +350,16 @@ virtio_user_dev_setup(struct virtio_user_dev *dev= ) > > dev->tapfds =3D NULL; > > > > if (dev->is_server) { > > - if (access(dev->path, F_OK) =3D=3D 0 && > > - !is_vhost_user_by_type(dev->path)) { > > - PMD_DRV_LOG(ERR, "Server mode doesn't support > > vhost-kernel!"); > > + if (dev->backend_type !=3D > > VIRTIO_USER_BACKEND_VHOST_USER) { > > + PMD_DRV_LOG(ERR, "Server mode only supports > > vhost-user!"); > > return -1; > > } > > dev->ops =3D &virtio_ops_user; > > } else { > > - if (is_vhost_user_by_type(dev->path)) { > > + if (dev->backend_type =3D=3D > > VIRTIO_USER_BACKEND_VHOST_USER) { > > dev->ops =3D &virtio_ops_user; > > - } else { > > + } else if (dev->backend_type =3D=3D > > + > > VIRTIO_USER_BACKEND_VHOST_KERNEL) { > > dev->ops =3D &virtio_ops_kernel; > > > > dev->vhostfds =3D malloc(dev->max_queue_pairs * > > @@ -430,7 +420,8 @@ virtio_user_dev_setup(struct virtio_user_dev *dev) > > int > > virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queu= es, > > int cq, int queue_size, const char *mac, char **ifname, > > - int server, int mrg_rxbuf, int in_order, int packed_vq) > > + int server, int mrg_rxbuf, int in_order, int packed_vq, > > + enum virtio_user_backend_type backend_type) > > { > > uint64_t protocol_features =3D 0; > > > > @@ -445,6 +436,8 @@ virtio_user_dev_init(struct virtio_user_dev *dev, c= har > > *path, int queues, > > dev->frontend_features =3D 0; > > dev->unsupported_features =3D ~VIRTIO_USER_SUPPORTED_FEATURES; > > dev->protocol_features =3D > > VIRTIO_USER_SUPPORTED_PROTOCOL_FEATURES; > > + dev->backend_type =3D backend_type; > > + > > parse_mac(dev, mac); > > > > if (*ifname) { > > @@ -457,7 +450,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, c= har > > *path, int queues, > > return -1; > > } > > > > - if (!is_vhost_user_by_type(dev->path)) > > + if (dev->backend_type !=3D VIRTIO_USER_BACKEND_VHOST_USER) > > dev->unsupported_features |=3D > > (1ULL << VHOST_USER_F_PROTOCOL_FEATURES); > > > > @@ -539,7 +532,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, c= har > > *path, int queues, > > } > > > > /* The backend will not report this feature, we add it explicitly */ > > - if (is_vhost_user_by_type(dev->path)) > > + if (dev->backend_type =3D=3D VIRTIO_USER_BACKEND_VHOST_USER) > > dev->frontend_features |=3D (1ull << VIRTIO_NET_F_STATUS); > > > > /* > > @@ -792,7 +785,7 @@ virtio_user_send_status_update(struct virtio_user_d= ev > > *dev, uint8_t status) > > uint64_t arg =3D status; > > > > /* Vhost-user only for now */ > > - if (!is_vhost_user_by_type(dev->path)) > > + if (dev->backend_type !=3D VIRTIO_USER_BACKEND_VHOST_USER) > > return 0; > > > > if (!(dev->protocol_features & (1ULL << > > VHOST_USER_PROTOCOL_F_STATUS))) > > @@ -815,7 +808,7 @@ virtio_user_update_status(struct virtio_user_dev *d= ev) > > int err; > > > > /* Vhost-user only for now */ > > - if (!is_vhost_user_by_type(dev->path)) > > + if (dev->backend_type !=3D VIRTIO_USER_BACKEND_VHOST_USER) > > return 0; > > > > if (!(dev->protocol_features & (1UL << > > VHOST_USER_PROTOCOL_F_STATUS))) > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h > > b/drivers/net/virtio/virtio_user/virtio_user_dev.h > > index 9377d5ba66..575bf430c0 100644 > > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.h > > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h > > @@ -10,6 +10,12 @@ > > #include "../virtio_pci.h" > > #include "../virtio_ring.h" > > > > +enum virtio_user_backend_type { > > + VIRTIO_USER_BACKEND_UNKNOWN, > > + VIRTIO_USER_BACKEND_VHOST_USER, > > + VIRTIO_USER_BACKEND_VHOST_KERNEL, > > +}; > > + > > struct virtio_user_queue { > > uint16_t used_idx; > > bool avail_wrap_counter; > > @@ -17,6 +23,7 @@ struct virtio_user_queue { > > }; > > > > struct virtio_user_dev { > > + enum virtio_user_backend_type backend_type; > > /* for vhost_user backend */ > > int vhostfd; > > int listenfd; /* listening fd */ > > @@ -60,13 +67,13 @@ struct virtio_user_dev { > > bool started; > > }; > > > > -int is_vhost_user_by_type(const char *path); > > int virtio_user_start_device(struct virtio_user_dev *dev); > > int virtio_user_stop_device(struct virtio_user_dev *dev); > > int virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int = queues, > > int cq, int queue_size, const char *mac, char **ifname, > > int server, int mrg_rxbuf, int in_order, > > - int packed_vq); > > + int packed_vq, > > + enum virtio_user_backend_type backend_type); > > void virtio_user_dev_uninit(struct virtio_user_dev *dev); > > void virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue= _idx); > > void virtio_user_handle_cq_packed(struct virtio_user_dev *dev, > > diff --git a/drivers/net/virtio/virtio_user_ethdev.c > > b/drivers/net/virtio/virtio_user_ethdev.c > > index 60d17af888..38b49bad5f 100644 > > --- a/drivers/net/virtio/virtio_user_ethdev.c > > +++ b/drivers/net/virtio/virtio_user_ethdev.c > > @@ -6,6 +6,7 @@ > > #include > > #include > > #include > > +#include > > #include > > > > #include > > @@ -518,6 +519,19 @@ get_integer_arg(const char *key __rte_unused, > > return -errno; > > } > > > > +static enum virtio_user_backend_type > > +virtio_user_backend_type(const char *path) > > +{ > > + struct stat sb; > > + > > + if (stat(path, &sb) =3D=3D -1) > > + return VIRTIO_USER_BACKEND_UNKNOWN; > > + > > + return S_ISSOCK(sb.st_mode) ? > > + VIRTIO_USER_BACKEND_VHOST_USER : > > + VIRTIO_USER_BACKEND_VHOST_KERNEL; > > +} > > + > > static struct rte_eth_dev * > > virtio_user_eth_dev_alloc(struct rte_vdev_device *vdev) > > { > > @@ -579,6 +593,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev) > > struct rte_kvargs *kvlist =3D NULL; > > struct rte_eth_dev *eth_dev; > > struct virtio_hw *hw; > > + enum virtio_user_backend_type backend_type =3D > > VIRTIO_USER_BACKEND_UNKNOWN; > > uint64_t queues =3D VIRTIO_USER_DEF_Q_NUM; > > uint64_t cq =3D VIRTIO_USER_DEF_CQ_EN; > > uint64_t queue_size =3D VIRTIO_USER_DEF_Q_SZ; > > @@ -631,8 +646,17 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev) > > goto end; > > } > > > > + backend_type =3D virtio_user_backend_type(path); > > + if (backend_type =3D=3D VIRTIO_USER_BACKEND_UNKNOWN) { > > + PMD_INIT_LOG(ERR, > > + "unable to determine backend type for path %s", > > + path); > > + goto end; > > + } > > + > > + > > if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_INTERFACE_NAME) =3D=3D 1= ) > > { > > - if (is_vhost_user_by_type(path)) { > > + if (backend_type !=3D VIRTIO_USER_BACKEND_VHOST_KERNEL) { > > PMD_INIT_LOG(ERR, > > "arg %s applies only to vhost-kernel backend", > > VIRTIO_USER_ARG_INTERFACE_NAME); > > @@ -751,7 +775,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev) > > hw =3D eth_dev->data->dev_private; > > if (virtio_user_dev_init(hw->virtio_user_dev, path, queues, cq, > > queue_size, mac_addr, &ifname, server_mode, > > - mrg_rxbuf, in_order, packed_vq) < 0) { > > + mrg_rxbuf, in_order, packed_vq, backend_type) < 0) { > > PMD_INIT_LOG(ERR, "virtio_user_dev_init fails"); > > virtio_user_eth_dev_free(eth_dev); > > goto end; > > -- > > 2.26.2