Commit bc474751 authored by David S. Miller's avatar David S. Miller

Merge branch 'ibmvnic-Tunable-parameter-support'

John Allen says:

====================
ibmvnic: Tunable parameter support

This series implements support for changing tunable parameters such as the
mtu, number of tx/rx queues, and number of buffers per queue via ethtool
and ifconfig.

v2: -Fix conflict with Tom's recently applied TSO/SG patches
v3: -Initialize rc in __ibmvnic_reset fixing build warning
    -Fix buggy behavior with pending mac changes. Use boolean flag
     to track if mac change is needed on open rather than relying on
     the desired->mac pointer.
    -Directly include tunable structs in the adapter struct rather
     than keeping pointers, eliminating the need to directly allocate
     them.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c9d0dc4b 2a1bf511
This diff is collapsed.
......@@ -30,6 +30,8 @@
#define IBMVNIC_DRIVER_VERSION "1.0.1"
#define IBMVNIC_INVALID_MAP -1
#define IBMVNIC_STATS_TIMEOUT 1
#define IBMVNIC_INIT_FAILED 2
/* basic structures plus 100 2k buffers */
#define IBMVNIC_IO_ENTITLEMENT_DEFAULT 610305
......@@ -42,6 +44,9 @@
#define IBMVNIC_TSO_BUF_SZ 65536
#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 {
__be32 len;
__be32 version;
......@@ -945,13 +950,23 @@ enum ibmvnic_reset_reason {VNIC_RESET_FAILOVER = 1,
VNIC_RESET_MOBILITY,
VNIC_RESET_FATAL,
VNIC_RESET_NON_FATAL,
VNIC_RESET_TIMEOUT};
VNIC_RESET_TIMEOUT,
VNIC_RESET_CHANGE_PARAM};
struct ibmvnic_rwi {
enum ibmvnic_reset_reason reset_reason;
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 vio_dev *vdev;
struct net_device *netdev;
......@@ -1012,6 +1027,10 @@ struct ibmvnic_adapter {
struct completion fw_done;
int fw_done_rc;
struct completion reset_done;
int reset_done_rc;
bool wait_for_reset;
/* partner capabilities */
u64 min_tx_queues;
u64 min_rx_queues;
......@@ -1056,4 +1075,9 @@ struct ibmvnic_adapter {
struct work_struct ibmvnic_reset;
bool resetting;
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