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 90E4845BB6 for ; Wed, 23 Oct 2024 23:20:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B43F43316; Wed, 23 Oct 2024 23:20:39 +0200 (CEST) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 2CF2A43316 for ; Wed, 23 Oct 2024 23:20:39 +0200 (CEST) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43167ff0f91so2083905e9.1 for ; Wed, 23 Oct 2024 14:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718439; x=1730323239; 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=dOYlEzUrOvagAuopMwuA8lA80AM1DRypz0BjaVgFXWw=; b=OUB9q+oeI9DXVj34juJkjSufGEiyjd0pGUZhM4/dPO3er3fvrPLMuEHKj2Ne3VH3CK FaJpSIM3zkN5QlD+8nwyp1o9ugfUgQib+KklojvSJPzL5qQtwu+oI4YQFjXDM3+snq77 zY1iKYtZuqgYGhGCGnorY/jF0ruzS1sgH1cyZOV3S/hFOeJUJy9nsM2OpzLN0pwz+FxF DFTRQEfdJUG+1PaH+wRViD1Rz5NtcdjPq18tDd4D2P9f2k9T9l0Et15zXwz0iMDwbeNW 0VBvm28i2DBnLJdAI4wVWusUPUmYowtoGIuxETZsy0ffQ9KAvpe9nUoqeg6gbJq5SXH1 LHOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718439; x=1730323239; 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=dOYlEzUrOvagAuopMwuA8lA80AM1DRypz0BjaVgFXWw=; b=Gzj/3ZChccy9ui6KC60+HOABaum4jgbo3Hc691SThVaNtK5WpAgFyj8WNPFkAiH9hW UsD6+7cgkFZK0UJz8wOqa/35kF1ImjeUn3PRc1LWBVxGLDj7nc4KvIdg9HrBqndS6S5O rAOkF8NBt65A9z23NkKEdIs7qmEIPdHUyzYgstt0bnT5AUS2bqmk+4T2nIVG7kUwLEFm DyJCKjXsy+XVuOVcv1pIUyToUgHrhO2iC1XsS9KQfnMPtNlbaO9T/qO/7cInIQxSgJSQ Gz968sFeJy5GC9Q9WI1scHJXGRGQZdhMqRQkk8YZcg2t1I+KuwlDEPK1fF+sYHbGc12L QChw== X-Forwarded-Encrypted: i=1; AJvYcCUxnV/ocWNdkSmHvNEEn5CAOqfTJhucp7qSYGsf7gnTzAbCWtYqINjGATI4AvSkvlICKHOzay0=@dpdk.org X-Gm-Message-State: AOJu0YymQ8lTcoPVZqA7AzbmWYX4ou6NLZJ4KMbVWaqt2ZmAACzxzcsO 1hHHG/LqA7/1Xaggx0bkroTRkwNLdky8GlPnbzyK9RPi+dfXCFHHZ32Kij+F X-Google-Smtp-Source: AGHT+IFHSG0QXqHGCDNgJAJZz7WoHP+pRsV9B3aG33eM1h1UAEhsme8foN+UbT3/E9bKVbZy0/WQeg== X-Received: by 2002:a05:600c:1e22:b0:431:53db:3d29 with SMTP id 5b1f17b1804b1-4318415f712mr30909885e9.18.1729718438641; Wed, 23 Oct 2024 14:20:38 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c3a7a1sm26980025e9.32.2024.10.23.14.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:20:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Rohit Raj Cc: Hemant Agrawal , dpdk stable Subject: patch 'net/dpaa: fix typecasting channel ID' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:37 +0100 Message-ID: <20241023211704.1216956-57-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/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/b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Thanks. Luca Boccassi --- >From b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Mon Sep 17 00:00:00 2001 From: Rohit Raj Date: Tue, 1 Oct 2024 16:33:09 +0530 Subject: [PATCH] net/dpaa: fix typecasting channel ID [ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ] Avoid typecasting ch_id to u32 and passing it to another API since it can corrupt other data. Instead, create new u32 variable and typecast it back to u16 after it gets updated by the API. Fixes: 0c504f6950b6 ("net/dpaa: support push mode") Signed-off-by: Rohit Raj Acked-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index bcb28f33ee..6fdbe80334 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, struct fman_if *fif = dev->process_private; struct qman_fq *rxq = &dpaa_intf->rx_queues[queue_idx]; struct qm_mcc_initfq opts = {0}; - u32 flags = 0; + u32 ch_id, flags = 0; int ret; u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM; uint32_t max_rx_pktlen; @@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, DPAA_IF_RX_CONTEXT_STASH; /*Create a channel and associate given queue with the channel*/ - qman_alloc_pool_range((u32 *)&rxq->ch_id, 1, 1, 0); + qman_alloc_pool_range(&ch_id, 1, 1, 0); + rxq->ch_id = (u16)ch_id; + opts.we_mask = opts.we_mask | QM_INITFQ_WE_DESTWQ; opts.fqd.dest.channel = rxq->ch_id; opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY; -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:42.682344768 +0100 +++ 0057-net-dpaa-fix-typecasting-channel-ID.patch 2024-10-23 22:16:40.519943519 +0100 @@ -1 +1 @@ -From 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e Mon Sep 17 00:00:00 2001 +From b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 51f5422e0c..afeca4307e 100644 +index bcb28f33ee..6fdbe80334 100644 @@ -23 +24 @@ -@@ -972,7 +972,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +@@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @@ -32 +33 @@ -@@ -1096,7 +1096,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +@@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,