aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/vlib.h
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-11-07 10:29:24 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-11-07 16:46:43 +0000
commit9d3e1b433f394781a55a4c7c39b695d08dd2563f (patch)
treeafb67520df4886c349c8ca3a80613261bc493c7b /src/vlib/vlib.h
parentc9dff181c8d135b95a12297c44bb4aa87b95b21d (diff)
session: fix app attach on error
Type: fix Change-Id: I57b3c76515544ba3655690b37e0dacb47734ba6d Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vlib/vlib.h')
0 files changed, 0 insertions, 0 deletions
d-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
## Development performance test    {#libmemif_devperftest_doc}

Simle test cases using ICMP. icmpr-epoll example app generates and transmits packets over memif interface.

#### TC1: LIB-VPP

Start icmpr-epoll example app and VPP.

VPP-side config:
```
DBGvpp# create memif id 0 master
DBGvpp# set int state memif0/0 up
DBGvpp# set int ip address memif0/0 192.168.1.1/24
```
icmpr-epoll:
```
conn 0 0 1
```
> Last argument specifies interrupt function to use. This function only responds to ARP requests. This is important because, packet generation and transmitting is handled by a separate thread. Calling memif_tx_burst from multiple threads writing on same queue could transmit uninitialized buffers.
Once connection is established, you can send ping from VPP to icmpr-epoll app to learn its mac address.
```
DBGvpp# ping 192.168.1.2
```
> There should be no ICMP response. Only ARP response.
Now send ICMP requests from icmpr-epoll:
```
send <index> <num-of-packets> <ip_daddr> <hw_daddr>
send 0 5 192.168.1.1 02:fe:ff:ff:ff:ff
```
this command will create new thread which will generate icmp packets and transmit them over memif connection with specified index. Once the sequence is finished status will be printed.

###### Example results (owerview of test data)

(This test was run with modofication in VPP-memif plugin. The modification disallows memif tx node to allocate last ring buffer)
lib-tx: 200M (if ring full don't drop packets)
vpp-rx: 200M
vpp-tx: 200M - 50K (if ring full drop packets)
lib-rx: =vpp-tx
drop: ~0.025% (full ring)
pps: ~650K
multiple interfaces:
pps: divided
drop: constant

#### TC2: LIB-LIB

This test case will not drop packets if memif ring is full. Instead it will loop until all required packets have been sent.

Start two instances of icmpr-epoll example app.
instance 1:
```
conn 0 1 0
```
instance 2:
```
conn 0 0 1
send 0 5 192.168.1.1 aa:aa:aa:aa:aa:aa
```
> icmpr-epoll example app doesn't check ip or mac address so as long as the format is correct you can type anything as ip_daddr and hw_daddr arguments.

###### Example results (owerview of test data)

lib1-tx: 200M (if ring full don't drop packets)
lib2-rx: 200M
lib2-tx: 200M (if ring full don't drop packets)
lib1-rx: 200M
drop: obsolete
pps: 4.5M
multiple interfaces:
not tested (excpected same as TC1)

#### TC3: LIB-LIB

Start two instances of icmpr-epoll example app.
instance 1:
```
conn 0 1
```
instance 2:
```
conn 0 0 1
send 0 5 192.168.1.1 aa:aa:aa:aa:aa:aa
```

###### Example results (owerview of test data)

lib1-tx: 200M (if ring full don't drop packets)
lib2-rx: 200M
lib2-tx: 169626182 (if ring full drop packets)
lib1-rx: =lib2-tx
drop: ~15%
pps: ~6M
multiple interfaces:
not tested (excpected same as TC1)