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 E158F432DA for ; Wed, 8 Nov 2023 20:25:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBB7F42DDE; Wed, 8 Nov 2023 20:25:44 +0100 (CET) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mails.dpdk.org (Postfix) with ESMTP id 6944A40EE3 for ; Wed, 8 Nov 2023 20:25:43 +0100 (CET) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2c594196344so96749661fa.3 for ; Wed, 08 Nov 2023 11:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471543; x=1700076343; darn=dpdk.org; 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=s9KO6VnKHVpghP/SCq/kfX+TE9PhC8GHWvpnH4pH+8U=; b=RPPbt1e2groemJe3oKClRHNLFnC/qBhHfI940wRrZK0zFEs1vqOOVYDjm/elLDqbhr sQKPUHYLO8cU8ARmZ09KlZcJpw2E+la/5hbTIuT5CsmKMkur3Y0JTPX+qsFzWdB5MZru Bu356UY9jOMw3cRt4FSqOua/u3AfJ+iyJqM+eGyYzz695tGxUiUTXFkk/ElLwYU+Cowh gbuuquHH8K411tK2Gg1FyOdGWqdXh3q2ro2ncyRanM2EUckkYNEAxq7fQUGwX3fCPUKB 0G0iz9HYt98NWfiBn95XnQ7TwfJ5N/EwjOiQB1yc3m+TfDzmfggBr0+O8p0bW8pAVg1L hPww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471543; x=1700076343; 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=s9KO6VnKHVpghP/SCq/kfX+TE9PhC8GHWvpnH4pH+8U=; b=PinFj1v8+gB8CX+jPzzKVxUzciklVhfTZGLIJx5qw1lqK747+OKPeXImBXZ8mWlOEF N2lO+4CuqHtrVggKCd6Whp0HeMfDT3GVNqeaE2pZOtttB1G6Ynhr4uKaYKFnDPXNhl1x 2Vc4yltPk1Yu09yQkmzlSMKJ2HCMaxwHOSI7kbJaA3j8O5d03IB2k1opcXTt7hODtz2Y 5PMb7HRPjKmuao3ZhmOKGhRT0wCa1NHg8kkK2XrYPg6r4wBHlkxbLOSI0iiw3RuXj8y1 xEPqKpZLBLI+Mj604ptUR3NzoXcvRdNFQzN8SMX1VxLPQwa6c+0FFhIjxPafwiKHeJD8 t8vw== X-Gm-Message-State: AOJu0YxJ4AMg45rAiBqWw7V5Fwnu76wKMIIxvl9KTuZ39HgOvNe/k2jg UrKU+Gk7T7MnNuorgjOhE/L5F+tI49dYgw== X-Google-Smtp-Source: AGHT+IFWfzko+aP5/gQFuaXJ7dot4qeRKS/TBczpCenb5KRMb8HcW4KIttw5nLP47jJnwkHzggurAw== X-Received: by 2002:a2e:8e3c:0:b0:2c6:eaf8:49ff with SMTP id r28-20020a2e8e3c000000b002c6eaf849ffmr2207668ljk.37.1699471542860; Wed, 08 Nov 2023 11:25:42 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id l18-20020a5d4bd2000000b0032fb46812c2sm5655104wrt.12.2023.11.08.11.25.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:25:42 -0800 (PST) From: luca.boccassi@gmail.com To: Wenwu Ma Cc: Wei Ling , Maxime Coquelin , dpdk stable Subject: patch 'net/virtio: fix link state interrupt vector setting' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:03 +0000 Message-Id: <20231108192535.922238-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-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.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/10/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/1945571d8bb3d300c5ca30f2e57b162df6032533 Thanks. Luca Boccassi --- >From 1945571d8bb3d300c5ca30f2e57b162df6032533 Mon Sep 17 00:00:00 2001 From: Wenwu Ma Date: Mon, 23 Oct 2023 09:46:12 +0800 Subject: [PATCH] net/virtio: fix link state interrupt vector setting [ upstream commit efc3f842b3dd69c4e65dbdf6cdaccde8c759b5d9 ] Setting the vector for link state interrupts should be done before the device initialization is completed. Fixes: ee85024cf5f7 ("net/virtio: complete init stage at the right place") Signed-off-by: Wenwu Ma Tested-by: Wei Ling Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 1ee738f8cc..867b3ff548 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1924,6 +1924,14 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) } } + if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) + /* Enable vector (0) for Link State Interrupt */ + if (VTPCI_OPS(hw)->set_config_irq(hw, 0) == + VIRTIO_MSI_NO_VECTOR) { + PMD_DRV_LOG(ERR, "failed to set config vector"); + return -EBUSY; + } + vtpci_reinit_complete(hw); if (pci_dev) @@ -2408,14 +2416,6 @@ virtio_dev_configure(struct rte_eth_dev *dev) hw->has_tx_offload = tx_offload_enabled(hw); hw->has_rx_offload = rx_offload_enabled(hw); - if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) - /* Enable vector (0) for Link State Interrupt */ - if (VTPCI_OPS(hw)->set_config_irq(hw, 0) == - VIRTIO_MSI_NO_VECTOR) { - PMD_DRV_LOG(ERR, "failed to set config vector"); - return -EBUSY; - } - if (vtpci_packed_queue(hw)) { #if defined(RTE_ARCH_X86_64) && defined(CC_AVX512_SUPPORT) if ((hw->use_vec_rx || hw->use_vec_tx) && -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:52.170369761 +0000 +++ 0005-net-virtio-fix-link-state-interrupt-vector-setting.patch 2023-11-08 19:23:51.729395382 +0000 @@ -1 +1 @@ -From efc3f842b3dd69c4e65dbdf6cdaccde8c759b5d9 Mon Sep 17 00:00:00 2001 +From 1945571d8bb3d300c5ca30f2e57b162df6032533 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit efc3f842b3dd69c4e65dbdf6cdaccde8c759b5d9 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 3ab56ef769..c2c0a1a111 100644 +index 1ee738f8cc..867b3ff548 100644 @@ -23 +24 @@ -@@ -1912,6 +1912,14 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) +@@ -1924,6 +1924,14 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) @@ -29 +30 @@ -+ if (VIRTIO_OPS(hw)->set_config_irq(hw, 0) == ++ if (VTPCI_OPS(hw)->set_config_irq(hw, 0) == @@ -35 +36 @@ - virtio_reinit_complete(hw); + vtpci_reinit_complete(hw); @@ -37,2 +38,2 @@ - return 0; -@@ -2237,14 +2245,6 @@ virtio_dev_configure(struct rte_eth_dev *dev) + if (pci_dev) +@@ -2408,14 +2416,6 @@ virtio_dev_configure(struct rte_eth_dev *dev) @@ -44 +45 @@ -- if (VIRTIO_OPS(hw)->set_config_irq(hw, 0) == +- if (VTPCI_OPS(hw)->set_config_irq(hw, 0) == @@ -50 +51 @@ - if (virtio_with_packed_queue(hw)) { + if (vtpci_packed_queue(hw)) {