1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2015-2018 Atomic Rules LLC
8 #include <rte_ethdev_driver.h>
11 * This is the template file for users who which to define a dynamic
12 * extension to the Arkville PMD. User's who create an extension
13 * should include this file and define the necessary and desired
15 * Only 1 function is required for an extension, dev_init(); all other
16 * functions prototyped in this file are optional.
20 * Called post PMD init.
21 * The implementation returns its private data that gets passed into
22 * all other functions as user_data
23 * The ARK extension implementation MUST implement this function
25 void *dev_init(struct rte_eth_dev *dev, void *a_bar, int port_id);
27 /* Called during device shutdown */
28 void dev_uninit(struct rte_eth_dev *dev, void *user_data);
30 /* This call is optional and allows the
31 * extension to specify the number of supported ports.
33 uint8_t dev_get_port_count(struct rte_eth_dev *dev,
37 * The following functions are optional and are directly mapped
38 * from the DPDK PMD ops structure.
39 * Each function if implemented is called after the ARK PMD
40 * implementation executes.
43 int dev_configure(struct rte_eth_dev *dev,
46 int dev_start(struct rte_eth_dev *dev,
49 void dev_stop(struct rte_eth_dev *dev,
52 void dev_close(struct rte_eth_dev *dev,
55 int link_update(struct rte_eth_dev *dev,
59 int dev_set_link_up(struct rte_eth_dev *dev,
62 int dev_set_link_down(struct rte_eth_dev *dev,
65 int stats_get(struct rte_eth_dev *dev,
66 struct rte_eth_stats *stats,
69 void stats_reset(struct rte_eth_dev *dev,
72 void mac_addr_add(struct rte_eth_dev *dev,
73 struct rte_ether_addr *macadr,
78 void mac_addr_remove(struct rte_eth_dev *dev,
82 void mac_addr_set(struct rte_eth_dev *dev,
83 struct rte_ether_addr *mac_addr,
86 int set_mtu(struct rte_eth_dev *dev,