Hi, mgradzki:
vpp-classifier-context will out of order when hc2vpp restart, this will impact classify-table’s next_table attribute.
define classify_add_del_table
{
u32 client_index;
u32 context;
u8 is_add;
u8 del_chain;
u32 table_index;
u32 nbuckets;
u32 memory_size;
u32 skip_n_vectors;
u32 match_n_vectors;
u32 next_table_index;
u32 miss_next_index;
u32 current_data_flag;
i32 current_data_offset;
u8 mask[0];
};
When hc2vpp restart,the next_table_index remain last / var/lib/honeycomb/persist/context/data.json,but next_table_index will change when the corresponding table add to vpp.so the leaf next_table will different between before restart and after restart.
I want to order the vpp-classifier-context by index when hc2vpp restart,Could you give me a advice?
Thanks,
Olympus
LOG:
1. start vpp(clean)
2. start hc(clean)
3. add some classify tables,shown as below(/var/lib/honeycomb/persist/context/data.json):
"vpp-classifier-context:vpp-classifier-context": {
"classify-table-context": [
{
"name": "classify-table-8",
"index": 8
},
{
"name": "classify-table-14",
"index": 14
},
{
"name": "classify-table-7",
"index": 7
},
{
"name": "classify-table-15",
"index": 15
},
{
"name": "classify-table-16",
"index": 16
},
{
"name": "classify-table-9",
"index": 9
},
{
"name": "classify-table-4",
"index": 4
},
{
"name": "classify-table-3",
"index": 3
},
{
"name": "classify-table-6",
"index": 6
},
{
"name": "classify-table-5",
"index": 5
},
{
"name": "classify-table-0",
"index": 0
},
{
"name": "classify-table-2",
"index": 2
},
{
"name": "classify-table-1",
"index": 1
},
{
"name": "classify-table-10",
"index": 10
},
{
"name": "classify-table-11",
"index": 11
},
{
"name": "classify-table-12",
"index": 12
},
{
"name": "classify-table-13",
"index": 13
}
]
}
4. restart vpp,hc2vpp then restart, vpp-classifier-context will out of order,shown as below(/var/lib/honeycomb/persist/context/data.json):
},
"vpp-classifier-context:vpp-classifier-context": {
"classify-table-context": [
{
"name": "classify-table-8",
"index": 0
},
{
"name": "classify-table-14",
"index": 10
},
{
"name": "classify-table-7",
"index": 1
},
{
"name": "classify-table-15",
"index": 11
},
{
"name": "classify-table-16",
"index": 12
},
{
"name": "classify-table-9",
"index": 2
},
{
"name": "classify-table-4",
"index": 6
},
{
"name": "classify-table-3",
"index": 7
},
{
"name": "classify-table-6",
"index": 8
},
{
"name": "classify-table-5",
"index": 9
},
{
"name": "classify-table-0",
"index": 3
},
{
"name": "classify-table-2",
"index": 4
},
{
"name": "classify-table-1",
"index": 5
},
{
"name": "classify-table-10",
"index": 13
},
{
"name": "classify-table-11",
"index": 14
},
{
"name": "classify-table-12",
"index": 15
},
{
"name": "classify-table-13",
"index": 16
}
]
}