From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53])
 by dpdk.org (Postfix) with ESMTP id 50436558B
 for <dev@dpdk.org>; Fri, 29 Apr 2016 11:04:55 +0200 (CEST)
Received: by mail-wm0-f53.google.com with SMTP id n129so19154703wmn.1
 for <dev@dpdk.org>; Fri, 29 Apr 2016 02:04:55 -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:organization:user-agent
 :in-reply-to:references:mime-version:content-transfer-encoding;
 bh=prgY2mJj802usybLpBSQdwpBFha8zcR1p1HQfnW++Pw=;
 b=hmj3DiKfP9EzZTjDoiCsjT2t6GW0BhRPk0q57ha+zYeiuifXE4dmwdqY4IlBX4xRwz
 xkHjTxBmGsUdgIl5rx1mCT9+6AQN24HdWWHzy9z7zwfiYl4AhWGV5sqHLE95XCPmPqnz
 cHwWop8o3uwzdVkSz9h7UvRlH7iBi2jprG6NiR1c39TI0w5D0nIYqjwqRvOpMB8Y8KT0
 7XrUtchksZAjMfREIJWV5BACMqPMzyeiCCPH5U0uSRUJ+6YVOJk9XYeslOP9sU3fDkC/
 Cf6FiLrrW/XvSF7qgQ9tYWq0c8LAxyVfN8sBM35Pwam1WUJAV8kfpuw2E4OoJ+IGLhOT
 sibg==
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:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding;
 bh=prgY2mJj802usybLpBSQdwpBFha8zcR1p1HQfnW++Pw=;
 b=Hqf3C9l6oCuOFjRzwpvBZJ8Y8+rgoWKY1mHUsQ/8Zp2PcsOfIi24BOW5OAztl+TEqF
 +8tNGf2mzTwoDG/5aMFoiM7W2gvo2OLVE1amya2ZlRDF9aOYScM5+uGOuvAhP0jTlSYD
 0b6H1nYTqtxQHYRxK7lw+mVZjzr07W6iQwI9uROQWCX4AezZOjOE4N8Gp2hZ5Q3GZZBH
 IYj4s+wmxLUc6nXNmXUE8/YKfP0NYmkvUBgLjAkK33W7Pb3nyk+gjDMD8wp+XP+tcF2/
 5FbJQ/xUINQzBR8mmptsWO8lw4gQj9bucxxy7aLnSSZ2cf393JeoR7LHSa/D7+Vv2x5Z
 7NEw==
X-Gm-Message-State: AOPr4FWMgye3B1OxLUmESUbFrf/sL2eg3VlU7XryAKe298N9tX1BgqDqPP+8s+BeAv1fM5ie
X-Received: by 10.28.131.195 with SMTP id f186mr2494615wmd.97.1461920695120;
 Fri, 29 Apr 2016 02:04:55 -0700 (PDT)
Received: from xps13.localnet (51.111.75.86.rev.sfr.net. [86.75.111.51])
 by smtp.gmail.com with ESMTPSA id y3sm13734032wji.40.2016.04.29.02.04.53
 (version=TLSv1/SSLv3 cipher=OTHER);
 Fri, 29 Apr 2016 02:04:54 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
 Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org
Date: Fri, 29 Apr 2016 11:04:52 +0200
Message-ID: <4314823.GZ8AKUaKyk@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; )
In-Reply-To: <20160422154239.5a3edecf@xeon-e3>
References: <1461332640-24273-1-git-send-email-thomas.monjalon@6wind.com>
 <20160422220850.GF7603@yliu-dev.sh.intel.com>
 <20160422154239.5a3edecf@xeon-e3>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH 4/4] eal: add assert macro for debug
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Apr 2016 09:04:55 -0000

2016-04-22 15:42, Stephen Hemminger:
> On Fri, 22 Apr 2016 15:08:50 -0700
> Yuanhan Liu <yuanhan.liu@linux.intel.com> wrote:
> > On Fri, Apr 22, 2016 at 11:14:35PM +0200, Thomas Monjalon wrote:
> > >                 rxd = (Vmxnet3_RxDesc *)rxq->cmd_ring[ring_idx].base + idx;
> > > +               RTE_SET_USED(rxd); /* used only for assert when enabled */
> > 
> > How about adding the __rte_unused tag at where we declare it?

It is not really unused.
And adding a SET_USED line allows to put a comment in the context
below the assignment.

> Why not just kill the useless assert's all together? They really only helped
> during the short time developer is debugging this code.

They also provide some kind of comments and can help when refactoring.
Anyway, removing the assert would deserve another patch.