From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CBAFC433F5 for ; Tue, 9 Nov 2021 07:30:49 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id D0F5961056 for ; Tue, 9 Nov 2021 07:30:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0F5961056 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D137C40687; Tue, 9 Nov 2021 08:30:47 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id F2B6B40151 for ; Tue, 9 Nov 2021 08:30:46 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 56DE55C0256; Tue, 9 Nov 2021 02:30:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 09 Nov 2021 02:30:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= OAdQM2wUTVLmCMhIEY/rbqPP4jDa+9xqytN+1Qtquxc=; b=C5DrgIjZSNtq3YS6 ixT3dc1s2SAtS9UTfJsjUI30hjwkfsNev9gltd3GXUHGZFc8qBc/w9hA6tglD+eT i5UkgkQE1LTW3Ux16lpAnjz/Q3cDl0Ma70o2ouY/HYZrEzA7REYC69zhQx4JcT00 DLNutX/+L3hflrAb0drc7Zkgya0dVJcAJsOmbGsYmVulqZUOBW5swlWqPDn/h3Rr IToXt49wE08BWDN6IAAR0sE1esIWi2fO8ko4oUX/ofSCDFMD89vuKOMT1DZ3BsfB FelEF8CnBYy0IghFvSmxBEP5fLGJYqdWwtKjUnPC6gWT/nhXSMWSSHdyzHnB9ZbL ws/x4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=OAdQM2wUTVLmCMhIEY/rbqPP4jDa+9xqytN+1Qtqu xc=; b=HcXA8dl71Wlco/7qHGcybVuHQVbppjq14phHhk0ReUih46T/RcgDb7q6c UOg0L53Hx23IVpILBdF0NIxeWWYWEx3tcSZrl+1GzYWBVjrVTVXj2C2a/SlTvHWQ tQ/Oy6E08HBf8adXyV2A/17LFaLhS7eT2UIeLOdbsj3BpschVK1zTcuKSEaYxubR kQa6I4Qy94XnHQY5NiAxLI59wDfmCaa4vHpGg+PAp4wqC6HdUSBSM2cbkNxrdzmX JeFmRxrqQFtq9pd3A//WeZl4ANqpW6rsMM0Y3cLN0lN+gUWSl4r0rgF0WlDGvcd6 FFvrtAK1S8iIdrBx39btiJF/UTRsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Nov 2021 02:30:44 -0500 (EST) From: Thomas Monjalon To: Gregory Etelson Cc: "Burakov, Anatoly" , "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , Dmitry Kozlyuk Date: Tue, 09 Nov 2021 08:30:42 +0100 Message-ID: <2000101.8nMyBBQigM@thomas> In-Reply-To: References: <20211026095037.17557-1-getelson@nvidia.com> <1880770.nP2jOJxqqx@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] examples/multi_process: fix RX packets distribution 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 Sender: "dev" 09/11/2021 07:42, Gregory Etelson: > Hello Thomas, > > > > > 28/10/2021 17:35, Burakov, Anatoly: > > > On 28-Oct-21 4:14 PM, Gregory Etelson wrote: > > > >>> - uint8_t client = 0; > > > >>> + static uint8_t client = 0; > > > > > > Acked-by: Anatoly Burakov > > > > > > checkpatch has a message for you: > > ERROR:INITIALISED_STATIC: do not initialise > > statics to 0 > > > > Turning the `client` variable to static ensured that the next time > the function will be called it will proceed iterating clients instead of > starting a loop from the beginning - that's the main idea of that patch. > The variable must be initialized to 0 because the application model > requires at least a single client with index 0. > ANSI C allows static variables initialization to any valid value. > Do you know why the checkpatch utility denied such initialization ? ANSI C makes static variables iniatilized to 0 by default.