|
CNDP
22.08.0
|
Go to the source code of this file.
Data Structures | |
| struct | netdev_link |
| struct | offloads |
Macros | |
| #define | ETH_LINK_HALF_DUPLEX 0 |
| #define | ETH_LINK_FULL_DUPLEX 1 |
| #define | ETH_LINK_DOWN 0 |
| #define | ETH_LINK_UP 1 |
| #define | ETH_LINK_FIXED 0 |
| #define | ETH_LINK_AUTONEG 1 |
| #define | CNE_ETH_SPEED_NUM_NONE 0 |
| #define | CNE_ETH_SPEED_NUM_10M 10 |
| #define | CNE_ETH_SPEED_NUM_100M 100 |
| #define | CNE_ETH_SPEED_NUM_1G 1000 |
| #define | CNE_ETH_SPEED_NUM_2_5G 2500 |
| #define | CNE_ETH_SPEED_NUM_5G 5000 |
| #define | CNE_ETH_SPEED_NUM_10G 10000 |
| #define | CNE_ETH_SPEED_NUM_20G 20000 |
| #define | CNE_ETH_SPEED_NUM_25G 25000 |
| #define | CNE_ETH_SPEED_NUM_40G 40000 |
| #define | CNE_ETH_SPEED_NUM_50G 50000 |
| #define | CNE_ETH_SPEED_NUM_56G 56000 |
| #define | CNE_ETH_SPEED_NUM_100G 100000 |
| #define | CNE_ETH_SPEED_NUM_200G 200000 |
| #define | CNE_ETH_SPEED_NUM_400G 400000 |
| #define | CNE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX |
Functions | |
| CNDP_API int | netdev_change_flags (const char *if_name, uint32_t flags, uint32_t mask) |
| CNDP_API int | netdev_promiscuous_enable (const char *if_name) |
| CNDP_API int | netdev_promiscuous_disable (const char *if_name) |
| CNDP_API int | netdev_promiscuous_get (const char *if_name) |
| CNDP_API int | netdev_set_link_up (const char *if_name) |
| CNDP_API int | netdev_set_link_down (const char *if_name) |
| CNDP_API int | netdev_get_mac_addr (const char *ifname, struct ether_addr *eth_addr) |
| CNDP_API int | netdev_get_link (const char *ifname, struct netdev_link *link) |
| CNDP_API int | netdev_get_offloads (const char *ifname, struct offloads *off) |
| CNDP_API int | netdev_get_channels (const char *ifname) |
| CNDP_API int | netdev_get_ring_params (const char *ifname, uint32_t *rx_nb_desc, uint32_t *tx_nb_desc) |
API for netdev modification like setting promiscuous mode, link up/down, etc.
Definition in file netdev_funcs.h.
| #define ETH_LINK_HALF_DUPLEX 0 |
Half-duplex connection (see link_duplex).
Definition at line 33 of file netdev_funcs.h.
| #define ETH_LINK_FULL_DUPLEX 1 |
Full-duplex connection (see link_duplex).
Definition at line 34 of file netdev_funcs.h.
| #define ETH_LINK_DOWN 0 |
Link is down (see link_status).
Definition at line 35 of file netdev_funcs.h.
| #define ETH_LINK_UP 1 |
Link is up (see link_status).
Definition at line 36 of file netdev_funcs.h.
| #define ETH_LINK_FIXED 0 |
No autonegotiation (see link_autoneg).
Definition at line 37 of file netdev_funcs.h.
| #define ETH_LINK_AUTONEG 1 |
Autonegotiated (see link_autoneg).
Definition at line 38 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_NONE 0 |
Ethernet numeric link speeds in Mbps Not defined
Definition at line 43 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_10M 10 |
10 Mbps
Definition at line 44 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_100M 100 |
100 Mbps
Definition at line 45 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_1G 1000 |
1 Gbps
Definition at line 46 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_2_5G 2500 |
2.5 Gbps
Definition at line 47 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_5G 5000 |
5 Gbps
Definition at line 48 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_10G 10000 |
10 Gbps
Definition at line 49 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_20G 20000 |
20 Gbps
Definition at line 50 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_25G 25000 |
25 Gbps
Definition at line 51 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_40G 40000 |
40 Gbps
Definition at line 52 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_50G 50000 |
50 Gbps
Definition at line 53 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_56G 56000 |
56 Gbps
Definition at line 54 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_100G 100000 |
100 Gbps
Definition at line 55 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_200G 200000 |
200 Gbps
Definition at line 56 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_400G 400000 |
400 Gbps
Definition at line 57 of file netdev_funcs.h.
| #define CNE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX |
Unknown
Definition at line 58 of file netdev_funcs.h.
| CNDP_API int netdev_change_flags | ( | const char * | if_name, |
| uint32_t | flags, | ||
| uint32_t | mask | ||
| ) |
Set a netdev flags.
| if_name | The lport identifier of the Ethernet device. |
| flags | The flags to set in the netdev |
| mask | The mask used to filter flags |
| CNDP_API int netdev_promiscuous_enable | ( | const char * | if_name | ) |
Enable promiscuous mode on the given netdev
| if_name | The lport identifier of the Ethernet device. |
| CNDP_API int netdev_promiscuous_disable | ( | const char * | if_name | ) |
Disable promiscuous mode on the given netdev
| if_name | The lport identifier of the Ethernet device. |
| CNDP_API int netdev_promiscuous_get | ( | const char * | if_name | ) |
Return the value of promiscuous mode for an netdev device.
| if_name | The lport identifier of the Ethernet device. |
| CNDP_API int netdev_set_link_up | ( | const char * | if_name | ) |
Link up an Ethernet device.
| if_name | The port identifier of the Ethernet device. |
| CNDP_API int netdev_set_link_down | ( | const char * | if_name | ) |
Link down an Ethernet device.
| if_name | The port identifier of the Ethernet device. |
| CNDP_API int netdev_get_mac_addr | ( | const char * | ifname, |
| struct ether_addr * | eth_addr | ||
| ) |
Get MAC address from interface name
| ifname | The interface name string or if_name |
| eth_addr | The location to return the MAC address if a valid address. |
| CNDP_API int netdev_get_link | ( | const char * | ifname, |
| struct netdev_link * | link | ||
| ) |
Get link status
| ifname | The interface name string or if_name |
| link | The link info: speed, duplex, autoneg. |
| CNDP_API int netdev_get_offloads | ( | const char * | ifname, |
| struct offloads * | off | ||
| ) |
Get offloads status
| ifname | The interface name string or if_name |
| off | The offloads info: checksum... |
| CNDP_API int netdev_get_channels | ( | const char * | ifname | ) |
Get the number of channels/queues on a device
| ifname | The interface name string or if_name |
| CNDP_API int netdev_get_ring_params | ( | const char * | ifname, |
| uint32_t * | rx_nb_desc, | ||
| uint32_t * | tx_nb_desc | ||
| ) |
Get the number of descriptors in a ring
| ifname | The interface name string or if_name |
| rx_nb_desc | The location to return the number of RX descriptors (maybe NULL) |
| tx_nb_desc | The location to return the number of TX descriptors (maybe NULL) Either rx_nb_desc or tx_nb_desc maybe NULL but not both |