linux/drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c

// SPDX-License-Identifier: GPL-2.0
/* Marvell OcteonTX CPT driver
 *
 * Copyright (C) 2019 Marvell International Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include "otx_cptvf.h"
#include "otx_cptvf_algs.h"

/* Completion code size and initial value */
#define COMPLETION_CODE_SIZE
#define COMPLETION_CODE_INIT

/* SG list header size in bytes */
#define SG_LIST_HDR_SIZE

/* Default timeout when waiting for free pending entry in us */
#define CPT_PENTRY_TIMEOUT
#define CPT_PENTRY_STEP

/* Default threshold for stopping and resuming sender requests */
#define CPT_IQ_STOP_MARGIN
#define CPT_IQ_RESUME_MARGIN

#define CPT_DMA_ALIGN

void otx_cpt_dump_sg_list(struct pci_dev *pdev, struct otx_cpt_req_info *req)
{}

static inline struct otx_cpt_pending_entry *get_free_pending_entry(
						struct otx_cpt_pending_queue *q,
						int qlen)
{}

static inline u32 modulo_inc(u32 index, u32 length, u32 inc)
{}

static inline void free_pentry(struct otx_cpt_pending_entry *pentry)
{}

static inline int setup_sgio_components(struct pci_dev *pdev,
					struct otx_cpt_buf_ptr *list,
					int buf_count, u8 *buffer)
{}

static inline int setup_sgio_list(struct pci_dev *pdev,
				  struct otx_cpt_info_buffer **pinfo,
				  struct otx_cpt_req_info *req, gfp_t gfp)
{}


static void cpt_fill_inst(union otx_cpt_inst_s *inst,
			  struct otx_cpt_info_buffer *info,
			  struct otx_cpt_iq_cmd *cmd)
{}

/*
 * On OcteonTX platform the parameter db_count is used as a count for ringing
 * door bell. The valid values for db_count are:
 * 0 - 1 CPT instruction will be enqueued however CPT will not be informed
 * 1 - 1 CPT instruction will be enqueued and CPT will be informed
 */
static void cpt_send_cmd(union otx_cpt_inst_s *cptinst, struct otx_cptvf *cptvf)
{}

static int process_request(struct pci_dev *pdev, struct otx_cpt_req_info *req,
			   struct otx_cpt_pending_queue *pqueue,
			   struct otx_cptvf *cptvf)
{}

int otx_cpt_do_request(struct pci_dev *pdev, struct otx_cpt_req_info *req,
		       int cpu_num)
{}

static int cpt_process_ccode(struct pci_dev *pdev,
			     union otx_cpt_res_s *cpt_status,
			     struct otx_cpt_info_buffer *cpt_info,
			     struct otx_cpt_req_info *req, u32 *res_code)
{}

static inline void process_pending_queue(struct pci_dev *pdev,
					 struct otx_cpt_pending_queue *pqueue)
{}

void otx_cpt_post_process(struct otx_cptvf_wqe *wqe)
{}