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 C6E1A46066; Tue, 14 Jan 2025 19:41:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6389C40299; Tue, 14 Jan 2025 19:41:58 +0100 (CET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id D77B740298 for ; Tue, 14 Jan 2025 19:41:56 +0100 (CET) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-2efd81c7ca4so7751580a91.2 for ; Tue, 14 Jan 2025 10:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1736880116; x=1737484916; 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=kaaqwDK2gJVBN2d8RltTYt9PdTdeyKvHZbmgpjhiwHk=; b=FxlKHffWV9yqTfhXYjUYWUSAcMFb+uDm4SOzJXNMReB7d6ggKlySCNIcQCKYgdQQbS WI8Y87XTHDzLg9/GB678kKm2AGYUcjRD+B5wO5rlJHwh+SWXSORYf3sMp/Oa1SKSIt3m r2X3yqxjnK1V/FQcX3i7CfrLwGlVt19x8EJSg2yPsXhtlgcWrZY3d55ya08zPPHRTSA3 RKSvvrX96GT85U2oqPgbI6h8b6p6QW3hrLfTokD3DUqLJcHrv+Mcdxcue1qZobQhgXXC CvDehS+YgwBxt0ztSBJz98aeVZxLD5EWHxFNa9GH+E50dK5pvjEDAC86HGJ92hB+f8iS wsQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736880116; x=1737484916; 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=kaaqwDK2gJVBN2d8RltTYt9PdTdeyKvHZbmgpjhiwHk=; b=OUDNupkvNoMXjxoDzgsMBTR7qO+Yt6IgTLl8fpIW+yByYBigRCvgfawKS2nj2MydWd mqmz+TKEwsZXnESOdBPInc/OKrf8Q28NucVZ/AZffHO50Fga4WsR0IyLzePuBoXAH8/q 7qWdNGlvouzyCpyUWy3idQpZmZh+q3m8cHcOqpvOlumM6R1B5dgN23BaDATubIlohSUa xiYIttx40PJcPMqBLEk1MCF/BTRqRYX+ljHMKlUDHZ7N2IMHBe9mjHp/OCC6iu1Y61+a SiGMPIyMI3fRLig8dEfFc7N/YARHpuvYxCl6AFYKA6t1ruRkH+QEL8+YI+DCa+/rithP 1e5A== X-Forwarded-Encrypted: i=1; AJvYcCWq5BFJtILRz0oJoX4IFL1dpfldFkqf2JYYzeBUo9P9SyZrUeH1NwHOgCOxOsa1PYshmN8=@dpdk.org X-Gm-Message-State: AOJu0YzhPeCK5CloTl52VG6RLy5xdU9LARZukXbWdYFyKdAB72YUDncT sNQXzAc/nUm0kHREuRmV8nnSgMVPI6SYn8t27Jm6I51NxzYZ4mVnG1J6BQhPors= X-Gm-Gg: ASbGncuUNmsKPj/Kj90dcvADoMgWM5aYpLnRwEDXl2K1pLDWgkrfn0cHrPnmbrwg5yx kOnT/YWSOMq2Q7aaobjW+GXOzVRav96hQioqDf38yLIiSX4IehxGjAIYbufKc7Px5xfiEuZeT8v Z6CnXZsYlx9hO51z+dlgfuvGpsPDfreIy1XUYl1O3lwWRXWn70nDr+IwFqu7VtwVNj/DzVgV7T5 lTajMkXX7mwHpgHqpaHA3LENV7DRNNF1XsNur+OaHYALD/xXklryHji9Y9LUlX7z9qSqLVCcrs7 zPXbqn3RoO+HgWUOAFMyNeZ5dtMIsxpweQ== X-Google-Smtp-Source: AGHT+IFNONL9cJdXPtwRZiNiTWhMtQ8ha/nLOTP5SKsstNT+rtY301pnToq6hYcf1A4OQmrCur7eXQ== X-Received: by 2002:a17:90b:5208:b0:2ef:33a4:ae6e with SMTP id 98e67ed59e1d1-2f548eba9c4mr44597131a91.12.1736880115875; Tue, 14 Jan 2025 10:41:55 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21a9f138a57sm70824565ad.87.2025.01.14.10.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 10:41:55 -0800 (PST) Date: Tue, 14 Jan 2025 10:41:53 -0800 From: Stephen Hemminger To: Andre Muezerie Cc: anatoly.burakov@intel.com, bruce.richardson@intel.com, dev@dpdk.org, ian.stokes@intel.com, jochen.behrens@broadcom.com, vladimir.medvedkin@intel.com Subject: Re: [PATCH v2] drivers/net: use 64-bit shift and avoid signed/unsigned mismatch Message-ID: <20250114104153.654dec88@hermes.local> In-Reply-To: <1736198215-12861-1-git-send-email-andremue@linux.microsoft.com> References: <1735246770-731-1-git-send-email-andremue@linux.microsoft.com> <1736198215-12861-1-git-send-email-andremue@linux.microsoft.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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, 6 Jan 2025 13:16:55 -0800 Andre Muezerie wrote: > This patch avoids warnings like the ones below emitted by MSVC: > > 1) > ../drivers/net/ice/base/ice_flg_rd.c(71): warning C4334: '<<': > result of 32-bit shift implicitly converted to 64 bits > (was 64-bit shift intended?) > > 2) > ../drivers/net/ice/ice_dcf_sched.c(177): warning C4018: '>=': > signed/unsigned mismatch > > The fix for (1) is to use 64-bit shifting when appropriate > (according to what the result is used for). > > The fix for (2) is to explicitly cast the variables used in the > comparison. > > Signed-off-by: Andre Muezerie > --- > drivers/net/i40e/i40e_ethdev.c | 22 +++++++++++----------- > drivers/net/iavf/iavf_ethdev.c | 2 +- > drivers/net/iavf/iavf_rxtx.c | 2 +- > drivers/net/iavf/iavf_vchnl.c | 2 +- > drivers/net/ice/base/ice_flg_rd.c | 4 ++-- > drivers/net/ice/base/ice_parser_rt.c | 16 ++++++++-------- > drivers/net/ice/base/ice_xlt_kb.c | 2 +- > drivers/net/ice/base/meson.build | 19 +++++++++++++------ Patches to base driver need to be avoided if at all possible. Please resubmit without that part