Lines Matching defs:cptvf
6 #include "cptvf.h"
44 static int setup_sgio_components(struct cpt_vf *cptvf, struct buf_ptr *list,
50 struct pci_dev *pdev = cptvf->pdev;
121 static inline int setup_sgio_list(struct cpt_vf *cptvf,
127 struct pci_dev *pdev = cptvf->pdev;
143 ret = setup_sgio_components(cptvf, req->in,
160 ret = setup_sgio_components(cptvf, req->out,
223 static int send_cpt_command(struct cpt_vf *cptvf, union cpt_inst_s *cmd,
226 struct pci_dev *pdev = cptvf->pdev;
233 if (unlikely(qno >= cptvf->nr_queues)) {
235 qno, cptvf->nr_queues);
239 qinfo = &cptvf->cqinfo;
263 cptvf_write_vq_doorbell(cptvf, 1);
270 static void do_request_cleanup(struct cpt_vf *cptvf,
274 struct pci_dev *pdev = cptvf->pdev;
316 static void do_post_process(struct cpt_vf *cptvf, struct cpt_info_buffer *info)
318 struct pci_dev *pdev = cptvf->pdev;
325 do_request_cleanup(cptvf, info);
328 static inline void process_pending_queue(struct cpt_vf *cptvf,
332 struct pci_dev *pdev = cptvf->pdev;
367 do_request_cleanup(cptvf, info);
381 do_request_cleanup(cptvf, info);
401 do_post_process(info->cptvf, info);
410 int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)
419 struct pci_dev *pdev = cptvf->pdev;
433 info->cptvf = cptvf;
435 ret = setup_sgio_list(cptvf, info, req);
480 pqueue = &cptvf->pqinfo.queue[queue];
484 process_pending_queue(cptvf, &cptvf->pqinfo, queue);
489 pentry = get_free_pending_entry(pqueue, cptvf->pqinfo.qlen);
493 process_pending_queue(cptvf, &cptvf->pqinfo, queue);
528 ret = send_cpt_command(cptvf, &cptinst, queue);
540 do_request_cleanup(cptvf, info);
545 void vq_post_process(struct cpt_vf *cptvf, u32 qno)
547 struct pci_dev *pdev = cptvf->pdev;
549 if (unlikely(qno > cptvf->nr_queues)) {
555 process_pending_queue(cptvf, &cptvf->pqinfo, qno);
560 struct cpt_vf *cptvf = (struct cpt_vf *)vfdev;
561 struct pci_dev *pdev = cptvf->pdev;
563 if (!cpt_device_ready(cptvf)) {
568 if ((cptvf->vftype == SE_TYPES) && (!req->ctrl.s.se_req)) {
570 cptvf->vfid);
572 } else if ((cptvf->vftype == AE_TYPES) && (req->ctrl.s.se_req)) {
574 cptvf->vfid);
578 return process_request(cptvf, req);