From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DE7EE438E0;
	Tue, 16 Jan 2024 17:28:08 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 6BBBE40278;
	Tue, 16 Jan 2024 17:28:08 +0100 (CET)
Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com
 [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 955AF40278
 for <dev@dpdk.org>; Tue, 16 Jan 2024 17:28:06 +0100 (CET)
Received: by mail-pj1-f54.google.com with SMTP id
 98e67ed59e1d1-28feede2624so58640a91.2
 for <dev@dpdk.org>; Tue, 16 Jan 2024 08:28:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705422485;
 x=1706027285; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=N2jvumre8hoc/CiliKGNKLByLsKY42c/j5HXNYRTPzw=;
 b=RiNxhcm+o6B8IHg9qV/WEEz+8Nsih8APs0IbwHVYaIwrsNKBvRqKIqxxnnjDKrQ41b
 21Y8W5HK1MMkcjeBNEaq6h0GbKdMFtCup43aj+J8TJg+ci4BVSPKidQrSw+Y5gT4/aKo
 BXjI8F3BArmnh9GY559NxLwqwTY7VWu6C7rhC4HbIW9FHwvKVJXYTSvTTGRy6EAt0b63
 VYQe3ytbuzHji7Rc0x+GouRZyP5GQaqMaYXvAgo8FbQhrTg04B7xeo0jOzO/6Dz5NA69
 MiiyyAt+kA1Q0360H8qhXEhG7nMe+ndmdmNoo9og3SdAIaM31jWiRozkO+384TXjZT6B
 S0wQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1705422485; x=1706027285;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=N2jvumre8hoc/CiliKGNKLByLsKY42c/j5HXNYRTPzw=;
 b=ChCcVpE0Bd8DXXwpbIXDL+4nn2+xpZgbFXPsaXLbINb07mQlfnSjGI+zhNM0+31oRK
 Ziioa7CQOHeLsCf+TtzkBE7Wrjf7M9kq1bsgLp+aF9IZXyrsUmEb8rUVvhIS6p+1jiNX
 3dSgWT98WFpnCWVC2TUJLLWqkJZP3ETO5d80c1+UTHHA5LsojxmU6bBl4RHVfGFaNfIn
 x9HRhQ5XyusYQKRq/aKRqb/euyQGVaQRXczuiUAFiPU2Uly5g5RJ/voklYB5eKHkMcri
 Vqhv1hhYScs6Q3DuAekE+o4vSSAVX+lHeAMF0YeyqWLB+AkXYgy+ckuTB4XylmF/z9qL
 fe1w==
X-Gm-Message-State: AOJu0YwVnwKEJX0ls1K0pdFyoKduvMYZbrtD366BuomfFqViB2KCE25a
 jg+uKpNH4dx7OYvnrutc0czpNFOCLQZLOA==
X-Google-Smtp-Source: AGHT+IHzZYKOLJfxnVg+l5iMwqcDLqMxrZpm5ViVVKhGvm0a/Dm3UpqTH7aTJ/2k9I4coPQB7qI2zw==
X-Received: by 2002:a17:90a:e552:b0:28e:71b8:1b76 with SMTP id
 ei18-20020a17090ae55200b0028e71b81b76mr1133436pjb.57.1705422485705; 
 Tue, 16 Jan 2024 08:28:05 -0800 (PST)
Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])
 by smtp.gmail.com with ESMTPSA id
 h14-20020a17090a604e00b0028d42741efasm11824138pjm.43.2024.01.16.08.28.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 16 Jan 2024 08:28:05 -0800 (PST)
Date: Tue, 16 Jan 2024 08:28:03 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Tummala, Sivaprasad" <Sivaprasad.Tummala@amd.com>
Cc: "Yigit, Ferruh" <Ferruh.Yigit@amd.com>, "david.hunt@intel.com"
 <david.hunt@intel.com>, "anatoly.burakov@intel.com"
 <anatoly.burakov@intel.com>, "jerinj@marvell.com" <jerinj@marvell.com>,
 "radu.nicolau@intel.com" <radu.nicolau@intel.com>, "gakhil@marvell.com"
 <gakhil@marvell.com>, "cristian.dumitrescu@intel.com"
 <cristian.dumitrescu@intel.com>, "konstantin.ananyev@huawei.com"
 <konstantin.ananyev@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>,
 "stable@dpdk.org" <stable@dpdk.org>, Bruce Richardson
 <bruce.richardson@intel.com>
Subject: Re: [PATCH v3 5/6] examples/qos_sched: fix lcore ID restriction
Message-ID: <20240116082803.260794b8@hermes.local>
In-Reply-To: <CH3PR12MB823395CC861BA196860169E186732@CH3PR12MB8233.namprd12.prod.outlook.com>
References: <20231219032826.4814-1-sivaprasad.tummala@amd.com>
 <20231220064502.2830-1-sivaprasad.tummala@amd.com>
 <20231220064502.2830-6-sivaprasad.tummala@amd.com>
 <20231220083150.55b7dc80@hermes.local>
 <9a90aa9c-4c32-4135-99eb-f46b7e0129cc@amd.com>
 <CH3PR12MB823395CC861BA196860169E186732@CH3PR12MB8233.namprd12.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Tue, 16 Jan 2024 12:33:48 +0000
"Tummala, Sivaprasad" <Sivaprasad.Tummala@amd.com> wrote:

> > > Not sure why cast is even needed, assigning uint32_t to uint16_t is
> > > not going to generate a warning with current compiler settings.
> > >  
> >
> > I was assuming compiler will complain when assigning uint32_t to uint16_t, but it
> > seems '-Wconversion' compiler flag is required for this warning.
> > Enabling this flag for DPDK build causes lots of warnings, I wonder if we should add
> > a new buildtype in meson that enables this flag.
> >
> >
> > And except from compiler warning, I think it is good to keep explicit cast where
> > assignment can cause change of value. This at worst can work as documentation
> > that assignment between different types done intentionally.  
> 
> I would prefer to keep the explicit conversion for consistency.
> Please let me know if you think otherwise.

Keep it, but casts are often a source of bug.
They defeat type checking, and often not needed.