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 4A99241D4F for ; Thu, 23 Feb 2023 10:39:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4730D43150; Thu, 23 Feb 2023 10:39:03 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 6244343164 for ; Thu, 23 Feb 2023 10:39:01 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id k37so5235835wms.0 for ; Thu, 23 Feb 2023 01:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dktq4QgCPHVCWmwL0VMgExiue2f8a01HYosnMVr07fY=; b=dSRz8/+Tw1ktVG955Syyk4zW4f6rJfPZDywR8rFGcKP7p/4vDDEExhznmiOi75cNyk Wg2UeQc6lLkGmTzqe50uf4i92C6HCst6PoeTkgFFrcrLBT7W/5ZVfZBT+jPoCtl+wDi9 v8ss2KZtiZT8FzO4Qe86/PoM4m5f3emwK31FbmYIqS6HFjd0hpIFZhCcZGkKuNR9QSuV eEWlo2TTQ5tWVlzHEZsKoudsfO1TX0FKoVDof1du/v9ihAWUNo0RWVIpq2jCFXq1aQBm OoR5hL2LroR8v2bihXjesf1KgcWsAtN77M6L5xOIhiVpa+IqNqnf2HsBv9criE3PzM7K 2gRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dktq4QgCPHVCWmwL0VMgExiue2f8a01HYosnMVr07fY=; b=2qGVl8F3XGYOdlrM8g7N2zfhBDlDsChE02DnGyCNWLEqF5curItiD/znNEVBgh4Fmj BjIIkiH2uY2OFiN94paBofpp0DsXZF1vcWHv2OKByFZWeddIhdLdiRIBVgWX/dGl2KWu BiYps22JLHlfRBPhN2OfbgUiR18DdjAS1nDWpA+itwloeL7vlM4pNCQrteOX45+eAy/g 7bucH4PD7YMErOof95vFqwQt+FCz9Gr36SMRgT9zx/2zMrjFeiydXwePv+8cnYjJbrtA d8EQ4og5IAFrM07oGDrkLfhSbTBsB0ov+f4Ht3unmUQ7PkerSXlHMpZsZwFavnvHdOdH 8LyQ== X-Gm-Message-State: AO0yUKXz60u0oNeF7ZJ7VfFR39oPbMu4sAoEvuRo2n46Ao4e/L7KRkxi Mtl7ALtTHpwhaLjvoyYFDPI= X-Google-Smtp-Source: AK7set9MYbvKPjdZ5JOcykWMBxiO505r/LCjuf7JawyhMP+iaP/4Z+vQLfHpJE4yVbApEDlSrt7aWQ== X-Received: by 2002:a05:600c:706:b0:3dc:438a:c381 with SMTP id i6-20020a05600c070600b003dc438ac381mr2438573wmn.28.1677145141146; Thu, 23 Feb 2023 01:39:01 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id y14-20020a7bcd8e000000b003e118684d56sm9580954wmj.45.2023.02.23.01.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:39:00 -0800 (PST) From: luca.boccassi@gmail.com To: Maxime Coquelin Cc: Chenbo Xia , dpdk stable Subject: patch 'net/virtio-user: fix device starting failure handling' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:38 +0000 Message-Id: <20230223093715.3926893-34-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/7b89a6890e19dded3dad3925be927471b7dd346f Thanks. Luca Boccassi --- >From 7b89a6890e19dded3dad3925be927471b7dd346f Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Thu, 9 Feb 2023 10:17:01 +0100 Subject: [PATCH] net/virtio-user: fix device starting failure handling [ upstream commit c1a6f787b04e470ebe9b5a3891022195eb2bc555 ] If the device fails to start, read the status from the device and return early. Fixes: 57912824615f ("net/virtio-user: support vhost status setting") Signed-off-by: Maxime Coquelin Reviewed-by: Chenbo Xia --- drivers/net/virtio/virtio_user_ethdev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 347caeef41..a6a2135eff 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -317,10 +317,15 @@ virtio_user_set_status(struct virtio_hw *hw, uint8_t status) if (status & VIRTIO_CONFIG_STATUS_FEATURES_OK && ~old_status & VIRTIO_CONFIG_STATUS_FEATURES_OK) virtio_user_dev_set_features(dev); - if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) - virtio_user_start_device(dev); - else if (status == VIRTIO_CONFIG_STATUS_RESET) + + if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) { + if (virtio_user_start_device(dev)) { + virtio_user_dev_update_status(dev); + return; + } + } else if (status == VIRTIO_CONFIG_STATUS_RESET) { virtio_user_reset(hw); + } virtio_user_dev_set_status(dev, status); } -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:29.608319515 +0000 +++ 0034-net-virtio-user-fix-device-starting-failure-handling.patch 2023-02-23 09:36:28.234170087 +0000 @@ -1 +1 @@ -From c1a6f787b04e470ebe9b5a3891022195eb2bc555 Mon Sep 17 00:00:00 2001 +From 7b89a6890e19dded3dad3925be927471b7dd346f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c1a6f787b04e470ebe9b5a3891022195eb2bc555 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index d32abec327..78b1ed9ace 100644 +index 347caeef41..a6a2135eff 100644 @@ -22 +23 @@ -@@ -90,10 +90,15 @@ virtio_user_set_status(struct virtio_hw *hw, uint8_t status) +@@ -317,10 +317,15 @@ virtio_user_set_status(struct virtio_hw *hw, uint8_t status)