summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl_dpa_offload
AgeCommit message (Collapse)Author
2015-03-31dpa_offload: Add DTS file for NF DPAA offloadingMarian Chereji
Added the B4860QDS platform DTS file example for NF DPAA offloading demo application. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ib546a6b2984735f933df90cce1be376bd60245d5 Reviewed-on: http://git.am.freescale.net:8181/33632 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-23dpa_offload: Fix statistics info for multipolicy IPSec outbound SAsMarian Chereji
The dpa_ipsec driver was only providing statistics for the first policy of the outbound SAs. It is now correctly suming up the statistics for all the outbound SA's policies. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/28731 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bogdan Constantin Popescu <bogdan.c.popescu@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com> Change-Id: Ide98e16c6a6c684b6d51fa190388c7a95b1a8490 Reviewed-on: http://git.am.freescale.net:8181/33188
2015-03-20fsl: Use ccflags-y instead of deprecated EXTRA_CFLAGSWang Dongsheng
This allows users to pass in additional compiler flags through the environment variable EXTRA_CFLAGS, e.g. make EXTRA_CFLAGS=-Wno-error Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Change-Id: I36513506ee1671c31bb076e9b73c2e8e2442cf4f Reviewed-on: http://git.am.freescale.net:8181/33146 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2015-03-16dpa_offload: Fix SEC era info acquisitionMarian Chereji
The dpa_ipsec driver was unreliable is acquiring the SEC era for toggling the ESP padding removal setting of the SEC. The SEC version was used which is not a good criteria to follow in order to assume the ESP padding removal feature is available. The implementation was updated and the driver is now searching for the first device tree node which has a "fsl,sec-era" property and is using that information for further configuration of the SEC. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I80ffe931995b8aac38d42a0e013d760fbb7a5cd6 Reviewed-on: http://git.am.freescale.net:8181/29887 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
2014-12-11dpa_offload: Update P2041RDB shared interfaces DTB fileMarian Chereji
Resync P2041RDB DPAA offloading shared interfaces DTB file with the latest changes in the usdpaa shared interfaces DTB file. Some shared interface parameters were missing. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ib91ea04fd482353f48e012971e6196f7201e9fac Reviewed-on: http://git.am.freescale.net:8181/25435 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bogdan Constantin Popescu <bogdan.c.popescu@freescale.com> Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
2014-12-11dpa_offload: sync with CAAM changesAlex Porosanu
The CAAM driver function caam_jr_strstatus() has changed its usage, and now it performs the interpretation and printing of the error itself. This patch syncs dpa_offload's sources with the updated version. Change-Id: I5b7b04386dbc03c11e3277adb77af985cc6418ca Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/24679 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
2014-12-11dpa_offload: use SEC API for retrieving JRAlex Porosanu
SEC driver offers a function for geting the handle to an available JR (caam_jr_alloc(...) This is mainly needed for split-key calculation per SA. There's no need to search for the JR in the device tree. This patch removes the unneeded code and replaces it with the proper SEC API call. Change-Id: Ibc8b4b216d5699fe5ec7d3d49b8a3560ab79ede0 Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/23860 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
2014-12-11dpa_offload: Relocate dpa_classifier entry in index management listMarian Chereji
For HASH tables sometimes when a user modifies the key of an entry the entry needs to be moved to a different bucket. The index management list is sorted so that indexes are always ascending. When tempering with the position of an entry in the internal Cc nodes for a HASH table, the position of the entry in the index management list must also be updated. Change-Id: If4b48282c407ed248dfd389cc0c8ae856fb7db75 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/23700 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com> Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
2014-12-11dpa_offload: Fix memory leak in copy_key_descriptor_compatcpyAnca Jeanina Floarea
In case either the byte or the mask of a key are provided NULL, the memory allocated for the lookup key descriptor needs to be release. Signed-off-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Change-Id: Ibb9b7ec28a93a87c82ab318b763866cf3d9f493a Reviewed-on: http://git.am.freescale.net:8181/23131 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
2014-12-11dpa_offload: Avoid dereferencing a NULL pointer in case of corrupted user paramsMarian Chereji
In the dpa_classifier function "try_compatible_node" there are some places where the header manipulation operation flags are compared to the configuration of an existing header manipulation node. The control path however doesn't suspend in case an inconsistency is found in the flags and, in some rare cases when users provide corrupt parameters, there is a danger to dereference a NULL hm_node pointer. Change-Id: I355862c146a228e5878272156adaf92a76391ce6 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/23111 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Anca Jeanina Floarea <AncaJeanina.Floarea@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
2014-12-11dpa_offload: Avoid double free of replicator group params in case of errorMarian Chereji
In dpa_classifier function "dpa_classif_mcast_create_group" the replicator group params could be freed twice if the function "FM_PCD_FrmReplicSetGroup" fails, for instance. The pointer is now reset at first free so that the second free operation ignores it. Change-Id: I8869db05157f68964bd2a131f6e184f78e64cf8c Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/23108 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
2014-12-11dpa_offload: Fill in proper VSP parameters when policer is enabledMarian Chereji
There are 2 different VSP profile parameters in the FMD API that need to be filled in depending whether the policer is enabled or disabled. The dpa_classifier was filling in the enqueue VSP profile all the time, but this was used only when the next action was "enqueue". When the next action is "policer" the policer VSP profile must be filled in. Change-Id: I09e2a6fad7216e7ce7b3c1190a4441b7a9825705 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/22064 Reviewed-by: Francois Massot-Pellet <Francois.Massot-Pellet@freescale.com>
2014-12-11dpa_offload: Avoid using an uninitialized dpa_stats instance IdMarian Chereji
The dpa_stats_init function failed to initialized the dpa_stats instance Id by declaring it unused. This causes problems when using the rest of the dpa_stats API as the instance Id is checked against negative values. Change-Id: I43e460e84e2f22c995bcadf64d165b57ec6e789c Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20956 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com>
2014-12-11dpa_classifier: Add support for miss statisticsBogdan Constantin Popescu
This commit adds support in dpa_classifier in order to retrieve miss statistics for a given table. Change-Id: Iea61107e05d13abf70d19aeb8c970c401c1562fc Signed-off-by: Bogdan Constantin Popescu <bogdan.c.popescu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19618 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Remove dead code from "table_delete_entry_by_ref"Marian Chereji
There is an unreachable code paragraph in function "table_delete_entry_by_ref". The function doesn't work for indexed tables. In the first half, an error is issued in this case. However, in the second half, another code paragraph is testing again if the table type is "indexed". This branch will never be reachable and was removed. Change-Id: Ib200f49eafca8131d4c1696af2e61753ede41a3d Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19135 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Remove useless assignment in dpa_classifierMarian Chereji
There is a useless assignment of variable "hmd" in function "hash_table_modify_entry". It was removed. Change-Id: I2710a5d13916c8ab56a6e2c8218db721bf61abe5 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19134 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Avoid dereferencing a free pointer in DPA Stats wrapperMarian Chereji
In the DPA statistics wrapper, in the function "do_ioctl_stats_modify_class_counter" the pointer prm.params.pair is dereferenced immediately after it has been freed up. The assignment espressions were useless hence they were discarded. Change-Id: Idbfc3865413b15d9713803fceb91956cc618d930 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/18812 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com>
2014-12-11dpa_offload: Fix bad allocation size for pointer arrayMarian Chereji
In the DPA statistics wrapper, in function "do_ioctl_stats_create_class_counter" the following pointers were allocated using a bad size (because of an additional '*' added by mistake to the "sizeof" operator argument): tbl->keys cnode->keys The size for these arrays of pointers should be (NUM x sizeof(struct dpa_offload_lookup_key *)) instead of (NUM x sizeof(struct dpa_offload_lookup_key)). tbl->pairs The correct size of this array should be (NUM x sizeof(struct dpa_offload_lookup_key_pair *)) instead of (NUM x sizeof(struct dpa_offload_lookup_key_pair)). Change-Id: I190d76973107300171e6f3033d8a79a3482fdd73 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/18811 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com>
2014-12-11dpa_offload: Avoid leaking memory in DPA statistics wrapperMarian Chereji
Two memory leaks were fixed in DPA statistics wrapper. In function "do_ioctl_stats_get_counters" the allocated memory for "prm.req_params.cnts_ids" leaks in some cases of error and even in successful function return. In function "dpa_stats_tbl_cls_compatcpy" the memory allocated for "us_keys" may leak in case the key type is DPA_STATS_CLASSIF_SINGLE_KEY. Change-Id: Ifffd8d67f972473b75a43190155754d1af68fe84 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/18810 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com>
2014-12-11dpa_offload: Avoid leaking memory for replicator paramsMarian Chereji
In function "dpa_classif_mcast_create_group_error" in the dpa_classifier driver, the allocated memory for "replic_grp_params" is leaking in case of errors. This change adds a release of this memory in case it is allocated when the function returns an error. Change-Id: Ic0f537f3e980d498f11ecf6c2874674b7003b2a9 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/18809 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Avoid dereferencing an invalid pointerMarian Chereji
In function "dpa_classif_mcast_create_group" from the dpa_classifier driver there is a danger of dereferencing pgroup->entries pointer which can be NULL in case of an error. To avoid this, in case of error this pointer is checked before using it to release resources. Also, in order to keep consistency of pgroup->entries in case of an allocation error of pgroup->member_ids, the allocation of this structure and the allocation of pgroup->member_ids have swicthed places. Change-Id: I3d7ec1b01983a9c917f54d596e35afd8ab3539cc Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/18808 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Add check for initialization vectorRadu Bulie
This patch adds a check for the maximum value of the IV provided to an outbound SA. Change-Id: I102aeb893100222171103a738f0bfa20ed17f33c Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19121 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Add fix for number of policies checkRadu Bulie
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>
2014-12-11dpa_offload: Check alg_suite value passed to the dpa_ipsec driverRadu Bulie
This patch adds a fix for alg_suite value that could be tainted from the ipsec wrapper. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I288f71f11d0a84311dcf966f4c7a693ff754a34b Reviewed-on: http://git.am.freescale.net:8181/19119 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Fix inconsistent use of case labelsAnca Jeanina FLOAREA
In function set_cnt_classif_node_retrieve_func the switch was made based on enum dpa_stats_classif_node_type but the case values were taken from enum dpa_cls_tbl_type. Fix it by using case values from the correct enum. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I041ad4ad56d84d9fd1f8424609c0efbe2da5c726 Reviewed-on: http://git.am.freescale.net:8181/5174 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/19117 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Fix DPA Stats issues caused by tainted valuesAnca Jeanina Floarea
Fix DPA Stats issues related to tainted values by adding constraints to user-provided parameters. Signed-off-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Change-Id: Ib59f89518d96c9102a71be4c673e2d065b0a71f8 Reviewed-on: http://git.am.freescale.net:8181/19070 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Return error code in function dpa_ipsec_sa_get_seq_numberAnca Jeanina Floarea
Although an error code was set in case an error occurred, the function always returned 0. Fix this by returning the error code. Signed-off-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Change-Id: I8fdc4c514fee0b77f4831bc976f5a8e69f28238e Reviewed-on: http://git.am.freescale.net:8181/18804 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Check SA returned by get_sa_from_sa_idAnca Jeanina Floarea
In function dpa_ipsec_free the SA returned by function get_sa_from_sa_id can be NULL in case of an error. Fixed this by adding BUG_ON on returned SA. Signed-off-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Change-Id: Id663dec2c47cd2eacce8c2a5ca1f00639df08bba Reviewed-on: http://git.am.freescale.net:8181/18802 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Fix precision loss in DPA Stats Policer counterAnca Jeanina Floarea
The value returned by FM_PCD_PlcrProfileGetCounter function is cast to uint64_t while the variable to store it in is uint32_t. Changed the variable from uint32_t to uint64_t. Signed-off-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Change-Id: I6c6e7be411ca66ea62541ea860ad39b8d660be66 Reviewed-on: http://git.am.freescale.net:8181/18801 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
2014-12-11dpa_offload: Fix compat mode IOCTL commands for IPSec sequence number ↵Marian Chereji
management functions The two functions that are managing the IPSec sequence numbers, dpa_ipsec_sa_modify and dpa_ipsec_sa_request_seq_number, don't have IOCTL support for working in compat mode (32bit user space applications calling a 64bit kernel). This change adds this support. Signed-off-by: Grigore Ion <ion.grigore@freescale.com> Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I8ce0514d0d40aee7155c2d17dd7cacb52736437a Reviewed-on: http://git.am.freescale.net:8181/15676 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Fix update HM init failure when using IP frag onlyMarian Chereji
Due to the recent aggregation that the dpa_classifier is performing for chained header manip nodes, a problem has occured in the update HM operation. This particular operation can consist of either one or two HM nodes, depending on what HM options the user is selecting in the parameters. This header manip operation can include an optional IP fragmentation. It can also consist ONLY of IP fragmentation at user's request. However, in this last case, the allocation of underlying HM nodes was incorrect and it was fixed. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Idb1ebe3cb518e1fd7a9d52fb0423e9e0e9b7900c Reviewed-on: http://git.am.freescale.net:8181/15621 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Enable possibility to modify IP fragmentation params in update HMMarian Chereji
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>
2014-12-11dpa_offload: Adjust debug information for dpa_classifierMarian Chereji
Added possibility to display some more debugging information. Change-Id: I66a7a110953b6dbcea15b3ee983cd5814fc65ce7 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/15222 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Add reparsing option to HM operationsMarian Chereji
Added the reparsing option to the DPA classifier driver API so that users can request a relaunch of the FMan parser immediatley after the configured header manipulation operation. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I3e6c9ea03da57e65e21a411fda9ba3cb5a3d5e87 Reviewed-on: http://git.am.freescale.net:8181/15221 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_offload: Aggregate dynamically created HM operationsMarian Chereji
The DPA classifier driver allows multiple HM operations to be aggregated in the same HM node only when importing the HM node resources. When creating the nodes dynamically, the driver does not search for candidates for aggregation before creating the HM nodes. This update improves the dpa_classifier driver to actively check for HM operation aggregation possibilities to certain neighbor HM nodes even when using the API in dynamic mode. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I96bb3eb62be81e3d1c3ac83947f32bee230ace38 Reviewed-on: http://git.am.freescale.net:8181/15220 Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com>
2014-12-11dpa_classifier: Add fix for multicast member removalRadu Bulie
Multicast member with id 0 could not be removed. This constraint was wrong in the context when a new member was added to a multicast group and the user no longer wanted to replicate the frame on member with id 0. This patch fix the above issue. Change-Id: Ia4c86687ef5693936933f7c67ee4c52550227d6d Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/14841
2014-12-11dpa_classifier: Get the header manip descriptor for a multicast entryRadu Bulie
The hm descriptor for an entry of type multicast was not fetched correctly. This patch fixes the above issue. Change-Id: I4ec4bad9ae3d65fe997b5b9047ef705c2eb052b5 Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/14840
2014-05-22dpa_offload: Fix IPSec general stats issue on B4 and T platformsMarian Chereji
The IPSec general statistics were displayed incorrectly on B4 and T platforms because in kernel compatibility mode (32bit user space apps combined with 64bit kernel) the DPA_IPSEC_IOC_GET_STATS message processing was not updated with the support for multiple IPSec instances. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I694324154ee70b9f54bdf941dfe78aa42f77823b Reviewed-on: http://git.am.freescale.net:8181/12781 Reviewed-by: Ioana Tibuleac <ioana.tibuleac@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-14dpa_offload: fix oNIC non-IPSEC Tx traffic for ipsec_offloadIoana Tibuleac
add dts attribute that prevents the pre-SEC OH port to free buffers when used with an oNIC node Signed-off-by: Ioana Tibuleac <ioana.tibuleac@freescale.com> Change-Id: I0d0c4f67973e2661855ed6d30a1d1bea3311f983 Reviewed-on: http://git.am.freescale.net:8181/12333 Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-14dpa_offload: Fill VSP enqueue params even when policer is not enabledMarian Chereji
The dpa_classifier was filling in the VSP profile Id only when policer parameters were specified for the classification entry. VSP profile parameters must not depend on the policer parameters. Signed-off-by: Francois Massot-Pellet <francois.massot-pellet@freescale.com> Signed-off-by: Sebastian Grigore <sebastian.grigore@freescale.com> Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ide4a26c8cc8fa8d7f85b2212a89816c51e01d19a Reviewed-on: http://git.am.freescale.net:8181/12301 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-14dpa_offload: wrp compat, Instance ID not given OK when creating SAsAndrei Varvara
In compat case the instances id was not properly given to the create SA API function. This commit is fixing the issue. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: Ie8c3d0f4bbbd8d34f7fa62207efcdf66d504b72b Reviewed-on: http://git.am.freescale.net:8181/12085 Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-10fsl_dpa_offload: Used SA index has to be set with invalid value at ↵Andrei Varvara
initialization used_sa_index field is used to check if SA is being initialized and used. Have to be set to -1 when init_sa_manager is called. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: Ie227979a3fc2f713d9c368245f9884c347a11434 Reviewed-on: http://git.am.freescale.net:8181/12044 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-10fsl_dpa_offload: Fix T4240 DTS for Multiple DPAA IPSec InstancesAndrei Varvara
required update of chosen offload, new entry for FMAN 1 with VSP. Change-Id: If6518557ed6be13c5d66e428a7198c20b7cb5d7d Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12035 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-05-09dpa_offload: Fix DPA Stats async request for 64bit US modeAurelian Zanoschi
Because in the case of 64 bit user-space, 64 bit kernel-space CONFIG_COMPAT is enabled, the DPA Stats asynchronous request failed to work. Solving the problem involves analyzing at run time the environment and taking the decision if the compat or normal function for read is used. Also some changes in the internal DPA Stats data structures are needed. Change-Id: I0d7357def19e42901a3c9b90478b07ef53f62301 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/12052 Reviewed-by: Anca Jeanina Floarea <anca.floarea@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-30dpa_offload: Fix SA per DSCP IPv6 supportAurelian Zanoschi
In order to extract the Traffic Class in case of IPv6 flows, the keygen will add two bytes to the key which hold: IPv6 version (4 bits), TC (8 bits) and 4 bits zero from Flow Label. At the time the feature was developed this information wasn't available and the assumption that it works as IPv4 case was made. Change-Id: Iedfab5635ba8a8c1a15404dc830edfe60844ada6 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11712 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-30dpaa_offload: add oNIC support in dts for T4240 and B4420Ioana Tibuleac
add oNIC nodes and buffer pools for the ipsec_offload usecase Signed-off-by: Ioana Tibuleac <ioana.tibuleac@freescale.com> Change-Id: I28bad579d5748ec0954d02abc30b1014b3cc13e1 Reviewed-on: http://git.am.freescale.net:8181/11542 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25dpa_offload: Remove shared interface from T2080RDB DTS fileMarian Chereji
Removed the shared interface from the t2080rdb-usdpaa-shared-interfaces DTS file to align Ethernet interfaces with the other dpaa offloading applications on T2080RDB. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ic24a39a8524ffd4485c91feb4760877a440ff803 Reviewed-on: http://git.am.freescale.net:8181/11528 Reviewed-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18dpa_offload: Fix compat support for SA per DSCPAurelian Zanoschi
In case of 64bit platforms SA per DSCP feature needs some structure data members in order to correctly copy parameters from user-space to kernel-space. Also values for the three feature parameters need to be correctly copied from one space to another. Change-Id: I2d31813431b87be6e61651597acf7ad56ae60148 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11104 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18dpa_offload: Fix usdpaa DTS file corruption for T2080RDBMarian Chereji
There is a closed bracket ('}') missing in the usdpaa DTS file which is causing a dtc compiler error. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibafca15bfb9e7c03bfda9d9ef05d43bdd233a66c Reviewed-on: http://git.am.freescale.net:8181/11102 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11dpa_classifier: Allow adding of header manipulation on miss table relationshipMarian Chereji
The dpa_classifier did not allow the user application to attach header manipulation chains on the miss table relationship action. This is, however supported in FMD, hence now the dpa_classifier will also allow this feature to be used. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I0174a4a3d9c708b4209cb2f8fa2fe3f724bb2081 Reviewed-on: http://git.am.freescale.net:8181/10644 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Nicolae-Sebastian Grigore <sebastian.grigore@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>