5 #ifndef __PKTDEV_CORE_H_
6 #define __PKTDEV_CORE_H_
27 typedef int (*pkt_dev_start_t)(
struct cne_pktdev *dev);
30 typedef void (*pkt_dev_stop_t)(
struct cne_pktdev *dev);
33 typedef int (*pkt_dev_admin_st_up_t)(
struct cne_pktdev *dev);
36 typedef int (*pkt_dev_admin_st_down_t)(
struct cne_pktdev *dev);
39 typedef void (*pkt_dev_close_t)(
struct cne_pktdev *dev);
42 typedef int (*pkt_dev_infos_get_t)(
struct cne_pktdev *dev,
struct pktdev_info *dev_info);
45 typedef int (*eth_link_update_t)(
struct cne_pktdev *dev,
int wait_to_complete);
48 typedef int (*eth_stats_get_t)(
struct cne_pktdev *dev, lport_stats_t *igb_stats);
70 typedef int (*eth_stats_reset_t)(
struct cne_pktdev *dev);
82 typedef int (*eth_tx_done_cleanup_t)(
void *txq, uint32_t free_cnt);
96 typedef uint16_t (*eth_rx_burst_t)(
void *rxq,
pktmbuf_t **rx_pkts, uint16_t nb_pkts);
110 typedef uint16_t (*eth_tx_burst_t)(
void *txq,
pktmbuf_t **tx_pkts, uint16_t nb_pkts);
124 typedef uint16_t (*eth_tx_prep_t)(
void *txq,
pktmbuf_t **tx_pkts, uint16_t nb_pkts);
136 typedef int (*eth_mac_addr_set_t)(
struct cne_pktdev *dev,
struct ether_addr *mac_addr);
150 typedef int (*eth_pkt_alloc)(
struct cne_pktdev *dev,
pktmbuf_t **bufs, uint16_t nb_pkts);
164 pkt_dev_admin_st_up_t admin_state_up;
165 pkt_dev_admin_st_down_t admin_state_down;
166 pkt_dev_close_t dev_close;
167 pkt_dev_infos_get_t dev_infos_get;
168 eth_mac_addr_set_t mac_addr_set;
169 eth_link_update_t link_update;
170 eth_stats_get_t stats_get;
171 eth_stats_reset_t stats_reset;
172 eth_tx_done_cleanup_t tx_done_cleanup;
173 eth_pkt_alloc pkt_alloc;
187 eth_rx_burst_t rx_pkt_burst;
188 eth_tx_burst_t tx_pkt_burst;
189 eth_tx_prep_t tx_pkt_prepare;
190 struct pktdev_data *data;
192 void *process_private;
193 const struct pktdev_ops *dev_ops;
195 } __cne_cache_aligned;
197 extern struct cne_pktdev pktdev_devices[CNE_MAX_ETHPORTS];
199 #define PKTDEV_NAME_MAX_LEN 16
208 char name[PKTDEV_NAME_MAX_LEN];
209 char ifname[PKTDEV_NAME_MAX_LEN];
214 uint32_t min_rx_buf_size;
219 } __cne_cache_aligned;
226 extern struct cne_pktdev cne_pktdevices[];