blob: b556518fea24b069ed7cd7818d95dbdb7b73f3e5 [file] [log] [blame]
Andrea Campanella8ec84842017-09-13 12:36:19 +02001/*******************************************************************************
2 * BAREFOOT NETWORKS CONFIDENTIAL & PROPRIETARY
3 *
4 * Copyright (c) 2015-2016 Barefoot Networks, Inc.
5
6 * All Rights Reserved.
7 *
8 * NOTICE: All information contained herein is, and remains the property of
9 * Barefoot Networks, Inc. and its suppliers, if any. The intellectual and
10 * technical concepts contained herein are proprietary to Barefoot Networks,
11 * Inc.
12 * and its suppliers and may be covered by U.S. and Foreign Patents, patents in
13 * process, and are protected by trade secret or copyright law.
14 * Dissemination of this information or reproduction of this material is
15 * strictly forbidden unless prior written permission is obtained from
16 * Barefoot Networks, Inc.
17 *
18 * No warranty, explicit or implicit is provided, unless granted under a
19 * written agreement with Barefoot Networks, Inc.
20 *
21 * $Id: $
22 *
23 ******************************************************************************/
24/*
25 pltfm_pm thrift file
26*/
27
28namespace py pltfm_pm_rpc
29namespace cpp pltfm_pm_rpc
30
31typedef i32 pltfm_pm_status_t
32typedef i32 pltfm_pm_dev_port_t
33typedef byte pltfm_pm_device_t
34
35exception InvalidPltfmPmOperation {
36 1:i32 code
37}
38
39enum pltfm_pm_port_speed_t {
40 BF_SPEED_NONE = 0,
41 BF_SPEED_1G = 1,
42 BF_SPEED_10G = 2,
43 BF_SPEED_25G = 3,
44 BF_SPEED_40G = 4,
45 BF_SPEED_40G_NB = 5,
46 BF_SPEED_50G = 6,
47 BF_SPEED_100G = 7,
48 BF_SPEED_40G_NON_BREAKABLE = 8
49}
50
51enum pltfm_pm_fec_type_t {
52 BF_FEC_TYP_NONE = 0,
53 BF_FEC_TYP_FIRECODE = 1,
54 BF_FEC_TYP_REED_SOLOMON = 2
55}
56
57enum pltfm_pm_oper_status_t {
58 DOWN = 0,
59 UP = 1
60}
61
62enum pltfm_pm_board_type_t {
63 BF_PLTFM_BD_ID_MAVERICKS_P0A = 0x0234,
64 BF_PLTFM_BD_ID_MAVERICKS_P0B = 0x1234,
65 BF_PLTFM_BD_ID_MONTARA_P0A = 0x2234,
66 BF_PLTFM_BD_ID_MONTARA_P0B = 0x3234,
67 BF_PLTFM_BD_ID_MAVERICKS_P0B_EMU = 0x4234,
68 BF_PLTFM_BD_ID_UNKNOWN = 0XFFFF
69}
70
71service pltfm_pm_rpc {
72 /* init */
73 pltfm_pm_status_t pltfm_pm_port_add(1:pltfm_pm_device_t device, 2:pltfm_pm_dev_port_t dev_port, 3:pltfm_pm_port_speed_t ps, 4:pltfm_pm_fec_type_t fec) throws (1:InvalidPltfmPmOperation ouch);
74 pltfm_pm_status_t pltfm_pm_port_del(1:pltfm_pm_device_t device, 2:pltfm_pm_dev_port_t dev_port) throws (1:InvalidPltfmPmOperation ouch);
75 pltfm_pm_status_t pltfm_pm_port_enable(1:pltfm_pm_device_t device, 2:pltfm_pm_dev_port_t dev_port) throws (1:InvalidPltfmPmOperation ouch);
76 pltfm_pm_status_t pltfm_pm_port_dis(1:pltfm_pm_device_t device, 2:pltfm_pm_dev_port_t dev_port) throws (1:InvalidPltfmPmOperation ouch);
77 pltfm_pm_status_t pltfm_pm_switchd_port_cleanup(1:pltfm_pm_device_t device) throws (1:InvalidPltfmPmOperation ouch);
78 pltfm_pm_oper_status_t pltfm_pm_port_oper_status_get(1:pltfm_pm_device_t device, 2:pltfm_pm_dev_port_t dev_port) throws (1:InvalidPltfmPmOperation ouch);
79 pltfm_pm_board_type_t pltfm_pm_board_type_get() throws (1:InvalidPltfmPmOperation ouch);
80 pltfm_pm_status_t pltfm_pm_port_an_set(1:pltfm_pm_device_t device, 2:pltfm_pm_dev_port_t dev_port, 3:i32 an_flag) throws (1:InvalidPltfmPmOperation ouch);
81 pltfm_pm_status_t pltfm_pm_serdes_lane_map_set(1:pltfm_pm_device_t device) throws (1:InvalidPltfmPmOperation ouch);
82 pltfm_pm_status_t pltfm_pm_serdes_init(1:pltfm_pm_device_t device) throws (1:InvalidPltfmPmOperation ouch);
83}