@@ -287,6 +287,12 @@ void gst_mtl_common_init_general_arguments(GObjectClass* gobject_class) {
287287 g_param_spec_boolean ("enable-ptp" , "Enable onboard PTP" ,
288288 "Enable onboard PTP client" , FALSE,
289289 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ));
290+
291+ g_object_class_install_property (
292+ gobject_class , PROP_GENERAL_LCORE_MASK ,
293+ g_param_spec_string ("lcore-mask" , "dpdk core mask" ,
294+ "List of cores to run on for dpdk." , NULL ,
295+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ));
290296}
291297
292298void gst_mtl_common_set_general_arguments (GObject * object , guint prop_id ,
@@ -350,6 +356,9 @@ void gst_mtl_common_set_general_arguments(GObject* object, guint prop_id,
350356 case PROP_GENERAL_ENABLE_ONBOARD_PTP :
351357 general_args -> enable_onboard_ptp = g_value_get_boolean (value );
352358 break ;
359+ case PROP_GENERAL_LCORE_MASK :
360+ strncpy (general_args -> lcore_mask , g_value_get_string (value ), MTL_PORT_MAX_LEN );
361+ break ;
353362 default :
354363 G_OBJECT_WARN_INVALID_PROPERTY_ID (object , prop_id , pspec );
355364 break ;
@@ -379,6 +388,9 @@ void gst_mtl_common_get_general_arguments(GObject* object, guint prop_id,
379388 case PROP_GENERAL_DEV_ARGS_DMA_DEV :
380389 g_value_set_string (value , general_args -> dma_dev );
381390 break ;
391+ case PROP_GENERAL_SESSION_PORT :
392+ g_value_set_string (value , portArgs -> port [MTL_PORT_P ]);
393+ break ;
382394 case PROP_GENERAL_PORT_IP :
383395 g_value_set_string (value , portArgs -> session_ip_string [MTL_PORT_P ]);
384396 break ;
@@ -400,6 +412,12 @@ void gst_mtl_common_get_general_arguments(GObject* object, guint prop_id,
400412 case PROP_GENERAL_PORT_TX_QUEUES :
401413 g_value_set_uint (value , general_args -> tx_queues_cnt [MTL_PORT_P ]);
402414 break ;
415+ case PROP_GENERAL_ENABLE_ONBOARD_PTP :
416+ g_value_set_boolean (value , general_args -> enable_onboard_ptp );
417+ break ;
418+ case PROP_GENERAL_LCORE_MASK :
419+ g_value_set_string (value , general_args -> lcore_mask );
420+ break ;
403421 default :
404422 G_OBJECT_WARN_INVALID_PROPERTY_ID (object , prop_id , pspec );
405423 break ;
@@ -556,6 +574,10 @@ gboolean gst_mtl_common_parse_general_arguments(struct mtl_init_params* mtl_init
556574 GST_INFO ("Using MTL library's onboard PTP" );
557575 }
558576
577+ if (strlen (general_args -> lcore_mask )) {
578+ mtl_init_params -> lcores = general_args -> lcore_mask ;
579+ }
580+
559581 while (mtl_port_idx <= MTL_PORT_R && strlen (general_args -> port [mtl_port_idx ]) != 0 ) {
560582 strncpy (mtl_init_params -> port [mtl_port_idx ], general_args -> port [mtl_port_idx ],
561583 MTL_PORT_MAX_LEN );
0 commit comments