DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Configure vlan interface on I350 Ethernet Controller Virtual Function
@ 2021-07-16 15:19 Renata Saiakhova
  2021-07-18 13:29 ` Wang, Haiyue
  0 siblings, 1 reply; 2+ messages in thread
From: Renata Saiakhova @ 2021-07-16 15:19 UTC (permalink / raw)
  To: users, Haiyue Wang

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] Configure vlan interface on I350 Ethernet Controller Virtual Function
  2021-07-16 15:19 [dpdk-users] Configure vlan interface on I350 Ethernet Controller Virtual Function Renata Saiakhova
@ 2021-07-18 13:29 ` Wang, Haiyue
  0 siblings, 0 replies; 2+ messages in thread
From: Wang, Haiyue @ 2021-07-18 13:29 UTC (permalink / raw)
  To: Renata Saiakhova, users

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@ekinops.com> 
Sent: Friday, July 16, 2021 23:19
To: users@dpdk.org; Wang, Haiyue <haiyue.wang@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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-18 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 15:19 [dpdk-users] Configure vlan interface on I350 Ethernet Controller Virtual Function Renata Saiakhova
2021-07-18 13:29 ` Wang, Haiyue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).