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 10 #define ETHDEV_IPV6_ADDR_LEN 16 11 12 struct ipv4_addr_config { 13 uint32_t ip; 14 uint32_t mask; 15 }; 16 17 struct ipv6_addr_config { 18 uint8_t ip[ETHDEV_IPV6_ADDR_LEN]; 19 uint8_t mask[ETHDEV_IPV6_ADDR_LEN]; 20 }; 21 22 extern uint32_t enabled_port_mask; 23 24 void ethdev_start(void); 25 void ethdev_stop(void); 26 void *ethdev_mempool_list_by_portid(uint16_t portid); 27 int16_t ethdev_portid_by_ip4(uint32_t ip, uint32_t mask); 28 int16_t ethdev_portid_by_ip6(uint8_t *ip, uint8_t *mask); 29 int16_t ethdev_txport_by_rxport_get(uint16_t portid_rx); 30 void ethdev_list_clean(void); 31 32 #endif 33