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 51F44A0542; Fri, 2 Sep 2022 06:58:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFCC840693; Fri, 2 Sep 2022 06:58:01 +0200 (CEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id 2E12A40684 for ; Fri, 2 Sep 2022 06:58:01 +0200 (CEST) Received: by mail-ej1-f45.google.com with SMTP id se27so1537240ejb.8 for ; Thu, 01 Sep 2022 21:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=QXtYscG08WCxFK7WZMKQpjlVo5YBPZYJBJNknRlee5I=; b=ZXSIDH6aHJ66EsbihqLB5X7nMgyk7AWPR3mS4xFV4X+cvc1M7OydvHBCuhXBP+aNpP 9/2dMePOenuILONTJMDOwpxmDcQmZ7v9zwYGSW9BmWT1uuKTJWhA5FOYq3afkckc6rdd 397vzX0FldQZZb8XrjhDshk4Y1prrCAID7YeSck5bt8B4K+YIxIItgs+7IaQzYh+Owav 4apErXREyLw9xMvsnREq8W1SOcKtQT9ITSX0q9jKZq2sod5/iV+RwNB9MukFD3eMmonE UP32P6oiRsavIEMvENTWYztbyvHKGtOqUwfxsLdrXGqkTJepsNXa63IfWQB0Zw+bbpoM 96HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=QXtYscG08WCxFK7WZMKQpjlVo5YBPZYJBJNknRlee5I=; b=BKPeqIYc88d2HMzBbszou1NAmKr9BDEVceKpNv3RgOo9QI4ZnbPNTXLD/lvAx4uYQ5 YxmHbZmMaRijRdn4Ql8i2gx4oCAi/qdF2IS4Ymk/wDXQFdenmH8TTFVXdNSw2AkqqDv0 +u56Mma4FJNaMgdLD7ajwg5Dcxq976QxZ7BRRJKc70ySbngoQyz/kmBNkOctTJaEPgBu 35iZijkoRr54AJRIM1gy0KC68oA8fabwU/ukr3QixrYUaPU2hcWzFxG1DojNkepdGdOW Wcc1qR0ORyv4rVs8XgMxtHB3RvEcDRA51ha+zM5We0gBspoR6oauSoEBJDtArs7hemQB VrPw== X-Gm-Message-State: ACgBeo0Uj3+LJhh4RUQJFSPHj76NUZ/eCzOZT57tgsSpwbL65I99DH3o dfNtjB1wKJCQwbr+5Pv+cf4kkcZjMwEBpXfStNrQbA== X-Google-Smtp-Source: AA6agR5PMIhXoA7FyYbrF25RNLLmGW5B44XWegBEoBp0G/4ocJwKM/WtxEup6cN8K7W1A/J25WmQOx93/4Bxuuj31Qw= X-Received: by 2002:a17:907:7612:b0:741:6559:de26 with SMTP id jx18-20020a170907761200b007416559de26mr18111547ejc.582.1662094680815; Thu, 01 Sep 2022 21:58:00 -0700 (PDT) MIME-Version: 1.0 References: <20220706063255.255325-1-usman.tanveer@emumba.com> In-Reply-To: <20220706063255.255325-1-usman.tanveer@emumba.com> From: Usman Tanveer Date: Fri, 2 Sep 2022 09:57:49 +0500 Message-ID: Subject: Re: [PATCH] drivers/raw/skeleton: fix typecasting in skeleton_rawdev_enqueue_bufs() To: Thomas Monjalon Cc: dev@dpdk.org, sachin.saxena@oss.nxp.com, hemant.agrawal@nxp.com Content-Type: multipart/alternative; boundary="000000000000088fe005e7aa9340" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --000000000000088fe005e7aa9340 Content-Type: text/plain; charset="UTF-8" Hi Thomas, Can you please have a look and update the status? On Wed, Jul 6, 2022 at 11:33 AM Usman Tanveer wrote: > In function "skeleton_rawdev_enqueue_bugs", variable "context" is being > typecasted to (int*), and then assigned to a "uint16_t" type variable > "q_id". As the value is a "uint16_t", (int*) is replaced by (uint16_t*). > > Signed-off-by: Usman Tanveer > --- > drivers/raw/skeleton/skeleton_rawdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/raw/skeleton/skeleton_rawdev.c > b/drivers/raw/skeleton/skeleton_rawdev.c > index 16ecae3d92..3f4da88747 100644 > --- a/drivers/raw/skeleton/skeleton_rawdev.c > +++ b/drivers/raw/skeleton/skeleton_rawdev.c > @@ -421,7 +421,7 @@ static int skeleton_rawdev_enqueue_bufs(struct > rte_rawdev *dev, > * help in complex implementation which require more information > than > * just an integer - for example, a queue-pair. > */ > - q_id = *((int *)context); > + q_id = *((uint16_t *)context); > > for (i = 0; i < count; i++) > queue_buf[q_id].bufs[i] = buffers[i]->buf_addr; > -- > 2.25.1 > > --000000000000088fe005e7aa9340 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Thomas,
Can you please have a look and update the s= tatus?



On Wed, Jul 6, 2022 at 11:33 AM U= sman Tanveer <usman.tanveer@= emumba.com> wrote:
In function "skeleton_rawdev_enqueue_bugs", variable &= quot;context" is being
typecasted to (int*), and then assigned to a "uint16_t" type vari= able
"q_id". As the value is a "uint16_t", (int*) is replace= d by (uint16_t*).

Signed-off-by: Usman Tanveer <usman.tanveer@emumba.com>
---
=C2=A0drivers/raw/skeleton/skeleton_rawdev.c | 2 +-
=C2=A01 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/= skeleton_rawdev.c
index 16ecae3d92..3f4da88747 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -421,7 +421,7 @@ static int skeleton_rawdev_enqueue_bufs(struct rte_rawd= ev *dev,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* help in complex implementation which re= quire more information than
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* just an integer - for example, a queue-= pair.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
-=C2=A0 =C2=A0 =C2=A0 =C2=A0q_id =3D *((int *)context);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0q_id =3D *((uint16_t *)context);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 for (i =3D 0; i < count; i++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 queue_buf[q_id].buf= s[i] =3D buffers[i]->buf_addr;
--
2.25.1

--000000000000088fe005e7aa9340--