1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2013-2016 Freescale Semiconductor Inc.
7 #include <fsl_mc_sys.h>
8 #include <fsl_mc_cmd.h>
10 #include <fsl_dpseci.h>
11 #include <fsl_dpseci_cmd.h>
14 * dpseci_open() - Open a control session for the specified object
15 * @mc_io: Pointer to MC portal's I/O object
16 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
17 * @dpseci_id: DPSECI unique ID
18 * @token: Returned token; use in subsequent API calls
20 * This function can be used to open a control session for an
21 * already created object; an object may have been declared in
22 * the DPL or by calling the dpseci_create() function.
23 * This function returns a unique authentication token,
24 * associated with the specific object ID and the specific MC
25 * portal; this token must be used in all subsequent commands for
26 * this specific object.
28 * Return: '0' on Success; Error code otherwise.
30 int dpseci_open(struct fsl_mc_io *mc_io,
35 struct dpseci_cmd_open *cmd_params;
36 struct mc_command cmd = { 0 };
40 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_OPEN,
43 cmd_params = (struct dpseci_cmd_open *)cmd.params;
44 cmd_params->dpseci_id = cpu_to_le32(dpseci_id);
46 /* send command to mc*/
47 err = mc_send_command(mc_io, &cmd);
51 /* retrieve response parameters */
52 *token = mc_cmd_hdr_read_token(&cmd);
58 * dpseci_close() - Close the control session of the object
59 * @mc_io: Pointer to MC portal's I/O object
60 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
61 * @token: Token of DPSECI object
63 * After this function is called, no further operations are
64 * allowed on the object without opening a new control session.
66 * Return: '0' on Success; Error code otherwise.
68 int dpseci_close(struct fsl_mc_io *mc_io,
72 struct mc_command cmd = { 0 };
75 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_CLOSE,
79 /* send command to mc*/
80 return mc_send_command(mc_io, &cmd);
84 * dpseci_create() - Create the DPSECI object
85 * @mc_io: Pointer to MC portal's I/O object
86 * @dprc_token: Parent container token; '0' for default container
87 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
88 * @cfg: Configuration structure
89 * @obj_id: Returned object id
91 * Create the DPSECI object, allocate required resources and
92 * perform required initialization.
94 * The object can be created either by declaring it in the
95 * DPL file, or by calling this function.
97 * The function accepts an authentication token of a parent
98 * container that this object should be assigned to. The token
99 * can be '0' so the object will be assigned to the default container.
100 * The newly created object can be opened with the returned
101 * object id and using the container's associated tokens and MC portals.
103 * Return: '0' on Success; Error code otherwise.
105 int dpseci_create(struct fsl_mc_io *mc_io,
108 const struct dpseci_cfg *cfg,
111 struct dpseci_cmd_create *cmd_params;
112 struct mc_command cmd = { 0 };
115 /* prepare command */
116 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_CREATE,
119 cmd_params = (struct dpseci_cmd_create *)cmd.params;
120 for (i = 0; i < 8; i++)
121 cmd_params->priorities[i] = cfg->priorities[i];
122 for (i = 0; i < 8; i++)
123 cmd_params->priorities2[i] = cfg->priorities[8 + i];
124 cmd_params->num_tx_queues = cfg->num_tx_queues;
125 cmd_params->num_rx_queues = cfg->num_rx_queues;
126 cmd_params->options = cpu_to_le32(cfg->options);
128 /* send command to mc*/
129 err = mc_send_command(mc_io, &cmd);
133 /* retrieve response parameters */
134 *obj_id = mc_cmd_read_object_id(&cmd);
140 * dpseci_destroy() - Destroy the DPSECI object and release all its resources.
141 * @mc_io: Pointer to MC portal's I/O object
142 * @dprc_token: Parent container token; '0' for default container
143 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
144 * @object_id: The object id; it must be a valid id within the container that
145 * created this object;
147 * The function accepts the authentication token of the parent container that
148 * created the object (not the one that currently owns the object). The object
149 * is searched within parent using the provided 'object_id'.
150 * All tokens to the object must be closed before calling destroy.
152 * Return: '0' on Success; error code otherwise.
154 int dpseci_destroy(struct fsl_mc_io *mc_io,
159 struct dpseci_cmd_destroy *cmd_params;
160 struct mc_command cmd = { 0 };
162 /* prepare command */
163 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_DESTROY,
166 cmd_params = (struct dpseci_cmd_destroy *)cmd.params;
167 cmd_params->dpseci_id = cpu_to_le32(object_id);
169 /* send command to mc*/
170 return mc_send_command(mc_io, &cmd);
174 * dpseci_enable() - Enable the DPSECI, allow sending and receiving frames.
175 * @mc_io: Pointer to MC portal's I/O object
176 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
177 * @token: Token of DPSECI object
179 * Return: '0' on Success; Error code otherwise.
181 int dpseci_enable(struct fsl_mc_io *mc_io,
185 struct mc_command cmd = { 0 };
187 /* prepare command */
188 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_ENABLE,
192 /* send command to mc*/
193 return mc_send_command(mc_io, &cmd);
197 * dpseci_disable() - Disable the DPSECI, stop sending and receiving frames.
198 * @mc_io: Pointer to MC portal's I/O object
199 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
200 * @token: Token of DPSECI object
202 * Return: '0' on Success; Error code otherwise.
204 int dpseci_disable(struct fsl_mc_io *mc_io,
208 struct mc_command cmd = { 0 };
210 /* prepare command */
211 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_DISABLE,
215 /* send command to mc*/
216 return mc_send_command(mc_io, &cmd);
220 * dpseci_is_enabled() - Check if the DPSECI is enabled.
221 * @mc_io: Pointer to MC portal's I/O object
222 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
223 * @token: Token of DPSECI object
224 * @en: Returns '1' if object is enabled; '0' otherwise
226 * Return: '0' on Success; Error code otherwise.
228 int dpseci_is_enabled(struct fsl_mc_io *mc_io,
233 struct dpseci_rsp_is_enabled *rsp_params;
234 struct mc_command cmd = { 0 };
237 /* prepare command */
238 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_IS_ENABLED,
242 /* send command to mc*/
243 err = mc_send_command(mc_io, &cmd);
247 /* retrieve response parameters */
248 rsp_params = (struct dpseci_rsp_is_enabled *)cmd.params;
249 *en = dpseci_get_field(rsp_params->en, ENABLE);
255 * dpseci_reset() - Reset the DPSECI, returns the object to initial state.
256 * @mc_io: Pointer to MC portal's I/O object
257 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
258 * @token: Token of DPSECI object
260 * Return: '0' on Success; Error code otherwise.
262 int dpseci_reset(struct fsl_mc_io *mc_io,
266 struct mc_command cmd = { 0 };
268 /* prepare command */
269 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_RESET,
273 /* send command to mc*/
274 return mc_send_command(mc_io, &cmd);
278 * dpseci_get_attributes() - Retrieve DPSECI attributes.
279 * @mc_io: Pointer to MC portal's I/O object
280 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
281 * @token: Token of DPSECI object
282 * @attr: Returned object's attributes
284 * Return: '0' on Success; Error code otherwise.
286 int dpseci_get_attributes(struct fsl_mc_io *mc_io,
289 struct dpseci_attr *attr)
291 struct dpseci_rsp_get_attr *rsp_params;
292 struct mc_command cmd = { 0 };
295 /* prepare command */
296 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_ATTR,
300 /* send command to mc*/
301 err = mc_send_command(mc_io, &cmd);
305 /* retrieve response parameters */
306 rsp_params = (struct dpseci_rsp_get_attr *)cmd.params;
307 attr->id = le32_to_cpu(rsp_params->id);
308 attr->options = le32_to_cpu(rsp_params->options);
309 attr->num_tx_queues = rsp_params->num_tx_queues;
310 attr->num_rx_queues = rsp_params->num_rx_queues;
316 * dpseci_set_rx_queue() - Set Rx queue configuration
317 * @mc_io: Pointer to MC portal's I/O object
318 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
319 * @token: Token of DPSECI object
320 * @queue: Select the queue relative to number of
321 * priorities configured at DPSECI creation; use
322 * DPSECI_ALL_QUEUES to configure all Rx queues identically.
323 * @cfg: Rx queue configuration
325 * Return: '0' on Success; Error code otherwise.
327 int dpseci_set_rx_queue(struct fsl_mc_io *mc_io,
331 const struct dpseci_rx_queue_cfg *cfg)
333 struct dpseci_cmd_set_rx_queue *cmd_params;
334 struct mc_command cmd = { 0 };
336 /* prepare command */
337 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_RX_QUEUE,
340 cmd_params = (struct dpseci_cmd_set_rx_queue *)cmd.params;
341 cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);
342 cmd_params->dest_priority = cfg->dest_cfg.priority;
343 cmd_params->queue = queue;
344 cmd_params->user_ctx = cpu_to_le64(cfg->user_ctx);
345 cmd_params->options = cpu_to_le32(cfg->options);
346 dpseci_set_field(cmd_params->dest_type,
348 cfg->dest_cfg.dest_type);
349 dpseci_set_field(cmd_params->order_preservation_en,
351 cfg->order_preservation_en);
353 /* send command to mc*/
354 return mc_send_command(mc_io, &cmd);
358 * dpseci_get_rx_queue() - Retrieve Rx queue attributes.
359 * @mc_io: Pointer to MC portal's I/O object
360 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
361 * @token: Token of DPSECI object
362 * @queue: Select the queue relative to number of
363 * priorities configured at DPSECI creation
364 * @attr: Returned Rx queue attributes
366 * Return: '0' on Success; Error code otherwise.
368 int dpseci_get_rx_queue(struct fsl_mc_io *mc_io,
372 struct dpseci_rx_queue_attr *attr)
374 struct dpseci_rsp_get_rx_queue *rsp_params;
375 struct dpseci_cmd_get_queue *cmd_params;
376 struct mc_command cmd = { 0 };
379 /* prepare command */
380 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_RX_QUEUE,
383 cmd_params = (struct dpseci_cmd_get_queue *)cmd.params;
384 cmd_params->queue = queue;
386 /* send command to mc*/
387 err = mc_send_command(mc_io, &cmd);
391 /* retrieve response parameters */
392 rsp_params = (struct dpseci_rsp_get_rx_queue *)cmd.params;
393 attr->user_ctx = le64_to_cpu(rsp_params->user_ctx);
394 attr->fqid = le32_to_cpu(rsp_params->fqid);
395 attr->dest_cfg.dest_id = le32_to_cpu(rsp_params->dest_id);
396 attr->dest_cfg.priority = rsp_params->dest_priority;
397 attr->dest_cfg.dest_type =
398 dpseci_get_field(rsp_params->dest_type,
400 attr->order_preservation_en =
401 dpseci_get_field(rsp_params->order_preservation_en,
408 * dpseci_get_tx_queue() - Retrieve Tx queue attributes.
409 * @mc_io: Pointer to MC portal's I/O object
410 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
411 * @token: Token of DPSECI object
412 * @queue: Select the queue relative to number of
413 * priorities configured at DPSECI creation
414 * @attr: Returned Tx queue attributes
416 * Return: '0' on Success; Error code otherwise.
418 int dpseci_get_tx_queue(struct fsl_mc_io *mc_io,
422 struct dpseci_tx_queue_attr *attr)
424 struct dpseci_rsp_get_tx_queue *rsp_params;
425 struct dpseci_cmd_get_queue *cmd_params;
426 struct mc_command cmd = { 0 };
429 /* prepare command */
430 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_TX_QUEUE,
433 cmd_params = (struct dpseci_cmd_get_queue *)cmd.params;
434 cmd_params->queue = queue;
436 /* send command to mc*/
437 err = mc_send_command(mc_io, &cmd);
441 /* retrieve response parameters */
442 rsp_params = (struct dpseci_rsp_get_tx_queue *)cmd.params;
443 attr->fqid = le32_to_cpu(rsp_params->fqid);
444 attr->priority = rsp_params->priority;
450 * dpseci_get_sec_attr() - Retrieve SEC accelerator attributes.
451 * @mc_io: Pointer to MC portal's I/O object
452 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
453 * @token: Token of DPSECI object
454 * @attr: Returned SEC attributes
456 * Return: '0' on Success; Error code otherwise.
458 int dpseci_get_sec_attr(struct fsl_mc_io *mc_io,
461 struct dpseci_sec_attr *attr)
463 struct dpseci_rsp_get_sec_attr *rsp_params;
464 struct mc_command cmd = { 0 };
467 /* prepare command */
468 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_SEC_ATTR,
472 /* send command to mc*/
473 err = mc_send_command(mc_io, &cmd);
477 /* retrieve response parameters */
478 rsp_params = (struct dpseci_rsp_get_sec_attr *)cmd.params;
479 attr->ip_id = le16_to_cpu(rsp_params->ip_id);
480 attr->major_rev = rsp_params->major_rev;
481 attr->minor_rev = rsp_params->minor_rev;
482 attr->era = rsp_params->era;
483 attr->deco_num = rsp_params->deco_num;
484 attr->zuc_auth_acc_num = rsp_params->zuc_auth_acc_num;
485 attr->zuc_enc_acc_num = rsp_params->zuc_enc_acc_num;
486 attr->snow_f8_acc_num = rsp_params->snow_f8_acc_num;
487 attr->snow_f9_acc_num = rsp_params->snow_f9_acc_num;
488 attr->crc_acc_num = rsp_params->crc_acc_num;
489 attr->pk_acc_num = rsp_params->pk_acc_num;
490 attr->kasumi_acc_num = rsp_params->kasumi_acc_num;
491 attr->rng_acc_num = rsp_params->rng_acc_num;
492 attr->md_acc_num = rsp_params->md_acc_num;
493 attr->arc4_acc_num = rsp_params->arc4_acc_num;
494 attr->des_acc_num = rsp_params->des_acc_num;
495 attr->aes_acc_num = rsp_params->aes_acc_num;
496 attr->ccha_acc_num = rsp_params->ccha_acc_num;
497 attr->ptha_acc_num = rsp_params->ptha_acc_num;
503 * dpseci_get_sec_counters() - Retrieve SEC accelerator counters.
504 * @mc_io: Pointer to MC portal's I/O object
505 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
506 * @token: Token of DPSECI object
507 * @counters: Returned SEC counters
509 * Return: '0' on Success; Error code otherwise.
511 int dpseci_get_sec_counters(struct fsl_mc_io *mc_io,
514 struct dpseci_sec_counters *counters)
516 struct dpseci_rsp_get_sec_counters *rsp_params;
517 struct mc_command cmd = { 0 };
520 /* prepare command */
521 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_SEC_COUNTERS,
525 /* send command to mc*/
526 err = mc_send_command(mc_io, &cmd);
530 /* retrieve response parameters */
531 rsp_params = (struct dpseci_rsp_get_sec_counters *)cmd.params;
532 counters->dequeued_requests =
533 le64_to_cpu(rsp_params->dequeued_requests);
534 counters->ob_enc_requests = le64_to_cpu(rsp_params->ob_enc_requests);
535 counters->ib_dec_requests = le64_to_cpu(rsp_params->ib_dec_requests);
536 counters->ob_enc_bytes = le64_to_cpu(rsp_params->ob_enc_bytes);
537 counters->ob_prot_bytes = le64_to_cpu(rsp_params->ob_prot_bytes);
538 counters->ib_dec_bytes = le64_to_cpu(rsp_params->ib_dec_bytes);
539 counters->ib_valid_bytes = le64_to_cpu(rsp_params->ib_valid_bytes);
545 * dpseci_get_api_version() - Get Data Path SEC Interface API version
546 * @mc_io: Pointer to MC portal's I/O object
547 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
548 * @major_ver: Major version of data path sec API
549 * @minor_ver: Minor version of data path sec API
551 * Return: '0' on Success; Error code otherwise.
553 int dpseci_get_api_version(struct fsl_mc_io *mc_io,
558 struct dpseci_rsp_get_api_version *rsp_params;
559 struct mc_command cmd = { 0 };
562 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_API_VERSION,
566 err = mc_send_command(mc_io, &cmd);
570 rsp_params = (struct dpseci_rsp_get_api_version *)cmd.params;
571 *major_ver = le16_to_cpu(rsp_params->major);
572 *minor_ver = le16_to_cpu(rsp_params->minor);
578 * dpseci_set_opr() - Set Order Restoration configuration.
579 * @mc_io: Pointer to MC portal's I/O object
580 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
581 * @token: Token of DPSECI object
582 * @index: The queue index
583 * @options: Configuration mode options
584 * can be OPR_OPT_CREATE or OPR_OPT_RETIRE
585 * @cfg: Configuration options for the OPR
587 * Return: '0' on Success; Error code otherwise.
589 int dpseci_set_opr(struct fsl_mc_io *mc_io,
596 struct dpseci_cmd_set_opr *cmd_params;
597 struct mc_command cmd = { 0 };
599 /* prepare command */
600 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_OPR,
603 cmd_params = (struct dpseci_cmd_set_opr *)cmd.params;
604 cmd_params->index = index;
605 cmd_params->options = options;
606 cmd_params->oloe = cfg->oloe;
607 cmd_params->oeane = cfg->oeane;
608 cmd_params->olws = cfg->olws;
609 cmd_params->oa = cfg->oa;
610 cmd_params->oprrws = cfg->oprrws;
612 /* send command to mc*/
613 return mc_send_command(mc_io, &cmd);
617 * dpseci_get_opr() - Retrieve Order Restoration config and query.
618 * @mc_io: Pointer to MC portal's I/O object
619 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
620 * @token: Token of DPSECI object
621 * @index: The queue index
622 * @cfg: Returned OPR configuration
623 * @qry: Returned OPR query
625 * Return: '0' on Success; Error code otherwise.
627 int dpseci_get_opr(struct fsl_mc_io *mc_io,
634 struct dpseci_rsp_get_opr *rsp_params;
635 struct dpseci_cmd_get_opr *cmd_params;
636 struct mc_command cmd = { 0 };
639 /* prepare command */
640 cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_OPR,
643 cmd_params = (struct dpseci_cmd_get_opr *)cmd.params;
644 cmd_params->index = index;
646 /* send command to mc*/
647 err = mc_send_command(mc_io, &cmd);
651 /* retrieve response parameters */
652 rsp_params = (struct dpseci_rsp_get_opr *)cmd.params;
653 cfg->oloe = rsp_params->oloe;
654 cfg->oeane = rsp_params->oeane;
655 cfg->olws = rsp_params->olws;
656 cfg->oa = rsp_params->oa;
657 cfg->oprrws = rsp_params->oprrws;
658 qry->rip = dpseci_get_field(rsp_params->flags, RIP);
659 qry->enable = dpseci_get_field(rsp_params->flags, OPR_ENABLE);
660 qry->nesn = le16_to_cpu(rsp_params->nesn);
661 qry->ndsn = le16_to_cpu(rsp_params->ndsn);
662 qry->ea_tseq = le16_to_cpu(rsp_params->ea_tseq);
663 qry->tseq_nlis = dpseci_get_field(rsp_params->tseq_nlis, TSEQ_NLIS);
664 qry->ea_hseq = le16_to_cpu(rsp_params->ea_hseq);
665 qry->hseq_nlis = dpseci_get_field(rsp_params->hseq_nlis, HSEQ_NLIS);
666 qry->ea_hptr = le16_to_cpu(rsp_params->ea_hptr);
667 qry->ea_tptr = le16_to_cpu(rsp_params->ea_tptr);
668 qry->opr_vid = le16_to_cpu(rsp_params->opr_vid);
669 qry->opr_id = le16_to_cpu(rsp_params->opr_id);
675 * dpseci_set_congestion_notification() - Set congestion group
676 * notification configuration
677 * @mc_io: Pointer to MC portal's I/O object
678 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
679 * @token: Token of DPSECI object
680 * @cfg: congestion notification configuration
682 * Return: '0' on success, error code otherwise
684 int dpseci_set_congestion_notification(
685 struct fsl_mc_io *mc_io,
688 const struct dpseci_congestion_notification_cfg *cfg)
690 struct dpseci_cmd_set_congestion_notification *cmd_params;
691 struct mc_command cmd = { 0 };
693 /* prepare command */
694 cmd.header = mc_encode_cmd_header(
695 DPSECI_CMDID_SET_CONGESTION_NOTIFICATION,
700 (struct dpseci_cmd_set_congestion_notification *)cmd.params;
701 cmd_params->dest_id = cfg->dest_cfg.dest_id;
702 cmd_params->dest_priority = cfg->dest_cfg.priority;
703 cmd_params->message_ctx = cfg->message_ctx;
704 cmd_params->message_iova = cfg->message_iova;
705 cmd_params->notification_mode = cfg->notification_mode;
706 cmd_params->threshold_entry = cfg->threshold_entry;
707 cmd_params->threshold_exit = cfg->threshold_exit;
708 dpseci_set_field(cmd_params->type_units,
710 cfg->dest_cfg.dest_type);
711 dpseci_set_field(cmd_params->type_units,
715 /* send command to mc*/
716 return mc_send_command(mc_io, &cmd);
720 * dpseci_get_congestion_notification() - Get congestion group
721 * notification configuration
722 * @mc_io: Pointer to MC portal's I/O object
723 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
724 * @token: Token of DPSECI object
725 * @cfg: congestion notification configuration
727 * Return: '0' on success, error code otherwise
729 int dpseci_get_congestion_notification(
730 struct fsl_mc_io *mc_io,
733 struct dpseci_congestion_notification_cfg *cfg)
735 struct dpseci_cmd_set_congestion_notification *rsp_params;
736 struct mc_command cmd = { 0 };
739 /* prepare command */
740 cmd.header = mc_encode_cmd_header(
741 DPSECI_CMDID_GET_CONGESTION_NOTIFICATION,
745 /* send command to mc*/
746 err = mc_send_command(mc_io, &cmd);
751 (struct dpseci_cmd_set_congestion_notification *)cmd.params;
753 cfg->dest_cfg.dest_id = le32_to_cpu(rsp_params->dest_id);
754 cfg->dest_cfg.priority = rsp_params->dest_priority;
755 cfg->notification_mode = le16_to_cpu(rsp_params->notification_mode);
756 cfg->message_ctx = le64_to_cpu(rsp_params->message_ctx);
757 cfg->message_iova = le64_to_cpu(rsp_params->message_iova);
758 cfg->threshold_entry = le32_to_cpu(rsp_params->threshold_entry);
759 cfg->threshold_exit = le32_to_cpu(rsp_params->threshold_exit);
760 cfg->units = dpseci_get_field(rsp_params->type_units, CG_UNITS);
761 cfg->dest_cfg.dest_type = dpseci_get_field(rsp_params->type_units,