FD.io VPP
v17.01.1-3-gc6833f8
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
ip6_ioam_seqno.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 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 __included_ip6_ioam_seqno_h__
17
#define __included_ip6_ioam_seqno_h__
18
19
#include <
vnet/ip/ip6_packet.h
>
20
#include <
vnet/ip/ip6_hop_by_hop.h
>
21
22
#define SEQ_CHECK_VALUE 0x80000000
/* for seq number wraparound detection */
23
24
#define SEQNO_WINDOW_SIZE 2048
25
#define SEQNO_WINDOW_ARRAY_SIZE 64
26
27
typedef
struct
seqno_bitmap_
{
28
u32
window_size
;
29
u32
array_size
;
30
u32
mask
;
31
u32
pad
;
32
u64
highest
;
33
u64
array
[
SEQNO_WINDOW_ARRAY_SIZE
];
/* Will be alloc to array_size */
34
}
seqno_bitmap
;
35
36
typedef
struct
seqno_rx_info_
{
37
u64
rx_packets
;
38
u64
lost_packets
;
39
u64
reordered_packets
;
40
u64
dup_packets
;
41
seqno_bitmap
bitmap
;
42
}
seqno_rx_info
;
43
44
/* This structure is 64-byte aligned */
45
typedef
struct
ioam_seqno_data_
{
46
union
{
47
u32
seq_num
;
/* Useful only for encap node */
48
seqno_rx_info
seqno_rx
;
49
};
50
}
ioam_seqno_data
;
51
52
typedef
struct
ioam_seqno_data_main_t_
{
53
ioam_seqno_data
*
seqno_data
;
54
}
ioam_seqno_data_main_t
;
55
56
void
ioam_seqno_init_bitmap
(
ioam_seqno_data
*data);
57
58
int
ioam_seqno_encap_handler
(
vlib_buffer_t
*b,
ip6_header_t
*ip,
59
ip6_hop_by_hop_option_t
*opt);
60
61
int
62
ioam_seqno_decap_handler
(
vlib_buffer_t
*b,
ip6_header_t
*ip,
63
ip6_hop_by_hop_option_t
*opt);
64
65
void
ioam_analyze_seqno
(
seqno_rx_info
*ppc_rx,
u64
seqno);
66
67
u8
*
68
show_ioam_seqno_cmd_fn
(
u8
*s,
ioam_seqno_data
*seqno_data,
u8
enc);
69
70
#endif
seqno_rx_info_::dup_packets
u64 dup_packets
Definition:
ip6_ioam_seqno.h:40
ioam_seqno_decap_handler
int ioam_seqno_decap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
Definition:
ip6_ioam_seqno.c:72
ioam_analyze_seqno
void ioam_analyze_seqno(seqno_rx_info *ppc_rx, u64 seqno)
Definition:
ip6_ioam_seqno_analyse.c:76
seqno_rx_info_::lost_packets
u64 lost_packets
Definition:
ip6_ioam_seqno.h:38
ioam_seqno_data
struct ioam_seqno_data_ ioam_seqno_data
ip6_packet.h
ioam_seqno_data_::seqno_rx
seqno_rx_info seqno_rx
Definition:
ip6_ioam_seqno.h:48
seqno_rx_info_::rx_packets
u64 rx_packets
Definition:
ip6_ioam_seqno.h:37
u64
unsigned long u64
Definition:
types.h:89
ioam_seqno_data_main_t_::seqno_data
ioam_seqno_data * seqno_data
Definition:
ip6_ioam_seqno.h:53
SEQNO_WINDOW_ARRAY_SIZE
#define SEQNO_WINDOW_ARRAY_SIZE
Definition:
ip6_ioam_seqno.h:25
seqno_bitmap_
Definition:
ip6_ioam_seqno.h:27
ioam_seqno_data_::seq_num
u32 seq_num
Definition:
ip6_ioam_seqno.h:47
seqno_rx_info_::reordered_packets
u64 reordered_packets
Definition:
ip6_ioam_seqno.h:39
ip6_hop_by_hop.h
seqno_bitmap_::mask
u32 mask
Definition:
ip6_ioam_seqno.h:30
vlib_buffer_t
Definition:
buffer.h:73
ip6_hop_by_hop_option_t
Definition:
ip6_hop_by_hop_packet.h:29
ioam_seqno_encap_handler
int ioam_seqno_encap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
Definition:
ip6_ioam_seqno.c:53
u32
unsigned int u32
Definition:
types.h:88
seqno_rx_info
struct seqno_rx_info_ seqno_rx_info
ioam_seqno_data_main_t_
Definition:
ip6_ioam_seqno.h:52
ip6_header_t
Definition:
ip6_packet.h:321
ioam_seqno_data_
Definition:
ip6_ioam_seqno.h:45
u8
unsigned char u8
Definition:
types.h:56
show_ioam_seqno_cmd_fn
u8 * show_ioam_seqno_cmd_fn(u8 *s, ioam_seqno_data *seqno_data, u8 enc)
Definition:
ip6_ioam_seqno.c:88
seqno_rx_info_
Definition:
ip6_ioam_seqno.h:36
seqno_bitmap_::pad
u32 pad
Definition:
ip6_ioam_seqno.h:31
ioam_seqno_data_main_t
struct ioam_seqno_data_main_t_ ioam_seqno_data_main_t
seqno_bitmap
struct seqno_bitmap_ seqno_bitmap
ioam_seqno_init_bitmap
void ioam_seqno_init_bitmap(ioam_seqno_data *data)
Definition:
ip6_ioam_seqno.c:33
seqno_bitmap_::array_size
u32 array_size
Definition:
ip6_ioam_seqno.h:29
seqno_rx_info_::bitmap
seqno_bitmap bitmap
Definition:
ip6_ioam_seqno.h:41
seqno_bitmap_::highest
u64 highest
Definition:
ip6_ioam_seqno.h:32
seqno_bitmap_::array
u64 array[SEQNO_WINDOW_ARRAY_SIZE]
Definition:
ip6_ioam_seqno.h:33
seqno_bitmap_::window_size
u32 window_size
Definition:
ip6_ioam_seqno.h:28
plugins
ioam-plugin
ioam
encap
ip6_ioam_seqno.h
Generated on Mon May 15 2017 22:01:32 for FD.io VPP by
1.8.11