From nobody Wed Nov 27 02:36:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nephogine.com); dmarc=pass(p=none dis=none) header.from=nephogine.com ARC-Seal: i=2; a=rsa-sha256; t=1701439274; cv=pass; d=zohomail.com; s=zohoarc; b=WdiWjOTmB9nnEnD32Va9PEI0tphJXkKwFaagbUgIYewS/YNIuYN8LPHaPM8RjF1MreLRZHnK5R/vpIn/m4FJT6nIdcWZkp5T/GPCAXq5t2ZFnbbCsMRa+TarDUMT6WIM1SShlD2g7cKU3Xn51H4huekdhH9Q+zHjtyiYyPWEGyM= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701439274; h=Content-Type:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=G6wJ8D8iRyquW4C4xpf7M9/DZjTWDC7OlS6Ttaw5xi4=; b=XPfYc6ODNHBotmmg9bFJhKYt2khg9eLkG+Uhp6tV/AgAY2V2EZTdHE3xZqTIzTQG/c/ftaef3IZWxplil9I89N78C4XFX/AutGxJQ7YvNquFot0+qQM3p9Iv8YpW9qR+M2KrFDWDSFhqmUkOgXklA/fK8Yflur1pJZToaDAe5XU= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=nephogine.com); dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701439274036671.1127968350963; Fri, 1 Dec 2023 06:01:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r944l-0002Po-HR; Fri, 01 Dec 2023 09:01:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r90ZQ-0005kb-Dy for qemu-devel@nongnu.org; Fri, 01 Dec 2023 05:16:28 -0500 Received: from mail-dm6nam10on2118.outbound.protection.outlook.com ([40.107.93.118] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r90ZN-0004ZM-7q for qemu-devel@nongnu.org; Fri, 01 Dec 2023 05:16:28 -0500 Received: from SN4PR13MB5727.namprd13.prod.outlook.com (2603:10b6:806:213::12) by CO6PR13MB5321.namprd13.prod.outlook.com (2603:10b6:303:148::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.27; Fri, 1 Dec 2023 10:11:15 +0000 Received: from SN4PR13MB5727.namprd13.prod.outlook.com ([fe80::523c:c466:5715:81d6]) by SN4PR13MB5727.namprd13.prod.outlook.com ([fe80::523c:c466:5715:81d6%7]) with mapi id 15.20.7046.024; Fri, 1 Dec 2023 10:11:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eBUFWafuT71ywDh9U6l4jmZy1s9KzNk6Cp2/t+ooMCSG1T579mTpe+n/XGNLhR64yQ5Inu3/zgWRrPxwa+NbSZbstsUVoxaESrFFEkNzSCARspWlVXXLV1ruwFQmCyJaBZRZIfuODJrfSzxYVgK3dA8jQBzPs+NVUCMaPMoWjTnbyxSN4LvGjKV0BKniN/XDC/RnU4QR8dlAMeQK7bMeVIHKLMat8TWD+kVFadoWKliZCZvipTrSUPj8rYYKjd0awP/X487abWs6JxzTa4//CloPoJa8UCMch021IMJSVlnM30OW/YRZuMetWR9VZDGbrUguP/JGtCBg227cUsWFLA== 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=G6wJ8D8iRyquW4C4xpf7M9/DZjTWDC7OlS6Ttaw5xi4=; b=fykTJa0hZd2bWI15mWJiSPqrptMLQfb53PS1ilzrUJFgKiCiBAotXMnsptzqjlGkeH0xvdBZtgmMB4UA7cF8R50bcVC5K/yi7z+SA8Z8cg+D2uPsEXWfS/KyMJ2HlZaA562ElSbA2AduYRT3E/4mNpyg+xcWt8rBaJEIhz0LyYLBFmjDlXYHkE/keCrvR7OY+zd/rKx+8PPgz+sV4xYBcGkDyFIkPqQMRzJAae06seZE2pDyMjwm53q17hsG026+PguoLigNl0ytUIrq3689yEWYTWkowMgKJ971z78A2ZeHWu92Me8kIOp/Yd5KkJaIKgY/+kIbf9SWGCZtEfmovw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nephogine.com; dmarc=pass action=none header.from=nephogine.com; dkim=pass header.d=nephogine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nephogine.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G6wJ8D8iRyquW4C4xpf7M9/DZjTWDC7OlS6Ttaw5xi4=; b=Dj3IeDf+QM4SCruZmvRbWxElApdrMUuWXvgrRDbuxa1gUKlw81Mahb3KUE0I+rWRA00fIyVdZjVOFmT9Lqi3H2m09Z1tdyxLFWXgMuQbA+LtB7aog8Y3w2K7erXRaGFJ6HBWiHLYcBYg4hZzhsW6wl7DWpNo8hFlg/Wh5HjboD5UM3tPbaxozIVh/Se9Ar+dhSVCHFJzr4HUKohjpksJo29ca8RBsYQT56vfG5wRDo2nxgGwMznE6fhp0+5HeefnYqxj1JjUgaJu8kgO5ATQzytX1rtFnFV0OXmn0XiDn47qeYrNcSRVVYLqDCOBCMtEkLAsR7Y9eJV7D7Cr5dJvgQ== From: Wentao Jia To: "qemu-devel@nongnu.org" Subject: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature Thread-Topic: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature Thread-Index: AdokPrZLsAJfb0btQhCy7EbMDce/Eg== Date: Fri, 1 Dec 2023 10:11:15 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nephogine.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN4PR13MB5727:EE_|CO6PR13MB5321:EE_ x-ms-office365-filtering-correlation-id: 10676cb8-82d8-4f87-eaa2-08dbf255da49 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1GVW8pMRK0xiD3WL4vQSrCXrsnq564a8ANqKSib7UeFK4WxDwd1J5+UmCESsu6r3a8A2QnVN5Qwpc5UANvt/xvKaUNXxq4hZju94n3au5GQbXdcCTBIDM+EAV6eGG7ka4yjJ5dRO8GPFV6Kahef5M3XeiYPx4pBjxTN4vUUb2VvERk+3miDCVE1W2R3LhNaNT1cvT9XTLlJOGsm/revQyk9DwVs7De+7EvqNHRHoLOQEX0kCyRXGSWsqVuLCVv5Qjpl3Lh7BQZ5zVZJ/53KeVu/mH+skCkST3S92AkIHmHrmzwrD9aheVE6LSrO+nUt4q9qQlYQRSmTlwuCI6acfpBkQnVxAcDXXWI9DkpNeBnKDK+PIilRKVZaGQfs7toqTIJU7ZgxqmznbzcBLzY6I4IU2QpvioYydfe1+as5WD7TG/5VucUrD5e52Ktuml0TAaQ66palMHTAaFGEWGdN4n5mMrF18mOJe0gTb3Y1FpUYA/OwZk8ov19wbFAxkNq1HC5oSbiPO4Y8YNdhW/nnh35b5fQdLxoLKcJKAXgmdmnqfCB85DTdd20fBXnRke/13y/iMB9fQMsgLYsKQv7ximj2ZB+TLsuknPP06MrOd1sl+7wMfyvkAwni/kmbLKd+lEZmuYZwQdZ//BwP/MIXgJip+s5oEVT59UabNPqA0j98= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR13MB5727.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(396003)(39830400003)(376002)(366004)(136003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(86362001)(38100700002)(44832011)(52536014)(5660300002)(33656002)(2906002)(41300700001)(38070700009)(83380400001)(55016003)(64756008)(66476007)(66446008)(6916009)(66556008)(76116006)(66946007)(6506007)(7696005)(478600001)(71200400001)(26005)(9686003)(316002)(8936002)(8676002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sGxPPx5l9VgQfzoVnWkvw70MkFlo1DH+CHgQhB/tFNceOTE/3PVX52cQhlTQ?= =?us-ascii?Q?AXQU3nRei/79ViO5BxWtvPO+yPicjQT+vqPBCAy5CfTUIPp0QLLhF7XBLT7D?= =?us-ascii?Q?3b0MSWeIA/plo6lUON38wnDiDbSbmkLS9ya8holfUa1eU8RLi/ibV2f+KUj/?= =?us-ascii?Q?ven5Qn8iArnFrwjcGXmIWC2gnHFl9NoIECrIQoaCYJexWXwLL1Jv9lBFrpn0?= =?us-ascii?Q?B8BHy0NGeEm5e9P3c3JoMqj/F2Jfn/yO2Y8CxkqgvmtrqPFSTxtM27Wc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E01WjIKOzgsZqT1u62QLeLzY7jOV1p/c?= =?us-ascii?Q?aKFV03bMHLa+ev8ibfkyqa60NzaSUXCLPz/XtmdtL+oue3OhUAgx5YW1SOjW?= =?us-ascii?Q?75h8g6omQmDZ2sRD6Gpw2Fozvv/mqEmWymZgoFcKKsjyuSssQlHkrWT4S+k5?= =?us-ascii?Q?2VHOTk9tM5TSJunJNA4Sixe4rPKXf1XsIXh7EBFG2bj9jFLI9j99YCbKOwyQ?= =?us-ascii?Q?kcdz7pxH8uwaLozEpFrbiM2ZkfQw0dBQz616pw0VkxnGhHxDrWCARDIGiX9z?= =?us-ascii?Q?EPc4CWv8N9Hf6/ovv71KKJ+YgEkb6ZvVigzG6YTc2BTH2HkTk8N0s9ptpazC?= =?us-ascii?Q?ELIhmEMhJgn8y09/hz72kKCedBApIFEXGwabTXmC7d3sEmqzlYH+6o5a2pmz?= =?us-ascii?Q?d8I+xGYmqb7Abkhvt0niIjFk3CU2pf8PxmIEK3bD?= Content-Type: multipart/alternative; boundary="_000_SN4PR13MB5727A538887598415C5A37D28681ASN4PR13MB5727namp_" MIME-Version: 1.0 X-OriginatorOrg: nephogine.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN4PR13MB5727.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10676cb8-82d8-4f87-eaa2-08dbf255da49 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2023 10:11:15.0967 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: W0I9V1HWaCk9luUQHZMgJiqAXaxIvcGZLdiLsPZTCAt2LC+Qsv1/NV2tq9J83s447FqdfF21VPkgZnOADAWWzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR13MB5321 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.93.118; envelope-from=wentao.jia@nephogine.com; helo=NAM10-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 01 Dec 2023 09:00:20 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @nephogine.com) X-ZM-MESSAGEID: 1701439277049000003 --_000_SN4PR13MB5727A538887598415C5A37D28681ASN4PR13MB5727namp_ Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature are important feat= ure for dpdk vdpa packets transmitting performance, add the 2 features at vhost= -user front-end to negotiation with backend. Signed-off-by: Kyle Xu zhenbing.xu@corigine.com Signed-off-by: Wentao Jia wentao.jia@corigine.com Reviewed-by: Xinying Yu xinying.yu@corigine.com Reviewed-by: Shujing Dong shujing.dong@corigine.com Reviewed-by: Rick Zhong zhaoyong.zhong@corigine.com --- hw/net/vhost_net.c | 2 ++ include/hw/virtio/virtio.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index e8e1661646..211ca859a6 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -76,6 +76,8 @@ static const int user_feature_bits[] =3D { VIRTIO_F_IOMMU_PLATFORM, VIRTIO_F_RING_PACKED, VIRTIO_F_RING_RESET, + VIRTIO_F_IN_ORDER, + VIRTIO_F_NOTIFICATION_DATA, VIRTIO_NET_F_RSS, VIRTIO_NET_F_HASH_REPORT, VIRTIO_NET_F_GUEST_USO4, diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index c8f72850bc..3880b6764c 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -369,6 +369,10 @@ typedef struct VirtIORNGConf VirtIORNGConf; VIRTIO_F_RING_PACKED, false), \ DEFINE_PROP_BIT64("queue_reset", _state, _field, \ VIRTIO_F_RING_RESET, true) + DEFINE_PROP_BIT64("notification_data", _state, _field, \ + VIRTIO_F_NOTIFICATION_DATA, true), \ + DEFINE_PROP_BIT64("in_order", _state, _field, \ + VIRTIO_F_IN_ORDER, true) hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n); bool virtio_queue_enabled_legacy(VirtIODevice *vdev, int n); -- --_000_SN4PR13MB5727A538887598415C5A37D28681ASN4PR13MB5727namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

VIRTIO_F_IN_ORDER and VIRTIO_F_= NOTIFICATION_DATA feature are important feature

for dpdk vdpa packets transmitt= ing performance, add the 2 features at vhost-user

front-end to negotiation with b= ackend.

 

Signed-off-by: Kyle Xu zhenbing.xu@corigine.com

Signed-off-by: Wentao Jia wentao.jia@corigine.com

Reviewed-by:   Xinyin= g Yu xinying.yu@corigine.com

Reviewed-by:   Shujin= g Dong shujing.dong@corigine.com

Reviewed-by:   Rick Z= hong zhaoyong.zhong@corigine.com

---

hw/net/vhost_net.c  &= nbsp;      | 2 ++

include/hw/virtio/virtio.h | 4 = ++++

2 files changed, 6 insertions(+= )

 

diff --git a/hw/net/vhost_net.c= b/hw/net/vhost_net.c

index e8e1661646..211ca859a6 10= 0644

--- a/hw/net/vhost_net.c

+++ b/hw/net/vhost_net.c

@@ -76,6 +76,8 @@ static const = int user_feature_bits[] =3D {

     VIRTIO= _F_IOMMU_PLATFORM,

     VIRTIO= _F_RING_PACKED,

     VIRTIO= _F_RING_RESET,

+    VIRTIO_F_IN= _ORDER,

+    VIRTIO_F_NO= TIFICATION_DATA,

     VIRTIO= _NET_F_RSS,

     VIRTIO= _NET_F_HASH_REPORT,

     VIRTIO= _NET_F_GUEST_USO4,

diff --git a/include/hw/virtio/= virtio.h b/include/hw/virtio/virtio.h

index c8f72850bc..3880b6764c 10= 0644

--- a/include/hw/virtio/virtio.= h

+++ b/include/hw/virtio/virtio.= h

@@ -369,6 +369,10 @@ typedef st= ruct VirtIORNGConf VirtIORNGConf;

     &= nbsp;           &nbs= p;     VIRTIO_F_RING_PACKED, false), \

     DEFINE= _PROP_BIT64("queue_reset", _state, _field, \

     &= nbsp;           &nbs= p;     VIRTIO_F_RING_RESET, true)

+    DEFINE_PROP= _BIT64("notification_data", _state, _field, \

+     =             &nb= sp;    VIRTIO_F_NOTIFICATION_DATA, true), \

+    DEFINE_PROP= _BIT64("in_order", _state, _field, \

+     =             &nb= sp;    VIRTIO_F_IN_ORDER, true)

 

hwaddr virtio_queue_get_desc_ad= dr(VirtIODevice *vdev, int n);

bool virtio_queue_enabled_legac= y(VirtIODevice *vdev, int n);

--

--_000_SN4PR13MB5727A538887598415C5A37D28681ASN4PR13MB5727namp_--