From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 08466F97D for ; Mon, 6 Mar 2017 17:45:21 +0100 (CET) Received: by mail-pf0-f171.google.com with SMTP id j5so62724609pfb.2 for ; Mon, 06 Mar 2017 08:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZYZbEXa5j2ErF4/NvncE4nF7Etbqb2XxNRwvKPcQ6iU=; b=uBNvTLgB1U5ugoVFG4mgDhE5n5jkg9wOPFM+pPuSkFGBMXnEvJgvL2Fa3SaBLc11CQ kD/mPlBCH1g/XIgLotT8gFgqU2aEE//7a/oothF/F1AK+E5s6LVkcSFg9bCKpTbRfnX/ jxTQOXqODgf69eAve8tvrN7+xlUgPy+7pr9beGP50ftEe7D4kEEhvoPeh8mV+mT5Hm0R go3BIUht+Nj5+OE3e40uoQzi/nPSoEHlKHfTJNRZO+uCy3TLL9wsd+mIWFlAm6lVkE8K MT3AciZW6lMXX2jvwZvgS38LREQDW2XPsigYDq/Dl61BK9j4MLC1X14EhxvM9QsprVjb dicw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZYZbEXa5j2ErF4/NvncE4nF7Etbqb2XxNRwvKPcQ6iU=; b=f6HBzsHY1eHnV0cejfdyE6PMdydN8VGCjQslV5jWBq27rJjfRPREvQkK/DuJfpJ8Zm qkUEFbh73kn4MJTYgFUl9q/dFfr2zOJorx/mUjb7+5GWYlQmkmcnExDwG5DgqWMop71r 1shdOzr1uyuQX6Bwsd1RlsDP/Bmsl2ArDFGcGFbkWMBatMWSiuFDj4w3B60G0SYLRFbw pka3z6mno6A2/R38AaTLFyb+jD0ETaDL4GeFvqeGl2+Ssbfku58XQXBZdVC2wS5+Q+lP IqBrfEOqwA1NszDyxMpHu0YRfGtKqdRF5JyMiPEZRvAOLKEkYYwPW4vt2rQriNMyBizR r/RQ== X-Gm-Message-State: AMke39lroFl7dtCMfcAc8ZSxzM8/Np6p12gPh3L0jMLgCu0liycjmUApsilWy+9cko6I3g== X-Received: by 10.84.225.22 with SMTP id t22mr28204764plj.14.1488818720352; Mon, 06 Mar 2017 08:45:20 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id 194sm6378346pfx.134.2017.03.06.08.45.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Mar 2017 08:45:20 -0800 (PST) Date: Mon, 6 Mar 2017 08:45:13 -0800 From: Stephen Hemminger To: Ravi Kerur Cc: dev@dpdk.org, konstantin.ananyev@intel.com, bruce.richardson@intel.com Message-ID: <20170306084513.5d3cf820@xeon-e3> In-Reply-To: <1488660259-6228-3-git-send-email-rkerur@gmail.com> References: <1488660259-6228-1-git-send-email-rkerur@gmail.com> <1488660259-6228-3-git-send-email-rkerur@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [v3 2/3] LPM config file read option. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 16:45:21 -0000 On Sat, 4 Mar 2017 12:44:18 -0800 Ravi Kerur wrote: > +#define GET_CB_FIELD(in, fd, base, lim, dlm) do { \ > + unsigned long val; \ > + char *end; \ > + errno = 0; \ > + val = strtoul((in), &end, (base)); \ > + if (errno != 0 || end[0] != (dlm) || val > (lim)) \ > + return -EINVAL; \ > + (fd) = (typeof(fd))val; \ > + (in) = end + 1; \ > +} while (0) > + Marcos are source of bugs, please write as function.