Hi Po,
I also have the same question, but when i read the code, i find sth.
The main code is here:
if (PREDICT_TRUE (table_index0 != ~0))
{
hash0 = vnet_buffer (b0)->l2_classify.hash;
t0 = pool_elt_at_index (vcm->tables, table_index0);
e0 = vnet_classify_find_entry (t0, h0, hash0, now);
if (e0)
{
hits++;
printf("flow classify hit!!\n");
}
else
{
misses++;
printf("flow classify miss!!\n");
vnet_classify_add_del_session (vcm, table_index0,
h0, ~0, 0, 0, 0, 0, 1);
/* increment counter */
vnet_classify_find_entry (t0, h0, hash0, now);
}
}
When hitting, it does nothing, or it will create a new session.
but I do not know the purpose of such implementation, it looks like the flow-classify has no effect.
The " set flow classify interface memif0/2 ip4-table 0" and "set int input acl intfc memif0/2 ip4-table 0" must match the classify session we created before.
This is my understanding.