aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/octeon_device.h
diff options
context:
space:
mode:
authorVijaya Mohan Guvva <vijaya.guvva@cavium.com>2017-10-31 16:04:57 -0700
committerDavid S. Miller <davem@davemloft.net>2017-11-01 11:39:52 +0900
commitd4be8ebefb449c43b7daa5c9d23b22cd20c17258 (patch)
treeb02c3df708107a9320d616eaa63013be12d8e3bf /drivers/net/ethernet/cavium/liquidio/octeon_device.h
parentliquidio: switchdev support for LiquidIO NIC (diff)
downloadlinux-dev-d4be8ebefb449c43b7daa5c9d23b22cd20c17258.tar.xz
linux-dev-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 '')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/octeon_device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.h b/drivers/net/ethernet/cavium/liquidio/octeon_device.h
index c97e067a8974..63b0c758a0a6 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_device.h
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.h
@@ -23,6 +23,7 @@
#define _OCTEON_DEVICE_H_
#include <linux/interrupt.h>
+#include <net/devlink.h>
/** PCI VendorId Device Id */
#define OCTEON_CN68XX_PCIID 0x91177d
@@ -396,6 +397,10 @@ struct lio_vf_rep_list {
struct net_device *ndev[CN23XX_MAX_VFS_PER_PF];
};
+struct lio_devlink_priv {
+ struct octeon_device *oct;
+};
+
/** The Octeon device.
* Each Octeon device has this structure to represent all its
* components.
@@ -575,6 +580,8 @@ struct octeon_device {
bool ptp_enable;
struct lio_vf_rep_list vf_rep_list;
+ struct devlink *devlink;
+ enum devlink_eswitch_mode eswitch_mode;
};
#define OCT_DRV_ONLINE 1