diff options
author | Vijaya Mohan Guvva | 2017-11-01 00:04:57 +0100 |
---|---|---|
committer | David S. Miller | 2017-11-01 03:39:52 +0100 |
commit | d4be8ebefb449c43b7daa5c9d23b22cd20c17258 (patch) | |
tree | b02c3df708107a9320d616eaa63013be12d8e3bf /drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | |
parent | liquidio: switchdev support for LiquidIO NIC (diff) | |
download | kernel-qcow2-linux-d4be8ebefb449c43b7daa5c9d23b22cd20c17258.tar.gz kernel-qcow2-linux-d4be8ebefb449c43b7daa5c9d23b22cd20c17258.tar.xz kernel-qcow2-linux-d4be8ebefb449c43b7daa5c9d23b22cd20c17258.zip |
liquidio: Configure switchdev with devlink
Enable and disable switchdev on SRIOV capable LiquidIO NIC with devlink.
Create representor netdev for each SRIOV VF function on SRIOV enable and
and do the cleanup on SRIOV disable.
Signed-off-by: Vijaya Mohan Guvva <vijaya.guvva@cavium.com>
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c index 67ff7a143e9e..de0c80d150f3 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c @@ -515,6 +515,9 @@ lio_vf_rep_create(struct octeon_device *oct) struct net_device *ndev; int i, num_vfs; + if (oct->eswitch_mode != DEVLINK_ESWITCH_MODE_SWITCHDEV) + return 0; + if (!oct->sriov_info.sriov_enabled) return 0; @@ -599,6 +602,9 @@ lio_vf_rep_destroy(struct octeon_device *oct) struct net_device *ndev; int i; + if (oct->eswitch_mode != DEVLINK_ESWITCH_MODE_SWITCHDEV) + return; + if (!oct->sriov_info.sriov_enabled) return; |