aboutsummaryrefslogtreecommitdiffstats
path: root/topologies/available/vagrant.yaml
blob: b2a444efc91d1d07be56d0423bceabdd7ecec9df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
metadata:
  version: 0.1
  schema:
    - resources/topology_schemas/3_node_topology.sch.yaml
    - resources/topology_schemas/topology.sch.yaml
  tags: [vagrant, 3-node]

nodes:
  TG:
    type: TG
    host: "192.168.255.100"
    arch: x86_64
    port: 22
    username: csit
    password: csit
    interfaces:
      port1:
        mac_address: ""
        pci_address: "0000:00:09.0"
        link: link0
        driver: e1000
      port2:
        mac_address: ""
        pci_address: "0000:00:0a.0"
        link: link0
        driver: e1000
      port3:
        mac_address: ""
        pci_address: "0000:00:10.0"
        link: link1
        driver: e1000
      port4:
        mac_address: ""
        pci_address: "0000:00:11.0"
        link: link4
        driver: e1000
      port5:
        mac_address: ""
        pci_address: "0000:00:12.0"
        link: link2
        driver: e1000
      port6:
        mac_address: ""
        pci_address: "0000:00:13.0"
        link: link5
        driver: e1000
  DUT1:
    type: DUT
    host: "192.168.255.101"
    arch: x86_64
    port: 22
    username: csit
    password: csit
    interfaces:
      port1:
        mac_address: ""
        pci_address: "0000:00:09.0"
        link: link1
        driver: e1000
      port2:
        mac_address: ""
        pci_address: "0000:00:0a.0"
        link: link4
        driver: e1000
      port3:
        mac_address: ""
        pci_address: "0000:00:10.0"
        link: link3
        driver: e1000
      port4:
        mac_address: ""
        pci_address: "0000:00:11.0"
        link: link6
        driver: e1000
  DUT2:
    type: DUT
    host: "192.168.255.102"
    arch: x86_64
    port: 22
    username: csit
    password: csit
    interfaces:
      port1:
        mac_address: ""
        pci_address: "0000:00:09.0"
        link: link2
        driver: e1000
      port2:
        mac_address: ""
        pci_address: "0000:00:0a.0"
        link: link5
        driver: e1000
      port3:
        mac_address: ""
        pci_address: "0000:00:10.0"
        link: link3
        driver: e1000
      port4:
        mac_address: ""
        pci_address: "0000:00:11.0"
        link: link6
        driver: e1000
">prev->flags |= VLIB_BUFFER_NEXT_PRESENT; } if (sm->last_buffer != ~0) { last = vlib_get_buffer (vm, sm->last_buffer); s->buffer = vlib_buffer_get_current (last); s->current_buffer_index = 0; ASSERT (last->current_data == s->current_buffer_index); } } static void vlib_serialize_rx (serialize_main_header_t * m, serialize_stream_t * s) { vlib_main_t *vm; vlib_serialize_buffer_main_t *sm; vlib_buffer_t *last; sm = uword_to_pointer (s->data_function_opaque, vlib_serialize_buffer_main_t *); vm = sm->vlib_main; if (serialize_stream_is_end_of_stream (s)) return; if (sm->last_buffer != ~0) { last = vlib_get_buffer (vm, sm->last_buffer); if (last->flags & VLIB_BUFFER_NEXT_PRESENT) sm->last_buffer = last->next_buffer; else { vlib_buffer_free (vm, &sm->first_buffer, /* count */ 1); sm->first_buffer = sm->last_buffer = ~0; } } if (sm->last_buffer == ~0) { while (clib_fifo_elts (sm->rx.buffer_fifo) == 0) { sm->rx.ready_one_time_event = vlib_process_create_one_time_event (vm, vlib_current_process (vm), ~0); vlib_process_wait_for_one_time_event (vm, /* no event data */ 0, sm->rx.ready_one_time_event); } clib_fifo_sub1 (sm->rx.buffer_fifo, sm->first_buffer); sm->last_buffer = sm->first_buffer; } ASSERT (sm->last_buffer != ~0); last = vlib_get_buffer (vm, sm->last_buffer); s->current_buffer_index = 0; s->buffer = vlib_buffer_get_current (last); s->n_buffer_bytes = last->current_length; } static void serialize_open_vlib_helper (serialize_main_t * m, vlib_main_t * vm, vlib_serialize_buffer_main_t * sm, uword is_read) { /* Initialize serialize main but save overflow buffer for re-use between calls. */ { u8 *save = m->stream.overflow_buffer; clib_memset (m, 0, sizeof (m[0])); m->stream.overflow_buffer = save; if (save) _vec_len (save) = 0; } sm->first_buffer = sm->last_buffer = ~0; if (is_read) clib_fifo_reset (sm->rx.buffer_fifo); else sm->tx.n_total_data_bytes = 0; sm->vlib_main = vm; m->header.data_function = is_read ? vlib_serialize_rx : vlib_serialize_tx; m->stream.data_function_opaque = pointer_to_uword (sm); } void serialize_open_vlib_buffer (serialize_main_t * m, vlib_main_t * vm, vlib_serialize_buffer_main_t * sm) { serialize_open_vlib_helper (m, vm, sm, /* is_read */ 0); } void unserialize_open_vlib_buffer (serialize_main_t * m, vlib_main_t * vm, vlib_serialize_buffer_main_t * sm) { serialize_open_vlib_helper (m, vm, sm, /* is_read */ 1); } u32 serialize_close_vlib_buffer (serialize_main_t * m) { vlib_serialize_buffer_main_t *sm = uword_to_pointer (m->stream.data_function_opaque, vlib_serialize_buffer_main_t *); vlib_buffer_t *last; serialize_stream_t *s = &m->stream; last = vlib_get_buffer (sm->vlib_main, sm->last_buffer); last->current_length = s->current_buffer_index; if (vec_len (s->overflow_buffer) > 0) { sm->last_buffer = vlib_buffer_add_data (sm->vlib_main, sm->tx.free_list_index, sm->last_buffer, s->overflow_buffer, vec_len (s->overflow_buffer)); _vec_len (s->overflow_buffer) = 0; } return sm->first_buffer; } void unserialize_close_vlib_buffer (serialize_main_t * m) { vlib_serialize_buffer_main_t *sm = uword_to_pointer (m->stream.data_function_opaque, vlib_serialize_buffer_main_t *); if (sm->first_buffer != ~0) vlib_buffer_free_one (sm->vlib_main, sm->first_buffer); clib_fifo_reset (sm->rx.buffer_fifo); if (m->stream.overflow_buffer) _vec_len (m->stream.overflow_buffer) = 0; } /** @endcond */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */