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 3610A43C60 for ; Thu, 7 Mar 2024 02:36:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A7DE42EE3; Thu, 7 Mar 2024 02:36:28 +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 C188042F02 for ; Thu, 7 Mar 2024 02:36:26 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-412eddd165eso3186875e9.1 for ; Wed, 06 Mar 2024 17:36:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775386; x=1710380186; 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=kYz+m+rI/LwNmLm7Iy0HJS6/uZYxavdxvvdH4GwPccc=; b=M+WHLGnylOf5CpMqzRlidaFHBi6ZtGBtnzwSeCcjSn8y2IxvKzvvjOxsnO3L7kPDFl o/NaKm4EDd+uKwMLfeRk+A7wAFBZ3LfEyRe7Vi6Jbj7Y7E147sbXi/rvL00qbzIJ9r45 jworcLXkdHb3jFRyH9ewJoIlVs9IXKxNczgjUA0WZmaQYllAswV2Y7FQ2oJO6jXcajb0 GdYR7Yfa/nLua3qHeqYLkDrWp/QLiQcntxo1cNXl2U0yCrxdDP5v8x7e05p0c6lbhEsQ S3hv2o/+ilOHbNAZiYpJUc2Y5FVqvkbne8atuiY04NZcIZMQJgHwtOYu1beQLu7sDVRk jJrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775386; x=1710380186; 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=kYz+m+rI/LwNmLm7Iy0HJS6/uZYxavdxvvdH4GwPccc=; b=iVqotAlF+9LDmswGgc9ozOgxyuvGM5ERlY3L9NlncBH0BBOm4wyUO7I2mlT6U2/scn XZIzhHLRj+BYSWlTA6963pCfkpmvQy4pKIXslvVZcbhgtw9xihzjr5xP3KTXlE53nKKC MsSOaX/FZIbVJl25HGYCVepG2o3AH0IrN9i9f5O045nepPPSGx+xclXPTO+eOr3mxR2V uXuAu2xsQy15McjaCcuXpjPYgsWDCzr8ydL3IwMgVRASHm9z3FFpukn/KwNsEJAe2Ap9 GfLf6fmgDRuvuffTrkrR919mk+NK/c5bTPh976lRVzWMn07eDLB0qRQUKimhwyeccLGp AzpA== X-Forwarded-Encrypted: i=1; AJvYcCUDjHFVFUXVm/mWVZTBXdd5lhsikeBhcXFl1oWHFtoS3nFT7ozcAI0AOba5vfY5xWW5UIlvIVswAt9xusRu0TY= X-Gm-Message-State: AOJu0YxIkk0J7PUm6GV1teR6S1J6YmoR/8gfC71wFKYjVlc/Vo3QiIQE NeF/hDTkyQPBmoJsTJ1rNSbfb9Ccxi/KFaiIMYbSsVr2NGXpM1se7bjUjAPHEpY= X-Google-Smtp-Source: AGHT+IGBAZ0hlxMQZcKTzCiI04i7UR2f44BQwLu6BTGzwxWroK8PT9JKA9JVUqeba7ZJm6zbrggJ/Q== X-Received: by 2002:a05:600c:4449:b0:412:fe20:71eb with SMTP id v9-20020a05600c444900b00412fe2071ebmr1766337wmn.37.1709775386374; Wed, 06 Mar 2024 17:36:26 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 1-20020a05600c028100b00412c1d51a0dsm848819wmk.45.2024.03.06.17.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:36:25 -0800 (PST) From: luca.boccassi@gmail.com To: Neel Patel Cc: Andrew Boyer , dpdk stable Subject: patch 'net/ionic: fix missing volatile type for cqe pointers' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:31:32 +0000 Message-Id: <20240307013159.1735343-75-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-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 22.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 03/09/24. 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/e15d5a01b1478c94bd1c4a905e79b71af35002f0 Thanks. Luca Boccassi --- >From e15d5a01b1478c94bd1c4a905e79b71af35002f0 Mon Sep 17 00:00:00 2001 From: Neel Patel Date: Tue, 6 Feb 2024 19:13:08 -0800 Subject: [PATCH] net/ionic: fix missing volatile type for cqe pointers [ upstream commit 463ad260d35ee5934ab206d392a1a3e08b5506d0 ] This memory may be changed by the hardware, so the volatile keyword is required for correctness. Fixes: e86a6fcc7cf3 ("net/ionic: add optimized non-scattered Rx/Tx") Signed-off-by: Andrew Boyer Signed-off-by: Neel Patel --- drivers/net/ionic/ionic_rxtx.c | 4 ++-- drivers/net/ionic/ionic_rxtx_sg.c | 8 +++++--- drivers/net/ionic/ionic_rxtx_simple.c | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index b9e73b4871..2f1ca986b3 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -752,7 +752,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset) { struct ionic_rx_qcq *rxq = rx_queue; struct ionic_qcq *qcq = &rxq->qcq; - struct ionic_rxq_comp *cq_desc; + volatile struct ionic_rxq_comp *cq_desc; uint16_t mask, head, tail, pos; bool done_color; @@ -791,7 +791,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset) { struct ionic_tx_qcq *txq = tx_queue; struct ionic_qcq *qcq = &txq->qcq; - struct ionic_txq_comp *cq_desc; + volatile struct ionic_txq_comp *cq_desc; uint16_t mask, head, tail, pos, cq_pos; bool done_color; diff --git a/drivers/net/ionic/ionic_rxtx_sg.c b/drivers/net/ionic/ionic_rxtx_sg.c index ab8e56e91c..241b6f8587 100644 --- a/drivers/net/ionic/ionic_rxtx_sg.c +++ b/drivers/net/ionic/ionic_rxtx_sg.c @@ -27,7 +27,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq) struct ionic_cq *cq = &txq->qcq.cq; struct ionic_queue *q = &txq->qcq.q; struct rte_mbuf *txm; - struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base; + struct ionic_txq_comp *cq_desc_base = cq->base; + volatile struct ionic_txq_comp *cq_desc; void **info; uint32_t i; @@ -252,7 +253,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts, */ static __rte_always_inline void ionic_rx_clean_one_sg(struct ionic_rx_qcq *rxq, - struct ionic_rxq_comp *cq_desc, + volatile struct ionic_rxq_comp *cq_desc, struct ionic_rx_service *rx_svc) { struct ionic_queue *q = &rxq->qcq.q; @@ -438,7 +439,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do, struct ionic_cq *cq = &rxq->qcq.cq; struct ionic_queue *q = &rxq->qcq.q; struct ionic_rxq_desc *q_desc_base = q->base; - struct ionic_rxq_comp *cq_desc, *cq_desc_base = cq->base; + struct ionic_rxq_comp *cq_desc_base = cq->base; + volatile struct ionic_rxq_comp *cq_desc; uint32_t work_done = 0; uint64_t then, now, hz, delta; diff --git a/drivers/net/ionic/ionic_rxtx_simple.c b/drivers/net/ionic/ionic_rxtx_simple.c index 5f81856256..0992177afc 100644 --- a/drivers/net/ionic/ionic_rxtx_simple.c +++ b/drivers/net/ionic/ionic_rxtx_simple.c @@ -27,7 +27,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq) struct ionic_cq *cq = &txq->qcq.cq; struct ionic_queue *q = &txq->qcq.q; struct rte_mbuf *txm; - struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base; + struct ionic_txq_comp *cq_desc_base = cq->base; + volatile struct ionic_txq_comp *cq_desc; void **info; cq_desc = &cq_desc_base[cq->tail_idx]; @@ -225,7 +226,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, */ static __rte_always_inline void ionic_rx_clean_one(struct ionic_rx_qcq *rxq, - struct ionic_rxq_comp *cq_desc, + volatile struct ionic_rxq_comp *cq_desc, struct ionic_rx_service *rx_svc) { struct ionic_queue *q = &rxq->qcq.q; @@ -359,7 +360,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do, struct ionic_cq *cq = &rxq->qcq.cq; struct ionic_queue *q = &rxq->qcq.q; struct ionic_rxq_desc *q_desc_base = q->base; - struct ionic_rxq_comp *cq_desc, *cq_desc_base = cq->base; + struct ionic_rxq_comp *cq_desc_base = cq->base; + volatile struct ionic_rxq_comp *cq_desc; uint32_t work_done = 0; uint64_t then, now, hz, delta; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:41.186293999 +0000 +++ 0075-net-ionic-fix-missing-volatile-type-for-cqe-pointers.patch 2024-03-07 01:05:34.922942648 +0000 @@ -1 +1 @@ -From 463ad260d35ee5934ab206d392a1a3e08b5506d0 Mon Sep 17 00:00:00 2001 +From e15d5a01b1478c94bd1c4a905e79b71af35002f0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 463ad260d35ee5934ab206d392a1a3e08b5506d0 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index e7a0e16ae1..8a9c5ae191 100644 +index b9e73b4871..2f1ca986b3 100644 @@ -24 +25 @@ -@@ -756,7 +756,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset) +@@ -752,7 +752,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset) @@ -33 +34 @@ -@@ -795,7 +795,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset) +@@ -791,7 +791,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset) @@ -43 +44 @@ -index 6c028a698c..1392342463 100644 +index ab8e56e91c..241b6f8587 100644 @@ -46 +47,2 @@ -@@ -28,7 +28,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq) +@@ -27,7 +27,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq) + struct ionic_cq *cq = &txq->qcq.cq; @@ -48 +49,0 @@ - struct ionic_tx_stats *stats = &txq->stats; @@ -56 +57 @@ -@@ -254,7 +255,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -252,7 +253,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts, @@ -65 +66 @@ -@@ -440,7 +441,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do, +@@ -438,7 +439,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do, @@ -76 +77 @@ -index 5969287b66..00152c885a 100644 +index 5f81856256..0992177afc 100644 @@ -79 +80,2 @@ -@@ -28,7 +28,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq) +@@ -27,7 +27,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq) + struct ionic_cq *cq = &txq->qcq.cq; @@ -81 +82,0 @@ - struct ionic_tx_stats *stats = &txq->stats; @@ -89 +90 @@ -@@ -227,7 +228,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -225,7 +226,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, @@ -98 +99 @@ -@@ -361,7 +362,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do, +@@ -359,7 +360,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,