src/dpdk/drivers/net/enic/enic_flow.c
static struct rte_flow *
enic_flow_create(struct rte_eth_dev *dev,
		 const struct rte_flow_attr *attrs,
		 const struct rte_flow_item pattern[],
		 const struct rte_flow_action actions[],
		 struct rte_flow_error *error)
{
	int ret;
	struct filter_v2 enic_filter;
	struct filter_action_v2 enic_action;
	struct rte_flow *flow;
	struct enic *enic = pmd_priv(dev);

	ENICPMD_FUNC_TRACE();

	ret = enic_flow_parse(dev, attrs, pattern, actions, error, &enic_filter,
			      &enic_action);
	if (ret < 0)
		return NULL;

	flow = enic_flow_add_filter(enic, &enic_filter, &enic_action,
				    error);
	if (flow)
		LIST_INSERT_HEAD(&enic->flows, flow, next);

	return flow;
}
/**
 * Create a flow supported by the NIC.
 *
 * @see rte_flow_create()
 * @see rte_flow_ops
 */
Create a flow supported by the NIC.
Create a flow supported by the NIC .
static struct rte_flow *
enic_flow_create(struct rte_eth_dev *dev,
		 const struct rte_flow_attr *attrs,
		 const struct rte_flow_item pattern[],
		 const struct rte_flow_action actions[],
		 struct rte_flow_error *error)
{
	int ret;
	struct filter_v2 enic_filter;
	struct filter_action_v2 enic_action;
	struct rte_flow *flow;
	struct enic *enic = pmd_priv(dev);
	ENICPMD_FUNC_TRACE();
	ret = enic_flow_parse(dev, attrs, pattern, actions, error, &enic_filter,
			      &enic_action);
	if (ret < 0)
		return NULL;
	flow = enic_flow_add_filter(enic, &enic_filter, &enic_action,
				    error);
	if (flow)
		LIST_INSERT_HEAD(&enic->flows, flow, next);
	return flow;
}
static struct rte_flow * enic_flow_create ( struct rte_eth_dev * dev , const struct rte_flow_attr * attrs , const struct rte_flow_item pattern [ ] , const struct rte_flow_action actions [ ] , struct rte_flow_error * error ) { int ret ; struct filter_v2 enic_filter ; struct filter_action_v2 enic_action ; struct rte_flow * flow ; struct enic * enic = pmd_priv ( dev ) ; ENICPMD_FUNC_TRACE ( ) ; ret = enic_flow_parse ( dev , attrs , pattern , actions , error , & enic_filter , & enic_action ) ; if ( ret < 0 ) return NULL ; flow = enic_flow_add_filter ( enic , & enic_filter , & enic_action , error ) ; if ( flow ) LIST_INSERT_HEAD ( & enic -> flows , flow , next ) ; return flow ; }
Create a flow supported by the NIC.
Create a flow supported by the NIC .