From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by dpdk.org (Postfix) with ESMTP id 631012A5E for ; Sun, 31 Dec 2017 18:37:58 +0100 (CET) Received: by mail-pl0-f66.google.com with SMTP id b96so25893884pli.2 for ; Sun, 31 Dec 2017 09:37:58 -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=tp4/9Kk5vvq5/DzQoijAELjMrtB33mVUNWpdmF7cZQY=; b=km5+gxxPHP5PZ5tFi6lAD8SNMHh5/PhynjpLGI5/XZvfkBdPa1leQVHuqJE18Br5x1 0OCF0Gdu7wn7vKjS5r7PtTGOTPrZDpSkGz3F+09arDBFXbQywIivHHORdglnoDQjKB3a iWWO09ks1v1A/E/TjUb1s9nSVUr9gWRc2RhLTH/IjUTVAjVQYj70rwuSQUGGLV1gOyBF UfC3TxEGIIWmThGINKq1Kw7nABy/jChd+3lwTHlwgBQA20mx6lbnWifjCAIOD+8xXF4J ue2DnYSomI2bFxJq5N5IYXuAECWUanBT8OpxpPOqWB24tSyxaZ898K5EVutsp+BgEOGy k2CA== 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=tp4/9Kk5vvq5/DzQoijAELjMrtB33mVUNWpdmF7cZQY=; b=KaK+7ubzvT+fVLeIqknZFSoTjmMjUd4TuB6KyV9xpi27SpGTjqSp5We09yGfhv+Dg3 PWsy6hNxoHSoH0Gy+WZwABkBST3CN84ppDJchh59jne1++t4n6Ouzr/BjA5bwX+QbAO8 vN3wkrJp060aiDDbreJjnZrkhFXgux4iETUh0V9yTMPs2lkHtUxSfQSJnOSBRi8Ugv+4 BiwLMFW15bD/scqwKPEvvHewBHh5AKAFWfjbacE/v1XT/N66OHWkxra06waOCs02zEF1 UsyDHOVn/AGx40rANk8IFbf2KtWCbDD9qRlI+9htkY63HIWGtiVoqz9/mI9hRkasf4be Hx0g== X-Gm-Message-State: AKGB3mJzkSzSzwxxbsOjTqvSPJU1f+PzyWvGSWwB7Wo/T45l/fgPgYHb Dv30VLg1NW6EBphQKvNHB79yzA== X-Google-Smtp-Source: ACJfBotcyWXeqyGc4NNXONB5SsOKwr7UV+qkNIies1KOJnsOIJwrZJaE0ak85SxbbY4kNqAwSaRAHw== X-Received: by 10.84.235.139 with SMTP id p11mr41336933plk.391.1514741877534; Sun, 31 Dec 2017 09:37:57 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id m65sm79926659pfm.41.2017.12.31.09.37.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 31 Dec 2017 09:37:57 -0800 (PST) Date: Sun, 31 Dec 2017 09:37:54 -0800 From: Stephen Hemminger To: Shachar Beiser Cc: dev@dpdk.org, Adrien Mazarguil , Nelio Laranjeiro Message-ID: <20171231093754.0d14f88b@xeon-e3> In-Reply-To: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> References: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] lib/net: add IPv6 header fields macros 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: Sun, 31 Dec 2017 17:37:58 -0000 On Sun, 31 Dec 2017 07:34:29 +0000 Shachar Beiser wrote: > +/* IPv6 vtc_flow: IPv / TC / flow_label */ > +#define IPV6_HDR_FL_SHIFT (0) > +#define IPV6_HDR_TC_SHIFT (20) No parenthesis needed around simple numeric values. > +#define IPV6_HDR_FL_MASK ((1 << IPV6_HDR_TC_SHIFT) - 1) If you use ((1u << IPV6_HDR_TC_SHFIT - 1) then the mask will be unsigned which probably what you want. > +#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT)