Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve interface naming for NICs ports sharing same PCI ID
[vpp.git]
/
vnet
/
vnet
/
ip
/
ip_input_acl.c
diff --git
a/vnet/vnet/ip/ip_input_acl.c
b/vnet/vnet/ip/ip_input_acl.c
index
75aa9ef
..
eaf7f34
100644
(file)
--- a/
vnet/vnet/ip/ip_input_acl.c
+++ b/
vnet/vnet/ip/ip_input_acl.c
@@
-71,6
+71,9
@@
ip_inacl_inline (vlib_main_t * vm,
u32 chain_hits = 0;
input_acl_table_id_t tid;
vlib_node_runtime_t * error_node;
u32 chain_hits = 0;
input_acl_table_id_t tid;
vlib_node_runtime_t * error_node;
+ u32 n_next_nodes;
+
+ n_next_nodes = node->n_next_nodes;
if (is_ip4)
{
if (is_ip4)
{
@@
-228,12
+231,13
@@
ip_inacl_inline (vlib_main_t * vm,
table_index0 = vnet_buffer(b0)->l2_classify.table_index;
e0 = 0;
t0 = 0;
table_index0 = vnet_buffer(b0)->l2_classify.table_index;
e0 = 0;
t0 = 0;
-
vnet_get_config_data (am->vnet_config_main[tid],
vnet_get_config_data (am->vnet_config_main[tid],
- &
vnet_buffer(b0)->ip.
current_config_index,
+ &
b0->
current_config_index,
&next0,
/* # bytes of config data */ 0);
&next0,
/* # bytes of config data */ 0);
+ vnet_buffer(b0)->l2_classify.opaque_index = ~0;
+
if (PREDICT_TRUE(table_index0 != ~0))
{
hash0 = vnet_buffer(b0)->l2_classify.hash;
if (PREDICT_TRUE(table_index0 != ~0))
{
hash0 = vnet_buffer(b0)->l2_classify.hash;
@@
-243,9
+247,11
@@
ip_inacl_inline (vlib_main_t * vm,
now);
if (e0)
{
now);
if (e0)
{
+ vnet_buffer(b0)->l2_classify.opaque_index
+ = e0->opaque_index;
vlib_buffer_advance (b0, e0->advance);
vlib_buffer_advance (b0, e0->advance);
- next0 = (e0->next_index <
ACL_NEXT_INDEX_N_NEXT
)?
+ next0 = (e0->next_index <
n_next_nodes
)?
e0->next_index:next0;
hits++;
e0->next_index:next0;
hits++;
@@
-267,7
+273,7
@@
ip_inacl_inline (vlib_main_t * vm,
t0->next_table_index);
else
{
t0->next_table_index);
else
{
- next0 = (t0->miss_next_index <
ACL_NEXT_INDEX_N_NEXT
)?
+ next0 = (t0->miss_next_index <
n_next_nodes
)?
t0->miss_next_index:next0;
misses++;
t0->miss_next_index:next0;
misses++;
@@
-287,8
+293,10
@@
ip_inacl_inline (vlib_main_t * vm,
(t0, (u8 *) h0, hash0, now);
if (e0)
{
(t0, (u8 *) h0, hash0, now);
if (e0)
{
+ vnet_buffer(b0)->l2_classify.opaque_index
+ = e0->opaque_index;
vlib_buffer_advance (b0, e0->advance);
vlib_buffer_advance (b0, e0->advance);
- next0 = (e0->next_index <
ACL_NEXT_INDEX_N_NEXT
)?
+ next0 = (e0->next_index <
n_next_nodes
)?
e0->next_index:next0;
hits++;
chain_hits++;
e0->next_index:next0;
hits++;
chain_hits++;
@@
-361,6
+369,8
@@
VLIB_REGISTER_NODE (ip4_inacl_node) = {
},
};
},
};
+VLIB_NODE_FUNCTION_MULTIARCH (ip4_inacl_node, ip4_inacl)
+
static uword
ip6_inacl (vlib_main_t * vm,
vlib_node_runtime_t * node,
static uword
ip6_inacl (vlib_main_t * vm,
vlib_node_runtime_t * node,
@@
-384,6
+394,8
@@
VLIB_REGISTER_NODE (ip6_inacl_node) = {
},
};
},
};
+VLIB_NODE_FUNCTION_MULTIARCH (ip6_inacl_node, ip6_inacl)
+
static clib_error_t *
ip_inacl_init (vlib_main_t * vm)
{
static clib_error_t *
ip_inacl_init (vlib_main_t * vm)
{