blob: 92cc5d1dc09664a9105cdf5d93150e37cc611b77 [file] [log] [blame]
Daniel Parkd02d7bd2018-08-23 23:04:31 +09001/*
2 * Copyright 2018-present Open Networking Foundation
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 */
16package org.onosproject.openstacknode.api;
17
18import java.util.Collection;
19
20/**
21 * Representation of dpdk config information.
22 */
23public interface DpdkConfig {
24
25 /**
26 * List of valid data path types.
27 */
28 enum DatapathType {
29 NORMAL,
30 NETDEV
31 }
32
33 /**
34 * Returns the data path type.
35 *
36 * @return data path type; normal or netdev
37 */
38 DatapathType datapathType();
39
40 /**
41 * Returns socket directory which dpdk port bound to.
42 *
43 * @return socket directory
44 */
45 String socketDir();
46
47 /**
48 * Returns a collection of dpdk interfaces.
49 *
50 * @return dpdk interfaces
51 */
52 Collection<DpdkInterface> dpdkIntfs();
53
54 interface Builder {
55 /**
56 * Returns new dpdk config.
57 *
58 * @return dpdk config
59 */
60 DpdkConfig build();
61
62 /**
63 * Returns dpdk config builder with supplied datapath type.
64 *
65 * @param datapathType datapath type
66 * @return dpdk config builder
67 */
68 Builder datapathType(DatapathType datapathType);
69
70 /**
71 * Returns dpdk config builder with supplied socket directory.
72 *
73 * @param socketDir socket directory
74 * @return dpdk config builder
75 */
76 Builder socketDir(String socketDir);
77
78 /**
79 * Returns dpdk config builder with supplied dpdk interfaces.
80 *
81 * @param dpdkIntfs a collection of dpdk interfaces
82 * @return dpdk config builder
83 */
84 Builder dpdkIntfs(Collection<DpdkInterface> dpdkIntfs);
85 }
86}