summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/initramfs/scripts/zfs167
-rw-r--r--contrib/intel_qat/patch/0001-cryptohash.diff17
-rw-r--r--contrib/intel_qat/patch/0001-pci_aer.diff20
-rw-r--r--contrib/intel_qat/patch/0001-timespec.diff35
-rw-r--r--contrib/intel_qat/patch/LICENSE30
-rw-r--r--contrib/intel_qat/readme.md27
6 files changed, 209 insertions, 87 deletions
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index a795fd39f605b..130aad5debd34 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -15,8 +15,8 @@
# See "4.5 Disable root prompt on the initramfs" of Securing Debian Manual:
# https://www.debian.org/doc/manuals/securing-debian-howto/ch4.en.html
shell() {
- if type panic > /dev/null 2>&1; then
- panic $@
+ if command -v panic > /dev/null 2>&1; then
+ panic
else
/bin/sh
fi
@@ -26,22 +26,23 @@ shell() {
# pools and mounting any filesystems.
pre_mountroot()
{
- if type run_scripts > /dev/null 2>&1 && \
- [ -f "/scripts/local-top" -o -d "/scripts/local-top" ]
+ if command -v run_scripts > /dev/null 2>&1
then
- [ "$quiet" != "y" ] && \
- zfs_log_begin_msg "Running /scripts/local-top"
- run_scripts /scripts/local-top
- [ "$quiet" != "y" ] && zfs_log_end_msg
- fi
+ if [ -f "/scripts/local-top" ] || [ -d "/scripts/local-top" ]
+ then
+ [ "$quiet" != "y" ] && \
+ zfs_log_begin_msg "Running /scripts/local-top"
+ run_scripts /scripts/local-top
+ [ "$quiet" != "y" ] && zfs_log_end_msg
+ fi
- if type run_scripts > /dev/null 2>&1 && \
- [ -f "/scripts/local-premount" -o -d "/scripts/local-premount" ]
- then
- [ "$quiet" != "y" ] && \
- zfs_log_begin_msg "Running /scripts/local-premount"
- run_scripts /scripts/local-premount
- [ "$quiet" != "y" ] && zfs_log_end_msg
+ if [ -f "/scripts/local-premount" ] || [ -d "/scripts/local-premount" ]
+ then
+ [ "$quiet" != "y" ] && \
+ zfs_log_begin_msg "Running /scripts/local-premount"
+ run_scripts /scripts/local-premount
+ [ "$quiet" != "y" ] && zfs_log_end_msg
+ fi
fi
}
@@ -57,10 +58,10 @@ disable_plymouth()
# Get a ZFS filesystem property value.
get_fs_value()
{
- local fs="$1"
- local value=$2
+ fs="$1"
+ value=$2
- "${ZFS}" get -H -ovalue $value "$fs" 2> /dev/null
+ "${ZFS}" get -H -ovalue "$value" "$fs" 2> /dev/null
}
# Find the 'bootfs' property on pool $1.
@@ -68,7 +69,7 @@ get_fs_value()
# pool by exporting it again.
find_rootfs()
{
- local pool="$1"
+ pool="$1"
# If 'POOL_IMPORTED' isn't set, no pool imported and therefore
# we won't be able to find a root fs.
@@ -84,7 +85,7 @@ find_rootfs()
# Make sure it's not '-' and that it starts with /.
if [ "${ZFS_BOOTFS}" != "-" ] && \
- $(get_fs_value "${ZFS_BOOTFS}" mountpoint | grep -q '^/$')
+ get_fs_value "${ZFS_BOOTFS}" mountpoint | grep -q '^/$'
then
# Keep it mounted
POOL_IMPORTED=1
@@ -101,14 +102,13 @@ find_rootfs()
# Support function to get a list of all pools, separated with ';'
find_pools()
{
- local CMD="$*"
- local pools pool
+ CMD="$*"
pools=$($CMD 2> /dev/null | \
grep -E "pool:|^[a-zA-Z0-9]" | \
sed 's@.*: @@' | \
- while read pool; do \
- echo -n "$pool;"
+ while read -r pool; do \
+ printf "%s" "$pool;"
done)
echo "${pools%%;}" # Return without the last ';'.
@@ -117,8 +117,6 @@ find_pools()
# Get a list of all available pools
get_pools()
{
- local available_pools npools
-
if [ -n "${ZFS_POOL_IMPORT}" ]; then
echo "$ZFS_POOL_IMPORT"
return 0
@@ -159,9 +157,8 @@ get_pools()
# Filter out any exceptions...
if [ -n "$ZFS_POOL_EXCEPTIONS" ]
then
- local found=""
- local apools=""
- local pool exception
+ found=""
+ apools=""
OLD_IFS="$IFS" ; IFS=";"
for pool in $available_pools
@@ -194,8 +191,7 @@ get_pools()
# Import given pool $1
import_pool()
{
- local pool="$1"
- local dirs dir
+ pool="$1"
# Verify that the pool isn't already imported
# Make as sure as we can to not require '-f' to import.
@@ -205,7 +201,7 @@ import_pool()
# to something we can use later with the real import(s). We want to
# make sure we find all by* dirs, BUT by-vdev should be first (if it
# exists).
- if [ -n "$USE_DISK_BY_ID" -a -z "$ZPOOL_IMPORT_PATH" ]
+ if [ -n "$USE_DISK_BY_ID" ] && [ -z "$ZPOOL_IMPORT_PATH" ]
then
dirs="$(for dir in $(echo /dev/disk/by-*)
do
@@ -213,7 +209,7 @@ import_pool()
echo "$dir" | grep -q /by-vdev && continue
[ ! -d "$dir" ] && continue
- echo -n "$dir:"
+ printf "%s" "$dir:"
done | sed 's,:$,,g')"
if [ -d "/dev/disk/by-vdev" ]
@@ -277,7 +273,7 @@ import_pool()
# with more logging etc.
load_module_initrd()
{
- if [ "$ZFS_INITRD_PRE_MOUNTROOT_SLEEP" > 0 ]
+ if [ "$ZFS_INITRD_PRE_MOUNTROOT_SLEEP" -gt 0 ] 2>/dev/null
then
if [ "$quiet" != "y" ]; then
zfs_log_begin_msg "Sleeping for" \
@@ -288,9 +284,9 @@ load_module_initrd()
fi
# Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear.
- if type wait_for_udev > /dev/null 2>&1 ; then
+ if command -v wait_for_udev > /dev/null 2>&1 ; then
wait_for_udev 10
- elif type wait_for_dev > /dev/null 2>&1 ; then
+ elif command -v wait_for_dev > /dev/null 2>&1 ; then
wait_for_dev
fi
@@ -300,7 +296,7 @@ load_module_initrd()
# Load the module
load_module "zfs" || return 1
- if [ "$ZFS_INITRD_POST_MODPROBE_SLEEP" > 0 ]
+ if [ "$ZFS_INITRD_POST_MODPROBE_SLEEP" -gt 0 ] 2>/dev/null
then
if [ "$quiet" != "y" ]; then
zfs_log_begin_msg "Sleeping for" \
@@ -316,12 +312,10 @@ load_module_initrd()
# Mount a given filesystem
mount_fs()
{
- local fs="$1"
- local mountpoint
+ fs="$1"
# Check that the filesystem exists
- "${ZFS}" list -oname -tfilesystem -H "${fs}" > /dev/null 2>&1
- [ "$?" -ne 0 ] && return 1
+ "${ZFS}" list -oname -tfilesystem -H "${fs}" > /dev/null 2>&1 || return 1
# Skip filesystems with canmount=off. The root fs should not have
# canmount=off, but ignore it for backwards compatibility just in case.
@@ -333,14 +327,14 @@ mount_fs()
# Need the _original_ datasets mountpoint!
mountpoint=$(get_fs_value "$fs" mountpoint)
- if [ "$mountpoint" = "legacy" -o "$mountpoint" = "none" ]; then
+ if [ "$mountpoint" = "legacy" ] || [ "$mountpoint" = "none" ]; then
# Can't use the mountpoint property. Might be one of our
# clones. Check the 'org.zol:mountpoint' property set in
# clone_snap() if that's usable.
mountpoint=$(get_fs_value "$fs" org.zol:mountpoint)
- if [ "$mountpoint" = "legacy" -o \
- "$mountpoint" = "none" -o \
- "$mountpoint" = "-" ]
+ if [ "$mountpoint" = "legacy" ] ||
+ [ "$mountpoint" = "none" ] ||
+ [ "$mountpoint" = "-" ]
then
if [ "$fs" != "${ZFS_BOOTFS}" ]; then
# We don't have a proper mountpoint and this
@@ -396,10 +390,10 @@ mount_fs()
# Unlock a ZFS native encrypted filesystem.
decrypt_fs()
{
- local fs="$1"
-
+ fs="$1"
+
# If pool encryption is active and the zfs command understands '-o encryption'
- if [ "$(zpool list -H -o feature@encryption $(echo "${fs}" | awk -F\/ '{print $1}'))" = 'active' ]; then
+ if [ "$(zpool list -H -o feature@encryption "$(echo "${fs}" | awk -F/ '{print $1}')")" = 'active' ]; then
# Determine dataset that holds key for root dataset
ENCRYPTIONROOT="$(get_fs_value "${fs}" encryptionroot)"
@@ -427,7 +421,7 @@ decrypt_fs()
TRY_COUNT=$((TRY_COUNT - 1))
done
- # Prompt with systemd, if active
+ # Prompt with systemd, if active
elif [ -e /run/systemd/system ]; then
echo "systemd-ask-password" > /run/zfs_console_askpwd_cmd
while [ $TRY_COUNT -gt 0 ]; do
@@ -454,7 +448,7 @@ decrypt_fs()
# Destroy a given filesystem.
destroy_fs()
{
- local fs="$1"
+ fs="$1"
[ "$quiet" != "y" ] && \
zfs_log_begin_msg "Destroying '$fs'"
@@ -489,9 +483,9 @@ destroy_fs()
# mounted with a 'zfs mount -a' in the init/systemd scripts).
clone_snap()
{
- local snap="$1"
- local destfs="$2"
- local mountpoint="$3"
+ snap="$1"
+ destfs="$2"
+ mountpoint="$3"
[ "$quiet" != "y" ] && zfs_log_begin_msg "Cloning '$snap' to '$destfs'"
@@ -529,7 +523,7 @@ clone_snap()
# Rollback a given snapshot.
rollback_snap()
{
- local snap="$1"
+ snap="$1"
[ "$quiet" != "y" ] && zfs_log_begin_msg "Rollback $snap"
@@ -559,9 +553,8 @@ rollback_snap()
# to the user to choose from.
ask_user_snap()
{
- local fs="$1"
- local i=1
- local SNAP snapnr snap debug
+ fs="$1"
+ i=1
# We need to temporarily disable debugging. Set 'debug' so we
# remember to enabled it again.
@@ -574,16 +567,16 @@ ask_user_snap()
# Because we need the resulting snapshot, which is sent on
# stdout to the caller, we use stderr for our questions.
echo "What snapshot do you want to boot from?" > /dev/stderr
- while read snap; do
+ while read -r snap; do
echo " $i: ${snap}" > /dev/stderr
- eval `echo SNAP_$i=$snap`
+ eval "$(echo SNAP_$i=$snap)"
i=$((i + 1))
done <<EOT
$("${ZFS}" list -H -oname -tsnapshot -r "${fs}")
EOT
- echo -n " Snap nr [1-$((i-1))]? " > /dev/stderr
- read snapnr
+ echo "%s" " Snap nr [1-$((i-1))]? " > /dev/stderr
+ read -r snapnr
# Re-enable debugging.
if [ -n "${debug}" ]; then
@@ -591,16 +584,16 @@ EOT
set -x
fi
- echo "$(eval echo "$"SNAP_$snapnr)"
+ echo "$(eval echo '$SNAP_'$snapnr)"
}
setup_snapshot_booting()
{
- local snap="$1"
- local s destfs subfs mountpoint retval=0 filesystems fs
+ snap="$1"
+ retval=0
- # Make sure that the snapshot specified actually exist.
- if [ ! $(get_fs_value "${snap}" type) ]
+ # Make sure that the snapshot specified actually exists.
+ if [ ! "$(get_fs_value "${snap}" type)" ]
then
# Snapshot does not exist (...@<null> ?)
# ask the user for a snapshot to use.
@@ -617,7 +610,7 @@ setup_snapshot_booting()
then
# If the destination dataset for the clone
# already exists, destroy it. Recursively
- if [ $(get_fs_value "${rootfs}_${snapname}" type) ]; then
+ if [ "$(get_fs_value "${rootfs}_${snapname}" type)" ]; then
filesystems=$("${ZFS}" list -oname -tfilesystem -H \
-r -Sname "${ZFS_BOOTFS}")
for fs in $filesystems; do
@@ -652,8 +645,8 @@ setup_snapshot_booting()
# with clone_snap(). If legacy or none, then use
# the sub fs value.
mountpoint=$(get_fs_value "${s%%@*}" mountpoint)
- if [ "$mountpoint" = "legacy" -o \
- "$mountpoint" = "none" ]
+ if [ "$mountpoint" = "legacy" ] || \
+ [ "$mountpoint" = "none" ]
then
if [ -n "${subfs}" ]; then
mountpoint="${subfs}"
@@ -678,8 +671,6 @@ setup_snapshot_booting()
# This is the main function.
mountroot()
{
- local snaporig snapsub destfs pool POOLS
-
# ----------------------------------------------------------------
# I N I T I A L S E T U P
@@ -742,7 +733,7 @@ mountroot()
# No longer set in the defaults file, but it could have been set in
# get_pools() in some circumstances. If it's something, but not 'yes',
# it's no good to us.
- [ -n "$USE_DISK_BY_ID" -a "$USE_DISK_BY_ID" != 'yes' ] && \
+ [ -n "$USE_DISK_BY_ID" ] && [ "$USE_DISK_BY_ID" != 'yes' ] && \
unset USE_DISK_BY_ID
# ----------------------------------------------------------------
@@ -788,12 +779,12 @@ mountroot()
# ------------
# If we have 'ROOT' (see above), but not 'ZFS_BOOTFS', then use
# 'ROOT'
- [ -n "$ROOT" -a -z "${ZFS_BOOTFS}" ] && ZFS_BOOTFS="$ROOT"
+ [ -n "$ROOT" ] && [ -z "${ZFS_BOOTFS}" ] && ZFS_BOOTFS="$ROOT"
# ------------
# Check for the `-B zfs-bootfs=%s/%u,...` kind of parameter.
# NOTE: Only use the pool name and dataset. The rest is not
- # supported by ZoL (whatever it's for).
+ # supported by OpenZFS (whatever it's for).
if [ -z "$ZFS_RPOOL" ]
then
# The ${zfs-bootfs} variable is set at the kernel command
@@ -809,11 +800,11 @@ mountroot()
# ------------
# No root fs or pool specified - do auto detect.
- if [ -z "$ZFS_RPOOL" -a -z "${ZFS_BOOTFS}" ]
+ if [ -z "$ZFS_RPOOL" ] && [ -z "${ZFS_BOOTFS}" ]
then
# Do auto detect. Do this by 'cheating' - set 'root=zfs:AUTO'
# which will be caught later
- ROOT=zfs:AUTO
+ ROOT='zfs:AUTO'
fi
# ----------------------------------------------------------------
@@ -858,7 +849,7 @@ mountroot()
fi
# Import the pool (if not already done so in the AUTO check above).
- if [ -n "$ZFS_RPOOL" -a -z "${POOL_IMPORTED}" ]
+ if [ -n "$ZFS_RPOOL" ] && [ -z "${POOL_IMPORTED}" ]
then
[ "$quiet" != "y" ] && \
zfs_log_begin_msg "Importing ZFS root pool '$ZFS_RPOOL'"
@@ -971,7 +962,7 @@ mountroot()
touch /run/zfs_unlock_complete
if [ -e /run/zfs_unlock_complete_notify ]; then
- read zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify
+ read -r zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify
fi
# ------------
@@ -989,8 +980,8 @@ mountroot()
echo
echo "=> waiting for ENTER before continuing because of 'zfsdebug=1'. "
- echo -n " 'c' for shell, 'r' for reboot, 'ENTER' to continue. "
- read b
+ printf "%s" " 'c' for shell, 'r' for reboot, 'ENTER' to continue. "
+ read -r b
[ "$b" = "c" ] && /bin/sh
[ "$b" = "r" ] && reboot -f
@@ -1000,12 +991,14 @@ mountroot()
# ------------
# Run local bottom script
- if type run_scripts > /dev/null 2>&1 && \
- [ -f "/scripts/local-bottom" -o -d "/scripts/local-bottom" ]
+ if command -v run_scripts > /dev/null 2>&1
then
- [ "$quiet" != "y" ] && \
- zfs_log_begin_msg "Running /scripts/local-bottom"
- run_scripts /scripts/local-bottom
- [ "$quiet" != "y" ] && zfs_log_end_msg
+ if [ -f "/scripts/local-bottom" ] || [ -d "/scripts/local-bottom" ]
+ then
+ [ "$quiet" != "y" ] && \
+ zfs_log_begin_msg "Running /scripts/local-bottom"
+ run_scripts /scripts/local-bottom
+ [ "$quiet" != "y" ] && zfs_log_end_msg
+ fi
fi
}
diff --git a/contrib/intel_qat/patch/0001-cryptohash.diff b/contrib/intel_qat/patch/0001-cryptohash.diff
new file mode 100644
index 0000000000000..2d87c8f36256c
--- /dev/null
+++ b/contrib/intel_qat/patch/0001-cryptohash.diff
@@ -0,0 +1,17 @@
+cryptohash.h was dropped and merged with crypto/sha.sh in 5.8 kernel. Details in:
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=228c4f265c6eb60eaa4ed0edb3bf7c113173576c
+
+---
+diff --git a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+index 4c389da..e602377 100644
+--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
++++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+@@ -66,7 +66,7 @@
+
+ #include "Osal.h"
+ #include <linux/crypto.h>
+-#include <linux/cryptohash.h>
++#include <crypto/sha.h>
+ #include <linux/version.h>
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ #include <crypto/internal/hash.h>
diff --git a/contrib/intel_qat/patch/0001-pci_aer.diff b/contrib/intel_qat/patch/0001-pci_aer.diff
new file mode 100644
index 0000000000000..7516ac4fee759
--- /dev/null
+++ b/contrib/intel_qat/patch/0001-pci_aer.diff
@@ -0,0 +1,20 @@
+In kernel 5.7 the pci_cleanup_aer_uncorrect_error_status() function was
+renamed with the following commit:
+
+git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=894020fdd88c1e9a74c60b67c0f19f1c7696ba2f
+
+This simply updates the function call with the proper name (pci_aer_clear_nonfatal_status()).
+
+---
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
+index a6ce6df..545bb79 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
+@@ -304,7 +304,7 @@ static pci_ers_result_t adf_slot_reset(struct pci_dev *pdev)
+ pr_err("QAT: Can't find acceleration device\n");
+ return PCI_ERS_RESULT_DISCONNECT;
+ }
+- pci_cleanup_aer_uncorrect_error_status(pdev);
++ pci_aer_clear_nonfatal_status(pdev);
+ if (adf_dev_aer_schedule_reset(accel_dev, ADF_DEV_RESET_SYNC))
+ return PCI_ERS_RESULT_DISCONNECT;
diff --git a/contrib/intel_qat/patch/0001-timespec.diff b/contrib/intel_qat/patch/0001-timespec.diff
new file mode 100644
index 0000000000000..04fb053e1f8c2
--- /dev/null
+++ b/contrib/intel_qat/patch/0001-timespec.diff
@@ -0,0 +1,35 @@
+This patch attempts to expose timespec and getnstimeofday which were
+explicitly hidden in the 5.6 kernel with the introduction of the
+following commits:
+
+git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23
+git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=412c53a680a97cb1ae2c0ab60230e193bee86387
+
+Code received from users@dpdk.org, issue tracked under QATE-59888.
+
+---
+diff --git a/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c b/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c
+index 4639834..523e376 100644
+--- a/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c
++++ b/quickassist/lookaside/access_layer/src/sample_code/performance/framework/linux/kernel_space/cpa_sample_code_utils.c
+@@ -107,6 +107,8 @@ atomic_t arrived;
+ extern struct device perf_device;
+ #endif
+
++#define timespec timespec64
++#define getnstimeofday ktime_get_real_ts64
+
+ /* Define a number for timeout */
+ #define SAMPLE_CODE_MAX_LONG (0x7FFFFFFF)
+diff --git a/quickassist/qat/compat/qat_compat.h b/quickassist/qat/compat/qat_compat.h
+index 2a02eaf..3515092 100644
+--- a/quickassist/qat/compat/qat_compat.h
++++ b/quickassist/qat/compat/qat_compat.h
+@@ -466,4 +466,7 @@ static inline void pci_ignore_hotplug(struct pci_dev *dev)
+ #if (RHEL_RELEASE_CODE && RHEL_RELEASE_VERSION(7, 3) <= RHEL_RELEASE_CODE)
+ #define QAT_KPT_CAP_DISCOVERY
+ #endif
++
++#define timespec timespec64
++#define getnstimeofday ktime_get_real_ts64
+ #endif /* _QAT_COMPAT_H_ */
diff --git a/contrib/intel_qat/patch/LICENSE b/contrib/intel_qat/patch/LICENSE
new file mode 100644
index 0000000000000..8e12726c0a9ac
--- /dev/null
+++ b/contrib/intel_qat/patch/LICENSE
@@ -0,0 +1,30 @@
+BSD LICENSE
+
+Copyright (c) Intel Corporation.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/contrib/intel_qat/readme.md b/contrib/intel_qat/readme.md
new file mode 100644
index 0000000000000..7e45d395bb801
--- /dev/null
+++ b/contrib/intel_qat/readme.md
@@ -0,0 +1,27 @@
+# Intel_QAT easy install script
+
+This contrib contains community compatibility patches to get Intel QAT working on the following kernel versions:
+- 5.6
+- 5.7
+- 5.8
+
+These patches are based on the following Intel QAT version:
+[1.7.l.4.10.0-00014](https://01.org/sites/default/files/downloads/qat1.7.l.4.10.0-00014.tar.gz)
+
+When using QAT with above kernels versions, the following patches needs to be applied using:
+patch -p1 < _$PATCH_
+_Where $PATCH refers to the path of the patch in question_
+
+### 5.6
+/patch/0001-timespec.diff
+
+### 5.7
+/patch/0001-pci_aer.diff
+
+### 5.8
+/patch/0001-cryptohash.diff
+
+
+_Patches are supplied by [Storage Performance Development Kit (SPDK)](https://github.com/spdk/spdk)_
+
+