@@ -264,6 +264,7 @@ struct st_cni_impl {
264264 pthread_t tid ; /* thread id for rx */
265265 rte_atomic32_t stop_thread ;
266266 bool lcore_tasklet ;
267+ struct st_sch_tasklet_impl * tasklet ;
267268 /* stat */
268269 int eth_rx_cnt [ST_PORT_MAX ];
269270#ifdef ST_HAS_KNI
@@ -312,6 +313,7 @@ struct st_sch_tasklet_ops {
312313struct st_sch_tasklet_impl {
313314 struct st_sch_tasklet_ops ops ;
314315 char name [ST_MAX_NAME_LEN ];
316+ struct st_sch_impl * sch ;
315317
316318 int idx ;
317319};
@@ -523,6 +525,7 @@ struct st_tx_video_sessions_mgr {
523525 struct st_main_impl * parnet ;
524526 int idx ; /* index for current session mgr */
525527 int max_idx ; /* max session index */
528+ struct st_sch_tasklet_impl * tasklet ;
526529
527530 struct st_tx_video_session_impl * sessions [ST_SCH_MAX_TX_VIDEO_SESSIONS ];
528531 /* protect session, spin(fast) lock as it call from tasklet aslo */
@@ -532,6 +535,7 @@ struct st_tx_video_sessions_mgr {
532535struct st_video_transmitter_impl {
533536 struct st_main_impl * parnet ;
534537 struct st_tx_video_sessions_mgr * mgr ;
538+ struct st_sch_tasklet_impl * tasklet ;
535539 int idx ; /* index for current transmitter */
536540};
537541
@@ -795,6 +799,7 @@ struct st_rx_video_sessions_mgr {
795799 struct st_main_impl * parnet ;
796800 int idx ; /* index for current session mgr */
797801 int max_idx ; /* max session index */
802+ struct st_sch_tasklet_impl * tasklet ;
798803
799804 struct st_rx_video_session_impl * sessions [ST_SCH_MAX_RX_VIDEO_SESSIONS ];
800805 /* protect session, spin(fast) lock as it call from tasklet aslo */
@@ -809,8 +814,8 @@ enum st_sch_type {
809814
810815struct st_sch_impl {
811816 pthread_mutex_t mutex ; /* protect sch context */
812- struct st_sch_tasklet_impl tasklet [ST_MAX_TASKLET_PER_SCH ];
813- int num_tasklet ;
817+ struct st_sch_tasklet_impl * tasklet [ST_MAX_TASKLET_PER_SCH ];
818+ int max_tasklet_idx ; /* max tasklet index */
814819 unsigned int lcore ;
815820
816821 int data_quota_mbs_total ; /* total data quota(mb/s) for current sch */
@@ -897,6 +902,7 @@ struct st_tx_audio_sessions_mgr {
897902 struct st_main_impl * parnet ;
898903 int idx ; /* index for current sessions mgr */
899904 int max_idx ; /* max session index */
905+ struct st_sch_tasklet_impl * tasklet ;
900906
901907 /* all audio sessions share same ring/queue */
902908 struct rte_ring * ring [ST_PORT_MAX ];
@@ -915,6 +921,7 @@ struct st_tx_audio_sessions_mgr {
915921struct st_audio_transmitter_impl {
916922 struct st_main_impl * parnet ;
917923 struct st_tx_audio_sessions_mgr * mgr ;
924+ struct st_sch_tasklet_impl * tasklet ;
918925 int idx ; /* index for current transmitter */
919926
920927 struct rte_mbuf * inflight [ST_PORT_MAX ]; /* inflight mbuf */
@@ -1009,6 +1016,7 @@ struct st_rx_audio_sessions_mgr {
10091016 struct st_main_impl * parnet ;
10101017 int idx ; /* index for current session mgr */
10111018 int max_idx ; /* max session index */
1019+ struct st_sch_tasklet_impl * tasklet ;
10121020
10131021 struct st_rx_audio_session_impl * sessions [ST_MAX_RX_AUDIO_SESSIONS ];
10141022 /* protect session, spin(fast) lock as it call from tasklet aslo */
@@ -1065,6 +1073,7 @@ struct st_tx_ancillary_sessions_mgr {
10651073 struct st_main_impl * parnet ;
10661074 int idx ; /* index for current sessions mgr */
10671075 int max_idx ; /* max session index */
1076+ struct st_sch_tasklet_impl * tasklet ;
10681077
10691078 /* all anc sessions share same ring/queue */
10701079 struct rte_ring * ring [ST_PORT_MAX ];
@@ -1109,6 +1118,7 @@ struct st_rx_ancillary_sessions_mgr {
11091118 struct st_main_impl * parnet ;
11101119 int idx ; /* index for current session mgr */
11111120 int max_idx ; /* max session index */
1121+ struct st_sch_tasklet_impl * tasklet ;
11121122
11131123 struct st_rx_ancillary_session_impl * sessions [ST_MAX_RX_ANC_SESSIONS ];
11141124 /* protect session, spin(fast) lock as it call from tasklet aslo */
@@ -1118,6 +1128,7 @@ struct st_rx_ancillary_sessions_mgr {
11181128struct st_ancillary_transmitter_impl {
11191129 struct st_main_impl * parnet ;
11201130 struct st_tx_ancillary_sessions_mgr * mgr ;
1131+ struct st_sch_tasklet_impl * tasklet ;
11211132 int idx ; /* index for current transmitter */
11221133
11231134 struct rte_mbuf * inflight [ST_PORT_MAX ]; /* inflight mbuf */
0 commit comments