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 71842A0032 for ; Fri, 18 Feb 2022 13:42:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CCDD40141; Fri, 18 Feb 2022 13:42:49 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id D4CA340141 for ; Fri, 18 Feb 2022 13:42:47 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id k1so14379458wrd.8 for ; Fri, 18 Feb 2022 04:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nyFIISur9447fihoC4VmkXZ4pBJcfF376sYSDz+eK1s=; b=LIBbrl7pHHQIFMkeDRXlSDU4CTLwA0NiHCCgIq9N4zHl4kUgi19TInNgIN0HDlvELh 5p1fYD9F8+N0fRqSAtJHGQiAVHY4ol4uIJj9uuNyD666n7jWQpBmNQQ+nqVH4YWH1LoJ kxPi/6ms/EBG6zn+6P6KesE/57hi64AxZ9ug4N6uq29KtllZ2XRIHpU4uOzVAmKx9gwm zXp7qr6w9o5SpAERF+OSa0nKXba+gKkkzE1JvXTwUF0fkdxAKNsC2REuRCCtKtRK55Dt L0yhk1kcg4KuzY+bwxEZ23p2ZXrBzeFVYnJuyenOZsndPuN6TpfLmNpkQZYV/1oms+Nb IbZw== 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=nyFIISur9447fihoC4VmkXZ4pBJcfF376sYSDz+eK1s=; b=RF04hyFnNEg7dMJ6VTEvv+ufKnK34ROufwVLPUH0VxzIHJ35x6qKN4BRoCTJCx7TbT R7koVN1ujU4DZI/CQmuUEd1C61zczKW+tooO4tHQoIpg5POw7yJFD9Nv3GmaYuBlTEWU 1EiPewqV9MVc4PlORG4QT5RkGBnxatVxbjFo8ppFzOPM7h/5NqdSU02RMfoPYWj5p9X2 p07M4rQedNwzFJmaBcJGGMCyfPXphR6yvOVr48hictgWm6tkjB2uB+S3a3LfCAgIW1Fp 6UMDqMtpyNgYpacWioV5SAYWKqz9AResa9WYLf+tB8ESJ+6usUGNkgLFFzNLzl0ggVb+ +nGw== X-Gm-Message-State: AOAM533lDPBVOUyQ0UFl9K4sDe1Sn1P+bRfiCS2f+uYXvG2I+vWKzzb+ c2/0MqwDrZ/bYLc/rofTGTs= X-Google-Smtp-Source: ABdhPJyd3bUJ0R0LylugIyvx+ph6FtsOfbGDOXL/V/VEL2RGPmBwXQTldoqq0g5ChqhaX4En3CcIfQ== X-Received: by 2002:a5d:6f0a:0:b0:1e4:a354:a7e with SMTP id ay10-20020a5d6f0a000000b001e4a3540a7emr5855631wrb.423.1645188167616; Fri, 18 Feb 2022 04:42:47 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id l11sm32904585wry.77.2022.02.18.04.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:42:47 -0800 (PST) From: luca.boccassi@gmail.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 20.11.5 Date: Fri, 18 Feb 2022 12:38:30 +0000 Message-Id: <20220218123931.1749595-61-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-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.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/9605f71afa8a11a9f0fb0c8d5131f08241b775fc Thanks. Luca Boccassi --- >From 9605f71afa8a11a9f0fb0c8d5131f08241b775fc 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 1d264d2fd0..fe6f9942a9 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -834,7 +834,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; @@ -878,7 +878,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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:40.342076047 +0000 +++ 0061-net-virtio-fix-Tx-queue-0-overriden-by-queue-128.patch 2022-02-18 12:37:37.698792099 +0000 @@ -1 +1 @@ -From 8a886e573af9d25be33e333e9f5cfb48ddd3646c Mon Sep 17 00:00:00 2001 +From 9605f71afa8a11a9f0fb0c8d5131f08241b775fc 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 1d264d2fd0..fe6f9942a9 100644 @@ -25 +26 @@ -@@ -814,7 +814,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, +@@ -834,7 +834,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 +@@ -878,7 +878,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];