From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0083.outbound.protection.outlook.com [104.47.40.83]) by dpdk.org (Postfix) with ESMTP id 7B271370 for ; Mon, 11 Jul 2016 12:42:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=j5IZil0JvO0wlRwuNk3GdBiTevMdH03Y0XuOFAPWaJU=; b=Wh/xbSLSZinjfD9NaahWialOtuohONJveCe3fV3hOABkzpuDYGAI8FkO3vRhG+eDirtdlC9eRGkp85fvQS9iGd9UZpATe86PrGEyJqlFKAhljEo/NawPWolfE5eGvzFgGhVLBR2MBNDSMSEFKpnDmEsyM9KDk1c+3/E8kEIbabI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.171.50.232) by BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) with Microsoft SMTP Server (TLS) id 15.1.534.14; Mon, 11 Jul 2016 10:42:07 +0000 Date: Mon, 11 Jul 2016 16:11:43 +0530 From: Jerin Jacob To: , Thomas Monjalon , Helin Zhang , Jingjing Wu , Rasesh Mody , Ajit Khaparde , Rahul Lakkireddy , Wenzhuo Lu , Jan Medala , John Daley , Jing Chen , Konstantin Ananyev , Matej Vido , Alejandro Lucero , Sony Chacko , Pablo de Lara , Olga Shern Message-ID: <20160711104141.GA10172@localhost.localdomain> References: <20160705181646.GO7621@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160705181646.GO7621@6wind.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [122.171.50.232] X-ClientProxiedBy: PN1PR01CA0051.INDPRD01.PROD.OUTLOOK.COM (10.164.136.151) To BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) X-MS-Office365-Filtering-Correlation-Id: 4bebc51f-4afd-4a71-2258-08d3a978051d X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 2:VGNmuZztdPfxnYKlHqlmACC3TY2SuU/SYhGlwgSRKA0gRibmewaw1kBSYqNp2Dc3JDyswDP8lqW5eZbKYLRsrZd70D/o9fqPFlQINTMVrBJj7PywEnG95MbYTNNnphuMxiwcV6ZYxIApW/ig3bjyvvTQjvXQqoaOLHoH2tT+Fgen4epqk4fbWfsfsXX/0IJs; 3:UZiYmJAdYwN2ez6aG15BCD0//dxX+D/xcU1ZcB22gB9zdWY9a4Ai/KU7wb0At5vQWinCOUZfn1083Rvpwpoa1Tl4Mlun82UrI5jumzSYn/R7XXxBe4ku6AlUkrWizxcS X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 25:+tHSL0YEq4yR0U8N43h3hvezbLc2Pda18Q27EqtqLshCqVatSs1roXbPeOGbUgTpcawPZAd/72HcrBP27wjhXj3nwdHsRxr8PnAmOhorNAh0KW4QMl93BGDshl6Ygc8W9xFvWKT20m2f4jh9Rqez3gtFzgsa9ylh7Mfl34MpoVOnWmfU+piSaPBD1bk8BkhVUcr5VTCPUMpuZJQBBPJHU6rgwG5eJoULk7vLQdoNehvjeVUG+n6Jue6R7B8hSY+2Y3c3O50S420P9PBCUwqiYw4yGAsETQIC63BFPom3MFaovVOl0p96ohmbBDA2dvCf0Qtl/AnnVkGqv479vAe3Liu0aieSqgXGjmLyvxOxkYcfEKO8SZEUsJYZGWwp90nINZaEI2xiSodnACZPW4HTeHvJgkkaxFE9GIVNijFy6xttlqm2AuLmdQYe8YkDxMIbAmT+fm6C3g5tpxvSMgOI7zji0wag8bcLAiXD5zZskeiE34a7BNcvrH5KITNoIJ4QjKev+Ug0r4CckHaLzwNeeBlKo1eoDEYmU5VaWFlI5CGgSkW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R3JdbPDMO1k2tLOEplD9Kq8oxl2NIPuTMdrZ8QkzGQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR0701MB1713; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 4:c0kLGovjN2h8ARbdL09aZAJ0iqrzQBjYLDUWaVt5I7A6AeEDTAuBftkHLTFr52UcAsHQa66hbs6FpBJkd6pzxxDUTdpRgRH8Ol2yQxnjMU8z8r/J+344/TWATH6sqyD655GtSzAVfBM/1Q92gyKm8gXw3wE2XYNgG8fjV++qdnayJ11IO8Z4AwnWpj+I9s/tjY1sVJQG5M6gsnpb0xyXFDlfUuwvLZDcOArMbzYDXpoyc6Wj22XYoDxx5gczi1n1E/pyM38b0EpJYJ3Ze1PI9NTWYr6mX5hkZnKUZB6sodJdcKeeN6TeeEBeDvZomTsgvhVaQyjlSWSutZP7aMAyxla4sgeBkH5Gsea4qVgl5jVkLJ+7us5LrxU0Jf3d9kHv X-Forefront-PRVS: 00003DBFE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(24454002)(199003)(47776003)(66066001)(23726003)(68736007)(107886002)(2950100001)(46406003)(101416001)(6116002)(2906002)(77096005)(97756001)(42186005)(189998001)(81156014)(1076002)(76176999)(97736004)(5001770100001)(9686002)(54356999)(61506002)(7736002)(92566002)(50986999)(81166006)(8676002)(33656002)(7846002)(561944003)(50466002)(3846002)(106356001)(4001350100001)(105586002)(83506001)(586003)(305945005)(18370500001)(41533002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1713; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1713; 23:A5GtcSWj/qgmoEciTrrxj8V9dofZEzKgPnkNydp?= =?us-ascii?Q?Saft3LuwoHYa80/LOkMyOOomd9XYf0k487wmnbLtVPl9kvttRo6KiGMwMkvY?= =?us-ascii?Q?MIqgJZZY90T2T+c2jGGNQ2W1d4zvLdu84WXqv8qLENXq9fj6ZJZStgI6LW8e?= =?us-ascii?Q?/uHIOu56UIbOVfNnjkTQrOM++hxror61ZTRGker5FHFsrgYBMegtaa2mWGpf?= =?us-ascii?Q?UV9QYmuhdfJZEHliOv/3Nr6e3fuj6s5jcOJIfeO/cjGDtx9GyWjqI9O6CnNm?= =?us-ascii?Q?IR14r+s6hrRNTwHPRDJsWS5jw3EYrAuRHtpEhdwAHYBahLaaDxEM7fItB41d?= =?us-ascii?Q?7HZxD2jGSY+9es6jrUTZ9Ix8rIdI90iTCwdk0bBHT8nQk1COjnOK5bEmeko+?= =?us-ascii?Q?/2ZpSJxA0ViSMjlDE/9rWWGAPuVu0cA8D5/damdtyprVMKRqVs99+SyKBOcn?= =?us-ascii?Q?uFI+1mWw1t5KPkyzVS9oFySbuEWaUUSZ+PAPEbn8ofdhJ/D/Te9NC5hVncPY?= =?us-ascii?Q?AQNfb9b7Mm21ZfmnM1MiHmOv8HLgmBm2nO67ClybZw+FjzsWXGk9nexkPSd6?= =?us-ascii?Q?aknVI0E7GBSK9fbixe5x1bgzXvDJuSV/17/PXGRLnfxGRf0CCMWpJsyfpAF9?= =?us-ascii?Q?PJwNqguf/KjSu+OOOpZrho/RxysQxgcPYtNQTm5pgi3BLFjy13AmdmbeiSIA?= =?us-ascii?Q?xIp67txx5gHVeXt8tvCS4YS3cq6v/Kc8xwxxxVidmu9R0uQvHsQmXlX7tp9n?= =?us-ascii?Q?xP2DqaOG/O552F1DEIJwRd7hIld6UeCQcoh9BTeh52uI3UxFoeE1NnqdE81D?= =?us-ascii?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UHLTtzFEJzap1ubZpHvjLYeUobDUE1/k+Gm3z6GI4L7RPe9hV2ZxulM=; 7:WL4pWhSSwf1r7gfrsiJzSFMvpP4YQ29HnUgdNMuhseyfHEIy2nHwPADzhb5/NCrLE0ZNtLTdLIB0wcfVuNg3/qesIBBfxJqD8XNcku9fx1uVYoI6KXwdwGdE7UOl1DBZsltvTsRJAxFPRadul0VVA1BbDcDmSFkQW8r0LpxfUobOqfMaMyKn0mu6qPbfWCWdPdcBL535tq1rUJgXx2hiOEK0fyYaqaSvST/A4eiZPeVVQFHvpcTlcOrXWJ60wZpc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2016 10:42:07.2339 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1713 Subject: Re: [dpdk-dev] [RFC] Generic flow director/filtering/classification API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 10:42:16 -0000 On Tue, Jul 05, 2016 at 08:16:46PM +0200, Adrien Mazarguil wrote: Hi Adrien, Overall this proposal looks very good. I could easily map to the classification hardware engines I am familiar with. > Priorities > ~~~~~~~~~~ > > A priority can be assigned to a matching pattern. > > The default priority level is 0 and is also the highest. Support for more > than a single priority level in hardware is not guaranteed. > > If a packet is matched by several filters at a given priority level, the > outcome is undefined. It can take any path and can even be duplicated. In some cases fatal unrecoverable error too > Matching pattern items for packet data must be naturally stacked (ordered > from lowest to highest protocol layer), as in the following examples: > > +--------------+ > | TCPv4 as L4 | > +===+==========+ > | 0 | Ethernet | > +---+----------+ > | 1 | IPv4 | > +---+----------+ > | 2 | TCP | > +---+----------+ > > +----------------+ > | TCPv6 in VXLAN | > +===+============+ > | 0 | Ethernet | > +---+------------+ > | 1 | IPv4 | > +---+------------+ > | 2 | UDP | > +---+------------+ > | 3 | VXLAN | > +---+------------+ > | 4 | Ethernet | > +---+------------+ > | 5 | IPv6 | > +---+------------+ How about enumerating as "Inner-IPV6" flow type to avoid any confusion. Though spec can be same for both IPv6 and Inner-IPV6. > | 6 | TCP | > +---+------------+ > > +-----------------------------+ > | TCPv4 as L4 with meta items | > +===+=========================+ > | 0 | VOID | > +---+-------------------------+ > | 1 | Ethernet | > +---+-------------------------+ > | 2 | VOID | > +---+-------------------------+ > | 3 | IPv4 | > +---+-------------------------+ > | 4 | TCP | > +---+-------------------------+ > | 5 | VOID | > +---+-------------------------+ > | 6 | VOID | > +---+-------------------------+ > > The above example shows how meta items do not affect packet data matching > items, as long as those remain stacked properly. The resulting matching > pattern is identical to "TCPv4 as L4". > > +----------------+ > | UDPv6 anywhere | > +===+============+ > | 0 | IPv6 | > +---+------------+ > | 1 | UDP | > +---+------------+ > > If supported by the PMD, omitting one or several protocol layers at the > bottom of the stack as in the above example (missing an Ethernet > specification) enables hardware to look anywhere in packets. It would be good if the common code can give it as Ethernet, IPV6, UDP to PMD(to avoid common code duplication across PMDs) > > It is unspecified whether the payload of supported encapsulations > (e.g. VXLAN inner packet) is matched by such a pattern, which may apply to > inner, outer or both packets. a separate flow type enumeration may fix that problem. like "Inner-IPV6" mentioned above. > > +---------------------+ > | Invalid, missing L3 | > +===+=================+ > | 0 | Ethernet | > +---+-----------------+ > | 1 | UDP | > +---+-----------------+ > > The above pattern is invalid due to a missing L3 specification between L2 > and L4. It is only allowed at the bottom and at the top of the stack. > > ``SIGNATURE`` > ^^^^^^^^^^^^^ > > Requests hash-based signature dispatching for this rule. > > Considering this is a global setting on devices that support it, all > subsequent filter rules may have to be created with it as well. Can you describe the use case for this and how its different from existing rte_eth devel RSS settings. > > - Only ``spec`` needs to be defined, ``mask`` is ignored. > > +--------------------+ > | SIGNATURE | > +==========+=========+ > | ``spec`` | TBD | > +----------+---------+ > | ``mask`` | ignored | > +----------+---------+ > > > ``ETH`` > ^^^^^^^ > > Matches an Ethernet header. > > - ``dst``: destination MAC. > - ``src``: source MAC. > - ``type``: EtherType. > - ``tags``: number of 802.1Q/ad tags defined. > - ``tag[]``: 802.1Q/ad tag definitions, innermost first. For each one: > > - ``tpid``: Tag protocol identifier. > - ``tci``: Tag control information. Find below the other L2 layer attributes are useful in HW classification, - HiGig headers - DSA Headers - MPLS May be we need to intrdouce a separate flow type with spec to add the support. Right? Jerin