DPDK  17.02.1
Data Structures | Enumerations | Functions
rte_pmd_i40e.h File Reference
#include <rte_ethdev.h>

Go to the source code of this file.

Data Structures

struct  rte_pmd_i40e_mb_event_param

Enumerations

enum  rte_pmd_i40e_mb_event_rsp { RTE_PMD_I40E_MB_EVENT_NOOP_ACK, RTE_PMD_I40E_MB_EVENT_NOOP_NACK, RTE_PMD_I40E_MB_EVENT_PROCEED, RTE_PMD_I40E_MB_EVENT_MAX }

Functions

int rte_pmd_i40e_ping_vfs (uint8_t port, uint16_t vf)
int rte_pmd_i40e_set_vf_mac_anti_spoof (uint8_t port, uint16_t vf_id, uint8_t on)
int rte_pmd_i40e_set_vf_vlan_anti_spoof (uint8_t port, uint16_t vf_id, uint8_t on)
int rte_pmd_i40e_set_tx_loopback (uint8_t port, uint8_t on)
int rte_pmd_i40e_set_vf_unicast_promisc (uint8_t port, uint16_t vf_id, uint8_t on)
int rte_pmd_i40e_set_vf_multicast_promisc (uint8_t port, uint16_t vf_id, uint8_t on)
int rte_pmd_i40e_set_vf_mac_addr (uint8_t port, uint16_t vf_id, struct ether_addr *mac_addr)
int rte_pmd_i40e_set_vf_vlan_stripq (uint8_t port, uint16_t vf, uint8_t on)
int rte_pmd_i40e_set_vf_vlan_insert (uint8_t port, uint16_t vf_id, uint16_t vlan_id)
int rte_pmd_i40e_set_vf_broadcast (uint8_t port, uint16_t vf_id, uint8_t on)
int rte_pmd_i40e_set_vf_vlan_tag (uint8_t port, uint16_t vf_id, uint8_t on)
int rte_pmd_i40e_set_vf_vlan_filter (uint8_t port, uint16_t vlan_id, uint64_t vf_mask, uint8_t on)
int rte_pmd_i40e_get_vf_stats (uint8_t port, uint16_t vf_id, struct rte_eth_stats *stats)
int rte_pmd_i40e_reset_vf_stats (uint8_t port, uint16_t vf_id)

Detailed Description

i40e PMD specific functions.

EXPERIMENTAL: this API may change, or be removed, without prior notice

Definition in file rte_pmd_i40e.h.

Enumeration Type Documentation

Response sent back to i40e driver from user app after callback

Enumerator:
RTE_PMD_I40E_MB_EVENT_NOOP_ACK 

skip mbox request and ACK

RTE_PMD_I40E_MB_EVENT_NOOP_NACK 

skip mbox request and NACK

RTE_PMD_I40E_MB_EVENT_PROCEED 

proceed with mbox request

RTE_PMD_I40E_MB_EVENT_MAX 

max value of this enum

Definition at line 50 of file rte_pmd_i40e.h.

Function Documentation

int rte_pmd_i40e_ping_vfs ( uint8_t  port,
uint16_t  vf 
)

Notify VF when PF link status changes.

Parameters
portThe port identifier of the Ethernet device.
vfVF id.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf invalid.
int rte_pmd_i40e_set_vf_mac_anti_spoof ( uint8_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF MAC anti spoofing.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set MAC anti spoofing.
on1 - Enable VFs MAC anti spoofing. 0 - Disable VFs MAC anti spoofing.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_vlan_anti_spoof ( uint8_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF VLAN anti spoofing.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set VLAN anti spoofing.
on1 - Enable VFs VLAN anti spoofing. 0 - Disable VFs VLAN anti spoofing.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_tx_loopback ( uint8_t  port,
uint8_t  on 
)

Enable/Disable TX loopback on all the PF and VFs.

Parameters
portThe port identifier of the Ethernet device.
on1 - Enable TX loopback. 0 - Disable TX loopback.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_unicast_promisc ( uint8_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF unicast promiscuous mode.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set.
on1 - Enable. 0 - Disable.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_multicast_promisc ( uint8_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF multicast promiscuous mode.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set.
on1 - Enable. 0 - Disable.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_mac_addr ( uint8_t  port,
uint16_t  vf_id,
struct ether_addr mac_addr 
)

Set the VF MAC address.

PF should set MAC address before VF initialized, if PF sets the MAC address after VF initialized, new MAC address won't be effective until VF reinitialize.

This will remove all existing MAC filters.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF id.
mac_addrVF MAC address.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf or mac_addr is invalid.
int rte_pmd_i40e_set_vf_vlan_stripq ( uint8_t  port,
uint16_t  vf,
uint8_t  on 
)

Enable/Disable vf vlan strip for all queues in a pool

Parameters
portThe port identifier of the Ethernet device.
vfID specifying VF.
on1 - Enable VF's vlan strip on RX queues. 0 - Disable VF's vlan strip on RX queues.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_vlan_insert ( uint8_t  port,
uint16_t  vf_id,
uint16_t  vlan_id 
)

Enable/Disable vf vlan insert

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
vlan_id0 - Disable VF's vlan insert. n - Enable; n is inserted as the vlan id.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_broadcast ( uint8_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable vf broadcast mode

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
on0 - Disable broadcast. 1 - Enable broadcast.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_vlan_tag ( uint8_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable vf vlan tag

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
on0 - Disable VF's vlan tag. n - Enable VF's vlan tag.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_set_vf_vlan_filter ( uint8_t  port,
uint16_t  vlan_id,
uint64_t  vf_mask,
uint8_t  on 
)

Enable/Disable VF VLAN filter

Parameters
portThe port identifier of the Ethernet device.
vlan_idID specifying VLAN
vf_maskMask to filter VF's
on0 - Disable VF's VLAN filter. 1 - Enable VF's VLAN filter.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) not supported by firmware.
int rte_pmd_i40e_get_vf_stats ( uint8_t  port,
uint16_t  vf_id,
struct rte_eth_stats stats 
)

Get VF's statistics

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to get.
statsA pointer to a structure of type rte_eth_stats to be filled with the values of device counters for the following set of statistics:
  • ipackets with the total of successfully received packets.
  • opackets with the total of successfully transmitted packets.
  • ibytes with the total of successfully received bytes.
  • obytes with the total of successfully transmitted bytes.
  • ierrors with the total of erroneous received packets.
  • oerrors with the total of failed transmitted packets.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
int rte_pmd_i40e_reset_vf_stats ( uint8_t  port,
uint16_t  vf_id 
)

Clear VF's statistics

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to get.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.