netdevsim: add switch_id attribute

Grouping netdevsim devices into "ASICs" will soon be supported.
Add switch_id attribute to all netdevsims.  For now each netdevsim
will have its switch_id matching the device id.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Jakub Kicinski
2018-07-17 10:53:19 -07:00
committed by Daniel Borkmann
parent c23e014a4b
commit 5f07655b80
2 changed files with 25 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ struct netdevsim {
struct u64_stats_sync syncp;
struct device dev;
u32 switch_id;
struct dentry *ddir;