From 514cf64cc5353929fbfb82ed1bda24588acaf96a Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Thu, 25 Apr 2019 15:59:51 +0200 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/netdevsim/netdevsim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/netdevsim/netdevsim.h') diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h index 4ef44a9538db..17639c7c9032 100644 --- a/drivers/net/netdevsim/netdevsim.h +++ b/drivers/net/netdevsim/netdevsim.h @@ -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 * -- cgit v1.2.3