doc: add restrictions for ACL rule fields
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Wed, 18 Feb 2015 16:28:49 +0000 (16:28 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Feb 2015 03:02:21 +0000 (04:02 +0100)
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Siobhan Butler <siobhan.a.butler@intel.com>
doc/guides/prog_guide/packet_classif_access_ctrl.rst

index 72f4510..e018c68 100644 (file)
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
 ..  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
     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
 --------
 
 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.
 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
 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
     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
     The input index specifies to which input group that field belongs to.
 
 *   offset