src/dpdk/drivers/net/hinic/hinic_pmd_ethdev.c
static int hinic_dev_filter_ctrl(struct rte_eth_dev *dev,
		     enum rte_filter_type filter_type,
		     enum rte_filter_op filter_op,
		     void *arg)
{
	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
	int func_id = hinic_global_func_id(nic_dev->hwdev);

	switch (filter_type) {
	case RTE_ETH_FILTER_GENERIC:
		if (filter_op != RTE_ETH_FILTER_GET)
			return -EINVAL;
		*(const void **)arg = &hinic_flow_ops;
		break;
	default:
		PMD_DRV_LOG(INFO, "Filter type (%d) not supported",
			filter_type);
		return -EINVAL;
	}

	PMD_DRV_LOG(INFO, "Set filter_ctrl succeed, func_id: 0x%x, filter_type: 0x%x,"
			"filter_op: 0x%x.", func_id, filter_type, filter_op);
	return 0;
}
/**
 * DPDK callback to manage filter control operations
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 * @param filter_type
 *   Filter type, which just supports generic type.
 * @param filter_op
 *   Filter operation to perform.
 * @param arg
 *   Pointer to operation-specific structure.
 *
 * @return
 *   0 on success, negative error value otherwise.
 */
DPDK callback to manage filter control operations
@param dev
Pointer to Ethernet device structure.
@param filter_type
Filter type, which just supports generic type.
@param filter_op
Filter operation to perform.
@param arg
Pointer to operation-specific structure.

@return
0 on success, negative error value otherwise.
DPDK callback to manage filter control operations @param dev Pointer to Ethernet device structure . @param filter_type Filter type which just supports generic type . @param filter_op Filter operation to perform . @param arg Pointer to operation - specific structure . @return 0 on success negative error value otherwise .
static int hinic_dev_filter_ctrl(struct rte_eth_dev *dev,
		     enum rte_filter_type filter_type,
		     enum rte_filter_op filter_op,
		     void *arg)
{
	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
	int func_id = hinic_global_func_id(nic_dev->hwdev);
	switch (filter_type) {
	case RTE_ETH_FILTER_GENERIC:
		if (filter_op != RTE_ETH_FILTER_GET)
			return -EINVAL;
		*(const void **)arg = &hinic_flow_ops;
		break;
	default:
		PMD_DRV_LOG(INFO, "Filter type (%d) not supported",
			filter_type);
		return -EINVAL;
	}
	PMD_DRV_LOG(INFO, "Set filter_ctrl succeed, func_id: 0x%x, filter_type: 0x%x,"
			"filter_op: 0x%x.", func_id, filter_type, filter_op);
	return 0;
}
static int hinic_dev_filter_ctrl ( struct rte_eth_dev * dev , enum rte_filter_type filter_type , enum rte_filter_op filter_op , void * arg ) { struct hinic_nic_dev * nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV ( dev ) ; int func_id = hinic_global_func_id ( nic_dev -> hwdev ) ; switch ( filter_type ) { case RTE_ETH_FILTER_GENERIC : if ( filter_op != RTE_ETH_FILTER_GET ) return - EINVAL ; * ( const void * * ) arg = & hinic_flow_ops ; break ; default : PMD_DRV_LOG ( INFO , " " , filter_type ) ; return - EINVAL ; } PMD_DRV_LOG ( INFO , " " " " , func_id , filter_type , filter_op ) ; return 0 ; }
DPDK callback to manage filter control operations
 @param dev
   Pointer to Ethernet device structure.
DPDK callback to manage filter control operations @param dev Pointer to Ethernet device structure .