summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl_dpa_offload
AgeCommit message (Collapse)Author
2013-10-02Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-10-02dpa_offload: Allow statistics enable on NEXT_TABLE classifier table entriesMarian Chereji
The DPA classifier allowed the user to enable statistics only for "enqueue" and "drop" type table entries. It now allows the user to enable statistics also for the "next_table" type table entries. Change-Id: I9d57af14922170a7554431b7ba5abcaaaeac04ac Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/5151 Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-10-02dpa_offload: Fix de-allocation of uninitialized valueAnca Jeanina FLOAREA
The tbl pointer is dereference without it being previously initialized. The code should use variable cnode instead of tbl in case DPA Stats counters of type DPA_STATS_CNT_CLASSIF_NODE is being created. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I10f8cd233f850c339e82d44522f2005dfb9ab27f Reviewed-on: http://git.am.freescale.net:8181/5149 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-10-02dpa_offload: Fix double free pointer issue in DPA multicast componentRadu Bulie
replic_grp_params variable would be freed a second time if the multicast group creation function failed to obtain a group handle from the FMD driver or imported from the user. The patch fixes the issue by freeing the resource, before any checks are performed on the group handle. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I547b0a2d476e1cd57aa3b561efa9a2cba99b7e3f Reviewed-on: http://git.am.freescale.net:8181/5147 Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-30dpa_offload: Propagate error code when IPSec module fails to recognize ioctl ↵Marian Chereji
command IPSec module used to silently fail when an ioctl command was not recognized. This may cause applications to take inconsistent (uninitialized) data as granted. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Id2ec3b0894d9d80332c279c976127c1d40345c7e Reviewed-on: http://git.am.freescale.net:8181/5038 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-27Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-09-27dpa_offload: Fix static index initialization in DPA ClassifierMarian Chereji
The static indexes used in recursive functions "init_hm_chain" and "remove_hm_chain" were not initialized. Also, "remove_hm_chain" was not decrementing this index as it removed header manipulations. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I00bd44c00749578a4c785741082e0ad2c1076c27 Reviewed-on: http://git.am.freescale.net:8181/4412 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-27dpa_offload: Improve debug printing in DPA ClassifierMarian Chereji
Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibe6ba10afc6447cf284b27cc7e3caed854eab304 Reviewed-on: http://git.am.freescale.net:8181/4413 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-27dpa_offload: Change memory allocation to support 512 countersAnca Jeanina FLOAREA
The driver fails to allocate a huge amount of memory in order to support 512 counters. Fixed it by changing memory allocation from static to dynamic for certain structure members. Counters that do not support the modify action will continue to have the memory allocated static. Change-Id: Ibdf76a9ce9e1a11d590166a2f93bbfd282edbeea Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/5009 Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-27dpa_offload: Allow 0xff masks for HASH classifier table entriesMarian Chereji
As key masks are not supported in HASH tables, the DPA Classifier was refusing to add an entry to a HASH table with a key that had any mask (mask pointer not NULL). This was changed so that the DPA Classifier can recognize a 0xff mask all over and ignore it. Any other (more complex) mask will still be refused. Change-Id: I0732d873fa5d10def4f2646c2bd248aadcffa736 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/4911 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-20Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-09-19dpa_offload : get SEC output frame buffer size from user spaceAlexandru Badicioiu
SEC shared descriptor requires output frame buffer size in the preheader to correctly create the output frame as scatter-gather when the buffer size is less than frame size. Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@freescale.com> Change-Id: I344296bd541d0f9a8645469f51b33be69373a42b Reviewed-on: http://git.am.freescale.net:8181/4829 Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-12Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-09-11dpa_offload : fix kernel segfault in ipsec_offload application on b4420qdsAlexandru Badicioiu
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@freescale.com> Change-Id: I3e168076370ccace0d970fc1afc32b87d90dc891 Reviewed-on: http://git.am.freescale.net:8181/4641 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-10dpa_offload: Leave stats counters Ids memory allocated for asynchronous ↵Marian Chereji
statistics requests When the DPA Stats is processing asynchronous requests, the memory allocated for the counter Ids and fed to the processing tasklet must NOT be released in the get_counters call, because the tasklet would work on invalid memory space later on. This memory must be released only when the event which signals the completion of the async request is consumed by the user space. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I49481a244305fb468781d3f3b1305698b554055f Reviewed-on: http://git.am.freescale.net:8181/4562 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-10dpa_offload: Leave stats counters Ids memory allocated for asynchronous ↵Marian Chereji
statistics requests When the DPA Stats is processing asynchronous requests, the memory allocated for the counter Ids and fed to the processing tasklet must NOT be released in the get_counters call, because the tasklet would work on invalid memory space later on. This memory must be released only when the event which signals the completion of the async request is consumed by the user space. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I49481a244305fb468781d3f3b1305698b554055f Reviewed-on: http://git.am.freescale.net:8181/4562 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-06dpa_offload: Added Traffic Manager user-space counter implementationAurelian Zanoschi
Added support for Traffic Manager user-space DPA Stats counter in driver. The Traffic Manager counters can be used both from user-space or kernel-space depending on the user needs. If the counter is created from user-space, all the retrieving mechanism is implemented in user-space and same happens for kernel-space case. The counters is marked as a user-space counter and the kernel will provide for this counter only the offset where the user-space library to write the statistics of the counter. This patch corrects some compilation warnings caused by QMan CEETM API changes. Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Change-Id: Ia97506a8a95e2c764f5176d35497f0ac95cb97cc Reviewed-on: http://git.am.freescale.net:8181/4447 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-09-06dpa_offload: Added Traffic Manager user-space counter implementationAurelian Zanoschi
Added support for Traffic Manager user-space DPA Stats counter in driver. The Traffic Manager counters can be used both from user-space or kernel-space depending on the user needs. If the counter is created from user-space, all the retrieving mechanism is implemented in user-space and same happens for kernel-space case. The counters is marked as a user-space counter and the kernel will provide for this counter only the offset where the user-space library to write the statistics of the counter. This patch corrects some compilation warnings caused by QMan CEETM API changes. Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Change-Id: Ia97506a8a95e2c764f5176d35497f0ac95cb97cc Reviewed-on: http://git.am.freescale.net:8181/4447 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-08-30Revert "dpa_offload: Added Traffic Manager user-space counter implementation" Rivera Jose-B46482
This reverts commit 658fb7c23113780e96ac8fc2503a058d49377281 This change has a bug related to misuse of the mutex_trylock() API (see line 3965) and causes non-obvious merge conflicts when merging to sdk-v1.4.x. Please rework this patch to ensure these issues are solved. Change-Id: If6be2d7fc98e3b3f0689b8c8abd241216adfd2f9 Reviewed-on: http://git.am.freescale.net:8181/4327 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-08-28dpa_offload: Added Traffic Manager user-space counter implementationAurelian Zanoschi
Added support for Traffic Manager user-space DPA Stats counter in driver. The Traffic Manager counters can be used both from user-space or kernel-space depending on the user needs. If the counter is created from user-space, all the retrieving mechanism is implemented in user-space and same happens for kernel-space case. The counters is marked as a user-space counter and the kernel will provide for this counter only the offset where the user-space library to write the statistics of the counter. This patch corrects some compilation warnings caused by QMan CEETM API changes. Change-Id: I48c4df286ab78efe2a16d46c4fd376d153732944 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/4196 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
2013-08-27Merge branch 'b4860rev2' into sdk-v1.4.xJ. German Rivera
2013-08-26dpa_offload : fix kernel segfault in ipsec_offload applicationAlexandru Badicioiu
Buffer pool id for frames enqueued to ipsec_offload inbound macless interface must match the interface bpid. Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@freescale.com>
2013-08-14dpa_offload: Add support in DPA Stats for miss statisticsAnca Jeanina FLOAREA
Added support in DPA Stats to retrieve the statistics for the miss-entry of either a Classification Node or a Classification Table. The user can request statistics for miss-entry by providing the key set to NULL. The Classification counter API was changed in order to allow the user to provide NULL instead of a valid key. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Idf1324414f25e45dae908df01e0dc008db0fd083 Reviewed-on: http://git.am.freescale.net:8181/3740 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Rivera Jose-B46482 <Jose.G.Rivera@freescale.com>
2013-08-13dpa_offload: Updated the traffic manager counter implementationAurelian Zanoschi
Updated the traffic manager implementation based on the QMan CEETM API updates. The compilation warnings problem was also fixed. This commit fixes the statistics selection and checks for counter source and counter type. Change-Id: I329d390b52361dc944fc51c6f4f9c6059cd7a5a9 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3437 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Rivera Jose-B46482 <Jose.G.Rivera@freescale.com>
2013-08-09dpa_offload: dpa_ipsec - Update create SA function to set hmd to invalidAndrei Varvara
DPA Classifier API was updated by adding a new attribute (hmd) to the struct dpa_cls_tbl_next_table_desc. DPA IPSec is using the classifier feature for linking two tables, if inbound policy verification is required but does not require the hmd option. A minor update had to be made to set the hdm to -1 (not valid) otherwise the 0 value would have been concidered valid by classifier and crash since not hmd is required here. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I76eccbf6a60b7d563540de539be5144112c1567c Reviewed-on: http://git.am.freescale.net:8181/3474 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-09dpa_offload: dpa_ipsec - Add support for NULL encryptionAndrei Varvara
The dpa ipsec component was not supporting ESP with NULL encryption. The patch is adding this suport. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I89111367e60c4592289687b0a13d84ac2911d23c Reviewed-on: http://git.am.freescale.net:8181/3473 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-09dpa_offload: Copy multicast group and header manipulation descriptors to ↵Radu Bulie
userspace during look-up by key or by ref operations Multicast group and hmanip descriptors were copied to userspace in classifier wrapper during look-up by key or by ref operations. The patch fixes the above issue. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: Ibba7869bcbe339a3ef23bd4071a3aaa682fe7b9d Reviewed-on: http://git.am.freescale.net:8181/3353 Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-09dpa_offload: Copy storage profile id to userspace during look-up by key or ↵Radu Bulie
by ref operations Not all parameters were copied to userspace in classifier wrapper during look-up by key or by ref operations. The patch fixes the above issue. Change-Id: I4c33455a327c8dfd6fd0fa28d13cc7e28b856714 Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3281 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-08-08dpa_offload: Add support in DPA Stats for miss statisticsAnca Jeanina FLOAREA
Added support in DPA Stats to retrieve the statistics for the miss-entry of either a Classification Node or a Classification Table. The user can request statistics for miss-entry by providing the key set to NULL. The Classification counter API was changed in order to allow the user to provide NULL instead of a valid key. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Id871766e5cc7b494c934096829e12af15ded7544 Reviewed-on: http://git.am.freescale.net:8181/3830 Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-08-08dpa_offload: Add possibility to query classification table miss action detailsMarian Chereji
Added a new function to query classification table miss action details. This function is only advertised as internal API and is needed by the DPA Stats component to acquire Miss Action Statistics. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: If9f506316c887bc44ebd5363c526a8f4fda3da1c Reviewed-on: http://git.am.freescale.net:8181/3829 Reviewed-by: Schmitt Richard-B43082 <B43082@freescale.com> Tested-by: Schmitt Richard-B43082 <B43082@freescale.com>
2013-07-23dpa_offload: dpa_ipsec - Update create SA function to set hmd to invalidAndrei Varvara
DPA Classifier API was updated by adding a new attribute (hmd) to the struct dpa_cls_tbl_next_table_desc. DPA IPSec is using the classifier feature for linking two tables, if inbound policy verification is required but does not require the hmd option. A minor update had to be made to set the hdm to -1 (not valid) otherwise the 0 value would have been concidered valid by classifier and crash since not hmd is required here. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I76eccbf6a60b7d563540de539be5144112c1567c Reviewed-on: http://git.am.freescale.net:8181/3474 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-23dpa_offload: dpa_ipsec - Add support for NULL encryptionAndrei Varvara
The dpa ipsec component was not supporting ESP with NULL encryption. The patch is adding this suport. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I89111367e60c4592289687b0a13d84ac2911d23c Reviewed-on: http://git.am.freescale.net:8181/3473 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-22dpa_offload: Copy multicast group and header manipulation descriptors to ↵Radu Bulie
userspace during look-up by key or by ref operations Multicast group and hmanip descriptors were copied to userspace in classifier wrapper during look-up by key or by ref operations. The patch fixes the above issue. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: Ibba7869bcbe339a3ef23bd4071a3aaa682fe7b9d Reviewed-on: http://git.am.freescale.net:8181/3353 Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-22dpa_offload: Copy storage profile id to userspace during look-up by key or ↵Radu Bulie
by ref operations Not all parameters were copied to userspace in classifier wrapper during look-up by key or by ref operations. The patch fixes the above issue. Change-Id: I4c33455a327c8dfd6fd0fa28d13cc7e28b856714 Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3281 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18dpa_offload: Add direct scheme support for classifier miss actionRadu Bulie
This patch enables the direct schemesupport when a miss action is configured. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: Ie16ab1e611a06b026fb5927ec2efea314bb0e2e1 Reviewed-on: http://git.am.freescale.net:8181/3354 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18dpa_offload: Add separate resource pointer for multicast group import operationRadu Bulie
When multicast group was preallocated from a xml PCD file, the handle to the group was given as a multicast group parameter. To align the multicast component with header manipulation and classifier components, the group handle will be given as a resource input parameter to the function that creates a multicast group. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I254d1c681cc016513d4cb569e0dfcf5c56478163 Reviewed-on: http://git.am.freescale.net:8181/3279 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-18dpa_offload: Add DPA Stats driver support for udev devicesAurelian Zanoschi
The device file in the file system is created automatically at init by the driver without need of any mknod commands. Change-Id: Ib0d5d4a47d3e92ec3d7a8813223017e0c24503a5 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2881 Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpa_offload: Switch DPA Classifier from using fmd/crc64 to using lib/crc64Marian Chereji
The DPA Classifier is computing a CRC64 ECMA by using the Frame Manager driver. Because the CRC64 ECMA generic module was recently accepted in linux/lib it will now use this CRC64 module instead of the implementation from FMan driver. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I97acd884302d7ab53ec78b045dd5978da2bf904a Reviewed-on: http://git.am.freescale.net:8181/3257 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpa_offload: Fix function free_resources to take in account errorsAnca Jeanina FLOAREA
Function free_resources was not taking in account error codes returned by free_cnts_resources and free_reqs_resources functions. In case an error occurred, function should be exited, so that the DPA Stats structure is not released. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I74800a38f52634ca1e38e1d68d5637a4480bf525 Reviewed-on: http://git.am.freescale.net:8181/2967 Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpa_offload: Improve error logging in DPA ClassifierMarian Chereji
The same error logging and display functions should be used all over the DPAA offloading drivers. "pr_err" calls were replaced with the newer "log_err" macros in DPA Classifier. Change-Id: I170b52ea716a5c0a5cae83a20e42a52fa55c8659 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3008 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-11dpa_offload: Add protection against concurrent HM ops runtime modificationsMarian Chereji
When modifying a header manipulation operation at runtime, the DPA Classifier uses the FMD call FM_PCD_ManipNodeReplace. This function locks the entire PCD and will fail if the PCD is already locked (it is not a blocking function). The parallel access protection mechanism in DPA Classifier would only protect against parallel access ON THE SAME MANIP NODE. It used to ALLOW parallel access on DIFFERENT HM nodes, but this will fail due to the locking system in the FMD. This patch updates the locking mechanism in DPA Classifier for the HM runtime modification functions so that a single call to FM_PCD_ManipNodeReplace can happen at any one time. Change-Id: I833b96e177e57f76d109ec000bd34c603df5ba71 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3007 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-06dpa_offload: Add support for header manipulation on DPA Classifier ↵Marian Chereji
next_table action The DPA Classifier API did not allow the user to add header manipulation on an entry whose action was sending the frames to a new classification table. This change adds this support to the DPA Classifier by adding an "hmd" (header manipulation descriptor) attribute to the "dpa_cls_tbl_next_table_desc" parameters structure. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I126cdfad8e76a8bec4453c8f7b506ad3380349e2 Reviewed-on: http://git.am.freescale.net:8181/3106 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Added the implementation for Traffic Manager counter into DPA StatsAurelian Zanoschi
Added the Traffic Manager counter implementation into DPA Stats component. For getting the Class Queue or the Class Congestion Group counter values, the component will call QMan functions qman_ceetm_cq_get_dequeu_statistics, respectively qman_ceetm_ccg_get_reject_statistics. For both Traffic Manager Class or Congestion Group the values returned can be the number of bytes or the number of frames dequeued from a Class Queue, respectively rejected in all Class Queues that belong to the Congestion Group. Change-Id: I3d1e0b0c5a2e206de68d5745e02727b0e2aa0fad Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2877 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Fix memory leak when plcr allocation failedAnca Jeanina FLOAREA
In function store_policy_param_to_sa_pol_list in case memory allocation of plcr failed, then the memory occupied by pol_entry needs to be released. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I88fd3ba1403b6af4d41d06ebd179219db9b84420 Reviewed-on: http://git.am.freescale.net:8181/2970 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Fix memory leaks for Classifier countersAnca Jeanina FLOAREA
For compat mode, the DPA Stats wrapper needs to allocate kernel-space memory to store the keys provided by the user-space application. After the driver call was successful, the memory must be released. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I489a73896f50da125e331dea6e459703cbdd2e76 Reviewed-on: http://git.am.freescale.net:8181/2986 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Added checks for dpa stats user provided paramsAurelian Zanoschi
Added extra checks for user provided params at counter creation to avoid DPA Stats driver getting stuck. Change-Id: Ic1cef09937217529c34d9b8dfc1c608fe93c195d Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2876 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Improved error messages with runtime information in DPA StatsAurelian Zanoschi
Updated all error messages from dpa_stats component by using the new macro's (log_err and log_warn) defined in dpa_offload. Added additional runtime information related to the counters that reported the error like counter id or member index for class counters Change-Id: Ib13652905bbbcb1da37385aa750d361452d7c09d Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2875 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Add udev support for dpa_classifierMarian Chereji
Added udev support so that the device file /dev/dpa_classifier gets created automatically at boot up instead of the user needing to create it manually using mknod commands. Change-Id: Icb2212a3232fe7eddba750617059f8d8b0ba87b5 Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3009 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Add support for udev in DPA IPsec WrapperAndrei Varvara
the device file for ipsec character device is now created by udev deamon. Change-Id: I3ec41cbe2347c6f2b1d5e9e30c45d77e76dc9a38 Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/3016 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-07-05dpa_offload: Fix l2_hdr_size correct usageAnca Jeanina FLOAREA
Function build_extended_encap_shared_descriptor had the fourth parameter as an uint8_t, but it must be uint32_t in order to store the l2_hdr_size. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Iabcdc3f80aa372a695385d3d39f1759647651792 Reviewed-on: http://git.am.freescale.net:8181/2969 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varvara Andrei-B21317 <andrei.varvara@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>