From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3243FB475 for ; Wed, 18 Feb 2015 17:29:30 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 18 Feb 2015 08:23:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,602,1418112000"; d="scan'208";a="668155254" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 18 Feb 2015 08:28:58 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t1IGSwdC030367; Wed, 18 Feb 2015 16:28:58 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t1IGSwPD016438; Wed, 18 Feb 2015 16:28:58 GMT Received: (from kananye1@localhost) by sivswdev02.ir.intel.com with id t1IGSv4K016434; Wed, 18 Feb 2015 16:28:57 GMT From: Konstantin Ananyev To: dev@dpdk.org Date: Wed, 18 Feb 2015 16:28:49 +0000 Message-Id: <1424276931-16380-2-git-send-email-konstantin.ananyev@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1424276931-16380-1-git-send-email-konstantin.ananyev@intel.com> References: <1424276931-16380-1-git-send-email-konstantin.ananyev@intel.com> Subject: [dpdk-dev] [PATCH 1/3] doc: Add restrictions for ACL rule fields 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: Wed, 18 Feb 2015 16:29:33 -0000 Signed-off-by: Konstantin Ananyev --- doc/guides/prog_guide/packet_classif_access_ctrl.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/guides/prog_guide/packet_classif_access_ctrl.rst b/doc/guides/prog_guide/packet_classif_access_ctrl.rst index 72f4510..e018c68 100644 --- a/doc/guides/prog_guide/packet_classif_access_ctrl.rst +++ b/doc/guides/prog_guide/packet_classif_access_ctrl.rst @@ -1,5 +1,5 @@ .. BSD LICENSE - Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + Copyright(c) 2010-2015 Intel Corporation. All rights reserved. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -51,8 +51,18 @@ The library API provides the following basic operations: Overview -------- +Rule definition +~~~~~~~~~~~~~~~ + The current implementation allows the user for each AC context to specify its own rule (set of fields) over which packet classification will be performed. +Though there are few restrictions on the rule fields layout: + +* First field in the rule definition has to be one byte long. +* All subsequent fields has to be grouped into sets of 4 consecutive bytes. + +This is done mainly for performance reasons - search function processes the first input byte as part of the flow setup and then the inner loop of the search function is unrolled to process four input bytes at a time. + To define each field inside an AC rule, the following structure is used: .. code-block:: c @@ -85,10 +95,7 @@ To define each field inside an AC rule, the following structure is used: A zero-based value that represents the position of the field inside the rule; 0 to N-1 for N fields. * input_index - For performance reasons, the inner loop of the search function is unrolled to process four input bytes at a time. - This requires the input to be grouped into sets of 4 consecutive bytes. - The loop processes the first input byte as part of the setup and then - subsequent bytes must be in groups of 4 consecutive bytes. + As mentioned above, all input fields, except the very first one, must be in groups of 4 consecutive bytes. The input index specifies to which input group that field belongs to. * offset -- 1.8.3.1