summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
2013-05-24fsl_qbman: initialise structures to zeroJeffrey Ladouceur
The cgr and cgrd are passed as parameters to the qman_query_cgr api. Initialise to all zero before using them. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: I3a6c3fdb0107ded82aec61842ae6463d4849512c Reviewed-on: http://git.am.freescale.net:8181/2680 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24dpa_offload: verify if inbound policy verification is enabledAndrei Varvara
Check if inbound policy verification is enabled prior to adding, removing, getting, flushing policies This patch is related to CR ENGR00258699 Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I58e0ada0369eb224492d7d43bd1f4a15f33b7c81 Reviewed-on: http://git.am.freescale.net:8181/2579 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-24dpa_offload: updated DPA IPsec not to require a valid index tableAndrei Varvara
Index table was mandatory when initializing the dpa ipsec. If upper layer does not require action per SA after decryption, then there is no need for a valid index table. Updated the code so that index table is no longer mandatory. This patch is related to CR ENGR00258699 Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I5dd4000f008cf07dcfbf960f3e0f8c65c8e2d04d Reviewed-on: http://git.am.freescale.net:8181/2578 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-22dpa_offload: Remove unused eth8 and eth9 from the B4860QDS dts fileMarian Chereji
Ethernet interfaces 8 and 9 are usually mapped on TGEC interfaces, but they are not used by the dpa_offloading applications. These interfaces were removed from the dts file because if the RCW of the board is not in sync with the board hardware (like extension cards), it can cause errors at initialization. Change-Id: I16aba4d555a66d6e93fbb3f7b0d0e2ac5116060c Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2653 Reviewed-by: Bulie Radu-Andrei-B37577 <Radu.Bulie@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-22dpa_offload: Fix for Policer engine in dpa_ipsec_sa_add_policyAnca Jeanina FLOAREA
When the function dpa_ipsec_sa_add_policy is called, the policy parameters are copied in an internal structure. The policer parameters are provided as a pointer so the parameters should be copied in an internal allocated memory area and not used "as is". This patch is related to CR ENGR00263529. Change-Id: I342f0f06457bb128452b33bed3eac55752c4bd6b Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2625 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>
2013-05-21dpa_offload: Fix multicast classifier component to proper release the locks ↵Radu Bulie
for decriptor array Descriptor array locks were not released correctly for actions of adding or removing a multicast member. This patch is related to CR ENGR260419 Change-Id: I440241fbfa6d4c8c9b0318b1ae89ddf6e2cad05a Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2595 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-20Merge tag 'v3.8.13'Scott Wood
This is the 3.8.13 stable release
2013-05-17qman: use math64 instead of direct 64-bit division.Haiying Wang
In 32-bit builds, the ROUNDING macro was breaking kernel assumptions when fed with 64-bit parameters. This forces it to use the recommended wrappers in <linux/math64.h> instead. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: Id708cdad58593f38683112adf59984ffd3d763f7 Reviewed-on: http://git.am.freescale.net:8181/2580 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-17dpa_offload: Add dtsi files for chosen node support on P4080 platformRadu Bulie
The patch adds the dtsi files used for enabling chosen node support for P4080 platform. Chosen node support permits to configure features such as: -fragmentation on O/H port -set TNUMS and buffer configuration parameters on different ports Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I6718ae3f51515ed35b0748476916087ce131ac57 Reviewed-on: http://git.am.freescale.net:8181/2577 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-17dpa_offload: Add dts files for B4420 platform support in DPA offloadRadu Bulie
This patch adds the dts files for B4420 support Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: Ibcae2a79f0b514a794dedb4da9504510365f79eb Reviewed-on: http://git.am.freescale.net:8181/2576 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-05-17dpa_classifier: exported dump_lookup_key functionAurelian Zanoschi
Exported function to display lookup key and its mask to be available to other DPA Offload modules. Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Change-Id: I7e80986901ea7147402724b9ff911ed6085f97f6 Reviewed-on: http://git.am.freescale.net:8181/2315 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-05-17dpa_stats: Updated the compat structure for traffic manager counterAurelian Zanoschi
Added dpa_stats_compat_cnt_traffic_mng and removed the dpa_stats_compat_cls_cnt_traffic_mng for the Traffic Manager counter in compat mode in order to be compliant with the updated Traffic Manager API. Change-Id: Ife6feaaf72c26439518c4ef3b4758f9653dfca19 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2522 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@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-05-17dpa_offload: Synchronize DPA offload dts files with latest sdk changesRadu Bulie
This patch synchronize the dts files used by DPA offload with the changes from sdk Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: Ia173ea0dfd6f4f675d76f8f2405228737354d6a8 Reviewed-on: http://git.am.freescale.net:8181/2519 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-05-17dpa_offload: Add dtsi files for chosen node support on B4860 platformRadu Bulie
The patch adds the dtsi files used for enabling chosen node support for B4860 platform. Chosen node support permits to configure features such as: -virtual storage profile -fragmentation on O/H port -set TNUMS and buffer configuration parameters on different ports Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I4a98251225ff34e9775d43f6f1b904cc389a21b2 Reviewed-on: http://git.am.freescale.net:8181/2518 Reviewed-by: Chereji Marian-Cornel-R27762 <marian.chereji@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-17dpa_ipsec: Fix support for Policer engineAnca Jeanina FLOAREA
The support for Policer engine was either lacking or had multiple bugs. A Policer engine can be configured in multiple cases: policy miss action, post ipsec action and/or policy action. A clean fix-up could only be performed if the code of non-compat mode is completely separated from the code of compat mode. This patch is related to CR ENGR00260484. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Iecb43d7efddad550ee25a982150e656ca5216c2d Reviewed-on: http://git.am.freescale.net:8181/2557 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-17dpa_ipsec: Fix incoherent use of copy_from_userAnca Jeanina FLOAREA
Function copy_from_used was used incorrectly, as copy from destination to source. The fqid_range variable needs to be used as a destination and not as a source. This patch is related to CR ENGR00260509. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I0b00cd2b5647ee51eab7cd1375579337930ac33d Reviewed-on: http://git.am.freescale.net:8181/2556 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-17dpa_classifier: fix lack of policer parameters in user read operationAnca Jeanina FLOAREA
Policer parameters were not provided when user performs a read operation for table action, in compat mode. This patch is related to CR ENGR00262910. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Ib8a592ba4016a311b142573297d43ee7befb0d3e Reviewed-on: http://git.am.freescale.net:8181/2542 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-17dpa_classifier: fix policer parameters for enqueue actionAnca Jeanina FLOAREA
Policer parameters overrideParams and newFqid must be configured in order for the Policer engine to operate properly. This patch is related to CR ENGR00262906. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I4166fedb864c6ce74cd5b6051f5e9994d211918b Reviewed-on: http://git.am.freescale.net:8181/2541 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-16fsl_qbman: remove stale (and unused) stubGeoff Thorpe
Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: I3e47ac16f9d119194aeb15da1186d6038f33f722 Reviewed-on: http://git.am.freescale.net:8181/2530 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-15dpa_offload: Automatically enable CRC8 when DPA offloading drivers are enabledMarian Chereji
DPA offloading drivers are dependent on the CRC8 functions. If one enables the DPA offloading drivers for build, but forgets to enable CRC8, the Linux kernel build will fail in the link stage. This change automatically selects CRC8 for build when the user wants DPA offloading driver in the kernel. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ife1bb645056169a0337f9d1f6318a39862ec3ee6 Reviewed-on: http://git.am.freescale.net:8181/2482 Reviewed-by: Zanoschi Aurelian-B43522 <Aurelian.Zanoschi@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-15Fix USDPAA IRQ handling to work correctly in 32 bit modeRoy Pledge
Also properly respect the NONBLOCK flag in the read() API Make sure IRQ is properly inhibited in the IRQ handler Create a dependancy between USDPAA and USDPAA_IRQ file pointers Change-Id: Idc0c33c8448a402d5d127e7e4e22e629dbfa5912 Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2310 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-15Fix pool channel ID checking so it works based on the globalRoy Pledge
pool channel ID variable Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Change-Id: I076964896bd1a54cf72aa16a25270a978c7d73d3 Reviewed-on: http://git.am.freescale.net:8181/2493 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-15dpa_offload: Bug fix. Remove unnecessary fm_pcd attribute from compat ↵Marian Chereji
parameters structure There was one fm_pcd attribute that was left behind in the classifier table parameters that seems to mess up the ioctl command codes. This was removed. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I81cd6f32fc77f1bfa23ea72e814879f6bd00ab74 Reviewed-on: http://git.am.freescale.net:8181/2484 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-05-10fsl_qbman: fix the non-SMP buildGeoff Thorpe
The <linux/smp.h> header only includes <asm/smp.h> if CONFIG_SMP is defined, yet it is required in the non-SMP case too. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: I0644bca53a0afeb3eb331956f7e4b20959f2a3d6 Reviewed-on: http://git.am.freescale.net:8181/2419 Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-05-08staging: zsmalloc: Fix link error on ARMJoerg Roedel
commit d95abbbb291bf5bce078148f53603ce9c0aa1d44 upstream. Testing the arm chromebook config against the upstream kernel produces a linker error for the zsmalloc module from staging. The symbol flush_tlb_kernel_range is not available there. Fix this by removing the reimplementation of unmap_kernel_range in the zsmalloc module and using the function directly. The unmap_kernel_range function is not usable by modules, so also disallow building the driver as a module for now. Signed-off-by: Joerg Roedel <joro@8bytes.org> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-07dpa_stats: added missing header dependency for qman_fq structureAurelian Zanoschi
The DPA Stats component uses the qman_fq structure from QMan. This structure uses rb_node defined in rbtree.h, but doesn't include it, so it was needed to include rbtree.h or module.h into dpa_stats. The DPA Stats component uses the qman_fq structure from QMan. This structure uses rb_node defined in rbtree.h, but doesn't include it, so it was needed to include rbtree.h or module.h into dpa_stats. Change-Id: I79caee058a7a0a4849cfd1827ff7fdb50d4d8d75 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/2338 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_stats: Add support for NCSP IP reassembly counterAurelian Zanoschi
Added support for non consistent storage profile reassembly counter for FMANv3 capable platforms. For non FMANv3 platforms the driver will accept the stat selection, but will always return 0 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Change-Id: I27501de84499c1db5085510eb7c320709786617e Reviewed-on: http://git.am.freescale.net:8181/2241 Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_stats: Add support for UNICAST class counterAurelian Zanoschi
Enabled the UNICAST IN/OUT class counter support into DPA Stats component by removing the condition that returned an error in case of UNICAST class counter was selected. Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Change-Id: Ib36048bc2a4a1c1d3d4f9fe511c35d44a4fbcb62 Reviewed-on: http://git.am.freescale.net:8181/2240 Reviewed-by: Floarea Anca Jeanina-B12569 <anca.floarea@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Makefile and Kconfig for DPA Offload moduleAndrei Varvara
Makefile - compiles DPA Classifier, IPSec and Stats components and creates the dpa_offload.ko module when required or makes the module built in kernel. Kconfig - configure "Freescale Datapath Offloading Driver" Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I06894635e95b88f165ad121a81c96801ba44b00a Reviewed-on: http://git.am.freescale.net:8181/2239 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add DPA Stats WrapperJeanina Floarea
This code is exporting the DPA Stats API to user-space. Create a character device called dpa_stats. Ioctls for every DPA Stats API function. Compat case treated i.e US & KS can be compiled on 32 or 64 bit Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: Iba2ab5b79e1bf742fc1249a4738a4e132baabba8 Reviewed-on: http://git.am.freescale.net:8181/2238 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add DPA Stats componentJeanina Floarea
The purpose of the DPA Stats module is to provide to the application a unitary method for retrieving counters that are spread at different hardware or software locations. Signed-off-by: Anca Jeanina FLOAREA <anca.floarea@freescale.com> Change-Id: I3b4d886ef5aab00f6de6a330e068b7401bc24b6c Reviewed-on: http://git.am.freescale.net:8181/2237 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add DPA IPsec WrapperAndrei Varvara
This code is exporting the DPA IPSec API to user-space. Create a character device called dpa_ipsec. Ioctls for every DPA IPsec API function. Compat case treated i.e US & KS can be compiled on 32 or 64 bit Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Signed-off-by: Mihai Serb Change-Id: I0050a1d0226f918be709cd5a98c2b49139c41874 Reviewed-on: http://git.am.freescale.net:8181/2236 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add DPA IPsec componentAndrei Varvara
The DPA IPSec component exports a set of functions used to: - initialize the DPA IPSec module internal data structures - create and configure full inbound IPSec hardware accelerated paths - create and configure full outbound IPSec hardware accelerated paths - replace expired SAs (after rekeying) without packet loss During the initialization phase the DPA IPSec implementation performs a series of actions meant to remove the need to perform memory allocations and hardware/software object initializations during the runtime phases. INBOUND PATH: _____________ ______________ _______________________________ __________ || SA lookup ||--> || Decryption || --> || Inbound Policy Verification || --> || App Rx || ||___________|| ||____________|| ||_____________________________|| ||________|| The inbound processing of an encrypted packet begins by determining the SA that will be used for decryption and authentication. In accordance to the RFC the packets are classified based on a 3-tuple that uniquely identifies the SA. This 3-tuple is formed from: - the destination IP address in the IP header of the encrypted packet - the value of the IP protocol field in the IP header of the encrypted packet - the value in the SPI field in the ESP header A special case is that were the encrypted packets are encapsulated in an UDP header in order to support NAT traversal. In this case the classification key should contain the following fields: - the destination IP address in the IP header of the encrypted packet - the IP protocol field in the IP header of the encrypted packet - the SPI field in the ESP header - the source UDP port in the UDP header - the destination UDP port in the UDP header This lookup is offloaded to FMAN by means of classifier API and FMAN API. When an encrypted packet matches an offloaded key, it is directed by the hardware into the decryption process by enquing the packet to a SEC frame queue (FQ). A shared descriptor (representing the decryption SA) is set on this FQ and the SEC will begin the decryption process and then place the clear text packet to a FQ that is input for an offline port (OH). Processing continues with inbound policy verification done on OH using the FMAN hardware. After this step the packet is enqueued to a FQ created by the application which benefits of IPSec security OUTBOUND PATH: __________ _________________ ______________ __________________ || App Tx || --> || Policy Lookup || --> || Encryption || --> || Error Checking || ||________|| ||_______________|| ||____________|| ||________________|| The primary function of the policy lookup block is to classify frames and determine the correct SA on which they should be processed. The DPA IPSec can be configured to build a policy key using any subset of the following fields: - masked source IP address - masked destination IP address - optionally masked IP protocol field value - masked source port value / ICMP type field value - masked destination port value / ICMP code field value IP fragmentation can be configured per policy and is performed, if required, on the packets before being sent to the Encryption Block. A fragmentation header manipulation identifier has to be passed when offloading the policy. If a clear text packet hits an offloaded policy the packet will be directed by FMAN hardware into the proper FQ for SEC processing. After the SEC has completed all the required operations, a new frame is created containing the ESP encapsulated packet. This frame will be sent to the next block for further processing i.e input to offline port where error checking is done prior to forwarding the packet to an application desired FQ based on the SA that processed that packet. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Signed-off-by: Mihai Serb Change-Id: Id8a4afa1cfda42dd2ba1408614a5900cb7b80cee Reviewed-on: http://git.am.freescale.net:8181/2235 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add packet classification component wrapperMarian Chereji
The wrapper component allows the packet classification offloading driver's API to be accessible from user space via ioctl sys calls. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I33110048b995205c7f9ef0f40753f9060789dd18 Reviewed-on: http://git.am.freescale.net:8181/2234 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add packet classification componentMarian Chereji
The packet classification offloading driver implements its functionalities using the NetCommSw FMan driver. It exposes an easy-to-use API which can be called either from kernel space or from user space (through the classification offloading driver wrapper). It is able to create or import (from FMD resources) 3 types of tables - exact match table, indexed table and HASH table. Imported tables can be either empty or prefilled. It offers an API to insert, remove, or modify entries. It allows the users to classify and - enqueue - multicast - discard - re-classify or - return-to-KeyGen network packets. It is able to create or import (from FMD resources) header manipulation operations and attach them to table entries. It allows runtime modification of existing (created or imported) header manipulation operations. It offers an API to create or import (from FMD resources) multicast groups. It allows the user to add or remove members to existing multicast groups. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Change-Id: I854c0c3c2eba6d6f441cb46e502e6dbc623c48d5 Reviewed-on: http://git.am.freescale.net:8181/2233 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Add dts required when running ipsec offload usecaseAndrei Varvara
These dts files are used in conjuntion with the ipsec offload, reassembly and fragmentation usecases. There is one dts for each DPAA platform. Signed-off-by: Radu Bulie <radu.bulie@freescale.com> Signed-off-by: Alex Badicioiu <alexandru.badicioiu@freescale.com> Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Id714faddcf126ccb2258d17e2951a7e7e92d9728 Reviewed-on: http://git.am.freescale.net:8181/2232 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-30dpa_offload: Circular queue utilities used in DPA offload codeAndrei Varvara
Source file for the circular queue object Elements are put in and taken out of the queue in FIFO order In addition any position in the queue may be read (without affecting the contents of the queue) The size of each item in the queue is set when the queue is initialized. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Change-Id: I70ff2a89b7c5e5deb90a2b66db8931790ea15b0d Reviewed-on: http://git.am.freescale.net:8181/2231 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-24Fix USDPAA memory mappings so they can no longer occur at address 0Roy Pledge
which confused any SW checking for NULL pointers Change-Id: Ic0ac5e61f1776ce8d4ddb622e401942ce2750705 Reviewed-on: http://git.am.freescale.net:8181/2062 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Ladouceur Jeffrey-R11498 <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-24squash! fsl_qman: Set stashing using the IOMMU APIEmil Medve
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Change-Id: I60be3c3f94f50fca47a53328a70a552b74808ad1 Reviewed-on: http://git.am.freescale.net:8181/1772 Reviewed-by: Yoder Stuart-B08248 <stuart.yoder@freescale.com> Reviewed-by: Pledge Roy-R01356 <roy.pledge@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-23fsl_qbman: Enable preemption in bman_create_affine_portal()Priyanka Jain
bman_create_affine_portal() calls bman_create_portal() which in turn calls request_irq() to register portal_isr. In case of PREEMPT_RT enabled, request_irq() is converted into request_threaded_irq() as portal_isr is threaded IRQ handler. But this request_threaded_irq() can sleep, so it is mandatory to call request_threaded_irq() only from context that can sleep. bman_create_affine_portal() is called from context that is already affine to CPU or in other words this is non-migratable to other CPUs. Hence, it is not required to run this function in non-preemptible context. Enabling preemption will allow subsequent functions to sleep. Call put_affine_portal() on entry i.e. before calling bman_create_portal() to enable preemption. Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com> Fixes CQ: ENGR00259733 kernel crash in bman_init when PREEMPT_RT is enabled Change-Id: I628b6fbc986a5bd980ffa68af4fd1ec7a2661758 Reviewed-on: http://git.am.freescale.net:8181/1717 Reviewed-by: Medve Emilian-EMMEDVE1 <Emilian.Medve@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-22Revert "ASF-QOS: Adding API to configure QMAN Scheduler via ASF"Fleming Andrew-AFLEMING
This reverts commit 5f2780e55e6885e1b89c28fc23f998a27a26d455 I must have grabbed this one by accident. A proper solution needs to be discussed. Change-Id: I276218aef9ea663d183a1233d79bf303e2113360 Reviewed-on: http://git.am.freescale.net:8181/1703 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-19fsl_qman: add debugfs support for query some ceetm featuresHaiying Wang
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I344f564af3cad4d46a1437559ece080dfef59cd2 Reviewed-on: http://git.am.freescale.net:8181/1639 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-18ASF-QOS: Adding API to configure QMAN Scheduler via ASFSachin Saxena
- API shall be defined & Exported only when ASF QOS is in use Change-Id: I026b34d6dec70f70cf44bcaa23573c18ff457b19 Signed-off-by: Sachin Saxena <sachin.saxena@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/1378 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-18Cleanup USDPAA resources when a process exitsRoy Pledge
Add an API to query the usage levels of DMA memory Elminates UIO and converts USDPAA to interact with the kernel via a character devicc Removed misc/devices fsl_usdpaa file Remove unneeded file Change-Id: I797548e2c79f7098e6378484bcae2b455f022cd4 Reviewed-on: http://git.am.freescale.net:8181/1546 Reviewed-by: Ladouceur Jeffrey-R11498 <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-18uio: Add FSL RMan UIO driver supportMinghuan Lian
Add support to expose FSL RMan controller to user space via UIO system. The RMan is composed of a global configuration and multiple inbound classification units. We map the global configuration as one UIO device and each classification unit as a unique UIO device. Change-Id: Ia491dae0d82c5fee9eb7e2b535305b557ba7329a Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/922 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-17pme: Set uninitialized variableJeffrey Ladouceur
The max scan size should be set to zero if PME hw version doesn't match. In this case zero means no limit. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: Ic1f756ac0971d27e9c103a2c27173c66dd14d519 Reviewed-on: http://git.am.freescale.net:8181/1361 Reviewed-by: Pledge Roy-R01356 <roy.pledge@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-17Merge tag 'v3.8.8'Scott Wood
This is the 3.8.8 stable release Conflicts: include/linux/preempt.h
2013-04-16fsl_qman: Add QMan3.1 reversion supportHaiying Wang
The QMan revision on both T4240 and B4860 rev2 silicon is 3.1, and both T2080 and T1040 also have QMan rev3.1. Update the qman driver to support rev3.1. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I7ea2149f982023cd5f99729df6c6b61cba46b668 Reviewed-on: http://git.am.freescale.net:8181/1261 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-16fsl_qman: some fixes for CEETM APIsHaiying Wang
- Fix the parameter order in disable ceetm mode of sp. - Alloc memory for CQ after confirming CQ is available for group CQs - Check prio_b to be non-zero if group_b is set. - Use object qm_ceetm_weight_code to convert wbfs and ratio. - Adjust weight code index from W8 to W15 in set/get queue weight - Fix the byte_cnt field of ceetm statistics counter Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I28e4978e1cc13957e64dd6f0e376d239d1161933 Reviewed-on: http://git.am.freescale.net:8181/1260 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
2013-04-16fsl_qman: implement CEETM CCSCI and update some ccg APIsHaiying Wang
The CEETM congestion state change notification uses a seperate bit for CSCN interrupt in software portal's ISR register, and different command to query congestion state. This patch implmentes the CCSCI interrupt handling, and combines the ccg's swp setting into qman_ceetm_ccg_set(), because we can only register ccgr callback to the affine portal. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Change-Id: I246bd70ea33786d39b6a18ae90e03f9fa09c3912 Reviewed-on: http://git.am.freescale.net:8181/1259 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>