1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2023 Marvell. 3 */ 4 5 #ifndef APP_GRAPH_ETHDEV_H 6 #define APP_GRAPH_ETHDEV_H 7 8 #include <cmdline_parse.h> 9 #include <rte_ip6.h> 10 11 struct ipv4_addr_config { 12 uint32_t ip; 13 uint32_t mask; 14 }; 15 16 struct ipv6_addr_config { 17 struct rte_ipv6_addr ip; 18 struct rte_ipv6_addr mask; 19 }; 20 21 extern uint32_t enabled_port_mask; 22 23 void ethdev_start(void); 24 void ethdev_stop(void); 25 void *ethdev_mempool_list_by_portid(uint16_t portid); 26 int16_t ethdev_portid_by_ip4(uint32_t ip, uint32_t mask); 27 int16_t ethdev_portid_by_ip6(struct rte_ipv6_addr *ip, struct rte_ipv6_addr *mask); 28 int16_t ethdev_txport_by_rxport_get(uint16_t portid_rx); 29 void ethdev_list_clean(void); 30 31 #endif 32