From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) by dpdk.org (Postfix) with ESMTP id A6045374C for ; Tue, 11 Jul 2017 22:28:14 +0200 (CEST) Received: by mail-pg0-f46.google.com with SMTP id t186so1574299pgb.1 for ; Tue, 11 Jul 2017 13:28:14 -0700 (PDT) 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=hubFyxrbZNw3C8BqksgxjigMGUMVhaUTbfW6QFWcoQY=; b=EWh+smzk8OFaZzC7t1UJ5Vbbpfm7SwfVWMdMfU4/DfGgnssdmForpOooIHfHJT81qF VwNOXRpDnRRiPryof8yy3XxVbsiEQ8Y4b/O1BkJqb55ChVbJwUJeuqJZvXGG74bzSSWZ BV5OXsATRyWhNgAuMkqGuxFtuF8ko8sOf0hCNSunrynG/c2oiXvE7qZYRb/cQ0c9fH78 NWenlIJOChmSGqVGC97LrBGshamd8t5icv/IAxmIgPWbDhViWrRn+a9shkox9x66GwQN b6+nyeayGr+3s8Ggi6vWxXQ5bARCLlOv/mH0AzS5vax97EKyt1jGt47KqOGjRJSTH0GZ +ixQ== 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=hubFyxrbZNw3C8BqksgxjigMGUMVhaUTbfW6QFWcoQY=; b=deBYMF2aiJSiKLI5KB7XXqtC4y+UDppCGiJgHaMVRu15zBxxGXn9rCA4Kh7MR+1H4J nlSH1U05/pYwfuA5SNOExA2bkDydGLSJMpAH5cB8MsHX4KsoOkOUg/hNeTjTR5t1p/lu lMGqz/epkc+8E8RGscu0gNPuBYZGS/WnEdgLeCu6czWo2t6powr8PCNLpxhtv9QfgELt 5F76p9L/CHMiQtkorb01oC1JWhs3sOenBDZIIJTqgAAoOtTTMZxgBYQ2pn/4ODv9UShz jp/j0uPiqtWS79CY1HHwGLtEP8Z122qBtNuYXwzwqLyIMbeCOh8HaK9aAT9rq9b+KAG2 TgRw== X-Gm-Message-State: AIVw113EbaiF+tIFu1vJOSVvloBLZlPMN3Z7iyMoQZO+vwUfbqQqs/EK 62CfnkRvIonE/JUP X-Received: by 10.84.136.36 with SMTP id 33mr202599plk.123.1499804893914; Tue, 11 Jul 2017 13:28:13 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id 71sm293105pge.45.2017.07.11.13.28.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jul 2017 13:28:13 -0700 (PDT) Date: Tue, 11 Jul 2017 13:28:07 -0700 From: Stephen Hemminger To: Medvedkin Vladimir Cc: dev@dpdk.org Message-ID: <20170711132807.4cbceb72@xeon-e3> In-Reply-To: <1499801585-10031-2-git-send-email-medvedkinv@gmail.com> References: <1499801585-10031-1-git-send-email-medvedkinv@gmail.com> <1499801585-10031-2-git-send-email-medvedkinv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] lib/rib: Add Routing Information Base library 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: Tue, 11 Jul 2017 20:28:15 -0000 On Tue, 11 Jul 2017 19:33:05 +0000 Medvedkin Vladimir wrote: > + > +#define ROUNDUP(x, y) ((((x - 1) >> (32 - y)) + 1) << (32 - y)) There is already RTE_ALIGN_FLOOR/RTE_ALIGN_CEIL > +#define RTE_DIR24_8_GET_TBL24_P(fib, ip) \ > + ((void *)&((uint8_t *)fib->tbl24)[(ip & \ > + RTE_DIR24_8_TBL24_MASK) >> (8 - fib->nh_sz)]) \ > + Why is this a macro and not an inline function. The expresion could also be split up to be simpler, and compiler would generate same result.