examples/ip_pipeline: check pipeline type
[dpdk.git] / examples / ip_pipeline / pipeline / pipeline_common_fe.h
index e84aa3a..cfad963 100644 (file)
@@ -60,7 +60,7 @@ app_pipeline_data(struct app_params *app, uint32_t id)
 }
 
 static inline void *
-app_pipeline_data_fe(struct app_params *app, uint32_t id)
+app_pipeline_data_fe(struct app_params *app, uint32_t id, struct pipeline_type *ptype)
 {
        struct app_pipeline_data *pipeline_data;
 
@@ -68,6 +68,9 @@ app_pipeline_data_fe(struct app_params *app, uint32_t id)
        if (pipeline_data == NULL)
                return NULL;
 
+       if (strcmp(pipeline_data->ptype->name, ptype->name) != 0)
+               return NULL;
+
        if (pipeline_data->enabled == 0)
                return NULL;