On 12/16/2016 8:31 PM, Vincent JARDIN wrote: > Le 16/12/2016 à 20:02, Ferruh Yigit a écrit : >> +#ifdef RTE_LIBRTE_IXGBE_PMD >> + if (strstr(dev_info.driver_name, "ixgbe") != NULL) >> + ret = rte_pmd_ixgbe_set_vf_vlan_filter(res->port_id, >> + res->vlan_id, res->vf_mask, is_add); >> +#endif >> +#ifdef RTE_LIBRTE_I40E_PMD >> + if (strstr(dev_info.driver_name, "i40e") != NULL) >> + ret = rte_pmd_i40e_set_vf_vlan_filter(res->port_id, >> + res->vlan_id, res->vf_mask, is_add); >> +#endif > > That's exactly what we need to avoid, it won't scale to many PMDs. >
For a generic PMD feature, completely agree with you. Application shouldn't know/worry about underlying hardware. eth_dev layer should be used. But above usage is for an application that knows the hardware, and knowing that it is losing all the benefits of the portability and explicitly including the PMD header to use those PMD specific APIs. Thanks, ferruh