From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id F1DE0B44F for ; Wed, 8 Jun 2016 22:36:23 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id m124so32877307wme.1 for ; Wed, 08 Jun 2016 13:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=et6tgbmwFv1TQopNnTdt6fA1nsgpJc08WSHXgM+9tCg=; b=L+ZU4mYQGBwfwD4nLR8r+3vIjY+z/xXrYqg5tQqHbUOArLRFMnGcDVuc+T3N382v2c NTBw6g0xkyiD8ArL/O4uxrIN+QqEjBCUvFm+qkxhbL95caRbyvu8wlpK6qGI0Exjfckh AQpQOpMaIbMI4t2XXvhIlH68Ti5l/5cFSBIaQnvmjy+dOg5iAElU8OirZj+2KW0gl8fm sbIOZXPB/rk3sYPJWCcHQQ2vDl/1XRzdfdc4Qdk8zrEGsGyem4BckYLh4SdoJzxr88E+ KHVbPERhkuCPKrxuzyo6pDIdoZnyWYHy1zjDrk/sFU4tQialmBw7u911TkSQxaaVTrNE 9jxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=et6tgbmwFv1TQopNnTdt6fA1nsgpJc08WSHXgM+9tCg=; b=DKTGD2vZ0GLxBL0gUtT1wZDINz2fURYbbZxo/IePEOlhqgbyWwJ7hzyxUlRzYkk/M8 gj8ZtH3H+wXVLVANAT2zaDFfgoQGNgbZ+v41UrLRdu6TuaTAf4zwUeWHzNcfG2T7Q8s5 QhXVreTmjwJtwPozrI5BjrWYopRVOkjAT2OD8mzsCXx8Utr8lLngDvDKMo+cJDrt4Q62 rVr4hdfyHT5xxhiNm3gmYeo2+Ilq4XGIoN9/e5NumxJkkg0uDmM68glTV/QMWieOrD5E CFEk3+vQMmlBM3dt+i9V/s50aO42QfMzEnTcJccxHyZyNGKSWDqrQsN3ixwhTsZZc66C Y9UA== X-Gm-Message-State: ALyK8tKcExvcQxGsi+ODD1w4IRhR3Zk8uv4XfBmiul/psO4u3rcFpBJ11fqg7qDFHgeVc0af X-Received: by 10.195.11.103 with SMTP id eh7mr6344443wjd.56.1465418183588; Wed, 08 Jun 2016 13:36:23 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id f189sm3618583wmf.19.2016.06.08.13.36.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Jun 2016 13:36:22 -0700 (PDT) From: Thomas Monjalon To: Piotr Azarewicz Cc: dev@dpdk.org Date: Wed, 08 Jun 2016 22:36:21 +0200 Message-ID: <183204323.ntq5UxT7Bb@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com> References: <1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v1 1/1] examples/quota_watermark: fix low_watermark variable placement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 20:36:24 -0000 2016-05-23 14:19, Piotr Azarewicz: > qw app at its init stage reserve 2*sizeof(int) memory space for quota > and low_watermark shared variables, but both apps (qw and qwctl) assign > wrong address for low_watermark pointer (out of reserved memzone space) > due to wrong pointer arithmetic. > > CID 30709 : Extra sizeof expression (SIZEOF_MISMATCH) > suspicious_pointer_arithmetic: Adding 4UL /* sizeof (int) */ to pointer > (unsigned int *)(*qw_memzone).addr of type unsigned int * is suspicious > because adding an integral value to this pointer automatically scales > that value by the size, 4 bytes, of the pointed-to type, unsigned int. > Most likely, sizeof (int) is extraneous and should be replaced with 1. > > Coverity issue: 30709 > Fixes: 1d6c3ee3321a ("examples/quota_watermark: initial import") > > Signed-off-by: Piotr Azarewicz Applied, thanks Is this example really useful?