mirror of
https://github.com/opnsense/src.git
synced 2026-03-03 05:41:01 -05:00
Overview: Intel(R) QuickAssist Technology (Intel(R) QAT) provides hardware acceleration for offloading security, authentication and compression services from the CPU, thus significantly increasing the performance and efficiency of standard platform solutions. This commit introduces: - Intel® 4xxx Series VF driver support. - Device configurability via sysctls. - UIO support for Intel® 4xxx Series devices. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Karol Grzadziel <karolx.grzadziel@intel.com> Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39850
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause */
|
|
/* Copyright(c) 2007-2022 Intel Corporation */
|
|
/* $FreeBSD$ */
|
|
#ifndef ADF_PFVF_UTILS_H
|
|
#define ADF_PFVF_UTILS_H
|
|
|
|
#include <linux/types.h>
|
|
#include "adf_pfvf_msg.h"
|
|
|
|
/* How long to wait for far side to acknowledge receipt */
|
|
#define ADF_PFVF_MSG_ACK_DELAY_US 4
|
|
#define ADF_PFVF_MSG_ACK_MAX_DELAY_US (1 * USEC_PER_SEC)
|
|
|
|
u8 adf_pfvf_calc_blkmsg_crc(u8 const *buf, u8 buf_len);
|
|
|
|
struct pfvf_field_format {
|
|
u8 offset;
|
|
u32 mask;
|
|
};
|
|
|
|
struct pfvf_csr_format {
|
|
struct pfvf_field_format type;
|
|
struct pfvf_field_format data;
|
|
};
|
|
|
|
u32 adf_pfvf_csr_msg_of(struct adf_accel_dev *accel_dev,
|
|
struct pfvf_message msg,
|
|
const struct pfvf_csr_format *fmt);
|
|
struct pfvf_message adf_pfvf_message_of(struct adf_accel_dev *accel_dev,
|
|
u32 raw_msg,
|
|
const struct pfvf_csr_format *fmt);
|
|
|
|
static inline struct resource *
|
|
adf_get_pmisc_base(struct adf_accel_dev *accel_dev)
|
|
{
|
|
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
|
|
struct adf_bar *pmisc;
|
|
|
|
pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)];
|
|
|
|
return pmisc->virt_addr;
|
|
}
|
|
|
|
#endif /* ADF_PFVF_UTILS_H */
|