Commit 103ab8da authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

userspace/wrsw_rtud: report hash/bucket of each entry for rtu_stat

parent e203b814
......@@ -137,6 +137,7 @@ struct filtering_entry {
// (2 words)
int dynamic;
uint16_t hash;
};
/**
......
......@@ -198,6 +198,7 @@ int rtu_fd_create_entry(uint8_t mac[ETH_ALEN], uint16_t vid, uint32_t port_map,
hash = rtu_hash(mac, fid);
// Check HTAB
ent = &rtu_htab[hash][bucket];
ent->hash = (hash << 2) | bucket;
switch(htab_contains(mac, fid, &bucket, &ent)){
case FOUND:
// update
......
......@@ -65,6 +65,7 @@ int rtudexp_get_fd_list(const struct minipc_pd *pd,
list->list[i].spm = ent->port_mask_src;
list->list[i].priority = 0;
list->list[i].dynamic = ent->dynamic;
list->list[i].hash = ent->hash;
}
list->num_rules = i;
......
......@@ -39,6 +39,7 @@ typedef struct
uint32_t spm;
uint8_t priority;
int dynamic;
uint16_t hash;
} rtudexp_fd_entry_t;
typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment