diff options
author | Dmytro Linkin <dlinkin@nvidia.com> | 2021-06-02 14:17:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-02 23:08:36 +0200 |
commit | 814b9ce65ec3b53404eeda7a11e1abb4af8d7df3 (patch) | |
tree | 106bf313e35643e9659a294a900f2ca609ab9ecf /drivers/net/netdevsim/netdev.c | |
parent | netdevsim: Disable VFs on nsim_dev_reload_destroy() call (diff) | |
download | linux-814b9ce65ec3b53404eeda7a11e1abb4af8d7df3.tar.xz linux-814b9ce65ec3b53404eeda7a11e1abb4af8d7df3.zip |
netdevsim: Implement port types and indexing
Define type of ports, which netdevsim driver currently operates with as
PF. Define new port type - VF, which will be implemented in following
patches. Add helper functions to distinguish them. Add helper function
to get VF index from port index.
Add port indexing logic where PFs' indexes starts from 0, VFs' - from
NSIM_DEV_VF_PORT_INDEX_BASE.
All ports uses same index pool, which means that PF port may be created
with index from VFs' indexes range.
Maximum number of VFs, which the driver can allocate, is limited by
UINT_MAX - BASE.
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
0 files changed, 0 insertions, 0 deletions