TAPI for RTE Ethernet Device API remote calls
Overview
// global functions uint32_t tapi_rpc_rte_eth_link_speeds_str2val(const char* str); void rpc_rte_eth_dev_info_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_dev_info* dev_info); int rpc_rte_eth_dev_configure(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct tarpc_rte_eth_conf* eth_conf); struct tarpc_rte_eth_conf* tapi_rpc_rte_eth_make_eth_conf(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_conf* eth_conf); int tapi_rpc_rte_eth_dev_configure_def(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue); void rpc_rte_eth_dev_close(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_reset(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_start(rcf_rpc_server* rpcs, uint16_t port_id); void rpc_rte_eth_dev_stop(rcf_rpc_server* rpcs, uint16_t port_id); void tapi_rpc_rte_eth_dev_stop(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_tx_queue_setup(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, struct tarpc_rte_eth_txconf* tx_conf); int rpc_rte_eth_rx_queue_setup(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, struct tarpc_rte_eth_rxconf* rx_conf, rpc_rte_mempool_p mp); int rpc_rte_eth_dev_rx_intr_enable(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); int rpc_rte_eth_dev_rx_intr_disable(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); int rpc_rte_eth_dev_rx_intr_ctl_q(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, int epfd, enum tarpc_rte_intr_op op, uint64_t data); uint16_t rpc_rte_eth_tx_burst(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* tx_pkts, uint16_t nb_pkts); uint16_t rpc_rte_eth_tx_prepare(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* tx_pkts, uint16_t nb_pkts); uint16_t rpc_rte_eth_rx_burst(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* rx_pkts, uint16_t nb_pkts); int rpc_rte_eth_dev_set_link_up(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_set_link_down(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_promiscuous_enable(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_promiscuous_disable(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_promiscuous_get(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_allmulticast_enable(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_allmulticast_disable(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_allmulticast_get(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_get_mtu(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t* mtu); int rpc_rte_eth_dev_set_mtu(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t mtu); int rpc_rte_eth_dev_vlan_filter(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t vlan_id, int on); int rpc_rte_eth_dev_set_vlan_strip_on_queue(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t rx_queue_id, int on); int rpc_rte_eth_dev_set_vlan_ether_type(rcf_rpc_server* rpcs, uint16_t port_id, enum tarpc_rte_vlan_type vlan_type, uint16_t tag_type); int rpc_rte_eth_dev_set_vlan_offload(rcf_rpc_server* rpcs, uint16_t port_id, tarpc_int offload_mask); int rpc_rte_eth_dev_get_vlan_offload(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_set_vlan_pvid(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t pvid, int on); int rpc_rte_eth_rx_queue_count(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); int rpc_rte_eth_rx_descriptor_status(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, uint16_t offset); int rpc_rte_eth_tx_descriptor_status(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, uint16_t offset); int rpc_rte_eth_dev_socket_id(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_is_valid_port(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_dev_rx_queue_start(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); int rpc_rte_eth_dev_rx_queue_stop(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); int rpc_rte_eth_dev_tx_queue_start(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); int rpc_rte_eth_dev_tx_queue_stop(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id); void rpc_rte_eth_macaddr_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mac_addr); int rpc_rte_eth_dev_default_mac_addr_set(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mac_addr); int rpc_rte_eth_rx_queue_info_get(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, struct tarpc_rte_eth_rxq_info* qinfo); int rpc_rte_eth_tx_queue_info_get(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, struct tarpc_rte_eth_txq_info* qinfo); int rpc_rte_eth_dev_rss_reta_query(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_reta_entry64* reta_conf, uint16_t reta_size); int rpc_rte_eth_dev_rss_reta_update(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_reta_entry64* reta_conf, uint16_t reta_size); int rpc_rte_eth_dev_rss_hash_conf_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_conf* rss_conf); int rpc_rte_eth_dev_flow_ctrl_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fc_conf* fc_conf); int rpc_rte_eth_dev_flow_ctrl_set(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fc_conf* fc_conf); te_errno tapi_rpc_add_mac_as_octstring2kvpair(rcf_rpc_server* rpcs, uint16_t port_id, te_kvpair_h* head, const char* name); int rpc_rte_eth_dev_rss_hash_update(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_conf* rss_conf); void rpc_rte_eth_link_get_nowait(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_link* eth_link); void rpc_rte_eth_link_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_link* eth_link); int rpc_dpdk_eth_await_link_up(rcf_rpc_server* rpcs, uint16_t port_id, unsigned int nb_attempts, unsigned int wait_int_ms, unsigned int after_up_ms); int rpc_rte_eth_stats_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_stats* stats); void rpc_rte_eth_stats_reset(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_xstats_get_names(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat_name* xstats_names, unsigned int size); int rpc_rte_eth_xstats_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat* xstats, unsigned int n); void rpc_rte_eth_xstats_reset(rcf_rpc_server* rpcs, uint16_t port_id); int rpc_rte_eth_xstats_get_by_id(rcf_rpc_server* rpcs, uint16_t port_id, uint64_t* ids, uint64_t* values, unsigned int n); int rpc_rte_eth_xstats_get_names_by_id(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat_name* xstat_names, unsigned int size, uint64_t* ids); int rpc_rte_eth_dev_get_supported_ptypes(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t ptype_mask, uint32_t* ptypes, int num); int rpc_rte_eth_dev_set_mc_addr_list(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mc_addr_set, uint32_t nb_mc_addr); int rpc_rte_eth_dev_fw_version_get(rcf_rpc_server* rpcs, uint16_t port_id, char* fw_version, size_t fw_size); int rpc_rte_eth_dev_udp_tunnel_port_add(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_udp_tunnel* tunnel_udp); int rpc_rte_eth_dev_udp_tunnel_port_delete(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_udp_tunnel* tunnel_udp); int rpc_rte_eth_dev_get_port_by_name(rcf_rpc_server* rpcs, const char* name, uint16_t* port_id); int rpc_rte_eth_dev_get_name_by_port(rcf_rpc_server* rpcs, uint16_t port_id, char* name); char* rpc_rte_eth_dev_rx_offload_name(rcf_rpc_server* rpcs, uint64_t offload); char* rpc_rte_eth_dev_tx_offload_name(rcf_rpc_server* rpcs, uint64_t offload); int rpc_rte_eth_rx_metadata_negotiate(rcf_rpc_server* rpcs, uint16_t port_id, uint64_t* features); const char* tarpc_rte_eth_tunnel_type2str(enum tarpc_rte_eth_tunnel_type tunnel_type); const char* tarpc_rte_eth_dev_rss_types2str(te_log_buf* tlbp, uint64_t rss_flow_types); int rpc_rte_eth_fec_get_capability(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fec_capa* speed_fec_capa, unsigned int num); int rpc_rte_eth_fec_get(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t* fec_capa); int rpc_rte_eth_fec_set(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t fec_capa); int rpc_rte_eth_dev_get_reg_info(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_dev_reg_info* info); void tapi_rpc_rte_eth_dev_get_reg_info(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t offset, uint32_t length); void tapi_rpc_rte_eth_dev_dump_reg_info(rcf_rpc_server* rpcs, uint16_t port_id);
Detailed Documentation
Global Functions
uint32_t tapi_rpc_rte_eth_link_speeds_str2val(const char* str)
Map link speed string to bitmask value.
Parameters:
str |
Link speed as string |
Returns:
Link speed bitmask value or 0.
void rpc_rte_eth_dev_info_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_dev_info* dev_info)
rte_eth_dev_info() RPC.
Caller must free memory allocated for driver_name using free().
int rpc_rte_eth_dev_configure(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct tarpc_rte_eth_conf* eth_conf)
rte_eth_dev_configure() RPC.
If failure is not expected, the function jumps out in the case of negative return value.
struct tarpc_rte_eth_conf* tapi_rpc_rte_eth_make_eth_conf(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_conf* eth_conf)
Fill in eth_conf with default settings.
The function may call rte_eth_dev_info_get() to obtain device facilities.
int tapi_rpc_rte_eth_dev_configure_def(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue)
Do rte_eth_dev_configure() RPC with default eth_conf.
void rpc_rte_eth_dev_close(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_close() RPC.
int rpc_rte_eth_dev_reset(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_reset() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_start(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_start() RPC.
If error is not expected, the function jumps out in the case of start failure.
void rpc_rte_eth_dev_stop(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_stop() RPC.
void tapi_rpc_rte_eth_dev_stop(rcf_rpc_server* rpcs, uint16_t port_id)
Wrapper for rpc_rte_eth_dev_stop() to extra common actions.
int rpc_rte_eth_tx_queue_setup(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, struct tarpc_rte_eth_txconf* tx_conf)
rte_eth_tx_queue_setup() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_rx_queue_setup(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, struct tarpc_rte_eth_rxconf* rx_conf, rpc_rte_mempool_p mp)
rte_eth_rx_queue_setup() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_rx_intr_enable(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_dev_rx_intr_enable() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_rx_intr_disable(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_dev_rx_intr_disable() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_rx_intr_ctl_q(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, int epfd, enum tarpc_rte_intr_op op, uint64_t data)
rte_eth_dev_rx_intr_ctl_q() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
uint16_t rpc_rte_eth_tx_burst(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* tx_pkts, uint16_t nb_pkts)
rte_eth_tx_burst() RPC.
The function jumps out in the case of actual number of transmitted packets more than nb_pkts
uint16_t rpc_rte_eth_tx_prepare(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* tx_pkts, uint16_t nb_pkts)
rte_eth_tx_prepare() RPC.
The function jumps out when the number of prepared packets is more than nb_pkts
.
uint16_t rpc_rte_eth_rx_burst(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* rx_pkts, uint16_t nb_pkts)
rte_eth_rx_burst() RPC.
The function jumps out in the case of the actual number of received packets more than nb_pkts
.
int rpc_rte_eth_dev_set_link_up(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_set_link_up() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_set_link_down(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_set_link_down() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_promiscuous_enable(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_promiscuous_enable() RPC.
int rpc_rte_eth_promiscuous_disable(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_promiscuous_disable() RPC.
int rpc_rte_eth_promiscuous_get(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_promiscuous_get() RPC
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_allmulticast_enable(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_allmulticast_enable() RPC
int rpc_rte_eth_allmulticast_disable(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_allmulticast_disable() RPC
int rpc_rte_eth_allmulticast_get(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_allmulticast_get() RPC
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_dev_get_mtu(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t* mtu)
rte_eth_dev_get_mtu() RPC
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_dev_set_mtu(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t mtu)
rte_eth_dev_set_mtu() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_vlan_filter(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t vlan_id, int on)
rte_eth_dev_vlan_filter() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_set_vlan_strip_on_queue(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t rx_queue_id, int on)
rte_eth_dev_set_vlan_strip_on_queue() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_set_vlan_ether_type(rcf_rpc_server* rpcs, uint16_t port_id, enum tarpc_rte_vlan_type vlan_type, uint16_t tag_type)
rte_eth_dev_set_vlan_ether_type() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value or vlan type is unknown.
int rpc_rte_eth_dev_set_vlan_offload(rcf_rpc_server* rpcs, uint16_t port_id, tarpc_int offload_mask)
rte_eth_dev_set_vlan_offload() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_get_vlan_offload(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_get_vlan_offload() RPC.
If failure is not expected, the function jumps out in the case of negative return value or invalid mask.
int rpc_rte_eth_dev_set_vlan_pvid(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t pvid, int on)
rte_eth_dev_set_vlan_pvid() RPC.
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_rx_queue_count(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_rx_queue_count() RPC
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_rx_descriptor_status(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, uint16_t offset)
rte_eth_rx_descriptor_status() RPC
The function jumps out if the return value is not recognized; jumps out (by default) if the return value is negative error code
int rpc_rte_eth_tx_descriptor_status(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, uint16_t offset)
rte_eth_tx_descriptor_status() RPC
The function jumps out if the return value is not recognized; jumps out (by default) if the return value is negative error code
int rpc_rte_eth_dev_socket_id(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_socket_id() RPC
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_dev_is_valid_port(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_dev_is_valid_port() RPC
int rpc_rte_eth_dev_rx_queue_start(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_dev_rx_queue_start() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_rx_queue_stop(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_dev_rx_queue_stop() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_tx_queue_start(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_dev_rx_queue_start() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_tx_queue_stop(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id)
rte_eth_dev_tx_queue_stop() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
void rpc_rte_eth_macaddr_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mac_addr)
rte_eth_macaddr_get() RPC
int rpc_rte_eth_dev_default_mac_addr_set(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mac_addr)
rte_eth_dev_default_mac_addr_set() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_rx_queue_info_get(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, struct tarpc_rte_eth_rxq_info* qinfo)
rte_eth_rx_queue_info_get() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_tx_queue_info_get(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, struct tarpc_rte_eth_txq_info* qinfo)
rte_eth_tx_queue_info_get() RPC
If failure is not expected, the function jumps out in the case of non-zero return value.
int rpc_rte_eth_dev_rss_reta_query(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_reta_entry64* reta_conf, uint16_t reta_size)
rte_eth_dev_rss_reta_query() RPC.
If failure is not expected, the function jumps out in the case of non-zero or negative return value.
Parameters:
rpcs |
RPC server handle |
port_id |
Port number |
reta_size |
Redirection table size. |
reta_conf |
A pointer to the array of rte_eth_rss_reta_entry64 structures. The memory must be allocated by the caller. |
int rpc_rte_eth_dev_rss_reta_update(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_reta_entry64* reta_conf, uint16_t reta_size)
rte_eth_dev_rss_reta_update() RPC.
If failure is not expected, the function jumps out in the case of non-zero or negative return value.
int rpc_rte_eth_dev_rss_hash_conf_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_conf* rss_conf)
rte_eth_dev_rss_hash_conf_get() RPC.
If failure is not expected, the function jumps out in the case of non-zero or negative return value.
Parameters:
rpcs |
RPC server handle |
port_id |
Port number |
rss_conf |
A pointer to store the current RSS hash configuration. The memory must be allocated by the caller. |
int rpc_rte_eth_dev_flow_ctrl_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fc_conf* fc_conf)
rte_eth_dev_flow_ctrl_get() RPC.
If failure is not expected, the function jumps out in the case of non-zero or negative return value.
Parameters:
rpcs |
RPC server handle |
port_id |
Port number |
fc_conf |
The pointer to the structure of the flow control parameters. The memory must be allocated by the caller. |
int rpc_rte_eth_dev_flow_ctrl_set(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fc_conf* fc_conf)
rte_eth_dev_flow_ctrl_set() RPC
te_errno tapi_rpc_add_mac_as_octstring2kvpair(rcf_rpc_server* rpcs, uint16_t port_id, te_kvpair_h* head, const char* name)
Add ethdev MAC address to test parameters kvpairs
Parameters:
rpcs |
RPC server handle. |
port_id |
Port identifier (port number) |
head |
Head of the list |
name |
Name that will be used as the key for MAC address |
Returns:
Status code
int rpc_rte_eth_dev_rss_hash_update(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_conf* rss_conf)
rte_eth_dev_rss_hash_update() RPC.
If failure is not expected, the function jumps out in the case of non-zero value.
void rpc_rte_eth_link_get_nowait(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_link* eth_link)
rte_eth_link_get_nowait() RPC.
void rpc_rte_eth_link_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_link* eth_link)
rte_eth_link_get() RPC.
int rpc_dpdk_eth_await_link_up(rcf_rpc_server* rpcs, uint16_t port_id, unsigned int nb_attempts, unsigned int wait_int_ms, unsigned int after_up_ms)
Await link UP after port start/restart
Parameters:
port_id |
The port identifier of the Ethernet device |
nb_attempts |
The number of attempts to check link status |
wait_int_ms |
The amount of time which shall elapse prior attempt (ms) |
after_up_ms |
The amount of time which shall elapse after link UP has been detected in order to wait for the other resources to become ready (ms) |
Returns:
0
on success; jumps out on error (negative return code)
int rpc_rte_eth_stats_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_stats* stats)
rte_eth_stats_get() RPC
Parameters:
port_id |
The port identifier of the Ethernet device |
stats |
Location for the response containing stats |
Returns:
0
on success; jumps out on error (negative return code)
void rpc_rte_eth_stats_reset(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_stats_reset() RPC
int rpc_rte_eth_xstats_get_names(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat_name* xstats_names, unsigned int size)
rte_eth_xstats_get_names() RPC.
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_xstats_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat* xstats, unsigned int n)
If failure is not expected, the function jumps out in the case of negative return value.
void rpc_rte_eth_xstats_reset(rcf_rpc_server* rpcs, uint16_t port_id)
rte_eth_xstats_reset() RPC
int rpc_rte_eth_xstats_get_by_id(rcf_rpc_server* rpcs, uint16_t port_id, uint64_t* ids, uint64_t* values, unsigned int n)
rte_eth_xstats_get_by_id() RPC
The function jumps out (by default) if the return value is negative error code
int rpc_rte_eth_xstats_get_names_by_id(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat_name* xstat_names, unsigned int size, uint64_t* ids)
rte_eth_xstats_get_names_by_id() RPC
The function jumps out (by default) if the return value is negative error code
int rpc_rte_eth_dev_get_supported_ptypes(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t ptype_mask, uint32_t* ptypes, int num)
rte_eth_dev_get_supported_ptypes() RPC.
If failure is not expected, the function jumps out in the case of negative return value.
int rpc_rte_eth_dev_set_mc_addr_list(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mc_addr_set, uint32_t nb_mc_addr)
rte_eth_dev_set_mc_addr_list() RPC
int rpc_rte_eth_dev_fw_version_get(rcf_rpc_server* rpcs, uint16_t port_id, char* fw_version, size_t fw_size)
rte_eth_dev_fw_version_get() RPC
Parameters:
port_id |
The port identifier of the device |
fw_version |
A buffer to store FW version string (allocated and freed by the caller) |
fw_size |
Buffer length |
Returns:
0
on success; positive length of unmodified string, if it was truncated to fit the buffer; jumps out on error (in case of negative value)
int rpc_rte_eth_dev_udp_tunnel_port_add(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_udp_tunnel* tunnel_udp)
rte_eth_dev_udp_tunnel_port_add() RPC
Parameters:
port_id |
The port identifier of the device |
tunnel_udp |
UDP tunneling configuration |
Returns:
0
on success; jumps out on error (negative value)
int rpc_rte_eth_dev_udp_tunnel_port_delete(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_udp_tunnel* tunnel_udp)
rte_eth_dev_udp_tunnel_port_delete() RPC
Parameters:
port_id |
The port identifier of the device |
tunnel_udp |
UDP tunneling configuration |
Returns:
0
on success; jumps out on error (negative value)
int rpc_rte_eth_dev_get_port_by_name(rcf_rpc_server* rpcs, const char* name, uint16_t* port_id)
rte_eth_dev_get_port_by_name() RPC
Parameters:
name |
PCI address or name of the device |
port_id |
Location for the port ID to be determined |
Returns:
0
on success; jumps out on error (negative value)
int rpc_rte_eth_dev_get_name_by_port(rcf_rpc_server* rpcs, uint16_t port_id, char* name)
rte_eth_dev_get_name_by_port() RPC
It’s the user’s burden to allocate the buffer storage of RPC_RTE_ETH_NAME_MAX_LEN bytes.
Parameters:
port_id |
The port identifier of the device |
name |
A buffer storage for the name to be retrieved |
Returns:
0
on success; jumps out on error (negative value)
char* rpc_rte_eth_dev_rx_offload_name(rcf_rpc_server* rpcs, uint64_t offload)
rte_eth_dev_rx_offload_name() RPC
Parameters:
offload |
The offload to query (bit field, not enum) |
Returns:
Offload name; ‘UNKNOWN’ may mean that the offload is unsupported or that the API is not implemented
char* rpc_rte_eth_dev_tx_offload_name(rcf_rpc_server* rpcs, uint64_t offload)
rte_eth_dev_tx_offload_name() RPC
Parameters:
offload |
The offload to query (bit field, not enum) |
Returns:
Offload name; ‘UNKNOWN’ may mean that the offload is unsupported or that the API is not implemented
int rpc_rte_eth_rx_metadata_negotiate(rcf_rpc_server* rpcs, uint16_t port_id, uint64_t* features)
rte_eth_rx_metadata_negotiate() RPC
Returns:
0
on success; jumps out on error (negative value)
const char* tarpc_rte_eth_dev_rss_types2str(te_log_buf* tlbp, uint64_t rss_flow_types)
Convert a RSS hash proto mask to string representation
Parameters:
tlbp |
Caller-allocated log buffer |
rss_flow_types |
The bitmask to be converted |
Returns:
The resulting string representation of the given bitmask
int rpc_rte_eth_fec_get_capability(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fec_capa* speed_fec_capa, unsigned int num)
rte_eth_fec_get_capability() RPC
Parameters:
port_id |
The port identifier of the device |
num |
A number of elements in speed_fec_capa array |
speed_fec_capa |
Per-speed capabilities |
Returns:
A non-negative value lower or equal to num: success. The return value is the number of entries filled in the fec capa array.
A non-negative value higher than num: error, the given fec capa array is too small. The return value corresponds to the num that should be given to succeed. The entries in fec capa array are not valid and shall not be used by the caller.
jumps out on error (negative value)
int rpc_rte_eth_fec_get(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t* fec_capa)
rte_eth_fec_get() RPC
Parameters:
port_id |
The port identifier of the device |
fec_capa |
A bitmask of enabled FEC modes |
Returns:
0
on success; jumps out on error (negative value)
int rpc_rte_eth_fec_set(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t fec_capa)
rte_eth_fec_set() RPC
Parameters:
port_id |
The port identifier of the device |
fec_capa |
A bitmask of FEC modes to set |
Returns:
0
on success; jumps out on error (negative value)
int rpc_rte_eth_dev_get_reg_info(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_dev_reg_info* info)
rte_eth_dev_get_reg_info() RPC
Parameters:
port_id |
The port identifier of the device |
info |
Pointer to rte_dev_reg_info structure to fill in. |
Returns:
0
on success; jumps out on error (negative value)
void tapi_rpc_rte_eth_dev_get_reg_info(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t offset, uint32_t length)
Get device registers (just to be logged).
Parameters:
rpcs |
RPC server handle |
port_id |
The port identifier of the device |
offset |
Offset to start from |
length |
Size of registers to get or 0 to get all |
void tapi_rpc_rte_eth_dev_dump_reg_info(rcf_rpc_server* rpcs, uint16_t port_id)
Dump device registers in logs if environment variable TE_ENV_DPDK_DUMP_REGS
is set.
Parameters:
rpcs |
RPC server handle |
port_id |
The port identifier of the device |