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 7A800A04FF; Tue, 24 May 2022 05:25:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AC0B4014F; Tue, 24 May 2022 05:25:04 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 27CD4400D6 for ; Tue, 24 May 2022 05:25:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653362702; x=1684898702; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=E0wERf3S4hfHJ4WIPE5XSrzrhaurB09SlPS5DxhGVMI=; b=L62zAQhEupLwlG4JMrWTaK1nKvj4AQHIsqrQGyr0xT6st56/R7fl6Vq9 19/xlnqpZhi+RAYJaQ4ZMOmbkuAS3PKNocWKa81A0e0arMrCe+6A5rchx 4i+vSGfWcgQsF7edSfSVlSYCbmZk61dpGDQZ5oRmuRxvs8O4UF4wzkayB 0wx9sZwlKcSpp4XG5JqibTZtDLjteNdTGfWYuipEImcrDwMJszkD2zbs5 ylfQpNNaU6OFZiEryJIfKw33WvaGU54jJ5qydmdQkv2fAi4vPM3w74ACc mRZd2w4VaLLeBy/slzaniA0IMEcKFUfEBIuzPFJ8khoIPHkwM/+1ywHsp A==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="359813976" X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="359813976" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 20:25:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="608510696" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga001.jf.intel.com with ESMTP; 23 May 2022 20:25:00 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.2308.27; Mon, 23 May 2022 20:25:00 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) 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, 23 May 2022 20:25:00 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 23 May 2022 20:25:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GPpbCQ3R+qdeaKnPge4K8iT4E2WekQOemGTqy+B2hYiRaq1XADtznZBxvDAuzeGDQUodINjYbhHGGtQrzuXqkW9UweyPNXW7EZEaj4aHl26ClZICzODkMrjf2WOVFlqGDWunKHhus28P7cG16Uk5jDXaOZj10tVHBGsmiYxg9pEhbMBNFEg1RO42R1PkyXaLaBymbZJPhBGg73Blu9IyG2ID6QYyyyLZa1GkbWP+gKJnCgm5/CwS1PPIyVz6trvfNEZQbx8fpTvEzRmWWH1phvLC6oEE5k49ZoqkIhXSBUo/1QUyLwO0hmAu5xgr/151w/txL9NKulGIeIGyOEe3vA== 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=oHyUmGCKoYZunZkaTYHCse9pOo2iEQz0xf8o2CSrhTA=; b=iQwknpZSboXDJI/iUU0YCo+FQeF9iMGjO6WzN8G84EjEBpJEiILQd6J0kj8NpkD2hzNuMNFioWl8Izrmk11+HXJfcsy09w9SbgTgg5P7hzHJ07JOUaGO2xP80p+sCzk6ukIRjssBFTwh7AUQ4GgbZ9avD7Zk80JJIdpZgH3t3W48m/v5cmlZ4JSLpPGPPN0IxAPnd57Qi2Z/555rr7SX1RuzkfjifYdaN6SFoeSsm8Q4sdSl3LyO4X7s+6AuZBmHDIveQEV/T/nPZnbj+uK7M1Ll/ntChI4rbjOSzfY6s93/zi0kYIX2HZbRGr5Y5n5hmjFrOCrct5+Sgu9cggbHMw== 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 DM5PR11MB1739.namprd11.prod.outlook.com (2603:10b6:3:111::22) by DM6PR11MB2874.namprd11.prod.outlook.com (2603:10b6:5:c9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.19; Tue, 24 May 2022 03:24:59 +0000 Received: from DM5PR11MB1739.namprd11.prod.outlook.com ([fe80::8c3b:8a54:d186:b555]) by DM5PR11MB1739.namprd11.prod.outlook.com ([fe80::8c3b:8a54:d186:b555%11]) with mapi id 15.20.5273.023; Tue, 24 May 2022 03:24:58 +0000 From: "Pei, Andy" To: "Xia, Chenbo" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" , "Xu, Rosen" , "Xiao, QimaiX" Subject: RE: [PATCH v9 03/13] vhost: add vhost msg support for get/set config Thread-Topic: [PATCH v9 03/13] vhost: add vhost msg support for get/set config Thread-Index: AQHYbo8JJZ9+ks3euUOEYycRsYkw4K0tU0aAgAALIlA= Date: Tue, 24 May 2022 03:24:58 +0000 Message-ID: References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1653298524-232138-1-git-send-email-andy.pei@intel.com> <1653298524-232138-4-git-send-email-andy.pei@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.500.17 dlp-reaction: no-action 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: 1ab73687-6997-4a1d-ab26-08da3d34faf6 x-ms-traffictypediagnostic: DM6PR11MB2874:EE_ 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: JaIv+3SmyHAz3my/TT9NUbf5reGjbpJnNaexQaxXDA+T2S2UExvKnaz9Z30sv33846hwyUfzJ3wr+gJkA9IEeKi5envxBBHLEVVDmuvHodgmSROKaYBzdQhj2W5UzuMqwnLV1uTKOHdcbPXsqqeMrRGGJJa+aTxqxcQ+AaT9HD9OzJbxYK4igZVRx7kqKDbckRQNPju9fSm8VWwd9OL53BwonPNT8xzA6kDM7aSxYhqjVw1k0vJMBDTsm8LD7yS++GP5/yOXx3LQXp/Ei37x7j0uvRfnearwUj2kLT970i65Zve/M28jW/5qVUtwLwl6rhJ0o2jgDRSioQZxqSQIic7Rxeb9ECbbdvxdGJKYI16FYKXJmmiov5ucKt6y0pfnbmmjoME+NmiwJLLREqYVyiS89V/3d65fwOI8NjZRm5tCqL+Not0rl8VlK6mAGJj113mD9RfCNWD2xkeukXMI1AStQKsteRnuyamDvMsUBp2F7g3H8NYFefjyuCnRY8eYf2UI5/UtucUW48F/8V6kHNJoEMmpjEHdGuXvFoWsy4z8RW1o0xR0KXerGaElNYIM04hQBx2fAHdDOeQkcmjFvn9yfyxPWRnSHunaYYQ/mS3BwlQa5kB3pvIufcrSQ8Zzebgj8Jzvj37hfsTb4ZmeyLBV4f8mI8fhTehVdx9g+k6csN0LBSrNNCIla9idIMht x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1739.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(38100700002)(316002)(64756008)(107886003)(122000001)(9686003)(26005)(82960400001)(66946007)(186003)(66476007)(66446008)(66556008)(76116006)(54906003)(110136005)(8676002)(6506007)(7696005)(71200400001)(86362001)(4326008)(8936002)(55016003)(38070700005)(52536014)(508600001)(33656002)(2906002)(53546011)(5660300002)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?FYtwdiexwZjFZ0fYk7LNql5WBXBXBgGXY5iKjts/PFqL+LbvFXB8j2qrEP6n?= =?us-ascii?Q?oC4C0IKTLmJofnK2tI8Hy3twOK3NLSmWZzTBL+nBgPmWOIS3XE1iRm1bXDFi?= =?us-ascii?Q?UkfhL+FlEacWej7zA7Walv+QtESvzlT8GrF7riEp1U9HWJtzGfeCStvifSJU?= =?us-ascii?Q?aZfOaYfcksUop/4/WR583UAGohH6LfRU0FnJS6O3IZf6LJk5vA8/uH/aJLAS?= =?us-ascii?Q?oQMdnXm3gE8LDuUHmWFv4jGgGZ3H6a6gixt8iPm778ibkvSoLmhGhaPPE/3s?= =?us-ascii?Q?jkPMP3bGz+ixUXkvkvgpdg3iGkng8AaSULicPuxuWpu8DepbqXV3S2JZu2Ne?= =?us-ascii?Q?bHHuFQcKoV8Etgic3Zn6ZMRC/u29WXeFUVFM/OzTUY108WpxqDHXXI9tkSkD?= =?us-ascii?Q?YvTdLi1mJcIyU7nSxojfQAiSKipheraYwTGKVvelTqYLZ9XLwb1MM95mTacm?= =?us-ascii?Q?GwpAgQ3YPwK+4GhKXnb3JLh+hMSrCguoRujV4p4DN9avILQOkDv/JnYdHBEo?= =?us-ascii?Q?LGGtE+NLu2zcotkbV/Re28fVlv/q4+kdvP9HbEglPY17vZLtR31owwnMVo1d?= =?us-ascii?Q?laV4Gz7nMl0oXuOoDaSrp+uND+p25tZHiPe/vdy55DqCLMTNTShzwoKEhTbu?= =?us-ascii?Q?Pg+DnOhaJe4ilBCwtxzBjew/QPo/NHMgRkanaM+5zQ6roRYFFK7eD6nGuzGf?= =?us-ascii?Q?AFkeqSel0pamlVqWFIEDHtbQvkbc1VRsfTX4mxQRd110JgZfJZZM0WhI9EzY?= =?us-ascii?Q?2v76vLRvBk0IHx51wCuqlPIrtug0MpiWZVaSl60gJRE8E7GB+VciSQNPWGiL?= =?us-ascii?Q?r1FAa3fjGSfHiwlPwoZJ0zXBBAHPodRs4CW8powmeiSRVb+yV7g5wcUBkE0x?= =?us-ascii?Q?HmSYqLZty7eh3e5E6pb1nWbYrMRpcVOzSSVVH7ypLVwgsUIEtI2V9ycobpAe?= =?us-ascii?Q?atDkKcH5nRG2cYv+H3dcjgH54uusABd/QJ4NohKog22zIF+m8B/j1em4MBCu?= =?us-ascii?Q?waTkw7xygb47HFzxw4MzioFafLO2IcMQGYS/28IRwMXBbeR+H/Yew5dmSiyP?= =?us-ascii?Q?hqX6lVkfUx4YS8lxzwzHd3TORLP7HP/HjtvojiRvuxlccG3QOG2xB6yxV1FC?= =?us-ascii?Q?vQEeR1VCH3YkZvP3p5pUPZ6Moe98sjJdndxnaSYxqmMIrhXlGF2UFAizQGAB?= =?us-ascii?Q?d06QRCg94XArLYMZM3mGGMoUZQZiOVPkPJe38H+KI52ErPY+Jw+tPpND520S?= =?us-ascii?Q?l9HB7o/hNZaqYHbNflp+m6dxHAEGr3zl6nvnolSahx1uR+UYAwX+M144hSWL?= =?us-ascii?Q?kteW63VUxEwlmlsecya9dbTOc9X9i2JMABEwSQs++jmgIwckxPlM8mnyTfLM?= =?us-ascii?Q?r5mETX5Y/KUvNVICbhCtys6wpf6k+txRrQfqmrJgtcXeRQz9+YvrzH7Otssl?= =?us-ascii?Q?hTTssAtaASLABJ65OLNey6MmL9aRkaxiQBw6qrA0Q5IdRAup8hNUJcE2U7I6?= =?us-ascii?Q?AzxvD3MTn450ItX9qO8fXNgElS3Jm8ioExVZKk4tXznU/PTxXmrduzxhi/R3?= =?us-ascii?Q?iyvyrHS5w/4vtL70SWjsNpWLo7dWvky1yfIua1MU+VtDQVGz6epTGOKQeeXo?= =?us-ascii?Q?qjfutrjTsT9HT/M+o4+l36QEcv0MMQccrM7AZ/lOsBeTNPfyxPSMjD+5K3/o?= =?us-ascii?Q?zHp07c6Yb4vVtWfYx6W424OTN69JFLxF7y/2wtQIE+NyZnlHv/48wf8aWnSZ?= =?us-ascii?Q?kif71YADSw=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: DM5PR11MB1739.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ab73687-6997-4a1d-ab26-08da3d34faf6 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 03:24:58.3784 (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: nZ2Dxc3T5cJ4B3omjhlxboFIu8y5LjgY/Op3VYJAdgCGAkLRayJAALF3HxlBHd4rh6cmnxf0AsVURoxQd7ijcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2874 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 > -----Original Message----- > From: Xia, Chenbo > Sent: Tuesday, May 24, 2022 10:52 AM > To: Pei, Andy ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng ; Xu, Rosen ; > Xiao, QimaiX > Subject: RE: [PATCH v9 03/13] vhost: add vhost msg support for get/set > config >=20 > > -----Original Message----- > > From: Pei, Andy > > Sent: Monday, May 23, 2022 5:35 PM > > To: dev@dpdk.org > > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; > > Cao, Gang ; Liu, Changpeng > > ; Xu, Rosen ; Xiao, > > QimaiX > > Subject: [PATCH v9 03/13] vhost: add vhost msg support for get/set > > config > > > > Add support for VHOST_USER_GET_CONFIG and > VHOST_USER_SET_CONFIG. > > VHOST_USER_GET_CONFIG and VHOST_USER_SET_CONFIG message is only > > supported by virtio blk VDPA device. > > > > Signed-off-by: Andy Pei > > --- > > lib/vhost/vhost_user.c | 88 > > ++++++++++++++++++++++++++++++++++++++++++++++++++ > > lib/vhost/vhost_user.h | 13 ++++++++ > > 2 files changed, 101 insertions(+) > > > > diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index > > 850848c..b37d814 100644 > > --- a/lib/vhost/vhost_user.c > > +++ b/lib/vhost/vhost_user.c > > @@ -2468,6 +2468,92 @@ static int is_vring_iotlb(struct virtio_net > > *dev, } > > > > static int > > +vhost_user_get_config(struct virtio_net **pdev, > > + struct vhu_msg_context *ctx, > > + int main_fd __rte_unused) > > +{ > > + struct virtio_net *dev =3D *pdev; > > + struct rte_vdpa_device *vdpa_dev =3D dev->vdpa_dev; > > + int ret =3D 0; > > + > > + if (validate_msg_fds(dev, ctx, 0) !=3D 0) > > + return RTE_VHOST_MSG_RESULT_ERR; > > + > > + if (!vdpa_dev) { > > + VHOST_LOG_CONFIG(ERR, > > + "(%s) is not vDPA device!\n", > > + dev->ifname); > > + goto out; > > + } >=20 > In my understanding, this message is only targeted for vDPA device. > Traditional SW back-end will not use it. So if vdpa_dev is not attached, = you > can just return RTE_VHOST_MSG_RESULT_ERR here. Another way is setting > msg size to 0 and reply, but I think in this case. We should just break t= he msg > handling. >=20 OK. I will just return RTE_VHOST_MSG_RESULT_ERR here. > Besides, two lines are enough for the log above: >=20 > + VHOST_LOG_CONFIG(ERR, "(%s) is not vDPA device!\n", > + dev->ifname); >=20 Sure. > Thanks, > Chenbo >=20 > > + > > + if (vdpa_dev->ops->get_config) { > > + ret =3D vdpa_dev->ops->get_config(dev->vid, > > + ctx->msg.payload.cfg.region, > > + ctx->msg.payload.cfg.size); > > + if (ret !=3D 0) { > > + ctx->msg.size =3D 0; > > + VHOST_LOG_CONFIG(ERR, > > + "(%s) get_config() return error!\n", > > + dev->ifname); > > + } > > + } else { > > + VHOST_LOG_CONFIG(ERR, "(%s) get_config() not > supported!\n", > > + dev->ifname); > > + } > > + > > +out: > > + return RTE_VHOST_MSG_RESULT_REPLY; > > +} > > + > > +static int > > +vhost_user_set_config(struct virtio_net **pdev, > > + struct vhu_msg_context *ctx, > > + int main_fd __rte_unused) > > +{ > > + struct virtio_net *dev =3D *pdev; > > + struct rte_vdpa_device *vdpa_dev =3D dev->vdpa_dev; > > + int ret =3D 0; > > + > > + if (validate_msg_fds(dev, ctx, 0) !=3D 0) > > + return RTE_VHOST_MSG_RESULT_ERR; > > + > > + if (ctx->msg.payload.cfg.size > VHOST_USER_MAX_CONFIG_SIZE) { > > + VHOST_LOG_CONFIG(ERR, > > + "(%s) vhost_user_config size: %"PRIu32", should not > be > > larger than %d\n", > > + dev->ifname, ctx->msg.payload.cfg.size, > > + VHOST_USER_MAX_CONFIG_SIZE); > > + goto out; > > + } > > + > > + if (!vdpa_dev) { > > + VHOST_LOG_CONFIG(ERR, > > + "(%s) is not vDPA device!\n", > > + dev->ifname); > > + goto out; > > + } > > + > > + if (vdpa_dev->ops->set_config) { > > + ret =3D vdpa_dev->ops->set_config(dev->vid, > > + ctx->msg.payload.cfg.region, > > + ctx->msg.payload.cfg.offset, > > + ctx->msg.payload.cfg.size, > > + ctx->msg.payload.cfg.flags); > > + if (ret) > > + VHOST_LOG_CONFIG(ERR, > > + "(%s) set_config() return error!\n", > > + dev->ifname); > > + } else { > > + VHOST_LOG_CONFIG(ERR, "(%s) set_config() not > supported!\n", > > + dev->ifname); > > + } > > + > > + return RTE_VHOST_MSG_RESULT_OK; > > + > > +out: > > + return RTE_VHOST_MSG_RESULT_ERR; > > +} > > + > > +static int > > vhost_user_iotlb_msg(struct virtio_net **pdev, > > struct vhu_msg_context *ctx, > > int main_fd __rte_unused) > > @@ -2686,6 +2772,8 @@ static int is_vring_iotlb(struct virtio_net > > *dev, VHOST_MESSAGE_HANDLER(VHOST_USER_NET_SET_MTU, > > vhost_user_net_set_mtu, > > false) \ > > VHOST_MESSAGE_HANDLER(VHOST_USER_SET_SLAVE_REQ_FD, > > vhost_user_set_req_fd, > > true) \ > > VHOST_MESSAGE_HANDLER(VHOST_USER_IOTLB_MSG, > vhost_user_iotlb_msg, > > false) \ > > +VHOST_MESSAGE_HANDLER(VHOST_USER_GET_CONFIG, > vhost_user_get_config, > > +false) > > \ > > +VHOST_MESSAGE_HANDLER(VHOST_USER_SET_CONFIG, > vhost_user_set_config, > > +false) > > \ > > VHOST_MESSAGE_HANDLER(VHOST_USER_POSTCOPY_ADVISE, > > vhost_user_set_postcopy_advise, false) \ > > VHOST_MESSAGE_HANDLER(VHOST_USER_POSTCOPY_LISTEN, > > vhost_user_set_postcopy_listen, false) \ > > VHOST_MESSAGE_HANDLER(VHOST_USER_POSTCOPY_END, > > vhost_user_postcopy_end, > > false) \ > > diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h index > > ba1c5c7..c4d091e 100644 > > --- a/lib/vhost/vhost_user.h > > +++ b/lib/vhost/vhost_user.h > > @@ -50,6 +50,8 @@ > > VHOST_USER_NET_SET_MTU =3D 20, > > VHOST_USER_SET_SLAVE_REQ_FD =3D 21, > > VHOST_USER_IOTLB_MSG =3D 22, > > + VHOST_USER_GET_CONFIG =3D 24, > > + VHOST_USER_SET_CONFIG =3D 25, > > VHOST_USER_CRYPTO_CREATE_SESS =3D 26, > > VHOST_USER_CRYPTO_CLOSE_SESS =3D 27, > > VHOST_USER_POSTCOPY_ADVISE =3D 28, > > @@ -123,6 +125,16 @@ > > uint16_t queue_size; > > } VhostUserInflight; > > > > +#define VHOST_USER_MAX_CONFIG_SIZE 256 > > + > > +/** Get/set config msg payload */ > > +struct vhost_user_config { > > + uint32_t offset; > > + uint32_t size; > > + uint32_t flags; > > + uint8_t region[VHOST_USER_MAX_CONFIG_SIZE]; > > +}; > > + > > typedef struct VhostUserMsg { > > union { > > uint32_t master; /* a VhostUserRequest value */ @@ -146,6 > +158,7 @@ > > VhostUserCryptoSessionParam crypto_session; > > VhostUserVringArea area; > > VhostUserInflight inflight; > > + struct vhost_user_config cfg; > > } payload; > > /* Nothing should be added after the payload */ } __rte_packed > > VhostUserMsg; > > -- > > 1.8.3.1