1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
5 #include "rte_eth_softnic_internals.h"
6 #include "rte_eth_softnic.h"
9 flow_attr_map_set(struct pmd_internals *softnic,
12 const char *pipeline_name,
15 struct pipeline *pipeline;
16 struct flow_attr_map *map;
18 if (group_id >= SOFTNIC_FLOW_MAX_GROUPS ||
19 pipeline_name == NULL)
22 pipeline = softnic_pipeline_find(softnic, pipeline_name);
23 if (pipeline == NULL ||
24 table_id >= pipeline->n_tables)
27 map = (ingress) ? &softnic->flow.ingress_map[group_id] :
28 &softnic->flow.egress_map[group_id];
29 strcpy(map->pipeline_name, pipeline_name);
30 map->table_id = table_id;
36 struct flow_attr_map *
37 flow_attr_map_get(struct pmd_internals *softnic,
41 if (group_id >= SOFTNIC_FLOW_MAX_GROUPS)
44 return (ingress) ? &softnic->flow.ingress_map[group_id] :
45 &softnic->flow.egress_map[group_id];