src/dpdk/lib/librte_ethdev/rte_flow.c
int
rte_flow_query(uint16_t port_id,
	       struct rte_flow *flow,
	       const struct rte_flow_action *action,
	       void *data,
	       struct rte_flow_error *error)
{
	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
	int ret;

	if (!ops)
		return -rte_errno;
	if (likely(!!ops->query)) {
		fts_enter(dev);
		ret = ops->query(dev, flow, action, data, error);
		fts_exit(dev);
		return flow_err(port_id, ret, error);
	}
	return rte_flow_error_set(error, ENOSYS,
				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
				  NULL, rte_strerror(ENOSYS));
}
/* Query an existing flow rule. */
Query an existing flow rule.
Query an existing flow rule .
int
rte_flow_query(uint16_t port_id,
	       struct rte_flow *flow,
	       const struct rte_flow_action *action,
	       void *data,
	       struct rte_flow_error *error)
{
	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
	int ret;
	if (!ops)
		return -rte_errno;
	if (likely(!!ops->query)) {
		fts_enter(dev);
		ret = ops->query(dev, flow, action, data, error);
		fts_exit(dev);
		return flow_err(port_id, ret, error);
	}
	return rte_flow_error_set(error, ENOSYS,
				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
				  NULL, rte_strerror(ENOSYS));
}
int rte_flow_query ( uint16_t port_id , struct rte_flow * flow , const struct rte_flow_action * action , void * data , struct rte_flow_error * error ) { struct rte_eth_dev * dev = & rte_eth_devices [ port_id ] ; const struct rte_flow_ops * ops = rte_flow_ops_get ( port_id , error ) ; int ret ; if ( ! ops ) return - rte_errno ; if ( likely ( ! ! ops -> query ) ) { fts_enter ( dev ) ; ret = ops -> query ( dev , flow , action , data , error ) ; fts_exit ( dev ) ; return flow_err ( port_id , ret , error ) ; } return rte_flow_error_set ( error , ENOSYS , RTE_FLOW_ERROR_TYPE_UNSPECIFIED , NULL , rte_strerror ( ENOSYS ) ) ; }
Query an existing flow rule.
Query an existing flow rule .