summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRadu Bulie <radu.bulie@freescale.com>2014-09-17 07:54:37 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:39:34 (GMT)
commita6ef2838a2fe289be7d9f9eb864701250153153b (patch)
tree32d2da15cf3dd6cc7d415201cb3756bfabeb2d65 /include
parentba5cce5bfefc14fa9f250bde96b071ab4a7556c1 (diff)
downloadlinux-fsl-qoriq-a6ef2838a2fe289be7d9f9eb864701250153153b.tar.xz
dpa_offload: Add fix for number of policies check
This patch adds an extra check for the number of policies defined per SA, limiting it to the maximum possible values from a ccnode Change-Id: I7ff1e9400e2357a53ee01d9f8d8ac5f15d3f8c40 Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19120 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fsl_dpa_ipsec.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/fsl_dpa_ipsec.h b/include/linux/fsl_dpa_ipsec.h
index 89b8e62..41e22d3 100644
--- a/include/linux/fsl_dpa_ipsec.h
+++ b/include/linux/fsl_dpa_ipsec.h
@@ -72,8 +72,9 @@
IP_PROTO_FIELD_LEN + \
2 * PORT_FIELD_LEN)
-#define DPA_IPSEC_MAX_IN_POL_PER_SA 255 /* Maximum supported number of
- * inbound policies per SA */
+
+#define DPA_IPSEC_MAX_POL_PER_SA 255 /* Maximum supported number of
+ * policies per SA */
/*
* IPSec Special Operations
@@ -497,6 +498,7 @@ int dpa_ipsec_sa_remove_policy(int sa_id,
* to determine the size of the policy_params array, the function
* must first be called with policy_params = NULL. In this case it
* will only return the number of policy entries linked to the SA.
+ * num_pol must not be greater than DPA_IPSEC_MAX_POL_PER_SA
*/
int dpa_ipsec_sa_get_policies(int sa_id,
struct dpa_ipsec_policy_params *policy_params,