summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-07-03 23:29:49 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-07-04 08:43:46 +0000
commiteb9df09085e9807b175c1639d55501db7244618b (patch)
tree8f42aecb65aa3893c9a2976d06b1a31947d50467 /src
parent680f2792128d0535060a3d2641fc5f8b4b9105f7 (diff)
Remove unused members from ip4_fib_t
Change-Id: I8b92652d512bad5d774c7862f9808c306bbeff18 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/fib/ip4_fib.c2
-rw-r--r--src/vnet/fib/ip4_fib.h10
2 files changed, 3 insertions, 9 deletions
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index 4ab6b1bcff6..a3cb682713d 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -129,8 +129,6 @@ ip4_create_fib_with_table_id (u32 table_id,
v4_fib->table_id =
table_id;
fib_table->ft_flow_hash_config = IP_FLOW_HASH_DEFAULT;
- v4_fib->fwd_classify_table_index = ~0;
- v4_fib->rev_classify_table_index = ~0;
fib_table_lock(fib_table->ft_index, FIB_PROTOCOL_IP4, src);
diff --git a/src/vnet/fib/ip4_fib.h b/src/vnet/fib/ip4_fib.h
index 7fc2d3f53c9..ff00b4170c4 100644
--- a/src/vnet/fib/ip4_fib.h
+++ b/src/vnet/fib/ip4_fib.h
@@ -38,6 +38,9 @@
typedef struct ip4_fib_t_
{
+ /** Required for pool_get_aligned */
+ CLIB_CACHE_LINE_ALIGN_MARK(cacheline0);
+
/**
* Mtrie for fast lookups. Hash is used to maintain overlapping prefixes.
* First member so it's in the first cacheline.
@@ -52,13 +55,6 @@ typedef struct ip4_fib_t_
/* Index into FIB vector. */
u32 index;
-
- /* N-tuple classifier indices */
- u32 fwd_classify_table_index;
- u32 rev_classify_table_index;
-
- /* Required for pool_get_aligned */
- CLIB_CACHE_LINE_ALIGN_MARK(cacheline0);
} ip4_fib_t;
extern fib_node_index_t ip4_fib_table_lookup(const ip4_fib_t *fib,
/* 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 */ }
VPP has now been built, installed, and started.

To give it a spin, we can create a tap interface and try a simple ping
(with trace).

Make sure you have run:

$ vagrant ssh

To get to the vagrant VM:

vagrant@localhost:~$

Confirm that vpp is running with

vagrant@localhost:~$ sudo status vpp
vpp start/running, process 25202

To create the tap:

vagrant@localhost:~$ sudo vppctl tap connect foobar
Created tap-0 for Linux tap 'foobar'
vagrant@localhost:~$ sudo vppctl show int

To assign it an ip address (and 'up' the interface):

vagrant@localhost:~$ sudo vppctl set int ip address tap-0 192.168.1.1/24
vagrant@localhost:~$ sudo vppctl set int state tap-0 up

To turn on packet tracing for the tap interface:
vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10

Now, to set up and try the other end:
vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar
vagrant@localhost:~$ ping -c 3 192.168.1.1

To look at the trace:
vagrant@localhost:~$ sudo vppctl show trace

And to stop tracing:

vagrant@localhost:~$ sudo vppctl clear trace

Other fun things to look at:

The vlib packet processing graph:
vagrant@localhost:~$ sudo vppctl show vlib graph

which will produce output like:

           Name                      Next                    Previous
ip4-icmp-input                  error-punt [0]               ip4-local
                                ip4-icmp-echo-request [1]
                                vpe-icmp4-oam [2]

To read this, the first column (Name) is the name of the node.
The second column (Next) is the name of the children of that node.
The third column (Previous) is the name of the parents of this node.

To see this README again:
cat /vagrant/README