[dpdk-dev] [PATCH 20/31] app/testpmd: use VFD APIs on i40e
Ferruh Yigit
ferruh.yigit at intel.com
Tue Dec 13 17:57:25 CET 2016
On 12/2/2016 12:12 AM, Wenzhuo Lu wrote:
> The new VF Daemon (VFD) APIs is implemented on i40e. Change
> testpmd code to use them, inlcuding VF MAC anti-spoofing,
> VF VLAN anti-spoofing, TX loopback, VF VLAN strip, VF VLAN
> insert.
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen at intel.com>
> Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com>
> ---
> app/test-pmd/cmdline.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 85 insertions(+), 7 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 63b55dc..1284d6c 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
<...>
> @@ -11059,8 +11109,20 @@ struct cmd_vf_vlan_insert_result {
> {
> struct cmd_vf_vlan_insert_result *res = parsed_result;
> int ret;
> + struct rte_eth_dev_info dev_info;
> +
> + memset(&dev_info, 0, sizeof(dev_info));
> + rte_eth_dev_info_get(res->port_id, &dev_info);
> +
> + if (strstr(dev_info.driver_name, "ixgbe") != NULL)
> + ret = rte_pmd_ixgbe_set_vf_vlan_insert(res->port_id, res->vf_id,
> + res->vlan_id);
> + else if (strstr(dev_info.driver_name, "i40e") != NULL)
> + ret = rte_pmd_i40e_set_vf_vlan_insert(res->port_id, res->vf_id,
> + res->vlan_id);
This code is within "#ifdef RTE_LIBRTE_IXGBE_PMD", so i40e check can
fail if IXGBE_PMD disabled, need to update surrounding ifdef.
Same for rest.
<...>
More information about the dev
mailing list