OSDN Git Service

netdevsim: add SR-IOV functionality
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 1 Dec 2017 23:09:01 +0000 (15:09 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 2 Dec 2017 23:27:58 +0000 (00:27 +0100)
commit79579220566cd33fe3b15ce8249c57e10251b258
tree459abfe0795c867ddc395ba8b97cd5dcff090d87
parent417ec26477a5c19abc72dd0298f48ebe5d2db43a
netdevsim: add SR-IOV functionality

dummy driver was extended with VF-related netdev APIs for testing
SR-IOV-related software.  netdevsim did not exist back then.
Implement SR-IOV functionality in netdevsim.  Notable difference
is that since netdevsim has no module parameters, we will actually
create a device with sriov_numvfs attribute for each netdev.
The zero MAC address is accepted as some HW use it to mean any
address is allowed.  Link state is also now validated.

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>
drivers/net/netdevsim/netdev.c
drivers/net/netdevsim/netdevsim.h