Dear vpp folks,

There is an ambiguity for me in 'multi_acl_match_get_applied_ace_index'
function in 'hash_lookup.c' when port-range check is true.
After finding an ace with matched port range, why we do not assign
curr_index to curr_match_index?
The following code snippet  is the lines I refered above.

u32
<https://docs.fd.io/vpp/17.07/d9/d49/types_8h.html#a10e94b422ef0c20dcdec20d31a1f5049>
curr_index = result_val->applied_entry_index;
129  while ((curr_index != ~0) && !match_portranges
<https://docs.fd.io/vpp/17.07/d8/dec/hash__lookup_8c.html#a97b9b3e403fd288a38db607cd86b63f6>(am,
match, curr_index)) {
130  /* while no match and there are more entries, walk... */
131  applied_hash_ace_entry_t
<https://docs.fd.io/vpp/17.07/de/d8e/structapplied__hash__ace__entry__t.html>
*pae = vec_elt_at_index
<https://docs.fd.io/vpp/17.07/dc/d5e/vec__bootstrap_8h.html#a341643ade1bab025cfe88e19cc1742f7>
((*applied_hash_aces),curr_index);
132  DBG
<https://docs.fd.io/vpp/17.07/de/df0/hash__lookup__private_8h.html#ae8924623ca601364965e3d88fb7f40fa>
("entry %d did not portmatch, advancing to %d", curr_index, pae->
next_applied_entry_index
<https://docs.fd.io/vpp/17.07/de/d8e/structapplied__hash__ace__entry__t.html#acf0092ae366166dc7eaa87b0d3c4ca59>
);
133  curr_index = pae->next_applied_entry_index
<https://docs.fd.io/vpp/17.07/de/d8e/structapplied__hash__ace__entry__t.html#acf0092ae366166dc7eaa87b0d3c4ca59>
;
134  }
135  if (curr_index < curr_match_index) {
136  DBG
<https://docs.fd.io/vpp/17.07/de/df0/hash__lookup__private_8h.html#ae8924623ca601364965e3d88fb7f40fa>
("The index %d is the new candidate in portrange matches.", curr_index);
137  curr_match_index = result_val->applied_entry_index

Cheers,
Soroosh
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to