FD.io VPP
v19.04.1-1-ge4a0f9f
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Data Structures
Source
Files
Symbols
rx_machine.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#ifndef __LACP_RX_MACHINE_H__
17
#define __LACP_RX_MACHINE_H__
18
19
#include <stdint.h>
20
#include <
lacp/machine.h
>
21
22
#define foreach_lacp_rx_event \
23
_(0, BEGIN, "begin") \
24
_(1, PORT_DISABLED, "port disabled") \
25
_(2, PORT_MOVED, "port moved") \
26
_(3, LACP_ENABLED, "lacp enabled") \
27
_(4, LACP_DISABLED, "lacp disabled") \
28
_(5, PDU_RECEIVED, "pdu received") \
29
_(6, TIMER_EXPIRED, "timer expired")
30
31
typedef
enum
32
{
33
#define _(a, b, c) LACP_RX_EVENT_##b = (a),
34
foreach_lacp_rx_event
35
#undef _
36
}
lacp_rx_event_t
;
37
38
#define foreach_lacp_rx_sm_state \
39
_(0, INITIALIZE, "initialize") \
40
_(1, PORT_DISABLED, "port disabled") \
41
_(2, EXPIRED, "expired") \
42
_(3, LACP_DISABLED, "lacp disabled") \
43
_(4, DEFAULTED, "defaulted") \
44
_(5, CURRENT, "current")
45
46
typedef
enum
47
{
48
#define _(a, b, c) LACP_RX_STATE_##b = (a),
49
foreach_lacp_rx_sm_state
50
#undef _
51
}
lacp_rx_sm_state_t
;
52
53
extern
lacp_machine_t
lacp_rx_machine
;
54
55
int
lacp_rx_action_initialize
(
void
*,
void
*);
56
int
lacp_rx_action_port_disabled
(
void
*,
void
*);
57
int
lacp_rx_action_pdu_received
(
void
*,
void
*);
58
int
lacp_rx_action_expired
(
void
*,
void
*);
59
int
lacp_rx_action_lacp_disabled
(
void
*,
void
*);
60
int
lacp_rx_action_defaulted
(
void
*,
void
*);
61
int
lacp_rx_action_current
(
void
*,
void
*);
62
void
lacp_rx_debug_func
(
slave_if_t
* sif,
int
event,
int
state
,
63
lacp_fsm_state_t
* transition);
64
65
#define LACP_ACTION_INITIALIZE \
66
LACP_ACTION_ROUTINE(lacp_rx_action_initialize)
67
#define LACP_ACTION_PORT_DISABLED \
68
LACP_ACTION_ROUTINE(lacp_rx_action_port_disabled)
69
#define LACP_ACTION_EXPIRED \
70
LACP_ACTION_ROUTINE(lacp_rx_action_expired)
71
#define LACP_ACTION_LACP_DISABLED \
72
LACP_ACTION_ROUTINE(lacp_rx_action_lacp_disabled)
73
#define LACP_ACTION_DEFAULTED LACP_ACTION_ROUTINE(lacp_rx_action_defaulted)
74
#define LACP_ACTION_CURRENT LACP_ACTION_ROUTINE(lacp_rx_action_current)
75
76
static
inline
void
77
lacp_start_current_while_timer
(
vlib_main_t
*
vm
,
slave_if_t
* sif,
78
u8
expiration)
79
{
80
sif->
current_while_timer
=
vlib_time_now
(vm) + expiration;
81
}
82
83
#endif
/* __LACP_RX_MACHINE_H__ */
84
85
/*
86
* fd.io coding-style-patch-verification: ON
87
*
88
* Local Variables:
89
* eval: (c-set-style "gnu")
90
* End:
91
*/
lacp_rx_action_lacp_disabled
int lacp_rx_action_lacp_disabled(void *, void *)
Definition:
rx_machine.c:311
lacp_rx_machine
lacp_machine_t lacp_rx_machine
Definition:
rx_machine.c:108
lacp_rx_action_defaulted
int lacp_rx_action_defaulted(void *, void *)
Definition:
rx_machine.c:325
vlib_time_now
static f64 vlib_time_now(vlib_main_t *vm)
Definition:
main.h:255
lacp_rx_debug_func
void lacp_rx_debug_func(slave_if_t *sif, int event, int state, lacp_fsm_state_t *transition)
Definition:
rx_machine.c:404
slave_if_t::current_while_timer
f64 current_while_timer
Definition:
node.h:263
u8
unsigned char u8
Definition:
types.h:56
foreach_lacp_rx_sm_state
#define foreach_lacp_rx_sm_state
Definition:
rx_machine.h:38
lacp_rx_sm_state_t
lacp_rx_sm_state_t
Definition:
rx_machine.h:46
state
vhost_vring_state_t state
Definition:
vhost_user.h:120
lacp_rx_action_port_disabled
int lacp_rx_action_port_disabled(void *, void *)
Definition:
rx_machine.c:258
lacp_rx_action_initialize
int lacp_rx_action_initialize(void *, void *)
Definition:
rx_machine.c:241
slave_if_t
Definition:
node.h:193
vm
vlib_main_t * vm
Definition:
buffer.c:312
lacp_fsm_state_t
Definition:
machine.h:26
lacp_rx_action_expired
int lacp_rx_action_expired(void *, void *)
Definition:
rx_machine.c:283
lacp_rx_action_pdu_received
int lacp_rx_action_pdu_received(void *, void *)
vlib_main_t
Definition:
main.h:68
lacp_start_current_while_timer
static void lacp_start_current_while_timer(vlib_main_t *vm, slave_if_t *sif, u8 expiration)
Definition:
rx_machine.h:77
machine.h
lacp_rx_event_t
lacp_rx_event_t
Definition:
rx_machine.h:31
foreach_lacp_rx_event
#define foreach_lacp_rx_event
Definition:
rx_machine.h:22
lacp_machine_t
Definition:
machine.h:40
lacp_rx_action_current
int lacp_rx_action_current(void *, void *)
Definition:
rx_machine.c:364
src
plugins
lacp
rx_machine.h
Generated on Mon Jun 3 2019 18:46:46 for FD.io VPP by
1.8.11