From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) by dpdk.org (Postfix) with ESMTP id 1DFCA231E for ; Wed, 12 Jul 2017 01:17:01 +0200 (CEST) Received: by mail-qk0-f177.google.com with SMTP id d78so6054467qkb.1 for ; Tue, 11 Jul 2017 16:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0Zyzn2WAtCe7S67G2HI/0BOjtKhzoddrEIM/wmLd+ms=; b=FXQYp3A9FWUpaAua4yhLN6s0JbBadjk/876v4vqw9nJm9bv9MdqzuO/fIDLhxNguJo YeGupf9W6735qwguusSz5c3jw1Az9s4Ab5FrXnyyQ5KpugbQkPRiEoxDafUax43UwV+D 0zEdKk4aJfwXi/9MZ3xPbzKPmg96Gl0HvS54I7m3LNiMTSQhFrZzU8rmglfC0KDTrQmA 7yEvR8NPBQS+mwN5MWUcwfwE3GKTy4AhC0grAIpGVhUR+crNAcxic7k8QL3lrjlQSMzA +DdlQ7gzNBEVU93k1qPknINBljOFrw8yb87EXVQUYyyYU8G5uJJPdk9rr5+DzP5sQiDL 1wjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0Zyzn2WAtCe7S67G2HI/0BOjtKhzoddrEIM/wmLd+ms=; b=RudLzR/QDYOIKjm+IPsVaXkeS9fyw3zBrYhCHOUpRmk7SALqwEfF0/sAdBbRnpFq/H RtVKTE+Rf9GsZZpdKqrHMgcezCPw2+klHUybPcZLCS5H+plq0p6gYfHWowzXTkeLL29h /p5RG9ipPOT2x6wRQ6+6ywblk1WNMXlm6Jz3hTYZfocTfz48g7Df/kixCV4uZg5AhLWA DmdZPYS91nBPn87EBo8bKQ7yxVJms2AO+OyFSnv8ZndActjXPtIw5/0Phyo6C5oyP0pL Sx83TWums8xeVtXb2+3J6FBQCjrumOMg8mq//y5vjP60zaYVkIMyKgoLdIEF4piK8hVb +rJQ== X-Gm-Message-State: AIVw113Hj9QpPRyOQtTV7L7Z1JwniRDIA8Ydqc0OdCfo+htwnth9tj4g QuUTfEnXnQx5pJIfp4LAPPmTecqVbzPr X-Received: by 10.55.94.70 with SMTP id s67mr1093855qkb.256.1499815020553; Tue, 11 Jul 2017 16:17:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.37.3 with HTTP; Tue, 11 Jul 2017 16:17:00 -0700 (PDT) In-Reply-To: <20170711132807.4cbceb72@xeon-e3> References: <1499801585-10031-1-git-send-email-medvedkinv@gmail.com> <1499801585-10031-2-git-send-email-medvedkinv@gmail.com> <20170711132807.4cbceb72@xeon-e3> From: Vladimir Medvedkin Date: Wed, 12 Jul 2017 02:17:00 +0300 Message-ID: To: Stephen Hemminger Cc: "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 23:17:01 -0000 Thanks, I'll change it. 2017-07-11 23:28 GMT+03:00 Stephen Hemminger : > 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. > -- Regards, Vladimir