netdevsim: generate random switch id instead of using dev id
Current implementation of parent_id/switch_id does not follow the original idea of being unique. The values are "0", "1", etc. Instead of that, generate 32 random bytes. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d514f41e79
commit
514cf64cc5
@@ -141,6 +141,7 @@ struct nsim_dev {
|
||||
u32 prog_id_gen;
|
||||
struct list_head bpf_bound_progs;
|
||||
struct list_head bpf_bound_maps;
|
||||
struct netdev_phys_item_id switch_id;
|
||||
};
|
||||
|
||||
struct nsim_dev *
|
||||
|
Reference in New Issue
Block a user