From patchwork Fri Aug 25 07:53:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhike Wang X-Patchwork-Id: 805797 X-Patchwork-Delegate: dlu998@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xdtjC4FCWz9sRm for ; Fri, 25 Aug 2017 17:54:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 39A2EAEF; Fri, 25 Aug 2017 07:54:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E205B516 for ; Fri, 25 Aug 2017 07:54:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.jd.com (smtp.jd.com [58.83.206.59]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9400887 for ; Fri, 25 Aug 2017 07:53:47 +0000 (UTC) Received: from USHUB02.360buyAD.local (172.26.2.76) by HUB03.360buyAD.local (172.17.27.17) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 25 Aug 2017 15:53:41 +0800 Received: from localhost.localdomain (39.109.125.70) by USHUB02.360buyAD.local (138.229.76.5) with Microsoft SMTP Server id 14.3.123.3; Fri, 25 Aug 2017 15:53:17 +0800 From: wangzhike To: Date: Fri, 25 Aug 2017 00:53:09 -0700 Message-ID: <1503647589-32847-1-git-send-email-wangzhike@jd.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [39.109.125.70] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: wangzhike Subject: [ovs-dev] [PATCH v2] netdev-dpdk: update vhost user client port status. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org After ovs-vswitchd reboots, vhost user client port status is displayed as LINK DOWN though the traffic is OK. The problem is that the port may be udpated while the vhost_reconfigured is false. Then the vhost_reconfigured is updated to true. As a result, the vhost port status is kept as LINK-DOWN. Signed-off-by: wangzhike --- lib/netdev-dpdk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 1aaf6f7..80415ef 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -3227,7 +3227,11 @@ dpdk_vhost_reconfigure_helper(struct netdev_dpdk *dev) } if (netdev_dpdk_get_vid(dev) >= 0) { - dev->vhost_reconfigured = true; + if (dev->vhost_reconfigured == false) { + dev->vhost_reconfigured = true; + /* Carrier status may need updating. */ + netdev_change_seq_changed(&dev->up); + } } return 0;