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 7CCF1A034C for ; Fri, 25 Feb 2022 18:17:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 779904113D; Fri, 25 Feb 2022 18:17:13 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id F03E2410FD for ; Fri, 25 Feb 2022 18:17:11 +0100 (CET) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id C9E893FCA6 for ; Fri, 25 Feb 2022 17:17:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809431; bh=feojkSLJ6d12rUfBSknWCNDDxRbys3zH1RnSIjItHFk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hdL/FttHJqtL7y/7DpULQRvjtWuCoz6ggR9O7zCVb4CfVHz+6oI8yklmL9iQRdrsx vfPo8iur1a2IqhfnHBL9Kug3CoCNUqrzBGAH26EKD7nrOsFyPh3LrdkxzvyFLlcWKs lkRhw6IgQWZ2WIKSqmgV58ZQ8j9ggX5+hwBXIZx1y9K6qpESwHyoBlS6OmaMC+BUV/ tjW1xdh1tzkFYU1b0KHTk1Ynja4wrjo+99x2dpixfpwnL9/fnZ5TIGWTujyeIDYed7 gs4wP8qdKsjAJiL26sEEHtRho9O/MmfoHsWil/82UJxuJIxYxRch0dKqE/3ltt63HH 5aESVLAYixfnQ== Received: by mail-wr1-f70.google.com with SMTP id w8-20020a5d4b48000000b001ef708e7f71so605448wrs.7 for ; Fri, 25 Feb 2022 09:17:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=feojkSLJ6d12rUfBSknWCNDDxRbys3zH1RnSIjItHFk=; b=yFRP+3d1fj0zrrxv4skEsmXNJiPgcU+x1DoEuekAwjSpGZCe0DJSyfVb7Hd3eITkQx pMRYQzrR2jrR9V4vDvdQEKTqCT80HO1KfbuQX594KvGuZywIpVmQ0xVDAIGQxYUmiv2M xTVr4o7ASk6JVh0Op1vTHtd+S8nX8XZcZWU8/06D9biJP+F5tnOZ4oDNlBYefiLw5lsO 29NdKZqsUvUZ1QdEjcTPNBZkm1bqw85P2TbyMguosj3+Jb4KEaEjSACdZsd0oDL5RqgV t+TGIqbZh1JEYsDUL2Jn3NpGbI3aTRpZuv/VuY+Z0dj3b8Az/FFcV2VDdiJ5xVlZkS5l F90w== X-Gm-Message-State: AOAM532q5YS76xaaTAWxHHD1dxEBOxwzDooMuQWI8o/W6+JAV9g+9EYs KiNMGxcVhAiVmXiytDnD1lIIbazii0g6LpvdsPWcbYWxCx4CTRX7V/fIcmqPsZzk0WtLvag7V0U ILKq0CmlBlMONIm6KOovzB3GP X-Received: by 2002:a5d:62c3:0:b0:1ed:e116:39 with SMTP id o3-20020a5d62c3000000b001ede1160039mr6698331wrv.197.1645809431111; Fri, 25 Feb 2022 09:17:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJygZwfE2PxXrw5+jXGHhKrssHNsy39+zsL193EvQ37UFA94cRwK0yi7zgLV0C74eIvaTM6e5A== X-Received: by 2002:a5d:62c3:0:b0:1ed:e116:39 with SMTP id o3-20020a5d62c3000000b001ede1160039mr6698317wrv.197.1645809430910; Fri, 25 Feb 2022 09:17:10 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id t8-20020a5d6908000000b001e3169cc6afsm2823779wru.94.2022.02.25.09.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:17:10 -0800 (PST) From: christian.ehrhardt@canonical.com To: Xueming Li Cc: Maxime Coquelin , dpdk stable Subject: patch 'net/virtio: fix Tx queue 0 overriden by queue 128' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:19 +0100 Message-Id: <20220225171550.3499040-26-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.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 19.11.12 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/27/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/58f8e7b7a880ccca9b8a478ad966fe4af1008df3 Thanks. Christian Ehrhardt --- >From 58f8e7b7a880ccca9b8a478ad966fe4af1008df3 Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Thu, 2 Dec 2021 21:50:45 +0800 Subject: [PATCH] net/virtio: fix Tx queue 0 overriden by queue 128 [ upstream commit 8a886e573af9d25be33e333e9f5cfb48ddd3646c ] Both Rx queue and Tx queue are VirtQ in virtio, VQ index is 256 for Tx queue 128. Uint8 type of TxQ VQ index overflows and overrides Tx queue 0 data. This patch fixes VQ index type with uint16 type. Fixes: c1f86306a026 ("virtio: add new driver") Signed-off-by: Xueming Li Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index b6a89d59e7..6706366e9f 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -1092,7 +1092,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, unsigned int socket_id __rte_unused, const struct rte_eth_txconf *tx_conf) { - uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; + uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; struct virtio_hw *hw = dev->data->dev_private; struct virtqueue *vq = hw->vqs[vtpci_queue_idx]; struct virtnet_tx *txvq; @@ -1136,7 +1136,7 @@ int virtio_dev_tx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx) { - uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; + uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; struct virtio_hw *hw = dev->data->dev_private; struct virtqueue *vq = hw->vqs[vtpci_queue_idx]; -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:45.282982318 +0100 +++ 0026-net-virtio-fix-Tx-queue-0-overriden-by-queue-128.patch 2022-02-25 16:58:44.236990409 +0100 @@ -1 +1 @@ -From 8a886e573af9d25be33e333e9f5cfb48ddd3646c Mon Sep 17 00:00:00 2001 +From 58f8e7b7a880ccca9b8a478ad966fe4af1008df3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8a886e573af9d25be33e333e9f5cfb48ddd3646c ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index b39dd92d1b..4795893ec7 100644 +index b6a89d59e7..6706366e9f 100644 @@ -25 +26 @@ -@@ -814,7 +814,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, +@@ -1092,7 +1092,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, @@ -29,2 +30,2 @@ -- uint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; -+ uint16_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; +- uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; ++ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; @@ -32 +33 @@ - struct virtqueue *vq = hw->vqs[vq_idx]; + struct virtqueue *vq = hw->vqs[vtpci_queue_idx]; @@ -34 +35 @@ -@@ -858,7 +858,7 @@ int +@@ -1136,7 +1136,7 @@ int @@ -38,2 +39,2 @@ -- uint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; -+ uint16_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; +- uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; ++ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; @@ -41 +42 @@ - struct virtqueue *vq = hw->vqs[vq_idx]; + struct virtqueue *vq = hw->vqs[vtpci_queue_idx];