DPDK
17.05.2
|
#include <rte_ethdev.h>
Go to the source code of this file.
Data Structures | |
struct | rte_pmd_i40e_mb_event_param |
struct | rte_pmd_i40e_ddp_version |
struct | rte_pmd_i40e_profile_info |
struct | rte_pmd_i40e_profile_list |
Macros | |
#define | RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK 0x80000000 |
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) |
int | rte_pmd_i40e_set_vf_max_bw (uint8_t port, uint16_t vf_id, uint32_t bw) |
int | rte_pmd_i40e_set_vf_tc_bw_alloc (uint8_t port, uint16_t vf_id, uint8_t tc_num, uint8_t *bw_weight) |
int | rte_pmd_i40e_set_vf_tc_max_bw (uint8_t port, uint16_t vf_id, uint8_t tc_no, uint32_t bw) |
int | rte_pmd_i40e_set_tc_strict_prio (uint8_t port, uint8_t tc_map) |
int | rte_pmd_i40e_process_ddp_package (uint8_t port, uint8_t *buff, uint32_t size, enum rte_pmd_i40e_package_op op) |
int | rte_pmd_i40e_get_ddp_list (uint8_t port, uint8_t *buff, uint32_t size) |
int | rte_pmd_i40e_ptype_mapping_update (uint8_t port, struct rte_pmd_i40e_ptype_mapping *mapping_items, uint16_t count, uint8_t exclusive) |
int | rte_pmd_i40e_ptype_mapping_reset (uint8_t port) |
int | rte_pmd_i40e_ptype_mapping_get (uint8_t port, struct rte_pmd_i40e_ptype_mapping *mapping_items, uint16_t size, uint16_t *count, uint8_t valid_only) |
int | rte_pmd_i40e_ptype_mapping_replace (uint8_t port, uint32_t target, uint8_t mask, uint32_t pkt_type) |
i40e PMD specific functions.
EXPERIMENTAL: this API may change, or be removed, without prior notice
Definition in file rte_pmd_i40e.h.
#define RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK 0x80000000 |
ptype mapping table only accept RTE_PTYPE_XXX or "user defined" ptype. A ptype with MSB set will be regarded as a user defined ptype. Below macro help to create a user defined ptype.
Definition at line 114 of file rte_pmd_i40e.h.
Response sent back to i40e driver from user app after callback
Definition at line 50 of file rte_pmd_i40e.h.
Option of package processing.
Definition at line 71 of file rte_pmd_i40e.h.
int rte_pmd_i40e_ping_vfs | ( | uint8_t | port, |
uint16_t | vf | ||
) |
Notify VF when PF link status changes.
port | The port identifier of the Ethernet device. |
vf | VF id. |
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.
port | The port identifier of the Ethernet device. |
vf_id | VF on which to set MAC anti spoofing. |
on | 1 - Enable VFs MAC anti spoofing. 0 - Disable VFs MAC anti spoofing. |
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.
port | The port identifier of the Ethernet device. |
vf_id | VF on which to set VLAN anti spoofing. |
on | 1 - Enable VFs VLAN anti spoofing. 0 - Disable VFs VLAN anti spoofing. |
int rte_pmd_i40e_set_tx_loopback | ( | uint8_t | port, |
uint8_t | on | ||
) |
Enable/Disable TX loopback on all the PF and VFs.
port | The port identifier of the Ethernet device. |
on | 1 - Enable TX loopback. 0 - Disable TX loopback. |
int rte_pmd_i40e_set_vf_unicast_promisc | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint8_t | on | ||
) |
Enable/Disable VF unicast promiscuous mode.
port | The port identifier of the Ethernet device. |
vf_id | VF on which to set. |
on | 1 - Enable. 0 - Disable. |
int rte_pmd_i40e_set_vf_multicast_promisc | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint8_t | on | ||
) |
Enable/Disable VF multicast promiscuous mode.
port | The port identifier of the Ethernet device. |
vf_id | VF on which to set. |
on | 1 - Enable. 0 - Disable. |
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.
port | The port identifier of the Ethernet device. |
vf_id | VF id. |
mac_addr | VF MAC address. |
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
port | The port identifier of the Ethernet device. |
vf | ID specifying VF. |
on | 1 - Enable VF's vlan strip on RX queues. 0 - Disable VF's vlan strip on RX queues. |
int rte_pmd_i40e_set_vf_vlan_insert | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint16_t | vlan_id | ||
) |
Enable/Disable vf vlan insert
port | The port identifier of the Ethernet device. |
vf_id | ID specifying VF. |
vlan_id | 0 - Disable VF's vlan insert. n - Enable; n is inserted as the vlan id. |
int rte_pmd_i40e_set_vf_broadcast | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint8_t | on | ||
) |
Enable/Disable vf broadcast mode
port | The port identifier of the Ethernet device. |
vf_id | ID specifying VF. |
on | 0 - Disable broadcast. 1 - Enable broadcast. |
int rte_pmd_i40e_set_vf_vlan_tag | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint8_t | on | ||
) |
Enable/Disable vf vlan tag
port | The port identifier of the Ethernet device. |
vf_id | ID specifying VF. |
on | 0 - Disable VF's vlan tag. n - Enable VF's vlan tag. |
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
port | The port identifier of the Ethernet device. |
vlan_id | ID specifying VLAN |
vf_mask | Mask to filter VF's |
on | 0 - Disable VF's VLAN filter. 1 - Enable VF's VLAN filter. |
int rte_pmd_i40e_get_vf_stats | ( | uint8_t | port, |
uint16_t | vf_id, | ||
struct rte_eth_stats * | stats | ||
) |
Get VF's statistics
port | The port identifier of the Ethernet device. |
vf_id | VF on which to get. |
stats | A pointer to a structure of type rte_eth_stats to be filled with the values of device counters for the following set of statistics:
|
int rte_pmd_i40e_reset_vf_stats | ( | uint8_t | port, |
uint16_t | vf_id | ||
) |
Clear VF's statistics
port | The port identifier of the Ethernet device. |
vf_id | VF on which to get. |
int rte_pmd_i40e_set_vf_max_bw | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint32_t | bw | ||
) |
Set VF's max bandwidth.
Per VF bandwidth limitation and per TC bandwidth limitation cannot be enabled in parallel. If per TC bandwidth is enabled, this function will disable it.
port | The port identifier of the Ethernet device. |
vf_id | ID specifying VF. |
bw | Bandwidth for this VF. The value should be an absolute bandwidth in Mbps. The bandwidth is a L2 bandwidth counting the bytes of ethernet packets. Not count the bytes added by physical layer. |
int rte_pmd_i40e_set_vf_tc_bw_alloc | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint8_t | tc_num, | ||
uint8_t * | bw_weight | ||
) |
Set all the TCs' bandwidth weight on a specific VF.
The bw_weight means the percentage occupied by the TC. It can be taken as the relative min bandwidth setting.
port | The port identifier of the Ethernet device. |
vf_id | ID specifying VF. |
tc_num | Number of TCs. |
bw_weight | An array of relative bandwidth weight for all the TCs. The summary of the bw_weight should be 100. |
int rte_pmd_i40e_set_vf_tc_max_bw | ( | uint8_t | port, |
uint16_t | vf_id, | ||
uint8_t | tc_no, | ||
uint32_t | bw | ||
) |
Set a specific TC's max bandwidth on a specific VF.
port | The port identifier of the Ethernet device. |
vf_id | ID specifying VF. |
tc_no | Number specifying TC. |
bw | Max bandwidth for this TC. The value should be an absolute bandwidth in Mbps. The bandwidth is a L2 bandwidth counting the bytes of ethernet packets. Not count the bytes added by physical layer. |
int rte_pmd_i40e_set_tc_strict_prio | ( | uint8_t | port, |
uint8_t | tc_map | ||
) |
Set some TCs to strict priority mode on a physical port.
port | The port identifier of the Ethernet device. |
tc_map | A bit map for the TCs. |
int rte_pmd_i40e_process_ddp_package | ( | uint8_t | port, |
uint8_t * | buff, | ||
uint32_t | size, | ||
enum rte_pmd_i40e_package_op | op | ||
) |
Load/Unload a ddp package
port | The port identifier of the Ethernet device. |
buff | buffer of package. |
size | size of buffer. |
op | Operation of package processing |
int rte_pmd_i40e_get_ddp_list | ( | uint8_t | port, |
uint8_t * | buff, | ||
uint32_t | size | ||
) |
rte_pmd_i40e_get_ddp_list - Get loaded profile list
port | port id |
buff | buffer for response |
size | buffer size |
int rte_pmd_i40e_ptype_mapping_update | ( | uint8_t | port, |
struct rte_pmd_i40e_ptype_mapping * | mapping_items, | ||
uint16_t | count, | ||
uint8_t | exclusive | ||
) |
Update hardware defined ptype to software defined packet type mapping table.
port | pointer to port identifier of the device. |
mapping_items | the base address of the mapping items array. |
count | number of mapping items. |
exclusive | the flag indicate different ptype mapping update method. -(0) only overwrite referred PTYPE mapping, keep other PTYPEs mapping unchanged. -(!0) overwrite referred PTYPE mapping, set other PTYPEs maps to PTYPE_UNKNOWN. |
int rte_pmd_i40e_ptype_mapping_reset | ( | uint8_t | port | ) |
Reset hardware defined ptype to software defined ptype mapping table to default.
port | pointer to port identifier of the device |
int rte_pmd_i40e_ptype_mapping_get | ( | uint8_t | port, |
struct rte_pmd_i40e_ptype_mapping * | mapping_items, | ||
uint16_t | size, | ||
uint16_t * | count, | ||
uint8_t | valid_only | ||
) |
Get hardware defined ptype to software defined ptype mapping items.
port | pointer to port identifier of the device. |
mapping_items | the base address of the array to store returned items. |
size | the size of the input array. |
count | the place to store the number of returned items. |
valid_only | -(0) return full mapping table. -(!0) only return mapping items which packet_type != RTE_PTYPE_UNKNOWN. |
int rte_pmd_i40e_ptype_mapping_replace | ( | uint8_t | port, |
uint32_t | target, | ||
uint8_t | mask, | ||
uint32_t | pkt_type | ||
) |
Replace a specific or a group of software defined ptypes with a new one
port | pointer to port identifier of the device |
target | the packet type to be replaced |
mask | -(0) target represent a specific software defined ptype. -(!0) target is a mask to represent a group of software defined ptypes. |
pkt_type | the new packet type to overwrite |