[dpdk-users] Configure vlan interface on I350 Ethernet Controller Virtual Function

Wang, Haiyue haiyue.wang at intel.com
Sun Jul 18 15:29:29 CEST 2021


TBH, I'm also new for i350. ;-)

I checked the code, it has ".vlan_filter_set = igbvf_vlan_filter_set,".
But not sure why missed the filter offload ops. :(

BR,
Haiyue

From: Renata Saiakhova <renata.saiakhova at ekinops.com> 
Sent: Friday, July 16, 2021 23:19
To: users at dpdk.org; Wang, Haiyue <haiyue.wang at intel.com>
Subject: Configure vlan interface on I350 Ethernet Controller Virtual Function

Hi all, hi Haiyue,

in our dpdk application I try to configure vlan interface on I350 Ethernet Controller Virtual Function. 
As I understand I need to use two API calls :
rte_eth_dev_set_vlan_offload with an offload including ETH_VLAN_FILTER_OFFLOAD
and
rte_eth_dev_vlan_filter. The second one doesn't work without DEV_RX_OFFLOAD_VLAN_FILTER in dev->offloads, that's why the first call is needed to configure a vlan offload.
Here is the whole snippet:

   offload_mask = rte_eth_dev_get_vlan_offload(port_id); 
   offload_mask |= ETH_VLAN_FILTER_OFFLOAD;
   diag = rte_eth_dev_set_vlan_offload(port_id, offload_mask);
   if (diag < 0) {
           printf("rx_vlan_filter_set(port_pi=%d, on=%d) failed "
                           "diag=%d\n", port_id, on, diag);
           return diag;
   }
   /* set vlan */
   diag = rte_eth_dev_vlan_filter(port_id, vlan_id, 1);
   if (diag < 0)
   {
           LO_ERROR("Error %d setting vlan filter, port %u", diag, port_id);
   }

However, rte_eth_dev_set_vlan_offload is not implemented for igbvf, dev_ops.vlan_offload_set is set to zero. For comparison, for ixgbevf vlan_offload is set to ixgbevf_vlan_offload_set. 
Does the above mean, that it is not possible to configure vlan filter for igbvf by means of dpdk?

Kind regards,
Renata




More information about the users mailing list