src/dpdk/drivers/net/mlx5/windows/mlx5_flow_os.c
int
mlx5_flow_os_validate_flow_attributes(struct rte_eth_dev *dev,
				      const struct rte_flow_attr *attributes,
				      bool external,
				      struct rte_flow_error *error)
{
	int ret = 1;

	RTE_SET_USED(dev);
	RTE_SET_USED(external);
	if (attributes->group)
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_GROUP,
					  NULL,
					  "groups are not supported");
	if (attributes->priority)
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY,
					  NULL,
					  "priorities are not supported");
	if (attributes->transfer)
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER,
					  NULL,
					  "transfer not supported");
	if (!(attributes->ingress))
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
					  NULL, "must specify ingress only");
	return ret;
}
/**
 * Verify the @p attributes will be correctly understood by the NIC and store
 * them in the @p flow if everything is correct.
 *
 * @param[in] dev
 *   Pointer to dev struct.
 * @param[in] attributes
 *   Pointer to flow attributes
 * @param[in] external
 *   This flow rule is created by request external to PMD.
 * @param[out] error
 *   Pointer to error structure.
 *
 * @return
 *   - 0 on success and non root table (not a valid option for Windows yet).
 *   - 1 on success and root table.
 *   - a negative errno value otherwise and rte_errno is set.
 */
Verify the @p attributes will be correctly understood by the NIC and store
them in the @p flow if everything is correct.

@param[in] dev
Pointer to dev struct.
@param[in] attributes
Pointer to flow attributes
@param[in] external
This flow rule is created by request external to PMD.
@param[out] error
Pointer to error structure.

@return
- 0 on success and non root table (not a valid option for Windows yet).
- 1 on success and root table.
- a negative errno value otherwise and rte_errno is set.
Verify the @p attributes will be correctly understood by the NIC and store them in the @p flow if everything is correct . @param [ in ] dev Pointer to dev struct . @param [ in ] attributes Pointer to flow attributes @param [ in ] external This flow rule is created by request external to PMD . @param [ out ] error Pointer to error structure . @return - 0 on success and non root table ( not a valid option for Windows yet ) . - 1 on success and root table . - a negative errno value otherwise and rte_errno is set .
int
mlx5_flow_os_validate_flow_attributes(struct rte_eth_dev *dev,
				      const struct rte_flow_attr *attributes,
				      bool external,
				      struct rte_flow_error *error)
{
	int ret = 1;
	RTE_SET_USED(dev);
	RTE_SET_USED(external);
	if (attributes->group)
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_GROUP,
					  NULL,
					  "groups are not supported");
	if (attributes->priority)
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY,
					  NULL,
					  "priorities are not supported");
	if (attributes->transfer)
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER,
					  NULL,
					  "transfer not supported");
	if (!(attributes->ingress))
		return rte_flow_error_set(error, ENOTSUP,
					  RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
					  NULL, "must specify ingress only");
	return ret;
}
int mlx5_flow_os_validate_flow_attributes ( struct rte_eth_dev * dev , const struct rte_flow_attr * attributes , bool external , struct rte_flow_error * error ) { int ret = 1 ; RTE_SET_USED ( dev ) ; RTE_SET_USED ( external ) ; if ( attributes -> group ) return rte_flow_error_set ( error , ENOTSUP , RTE_FLOW_ERROR_TYPE_ATTR_GROUP , NULL , " " ) ; if ( attributes -> priority ) return rte_flow_error_set ( error , ENOTSUP , RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY , NULL , " " ) ; if ( attributes -> transfer ) return rte_flow_error_set ( error , ENOTSUP , RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER , NULL , " " ) ; if ( ! ( attributes -> ingress ) ) return rte_flow_error_set ( error , ENOTSUP , RTE_FLOW_ERROR_TYPE_ATTR_INGRESS , NULL , " " ) ; return ret ; }
Verify the @p attributes will be correctly understood by the NIC and store
 them in the @p flow if everything is correct.
Verify the @p attributes will be correctly understood by the NIC and store them in the @p flow if everything is correct .