summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMarian Chereji <marian.chereji@freescale.com>2014-07-21 15:01:56 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:39:28 (GMT)
commit482408db7986470a56e3f0b21937343cec79eef0 (patch)
tree6aa60eeb1744335ccf4dfac18de0a9f49ad6bb1f /drivers/staging
parentd819390700a74461259e2f6d078b51a15bf07686 (diff)
downloadlinux-fsl-qoriq-482408db7986470a56e3f0b21937343cec79eef0.tar.xz
dpa_offload: Enable possibility to modify IP fragmentation params in update HM
Possibility to modify at runtime the IP fragmentation params in the update header manipulation operation (created via dpa_classif_set_update_hm) was disabled from the DPA classifier driver. This change enables it. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I4ed91e941a810235503dc23f24b6ebb4e563be90 Reviewed-on: http://git.am.freescale.net:8181/15223 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/fsl_dpa_offload/dpa_classifier.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/staging/fsl_dpa_offload/dpa_classifier.c b/drivers/staging/fsl_dpa_offload/dpa_classifier.c
index fe22df8..0899683 100644
--- a/drivers/staging/fsl_dpa_offload/dpa_classifier.c
+++ b/drivers/staging/fsl_dpa_offload/dpa_classifier.c
@@ -6665,6 +6665,12 @@ int dpa_classif_modify_update_hm(int hmd,
}
}
+ if (modify_flags & DPA_CLS_HM_UPDATE_MOD_IP_FRAG_MTU) {
+ pupdate_hm->update_params.ip_frag_params.mtu =
+ new_update_params->ip_frag_params.mtu;
+ update[1] = true;
+ }
+
if (update[0]) {
ret = update_hm_update_params(pupdate_hm);
if (ret == 0) {
@@ -6693,7 +6699,34 @@ int dpa_classif_modify_update_hm(int hmd,
}
}
- /* update[1] not supported at this time */
+ if (update[1]) {
+ ret = update_hm_update_params(pupdate_hm);
+ if (ret == 0) {
+ t_FmPcdManipParams new_hm_node_params;
+
+ hm_node = pupdate_hm->hm_node[1];
+
+ /*
+ * Have to make a copy of the manip node params because
+ * ManipNodeReplace does not accept h_NextManip != NULL.
+ */
+ memcpy(&new_hm_node_params, &hm_node->params,
+ sizeof(new_hm_node_params));
+ new_hm_node_params.h_NextManip = NULL;
+ error = FM_PCD_ManipNodeReplace(hm_node->node,
+ &new_hm_node_params);
+ if (error != E_OK) {
+ release_desc_table(&hm_array);
+ mutex_unlock(&pupdate_hm->access);
+ log_err("FMan driver call failed - "
+ "FM_PCD_ManipNodeReplace, while trying "
+ "to modify hmd=%d, manip node "
+ "handle=0x%p.\n", hmd, hm_node->node);
+ return -EBUSY;
+ }
+ }
+
+ }
release_desc_table(&hm_array);
mutex_unlock(&pupdate_hm->access);