]> git.proxmox.com Git - mirror_ovs.git/blame - lib/dpdk-stub.c
lldp: validate a bit more received LLDP frames
[mirror_ovs.git] / lib / dpdk-stub.c
CommitLineData
563bbfdc 1/*
01961bbd 2 * Copyright (c) 2014, 2015, 2016 Nicira, Inc.
563bbfdc
DDP
3 * Copyright (c) 2016 Red Hat, Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
bab69409 18#include <config.h>
01961bbd
DDP
19#include "dpdk.h"
20
bab69409
AC
21#include "smap.h"
22#include "ovs-thread.h"
23#include "openvswitch/vlog.h"
3e52fa56 24#include "vswitch-idl.h"
bab69409
AC
25
26VLOG_DEFINE_THIS_MODULE(dpdk);
27
28void
29dpdk_init(const struct smap *ovs_other_config)
30{
ec2b0701
DDP
31 if (smap_get_bool(ovs_other_config, "dpdk-init", false)) {
32 static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;
bab69409 33
ec2b0701 34 if (ovsthread_once_start(&once)) {
bab69409 35 VLOG_ERR("DPDK not supported in this copy of Open vSwitch.");
ec2b0701 36 ovsthread_once_done(&once);
bab69409 37 }
bab69409
AC
38 }
39}
01961bbd
DDP
40
41void
42dpdk_set_lcore_id(unsigned cpu OVS_UNUSED)
43{
44 /* Nothing */
45}
46
47const char *
48dpdk_get_vhost_sock_dir(void)
49{
50 return NULL;
51}
a14d1cc8
MK
52
53bool
54dpdk_vhost_iommu_enabled(void)
55{
56 return false;
57}
40c23a57 58
30e834dc
LB
59bool
60dpdk_vhost_postcopy_enabled(void)
61{
62 return false;
63}
64
43307ad0
IS
65bool
66dpdk_per_port_memory(void)
67{
68 return false;
69}
70
1276e3db
IM
71bool
72dpdk_available(void)
73{
74 return false;
75}
76
40c23a57
MC
77void
78print_dpdk_version(void)
79{
80}
3e52fa56 81
b250b39a
HH
82bool
83dpdk_get_cpu_has_isa(const char *arch OVS_UNUSED,
84 const char *feature OVS_UNUSED)
85{
86 VLOG_ERR_ONCE("DPDK not supported in this version of Open vSwitch, "
87 "cannot use CPU flag based optimizations");
88 return false;
89}
90
3e52fa56
AC
91void
92dpdk_status(const struct ovsrec_open_vswitch *cfg)
93{
94 if (cfg) {
95 ovsrec_open_vswitch_set_dpdk_initialized(cfg, false);
96 ovsrec_open_vswitch_set_dpdk_version(cfg, "none");
97 }
98}