From nobody Sat May 18 07:48:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=none dis=none) header.from=zte.com.cn Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1649810270694989.7959012297825; Tue, 12 Apr 2022 17:37:50 -0700 (PDT) Received: from localhost ([::1]:52120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neR12-0000MM-PZ for importer@patchew.org; Tue, 12 Apr 2022 20:37:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neQzy-00085x-F0 for qemu-devel@nongnu.org; Tue, 12 Apr 2022 20:36:42 -0400 Received: from mxhk.zte.com.cn ([63.216.63.35]:56226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neQzw-0003WW-0K for qemu-devel@nongnu.org; Tue, 12 Apr 2022 20:36:42 -0400 Received: from mse-fl1.zte.com.cn (unknown [10.30.14.238]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4KdNv507lqz5B13Z for ; Wed, 13 Apr 2022 08:36:33 +0800 (CST) Received: from szxlzmapp03.zte.com.cn ([10.5.231.207]) by mse-fl1.zte.com.cn with SMTP id 23D0aPkX036833 for ; Wed, 13 Apr 2022 08:36:25 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-cloudhost8.localdomain (unknown [10.234.72.110]) by smtp (Zmail) with SMTP; Wed, 13 Apr 2022 08:36:25 +0800 X-Zmail-TransId: 3e8162561b08009-013a1 From: Yi Wang To: qemu-devel@nongnu.org Subject: [PATCH] net/vhost-user: Save ack_features to net_clients during vhost_user_start Date: Wed, 13 Apr 2022 16:17:56 +0800 Message-Id: <20220413081756.52983-1-wang.yi59@zte.com.cn> X-Mailer: git-send-email 2.33.0.rc0.dirty MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MAIL: mse-fl1.zte.com.cn 23D0aPkX036833 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 62561B11.000 by FangMail milter! X-FangMail-Envelope: 1649810193/4KdNv507lqz5B13Z/62561B11.000/10.30.14.238/[10.30.14.238]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 62561B11.000/4KdNv507lqz5B13Z 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=63.216.63.35; envelope-from=wang.yi59@zte.com.cn; helo=mxhk.zte.com.cn X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DATE_IN_FUTURE_06_12=1.947, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: wang.yi59@zte.com.cn, wang.liang82@zte.com.cn, xue.zhihong@zte.com.cn, Liu Xiangyu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1649810271969100001 Content-Type: text/plain; charset="utf-8" From: Liu Xiangyu During vhost_user_start, if openvswitch.service restart, cause the final fe= atures not expected. Because qemu not save the ack_features promptly. Signed-off-by: Liu Xiangyu Signed-off-by: Yi Wang --- net/vhost-user.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index b1a0247..ce9dcb6 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -92,6 +92,10 @@ static int vhost_user_start(int queues, NetClientState *= ncs[], goto err; } =20 + if (s->vhost_net) { + s->acked_features =3D vhost_net_get_acked_features(net); + } + if (i =3D=3D 0) { max_queues =3D vhost_net_get_max_queues(net); if (queues > max_queues) { --=20 1.8.3.1