]> git.proxmox.com Git - mirror_ovs.git/blame - lib/netdev-dpdk.h
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / lib / netdev-dpdk.h
CommitLineData
e92387bc
DDP
1/*
2 * Copyright (c) 2014, 2015, 2016 Nicira, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
8a9562d2
PS
17#ifndef NETDEV_DPDK_H
18#define NETDEV_DPDK_H
19
8a9562d2 20#include <config.h>
b8da6cce 21
01961bbd
DDP
22#include "openvswitch/compiler.h"
23
e14deea0 24struct dp_packet;
6775bdfc 25struct netdev;
91088554 26
b8da6cce 27#ifdef DPDK_NETDEV
8a9562d2 28
6775bdfc
RBY
29struct rte_flow;
30struct rte_flow_error;
31struct rte_flow_attr;
32struct rte_flow_item;
33struct rte_flow_action;
63556d85 34struct rte_flow_query_count;
6775bdfc 35
8a9562d2 36void netdev_dpdk_register(void);
e14deea0 37void free_dpdk_buf(struct dp_packet *);
5fc5c50f
IM
38
39bool netdev_dpdk_flow_api_supported(struct netdev *);
40
6775bdfc
RBY
41int
42netdev_dpdk_rte_flow_destroy(struct netdev *netdev,
43 struct rte_flow *rte_flow,
44 struct rte_flow_error *error);
45struct rte_flow *
46netdev_dpdk_rte_flow_create(struct netdev *netdev,
47 const struct rte_flow_attr *attr,
48 const struct rte_flow_item *items,
49 const struct rte_flow_action *actions,
50 struct rte_flow_error *error);
63556d85
EB
51int
52netdev_dpdk_rte_flow_query_count(struct netdev *netdev,
53 struct rte_flow *rte_flow,
54 struct rte_flow_query_count *query,
55 struct rte_flow_error *error);
2f7f9284
EB
56int
57netdev_dpdk_get_port_id(struct netdev *netdev);
8a9562d2
PS
58
59#else
60
b8da6cce
AZ
61static inline void
62netdev_dpdk_register(void)
63{
64 /* Nothing */
65}
b8da6cce 66static inline void
e14deea0 67free_dpdk_buf(struct dp_packet *buf OVS_UNUSED)
b8da6cce
AZ
68{
69 /* Nothing */
70}
71
8a9562d2 72#endif
01961bbd
DDP
73
74#endif /* netdev-dpdk.h */