Commit c26eba03 authored by John Allen's avatar John Allen Committed by David S. Miller

ibmvnic: Update reset infrastructure to support tunable parameters

Update ibmvnic reset infrastructure to include a new reset option that will
allow changing of tunable parameters. There currently is no way to request
different capabilities from the vnic server on the fly so this patch
achieves this by resetting the driver and attempting to log in with the
requested changes. If the reset operation fails, the old values of the
tunable parameters are stored in the "fallback" struct and we attempt to
login with the fallback values.
Signed-off-by: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c9d0dc4b
This diff is collapsed.
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
#define IBMVNIC_TSO_BUF_SZ 65536 #define IBMVNIC_TSO_BUF_SZ 65536
#define IBMVNIC_TSO_BUFS 64 #define IBMVNIC_TSO_BUFS 64
#define IBMVNIC_MAX_LTB_SIZE ((1 << (MAX_ORDER - 1)) * PAGE_SIZE)
#define IBMVNIC_BUFFER_HLEN 500
struct ibmvnic_login_buffer { struct ibmvnic_login_buffer {
__be32 len; __be32 len;
__be32 version; __be32 version;
...@@ -945,13 +948,23 @@ enum ibmvnic_reset_reason {VNIC_RESET_FAILOVER = 1, ...@@ -945,13 +948,23 @@ enum ibmvnic_reset_reason {VNIC_RESET_FAILOVER = 1,
VNIC_RESET_MOBILITY, VNIC_RESET_MOBILITY,
VNIC_RESET_FATAL, VNIC_RESET_FATAL,
VNIC_RESET_NON_FATAL, VNIC_RESET_NON_FATAL,
VNIC_RESET_TIMEOUT}; VNIC_RESET_TIMEOUT,
VNIC_RESET_CHANGE_PARAM};
struct ibmvnic_rwi { struct ibmvnic_rwi {
enum ibmvnic_reset_reason reset_reason; enum ibmvnic_reset_reason reset_reason;
struct list_head list; struct list_head list;
}; };
struct ibmvnic_tunables {
u64 rx_queues;
u64 tx_queues;
u64 rx_entries;
u64 tx_entries;
u64 mtu;
struct sockaddr mac;
};
struct ibmvnic_adapter { struct ibmvnic_adapter {
struct vio_dev *vdev; struct vio_dev *vdev;
struct net_device *netdev; struct net_device *netdev;
...@@ -1012,6 +1025,10 @@ struct ibmvnic_adapter { ...@@ -1012,6 +1025,10 @@ struct ibmvnic_adapter {
struct completion fw_done; struct completion fw_done;
int fw_done_rc; int fw_done_rc;
struct completion reset_done;
int reset_done_rc;
bool wait_for_reset;
/* partner capabilities */ /* partner capabilities */
u64 min_tx_queues; u64 min_tx_queues;
u64 min_rx_queues; u64 min_rx_queues;
...@@ -1056,4 +1073,9 @@ struct ibmvnic_adapter { ...@@ -1056,4 +1073,9 @@ struct ibmvnic_adapter {
struct work_struct ibmvnic_reset; struct work_struct ibmvnic_reset;
bool resetting; bool resetting;
bool napi_enabled, from_passive_init; bool napi_enabled, from_passive_init;
bool mac_change_pending;
struct ibmvnic_tunables desired;
struct ibmvnic_tunables fallback;
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment