]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/dpdk/drivers/net/ark/ark_ext.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / drivers / net / ark / ark_ext.h
CommitLineData
9f95a23c
TL
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2015-2018 Atomic Rules LLC
11fdf7f2
TL
3 */
4
5#ifndef _ARK_EXT_H_
6#define _ARK_EXT_H_
7
9f95a23c 8#include <rte_ethdev_driver.h>
11fdf7f2
TL
9
10/*
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
14 * functions.
15 * Only 1 function is required for an extension, dev_init(); all other
16 * functions prototyped in this file are optional.
17 */
18
19/*
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
24 */
25void *dev_init(struct rte_eth_dev *dev, void *a_bar, int port_id);
26
27/* Called during device shutdown */
28void dev_uninit(struct rte_eth_dev *dev, void *user_data);
29
30/* This call is optional and allows the
31 * extension to specify the number of supported ports.
32 */
33uint8_t dev_get_port_count(struct rte_eth_dev *dev,
34 void *user_data);
35
36/*
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.
41 */
42
43int dev_configure(struct rte_eth_dev *dev,
44 void *user_data);
45
46int dev_start(struct rte_eth_dev *dev,
47 void *user_data);
48
49void dev_stop(struct rte_eth_dev *dev,
50 void *user_data);
51
52void dev_close(struct rte_eth_dev *dev,
53 void *user_data);
54
55int link_update(struct rte_eth_dev *dev,
56 int wait_to_complete,
57 void *user_data);
58
59int dev_set_link_up(struct rte_eth_dev *dev,
60 void *user_data);
61
62int dev_set_link_down(struct rte_eth_dev *dev,
63 void *user_data);
64
9f95a23c 65int stats_get(struct rte_eth_dev *dev,
11fdf7f2
TL
66 struct rte_eth_stats *stats,
67 void *user_data);
68
69void stats_reset(struct rte_eth_dev *dev,
70 void *user_data);
71
72void mac_addr_add(struct rte_eth_dev *dev,
73 struct ether_addr *macadr,
74 uint32_t index,
75 uint32_t pool,
76 void *user_data);
77
78void mac_addr_remove(struct rte_eth_dev *dev,
79 uint32_t index,
80 void *user_data);
81
82void mac_addr_set(struct rte_eth_dev *dev,
83 struct ether_addr *mac_addr,
84 void *user_data);
85
9f95a23c
TL
86int set_mtu(struct rte_eth_dev *dev,
87 uint16_t size,
88 void *user_data);
89
11fdf7f2 90#endif