Lines Matching refs:port_id
1814 uint16_t port_id; member
2062 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \ argument
2063 if (!rte_eth_dev_is_valid_port(port_id)) { \
2064 RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \
2069 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \ argument
2070 if (!rte_eth_dev_is_valid_port(port_id)) { \
2071 RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \
2098 typedef uint16_t (*rte_rx_callback_fn)(uint16_t port_id, uint16_t queue,
2122 typedef uint16_t (*rte_tx_callback_fn)(uint16_t port_id, uint16_t queue,
2190 uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
2209 uint16_t rte_eth_find_next(uint16_t port_id);
2240 #define RTE_ETH_FOREACH_DEV_OF(port_id, parent) \ argument
2241 for (port_id = rte_eth_find_next_of(0, parent); \
2242 port_id < RTE_MAX_ETHPORTS; \
2243 port_id = rte_eth_find_next_of(port_id + 1, parent))
2269 #define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \ argument
2270 for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \
2271 port_id < RTE_MAX_ETHPORTS; \
2272 port_id = rte_eth_find_next_sibling(port_id + 1, ref_port_id))
2304 int rte_eth_dev_owner_set(const uint16_t port_id,
2321 int rte_eth_dev_owner_unset(const uint16_t port_id,
2352 int rte_eth_dev_owner_get(const uint16_t port_id,
2463 int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
2475 rte_eth_dev_is_removed(uint16_t port_id);
2539 int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
2573 (uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc,
2624 int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
2655 (uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc,
2685 int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
2750 int rte_eth_dev_socket_id(uint16_t port_id);
2761 int rte_eth_dev_is_valid_port(uint16_t port_id);
2780 int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
2798 int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
2817 int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
2835 int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
2856 int rte_eth_dev_start(uint16_t port_id);
2868 int rte_eth_dev_stop(uint16_t port_id);
2882 int rte_eth_dev_set_link_up(uint16_t port_id);
2893 int rte_eth_dev_set_link_down(uint16_t port_id);
2905 int rte_eth_dev_close(uint16_t port_id);
2944 int rte_eth_dev_reset(uint16_t port_id);
2957 int rte_eth_promiscuous_enable(uint16_t port_id);
2970 int rte_eth_promiscuous_disable(uint16_t port_id);
2982 int rte_eth_promiscuous_get(uint16_t port_id);
2995 int rte_eth_allmulticast_enable(uint16_t port_id);
3008 int rte_eth_allmulticast_disable(uint16_t port_id);
3020 int rte_eth_allmulticast_get(uint16_t port_id);
3039 int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
3055 int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
3112 int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
3125 int rte_eth_stats_reset(uint16_t port_id);
3156 int rte_eth_xstats_get_names(uint16_t port_id,
3189 int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
3217 rte_eth_xstats_get_names_by_id(uint16_t port_id,
3245 int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
3267 int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
3282 int rte_eth_xstats_reset(uint16_t port_id);
3302 int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
3323 int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
3340 int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
3363 int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
3409 int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);
3427 int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf);
3449 int rte_eth_dev_fw_version_get(uint16_t port_id,
3491 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
3523 int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask,
3538 int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
3557 int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
3578 int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
3598 int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
3617 int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
3638 int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
3653 int rte_eth_dev_get_vlan_offload(uint16_t port_id);
3669 int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
3816 rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
3880 typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
3900 int rte_eth_dev_callback_register(uint16_t port_id,
3922 int rte_eth_dev_callback_unregister(uint16_t port_id,
3947 int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
3969 int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
3988 int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
4011 int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
4029 rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id);
4044 int rte_eth_led_on(uint16_t port_id);
4059 int rte_eth_led_off(uint16_t port_id);
4090 int rte_eth_fec_get_capability(uint16_t port_id,
4118 int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
4141 int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa);
4157 int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
4174 int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
4192 int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
4213 int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr,
4234 int rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id,
4261 int rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id,
4278 int rte_eth_dev_mac_addr_remove(uint16_t port_id,
4294 int rte_eth_dev_default_mac_addr_set(uint16_t port_id,
4314 int rte_eth_dev_rss_reta_update(uint16_t port_id,
4336 int rte_eth_dev_rss_reta_query(uint16_t port_id,
4359 int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
4380 int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
4398 int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4415 int rte_eth_dev_rss_hash_update(uint16_t port_id,
4434 rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
4462 rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
4485 rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
4502 int rte_eth_dev_get_dcb_info(uint16_t port_id,
4533 rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
4563 rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
4592 rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
4628 int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
4664 int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
4686 int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
4708 int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
4729 int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
4750 int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
4774 int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,
4795 int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info);
4809 int rte_eth_dev_get_eeprom_length(uint16_t port_id);
4827 int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
4845 int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
4867 rte_eth_dev_get_module_info(uint16_t port_id,
4891 rte_eth_dev_get_module_eeprom(uint16_t port_id,
4913 int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
4929 int rte_eth_timesync_enable(uint16_t port_id);
4943 int rte_eth_timesync_disable(uint16_t port_id);
4963 int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
4981 int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
5001 int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
5018 int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
5038 int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
5087 rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
5105 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
5123 rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
5141 int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
5160 rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
5172 rte_eth_dev_get_sec_ctx(uint16_t port_id);
5190 int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
5251 int rte_eth_representor_info_get(uint16_t port_id,
5306 int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
5354 int rte_eth_ip_reassembly_capability_get(uint16_t port_id,
5379 int rte_eth_ip_reassembly_conf_get(uint16_t port_id,
5412 int rte_eth_ip_reassembly_conf_set(uint16_t port_id,
5453 int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
5480 uint16_t rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id,
5572 rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id, in rte_eth_rx_burst() argument
5580 if (port_id >= RTE_MAX_ETHPORTS || in rte_eth_rx_burst()
5584 port_id, queue_id); in rte_eth_rx_burst()
5590 p = &rte_eth_fp_ops[port_id]; in rte_eth_rx_burst()
5594 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); in rte_eth_rx_burst()
5598 queue_id, port_id); in rte_eth_rx_burst()
5618 nb_rx = rte_eth_call_rx_callbacks(port_id, queue_id, in rte_eth_rx_burst()
5623 rte_ethdev_trace_rx_burst(port_id, queue_id, (void **)rx_pkts, nb_rx); in rte_eth_rx_burst()
5641 rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id) in rte_eth_rx_queue_count() argument
5646 if (port_id >= RTE_MAX_ETHPORTS || in rte_eth_rx_queue_count()
5650 port_id, queue_id); in rte_eth_rx_queue_count()
5655 p = &rte_eth_fp_ops[port_id]; in rte_eth_rx_queue_count()
5658 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); in rte_eth_rx_queue_count()
5708 rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, in rte_eth_rx_descriptor_status() argument
5715 if (port_id >= RTE_MAX_ETHPORTS || in rte_eth_rx_descriptor_status()
5719 port_id, queue_id); in rte_eth_rx_descriptor_status()
5725 p = &rte_eth_fp_ops[port_id]; in rte_eth_rx_descriptor_status()
5729 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); in rte_eth_rx_descriptor_status()
5778 static inline int rte_eth_tx_descriptor_status(uint16_t port_id, in rte_eth_tx_descriptor_status() argument
5785 if (port_id >= RTE_MAX_ETHPORTS || in rte_eth_tx_descriptor_status()
5789 port_id, queue_id); in rte_eth_tx_descriptor_status()
5795 p = &rte_eth_fp_ops[port_id]; in rte_eth_tx_descriptor_status()
5799 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); in rte_eth_tx_descriptor_status()
5826 uint16_t rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id,
5896 rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id, in rte_eth_tx_burst() argument
5903 if (port_id >= RTE_MAX_ETHPORTS || in rte_eth_tx_burst()
5907 port_id, queue_id); in rte_eth_tx_burst()
5913 p = &rte_eth_fp_ops[port_id]; in rte_eth_tx_burst()
5917 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); in rte_eth_tx_burst()
5921 queue_id, port_id); in rte_eth_tx_burst()
5939 nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id, in rte_eth_tx_burst()
5946 rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, nb_pkts); in rte_eth_tx_burst()
6007 rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, in rte_eth_tx_prepare() argument
6014 if (port_id >= RTE_MAX_ETHPORTS || in rte_eth_tx_prepare()
6018 port_id, queue_id); in rte_eth_tx_prepare()
6025 p = &rte_eth_fp_ops[port_id]; in rte_eth_tx_prepare()
6029 if (!rte_eth_dev_is_valid_port(port_id)) { in rte_eth_tx_prepare()
6030 RTE_ETHDEV_LOG(ERR, "Invalid Tx port_id=%u\n", port_id); in rte_eth_tx_prepare()
6036 queue_id, port_id); in rte_eth_tx_prepare()
6060 rte_eth_tx_prepare(__rte_unused uint16_t port_id, in rte_eth_tx_prepare() argument
6092 rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id, in rte_eth_tx_buffer_flush() argument
6101 sent = rte_eth_tx_burst(port_id, queue_id, buffer->pkts, to_send); in rte_eth_tx_buffer_flush()
6145 rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id, in rte_eth_tx_buffer() argument
6152 return rte_eth_tx_buffer_flush(port_id, queue_id, buffer); in rte_eth_tx_buffer()