From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0043.outbound.protection.outlook.com [104.47.1.43]) by dpdk.org (Postfix) with ESMTP id 894B012001 for ; Tue, 16 Jan 2018 10:18:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5QRN86tQ/TvzkAyChyRcRw7W8SI+YMJQyzRGMMsaMV4=; b=WWl4BkSaRi93mLSogsUhc6jpDya1wUFRq3KotUT/zOs9w15tINXzqydNlGcA8VlDU1kGsZqxmzVh5VbXFrQgD5PELTfhs6pdUh5Mvr45GXOzbxA18IhfGQkmtUh8zZsOu9Sm+eGNxq5eTO0BrMjsHDcOy6Ile1hdVukjza1vWjo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 09:18:24 +0000 From: Shahaf Shuler To: olivier.matz@6wind.com, stephen@networkplumber.org, yskoh@mellanox.com, nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, Shachar Beiser Date: Tue, 16 Jan 2018 11:17:51 +0200 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> References: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: DB6PR0301CA0055.eurprd03.prod.outlook.com (2603:10a6:4:54::23) To AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 60ec88e9-c0a7-4ad4-a4a7-08d55cc218e6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:AM4PR05MB3137; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 3:VFOquu2nSMmE6Jd/DkScnasS3a3ADKmo1rqVdV90ynmq8konw3dPgp9ZgqHMYAacWzCTAw3I3dK9GlMvByMuEbckkxxpnJPVJX7BfzuJKGH9PuRPUD9UWRrzDoGR3XtY7wY8M6qgNCfgkrbTarZYNA0LVag9MWHFWk8mQSg6b0jng0jt6vLEcb6wdhzxTenLYz8z7B7Jsm1BZZ2rT9OREvE8WQ2rcmlDEOuoAK7sA2ZDHhczrxsroCOU0uHvuZuI; 25:BgUc+Kx4+RPx5XfqhR7e/Mbiq+4QUKvtqAU+mUqXI+AfzRmQpe1nDSmN9o7bcoG9KPpH+FjgqHPh++OziT1bTKZs7eWN/7jIk2sJj3KhDDgsdNqXjRm4fz02/gHsb296L3HLg2Hbnkz2tTjpVwCpwxjZ9XQUU5ENmRqlo5ZuTTiCbXtp65bS+wFeeqwIrjqAqr+pi0Ok4nNTDCRj5nrKDqB8EIufmfmw6vYNfJ/2mTPUjxm8C2TBULPih6cc9IoxVtIrOysa856qRks/iBVrZIjIRsOnRc0WH7sP5O+e1IPHBjV1gg6CdNmXYt/yJK5ZLZCMSjNJfI8wh8qD9t6WoA==; 31:IMLZQCJCh/QA6kdO6tylNpDLjmZ3ii6jZR4rij4ZEzXmcaZBbgx/nJ6yqlfhzAk/jJiSGEx02PsVdjPQc045wSj/HmJ7mcIXzPa1igPebCSxtnn/eUKs4fFc7XKm++NcM39Qz0aUcWQ4wO5UeMkABuJPjqIi2g2vb5EFJr+YGO9c3pP0SF33/X/mDu11bXwtB8cCcBPRbMRC77sf8uBnG7lzrnl9RqUDydwYL/g29oA= X-MS-TrafficTypeDiagnostic: AM4PR05MB3137: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 20:1cXmyCznlf/b0dr4UpLQxriBFu42ZfJaJf2PnzLPGDYSuS7Vc38lZdabQiIBawFTOcwvtLgEm9YMmWQbm/5u03a82DMxnA2FR0/EvsYYx9ac82ibI5CuwPNAJLoiq+A+vINxJIGjsWlyPUSgPExJWq2i0x4+jFgKOKM5k+GOV9WeyQO4+UA3IoOs9ZcA93NrWQW3EjrTPSMhKdTxHZRleSNi42kN2kkUH+bnyXoNRgGahOmlqKXm8afWUTMJFO3+1OKmxOnxZ9rRYXlEwxakGFmQ6kO/FibKhDF5ZLmcduAtVz9gtqG7tTVC++d/FBEwjrZCm+rT3V94X9pZQBEXXzlZsA21eGmbQI9GNDohI7AQMAqUtnXMDkFJoheA/Fj6b690KOWI4JwcaQoA9sjAg01I6c1TPE5Ykfjj1AJ2w7b/hEZlcfOSaXYZYa1RU0cbjq1GgZkt35GBBh0aH5Au0SeJ9Uh4hfABBYXEBPmsem5cAOgaY8a+aa7WT459kfCA; 4:5CZy6Bn3pymkDDf5XiTHjHN7QXEsNXTMYKo4Ek9XOaHKlsD8YvgGRq8EyqyU1wKuYP3HCdaWv2IrPLfzExXn7IvBtjDx5Bb0eYHDTCSthGbp5eCPa/AXXOP/bL+ToEvpftVck3/GTsg400efvhxqiQUKKf2PeTzgfVS1S+zCya4ccZJ+orYs6fTcKGCUq7jRsn7tdtq7+G79/mJpcAToRqMxAylIlRJ3wM1U0T6EFO1Hb71HpZvqrplmDFul3pRwF76cxh4m3CmbUmYq39Sujw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231023)(944501161)(6055026)(6041268)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR05MB3137; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM4PR05MB3137; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39860400002)(39380400002)(376002)(396003)(199004)(189003)(316002)(106356001)(86362001)(36756003)(66066001)(33026002)(50226002)(8936002)(7736002)(305945005)(16526018)(69596002)(47776003)(8676002)(16586007)(118296001)(50466002)(48376002)(105586002)(81166006)(81156014)(21086003)(97736004)(2950100002)(4326008)(25786009)(478600001)(53936002)(5660300001)(107886003)(76176011)(51416003)(52116002)(7696005)(2906002)(55016002)(6116002)(3846002)(6666003)(68736007)(386003)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3137; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR05MB3137; 23:LoUw2G4KWZ0TlrFeamOV/ZyeBaI8QfrRJ6SM/WCRi?= =?us-ascii?Q?SXlR0nyOsSt3k7TWwN5oHR/WRoVn9Dtryb9TF0bowN2VK+W6WnOYROdhot23?= =?us-ascii?Q?T1C/vVXiP/j97PePVy1NPxBSliYXnb2Kde5EYr2BO1L6j27rFBUT49Z3k3hl?= =?us-ascii?Q?KuFkr4EywGTGwmz8OqO3/Bq8Ko82qeuGQGxQ219aWSxTJdlQMp1rrrabryYC?= =?us-ascii?Q?Xl2zwO2VOM7BS91zSBQ15/Q4tiMAXGGPun1L+/oGXRyBu1I60Fl2mqQ9+Q8r?= =?us-ascii?Q?LmP/niY8Datd88/8cZt+MhiskrM/QCujjGe88juUZBzEQw/1mGmA40XPRURt?= =?us-ascii?Q?uvzwBD/Em9OiI/VN2IZU9GnJjhaYvQJKOw5ducvc8zahO59MT/YIfs4CCmBh?= =?us-ascii?Q?kJzQlOHGNWQ8Laq7orgTDVtxfEdQ55bAddz7L6dYV7fldibTpyuzUaGvo9d2?= =?us-ascii?Q?Am7nWys1gBJhepoVgA2M2pREE/lpBbuNBfGQlyX7amqh2W5fUWXtzhcumrcF?= =?us-ascii?Q?w+avduSvrso7hZlUK8HT9zKsPCy4ArS6xb65jFAQwMZYssANhJsIuWpthErF?= =?us-ascii?Q?dcGHdU+VHTLxHhrZDpUSk67Nl/+gLlkygEu/yq95jQLfdnxXUxid3QvQXEMT?= =?us-ascii?Q?/d67sWZc2oe+7Cx7icFATnv9Oga+hopq4oTiWFa+54UwPI2MKT9L1YK9OIx3?= =?us-ascii?Q?jXTV6rbLlMzN6ozvOs4hCDUKkQ49rQaU2B5+Blxu8OUonRN7QEIgc7GAqNIN?= =?us-ascii?Q?HAZBDeAr0HkHjEd3LXoWsg9ZIYJaydfR/3mOYX52IlMjZv+EIdmYsiEgEUkH?= =?us-ascii?Q?luqaEzg/j49lrsOfXXciiP+R+2fKKepnii6Hpm3dsXz0HwiiNdv1tcB6FEAG?= =?us-ascii?Q?keanbkDIyhGuREOyPMvBwUlwrpykdSMiYigEna0hocqToXXit6GkRtz99Zvc?= =?us-ascii?Q?1UHmFfp/VV9egkDMOz4TeFtuOwK9ysQwfNn7VyivfUbt2Wmd9HbxUPkad7Rr?= =?us-ascii?Q?w4bunG92qFVpgbObQ0Ii2U2RP9+E2MoTlwYXT1iJcTB6+gIlTZECTPfxnkPe?= =?us-ascii?Q?hdOEcOxzHxrqbscH7iVsDg3bADVkfJIUSxNk9B5Mm8QiLic47fZfW50dTxGx?= =?us-ascii?Q?v4DNgby7sgjlnrR86C6wUTzdky6NMJB7vcIR5vfDEuznTxuKM7JbA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 6:dEwTbkwYkxk3zUyEmt+Ga5Eit/zmR0A4AOwuznzN9HldPgZ9P8r4VLOYJqT55rmkpSpm6vgEzj1h3tNOCFEk/tzGs1c5jHO17GJ+9hskpdpJD3pHnu2ifJXkb2fPvW8AeAO1PhYl9vaVPUvwuvfLoH08yBbqgdSw9QTK2O3TxFa/pUpiO7O+LQwm2kGG62F5x7tUpyXyTjv3u3refpVk1TgE/gAvm4r7LuU/4q1cxEA6anJMnuIF4w0VeCLAX2qeYGdfEDdTJCPRjqekUQ8DkPEVHvqamnD53tmfRZ8AmVesK35NLa5B/MyNW0egUlu8VfvAbvYm9eC7wdMFXxKMSgt/ZjSpJu8RnxaaKdIdIWY=; 5:4IjiBX5LJtUGNgUQlowe0qyVba4PnUdqD1niSa7r4cBAFnAO2hdF3E/Q0+eGYl5blydrNuX3xtZ3+V8OJ6y2puf8w9bzQ97rg5R938J2izw8n4/jaIQslvG0PBGnX4fur76FSTLtd1oIIwVbBJDkr4bP0jQFvAFQ5qeDr+iYtV0=; 24:G3OJuAXNo3rwVep+Cn64m5y69oLIrEbpxoyW16VCpbMYLbGhOY9vI4I2U2Hbntf/QU4qFsdPoL/+RPMDhs2ldmIvZBFY1X3u8qZ6PbY/GBc=; 7:NYXJeKqPH381RgvkNy/aTcvZYPG6jTF4Np8BrWJJo2HloJWjWrlpo2Wuskqm7Ku0YcivPddZaMh+JUzofbceZeBDxOeyLIfJ41a5o2wYz78iqRvMrlC0fcevXXL+538TJ1f7whfiaXFXigp1ZGFfkw5N6zDukTSWrXsYabnj3kNElXrTxRX3Pqc8u80QX10uhjHaUbmGizgGRcUs2eOImICiA4bEWueOcIKIYMh/mnsN90/EjoxM52H3bTf6Dige SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 09:18:24.3660 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60ec88e9-c0a7-4ad4-a4a7-08d55cc218e6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3137 Subject: [dpdk-dev] [PATCH v2 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: Tue, 16 Jan 2018 09:18:27 -0000 From: Shachar Beiser Support IPv6 header vtc_flow fields : tc , flow_label Signed-off-by: Shachar Beiser --- Sending on behalf of Shachar. On v2: - Addressed Stephen comments on the coding style. --- lib/librte_net/rte_ip.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index 9a62ff667..f32684c66 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -344,6 +344,12 @@ struct ipv6_hdr { uint8_t dst_addr[16]; /**< IP address of destination host(s). */ } __attribute__((__packed__)); +/* IPv6 vtc_flow: IPv / TC / flow_label */ +#define IPV6_HDR_FL_SHIFT 0 +#define IPV6_HDR_TC_SHIFT 20 +#define IPV6_HDR_FL_MASK ((1u << IPV6_HDR_TC_SHIFT) - 1) +#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT) + /** * Process the pseudo-header checksum of an IPv6 header. * -- 2.12.0