@@ -117,15 +117,12 @@ int dpni_close(struct fsl_mc_io *mc_io,
117
117
* @num_dpbp: Number of DPBPs
118
118
* @pools: Array of buffer pools parameters; The number of valid entries
119
119
* must match 'num_dpbp' value
120
+ * @pools.dpbp_id: DPBP object ID
121
+ * @pools.buffer_size: Buffer size
122
+ * @pools.backup_pool: Backup pool
120
123
*/
121
124
struct dpni_pools_cfg {
122
125
u8 num_dpbp ;
123
- /**
124
- * struct pools - Buffer pools parameters
125
- * @dpbp_id: DPBP object ID
126
- * @buffer_size: Buffer size
127
- * @backup_pool: Backup pool
128
- */
129
126
struct {
130
127
int dpbp_id ;
131
128
u16 buffer_size ;
@@ -424,16 +421,32 @@ int dpni_get_tx_data_offset(struct fsl_mc_io *mc_io,
424
421
425
422
#define DPNI_STATISTICS_CNT 7
426
423
424
+ /**
425
+ * union dpni_statistics - Union describing the DPNI statistics
426
+ * @page_0: Page_0 statistics structure
427
+ * @page_0.ingress_all_frames: Ingress frame count
428
+ * @page_0.ingress_all_bytes: Ingress byte count
429
+ * @page_0.ingress_multicast_frames: Ingress multicast frame count
430
+ * @page_0.ingress_multicast_bytes: Ingress multicast byte count
431
+ * @page_0.ingress_broadcast_frames: Ingress broadcast frame count
432
+ * @page_0.ingress_broadcast_bytes: Ingress broadcast byte count
433
+ * @page_1: Page_1 statistics structure
434
+ * @page_1.egress_all_frames: Egress frame count
435
+ * @page_1.egress_all_bytes: Egress byte count
436
+ * @page_1.egress_multicast_frames: Egress multicast frame count
437
+ * @page_1.egress_multicast_bytes: Egress multicast byte count
438
+ * @page_1.egress_broadcast_frames: Egress broadcast frame count
439
+ * @page_1.egress_broadcast_bytes: Egress broadcast byte count
440
+ * @page_2: Page_2 statistics structure
441
+ * @page_2.ingress_filtered_frames: Ingress filtered frame count
442
+ * @page_2.ingress_discarded_frames: Ingress discarded frame count
443
+ * @page_2.ingress_nobuffer_discards: Ingress discarded frame count due to
444
+ * lack of buffers
445
+ * @page_2.egress_discarded_frames: Egress discarded frame count
446
+ * @page_2.egress_confirmed_frames: Egress confirmed frame count
447
+ * @raw: raw statistics structure, used to index counters
448
+ */
427
449
union dpni_statistics {
428
- /**
429
- * struct page_0 - Page_0 statistics structure
430
- * @ingress_all_frames: Ingress frame count
431
- * @ingress_all_bytes: Ingress byte count
432
- * @ingress_multicast_frames: Ingress multicast frame count
433
- * @ingress_multicast_bytes: Ingress multicast byte count
434
- * @ingress_broadcast_frames: Ingress broadcast frame count
435
- * @ingress_broadcast_bytes: Ingress broadcast byte count
436
- */
437
450
struct {
438
451
u64 ingress_all_frames ;
439
452
u64 ingress_all_bytes ;
@@ -442,15 +455,6 @@ union dpni_statistics {
442
455
u64 ingress_broadcast_frames ;
443
456
u64 ingress_broadcast_bytes ;
444
457
} page_0 ;
445
- /**
446
- * struct page_1 - Page_1 statistics structure
447
- * @egress_all_frames: Egress frame count
448
- * @egress_all_bytes: Egress byte count
449
- * @egress_multicast_frames: Egress multicast frame count
450
- * @egress_multicast_bytes: Egress multicast byte count
451
- * @egress_broadcast_frames: Egress broadcast frame count
452
- * @egress_broadcast_bytes: Egress broadcast byte count
453
- */
454
458
struct {
455
459
u64 egress_all_frames ;
456
460
u64 egress_all_bytes ;
@@ -459,25 +463,13 @@ union dpni_statistics {
459
463
u64 egress_broadcast_frames ;
460
464
u64 egress_broadcast_bytes ;
461
465
} page_1 ;
462
- /**
463
- * struct page_2 - Page_2 statistics structure
464
- * @ingress_filtered_frames: Ingress filtered frame count
465
- * @ingress_discarded_frames: Ingress discarded frame count
466
- * @ingress_nobuffer_discards: Ingress discarded frame count
467
- * due to lack of buffers
468
- * @egress_discarded_frames: Egress discarded frame count
469
- * @egress_confirmed_frames: Egress confirmed frame count
470
- */
471
466
struct {
472
467
u64 ingress_filtered_frames ;
473
468
u64 ingress_discarded_frames ;
474
469
u64 ingress_nobuffer_discards ;
475
470
u64 egress_discarded_frames ;
476
471
u64 egress_confirmed_frames ;
477
472
} page_2 ;
478
- /**
479
- * struct raw - raw statistics structure
480
- */
481
473
struct {
482
474
u64 counter [DPNI_STATISTICS_CNT ];
483
475
} raw ;
@@ -685,29 +677,52 @@ enum dpni_dest {
685
677
686
678
/**
687
679
* struct dpni_queue - Queue structure
688
- * @user_context: User data, presented to the user along with any frames from
689
- * this queue. Not relevant for Tx queues.
690
- */
691
- struct dpni_queue {
692
- /**
693
- * struct destination - Destination structure
694
- * @id: ID of the destination, only relevant if DEST_TYPE is > 0.
695
- * Identifies either a DPIO or a DPCON object. Not relevant for
696
- * Tx queues.
697
- * @type: May be one of the following:
698
- * 0 - No destination, queue can be manually queried, but will not
699
- * push traffic or notifications to a DPIO;
700
- * 1 - The destination is a DPIO. When traffic becomes available in
701
- * the queue a FQDAN (FQ data available notification) will be
680
+ * @destination - Destination structure
681
+ * @destination.id: ID of the destination, only relevant if DEST_TYPE is > 0.
682
+ * Identifies either a DPIO or a DPCON object.
683
+ * Not relevant for Tx queues.
684
+ * @destination.type: May be one of the following:
685
+ * 0 - No destination, queue can be manually
686
+ * queried, but will not push traffic or
687
+ * notifications to a DPIO;
688
+ * 1 - The destination is a DPIO. When traffic
689
+ * becomes available in the queue a FQDAN
690
+ * (FQ data available notification) will be
702
691
* generated to selected DPIO;
703
- * 2 - The destination is a DPCON. The queue is associated with a
704
- * DPCON object for the purpose of scheduling between multiple
705
- * queues. The DPCON may be independently configured to
706
- * generate notifications. Not relevant for Tx queues.
707
- * @hold_active: Hold active, maintains a queue scheduled for longer
708
- * in a DPIO during dequeue to reduce spread of traffic.
709
- * Only relevant if queues are not affined to a single DPIO.
692
+ * 2 - The destination is a DPCON. The queue is
693
+ * associated with a DPCON object for the
694
+ * purpose of scheduling between multiple
695
+ * queues. The DPCON may be independently
696
+ * configured to generate notifications.
697
+ * Not relevant for Tx queues.
698
+ * @destination.hold_active: Hold active, maintains a queue scheduled for longer
699
+ * in a DPIO during dequeue to reduce spread of traffic.
700
+ * Only relevant if queues are
701
+ * not affined to a single DPIO.
702
+ * @user_context: User data, presented to the user along with any frames
703
+ * from this queue. Not relevant for Tx queues.
704
+ * @flc: FD FLow Context structure
705
+ * @flc.value: Default FLC value for traffic dequeued from
706
+ * this queue. Please check description of FD
707
+ * structure for more information.
708
+ * Note that FLC values set using dpni_add_fs_entry,
709
+ * if any, take precedence over values per queue.
710
+ * @flc.stash_control: Boolean, indicates whether the 6 lowest
711
+ * - significant bits are used for stash control.
712
+ * significant bits are used for stash control. If set, the 6
713
+ * least significant bits in value are interpreted as follows:
714
+ * - bits 0-1: indicates the number of 64 byte units of context
715
+ * that are stashed. FLC value is interpreted as a memory address
716
+ * in this case, excluding the 6 LS bits.
717
+ * - bits 2-3: indicates the number of 64 byte units of frame
718
+ * annotation to be stashed. Annotation is placed at FD[ADDR].
719
+ * - bits 4-5: indicates the number of 64 byte units of frame
720
+ * data to be stashed. Frame data is placed at FD[ADDR] +
721
+ * FD[OFFSET].
722
+ * For more details check the Frame Descriptor section in the
723
+ * hardware documentation.
710
724
*/
725
+ struct dpni_queue {
711
726
struct {
712
727
u16 id ;
713
728
enum dpni_dest type ;
0 commit comments