[PATCH net] ibmvnic: Fix error recovery on login failure

2018-07-16 Thread John Allen
y reset in. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d0e196b..c1e23bb 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1825,8 +1825,8 @@ static int do_reset(struct ibmvnic_adapte

[PATCH net] ibmvnic: Disable irqs before exiting reset from closed state

2018-03-30 Thread John Allen
irqs from being enabled twice in this case and reporting a number of noisy warning traces. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 0389a7a..b492af6 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net

[PATCH net-next] ibmvnic: Fix reset return from closed state

2018-03-14 Thread John Allen
cific cases, we don't exit the reset routine at all and resetting will cause a closed device to be opened. This patch fixes the problem by unconditionally checking the reset_state and correctly setting the adapter state before returning. Signed-off-by: John Allen --- diff --git a/drivers/net/et

Re: [PATCH net-next v2] ibmvnic: Bail from ibmvnic_open if driver is already open

2018-03-12 Thread John Allen
On 03/12/2018 03:10 PM, Andrew Lunn wrote: >> The problem here is that our routine to change the mtu does a full reset on >> the driver meaning that in the process we go from effectively "open" to >> "closed" to "open" again. >> >> Consider the scenario where we change the mtu by running "ifdown >

Re: [PATCH net-next v2] ibmvnic: Bail from ibmvnic_open if driver is already open

2018-03-12 Thread John Allen
On 03/12/2018 02:33 PM, Andrew Lunn wrote: > On Mon, Mar 12, 2018 at 02:19:52PM -0500, John Allen wrote: >> If the driver is already in the "open" state, don't attempt the procedure >> for opening the driver. >> >> Signed-off-by: John Allen >> ---

[PATCH net-next v2] ibmvnic: Bail from ibmvnic_open if driver is already open

2018-03-12 Thread John Allen
If the driver is already in the "open" state, don't attempt the procedure for opening the driver. Signed-off-by: John Allen --- v2: Unlock reset_lock mutex before returning. diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 7be4b06..9a5e8

Re: [PATCH net-next] ibmvnic: Bail from ibmvnic_open if driver is already open

2018-03-12 Thread John Allen
On 03/12/2018 02:01 PM, Andrew Lunn wrote: > On Mon, Mar 12, 2018 at 01:47:51PM -0500, John Allen wrote: >> If the driver is already in the "open" state, don't attempt the procedure >> for opening the driver. >> >> Signed-off-by: John Allen >&

[PATCH net-next] ibmvnic: Bail from ibmvnic_open if driver is already open

2018-03-12 Thread John Allen
If the driver is already in the "open" state, don't attempt the procedure for opening the driver. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 7be4b06..98c4f75 100644 --- a/drivers/net/ethernet/ibm/

[PATCH net] ibmvnic: Fix rx queue cleanup for non-fatal resets

2018-02-06 Thread John Allen
we are, continues normal polling operation. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 8c3058d5d191..2a26b2ece7fe 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1831,7

[PATCH net v2 3/3] ibmvnic: Allocate and request vpd in init_resources

2018-01-18 Thread John Allen
it will be symmetrically freed during release resources. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index bb56460..f0dbb76 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -867,7

[PATCH net v2 2/3] ibmvnic: Revert to previous mtu when unsupported value requested

2018-01-18 Thread John Allen
tu to some completely different value most of the time. This patch fixes the issue by logging in with the previously used mtu value and printing an error message saying that the given mtu is unsupported. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/driver

[PATCH net v2 1/3] ibmvnic: Modify buffer size and number of queues on failover

2018-01-18 Thread John Allen
server, attempt to free long term buffers that are no longer there, or not free long term buffers that should be freed. This patch resolves the issue by checking whether any of these values change, and if so perform the necessary re-allocations. Signed-off-by: John Allen --- v2: Added the line to

[PATCH net v2 0/3] ibmvnic: Reset behavior fixes

2018-01-18 Thread John Allen
variables to the adapter struct to track how many rx/tx pools have actually been allocated and modify the release pools routines to use these values rather than the possibly incorrect req_rx/tx_queues values. John Allen (3): ibmvnic: Modify buffer size and number of queues on failover ibmvnic

Re: [PATCH 1/3 net] ibmvnic: Modify buffer size on failover

2018-01-15 Thread John Allen
On 01/15/2018 03:11 PM, John Allen wrote: > Using newer backing devices can cause the required padding at the end of > rx buffers to change. Currently we assume that the size of buffers will > never change, but in the case that we failover from a backing device with > smaller padding

[PATCH 3/3 net] ibmvnic: Allocate and request vpd in init_resources

2018-01-15 Thread John Allen
it will be symmetrically freed during release resources. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index bb56460..f0dbb76 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -867,7

[PATCH 2/3 net] ibmvnic: Revert to previous mtu when unsupported value requested

2018-01-15 Thread John Allen
tu to some completely different value most of the time. This patch fixes the issue by logging in with the previously used mtu value and printing an error message saying that the given mtu is unsupported. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/driver

[PATCH 1/3 net] ibmvnic: Modify buffer size on failover

2018-01-15 Thread John Allen
requirement, the vnic server will fail to post rx buffers due to inadequate space in our rx pool. This patch fixes the issue by checking whether or not the buffer size has changed on a reset and if it has, reallocate the buffer. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c

[PATCH 0/3 net] ibmvnic: Reset behavior fixes

2018-01-15 Thread John Allen
ix pending MAC address changes" which is currently submitted awaiting acceptance to the net tree. John Allen (3): ibmvnic: Modify buffer size on failover ibmvnic: Revert to previous mtu when unsupported value requested ibmvnic: Allocate and request vpd in init_resources drivers/n

Re: [PATCH net] ibmvnic: Fix pending MAC address changes

2018-01-15 Thread John Allen
ED" state before setting the > MAC address. > > Fixes: c26eba03e407 ("ibmvnic: Update reset infrastructure to support tunable > parameters") > Signed-off-by: Thomas Falcon > --- Reviewed-by: John Allen > drivers/net/ethernet/ibm/ibmvnic.c | 13 +++-

[PATCH v3 net-next 2/2] ibmvnic: Fix failover error path for non-fatal resets

2017-10-26 Thread John Allen
hit this case. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 3d02801..d0cff28 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1507,7 +1507,7 @@ static int do_reset(struct

[PATCH v3 net-next 1/2] ibmvnic: Update reset infrastructure to support tunable parameters

2017-10-26 Thread John Allen
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: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvn

[PATCH v3 net-next 0/2] ibmvnic: Tunable parameter support

2017-10-26 Thread John Allen
them. John Allen (2): ibmvnic: Update reset infrastructure to support tunable parameters ibmvnic: Fix failover error path for non-fatal resets drivers/net/ethernet/ibm/ibmvnic.c | 217 - drivers/net/ethernet/ibm/ibmvnic.h | 26 - 2 files chan

[PATCH v2 net-next 2/2] ibmvnic: Fix failover error path for non-fatal resets

2017-10-23 Thread John Allen
hit this case. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index c2c4a5b..fa6b2ad 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1506,7 +1506,7 @@ static int do_reset(struct

[PATCH v2 net-next 1/2] ibmvnic: Update reset infrastructure to support tunable parameters

2017-10-23 Thread John Allen
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: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvn

[PATCH v2 net-next 0/2] ibmvnic: Tunable parameter support

2017-10-23 Thread John Allen
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 John Allen (2): ibmvnic: Update reset infrastructure to support tu

[PATCH net-next 2/2] ibmvnic: Fix failover error path for non-fatal resets

2017-10-20 Thread John Allen
have hit this case. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index ebbb083..c914d5a 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1452,7 +1452,7 @@ static int do_reset(struct

[PATCH net-next 1/2] ibmvnic: Update reset infrastructure to support tunable parameters

2017-10-20 Thread John Allen
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: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvn

[PATCH net-next 0/2] ibmvnic: Tunable parameter support

2017-10-20 Thread John Allen
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. John Allen (2): ibmvnic: Update reset infrastructure to support tunable parameters ibmvnic: Fix failover error path for non-fatal

[PATCH net-next] ibmvnic: Improve output for unsupported stats

2017-10-02 Thread John Allen
statistic is not supported. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index cb8182f..b8ad2db 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1862,6 +1862,7 @@ static void

[PATCH net-next] ibmvnic: Report rx buffer return codes as netdev_dbg

2017-08-07 Thread John Allen
Reporting any return code for a receive buffer as an "rx error" only produces alarming noise and the only values that have been observed to be used in this field are not error conditions. Change this to a netdev_dbg with a more descriptive message. Signed-off-by: John Allen --- di

[PATCH net-next 4/4] ibmvnic: Implement .get_channels

2017-08-02 Thread John Allen
Implement .get_channels (ethtool -l) functionality Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 1cc5db94e40f..130aee7b5c32 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next 3/4] ibmvnic: Implement .get_ringparam

2017-08-02 Thread John Allen
Implement .get_ringparam (ethtool -g) functionality Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 285ea23bac6a..1cc5db94e40f 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next 2/4] ibmvnic: Convert vnic server reported statistics to cpu endian

2017-08-02 Thread John Allen
The vnic server reports the statistics buffer in big endian format and must be converted to cpu endian in order to be displayed correctly on little endian lpars. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a264c6992328

[PATCH net-next 1/4] ibmvnic: Implement per-queue statistics reporting

2017-08-02 Thread John Allen
Add counters to report number of packets, bytes, and dropped packets for each transmit queue and number of packets, bytes, and interrupts for each receive queue. Modify ethtool callbacks to report the new statistics. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next 0/4] ibmvnic: Improve ethtool functionality

2017-08-02 Thread John Allen
This patch series improves ibmvnic ethtool functionality by adding support for ethtool -l and -g options, correcting existing statistics reporting, and augmenting the existing statistics with counters for each tx and rx queue. John Allen (4): ibmvnic: Implement per-queue statistics reporting

[PATCH net-next] ibmvnic: Check for transport event on driver resume

2017-07-24 Thread John Allen
s the issue by removing the calls to kick the receive interrupts handlers and instead directly invoking the main crq interrupt handler. This will ensure that we see the transport event necessary to properly resume the driver. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic

[PATCH net-next] ibmvnic: Return from ibmvnic_resume if not in VNIC_OPEN state

2017-06-19 Thread John Allen
If the ibmvnic driver is not in the VNIC_OPEN state, return from ibmvnic_resume callback. If we are not in the VNIC_OPEN state, interrupts may not be initialized and directly calling the interrupt handler will cause a crash. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm

[PATCH net] ibmvnic: Return failure on attempted mtu change

2017-06-06 Thread John Allen
Changing the mtu is currently not supported in the ibmvnic driver. Implement .ndo_change_mtu in the driver so that attempting to use ifconfig to change the mtu will fail and present the user with an error message. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b

[PATCH net-next] ibmvnic: Track state of adapter napis

2017-05-05 Thread John Allen
Track the state of ibmvnic napis. The driver can get into states where it can be reset when napis are already disabled and attempting to disable them again will cause the driver to hang. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm

[PATCH net 3/4] ibmvnic: Move ibmvnic adapter intialization to its own routine

2017-03-17 Thread John Allen
The intialization of the ibmvnic driver with respect to the virtual server it connects to should be moved to its own routine. This will alolow the driver to initiate this process from places outside of the drivers probe routine. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic

[PATCH net 2/4] ibmvnic: Move login to its own routine

2017-03-17 Thread John Allen
Move the code that handles login and renegotiation of ibmvnic capabilities to its own routine. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.

[PATCH net 4/4] ibmvnic: Correct ibmvnic handling of device open/close

2017-03-17 Thread John Allen
When closing the ibmvnic device we need to release the resources used in communicating to the virtual I/O server. These need to be re-negotiated with the server at open time. This patch moves the releasing of resources a separate routine and updates the open and close handlers to release all resou

[PATCH net 0/4] ibmvnic: Initialization fixes and improvements

2017-03-17 Thread John Allen
These patches resolve issues with the ibmvnic initialization process. John Allen (1): ibmvnic: Move login and queue negotiation into ibmvnic_open Nathan Fontenot (3): ibmvnic: Move login to its own routine ibmvnic: Move ibmvnic adapter intialization to its own routine ibmvnic: Correct

[PATCH net 1/4] ibmvnic: Move login and queue negotiation into ibmvnic_open

2017-03-17 Thread John Allen
LINK_STATE_UP occur within the 30s window. Signed-off-by: John Allen --- drivers/net/ethernet/ibm/ibmvnic.c | 88 +++--- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index

[PATCH net] ibmvnic: Start completion queue negotiation at server-provided optimum values

2016-11-07 Thread John Allen
reduce the number of times this needs to happen and will prevent driver probe timeout on systems using large numbers of ibmvnic client devices per vnic port. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d54405b4..ee66164

Re: [PATCH net 3/4] ibmvnic: simplify and improve driver probe function

2016-07-07 Thread John Allen
On 07/06/2016 03:35 PM, Thomas Falcon wrote: > @@ -3560,6 +3608,7 @@ static const struct file_operations ibmvnic_dump_ops = { > > static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id) > { > + unsigned long timeout = msecs_to_jiffies(3); > struct ibmvnic_adap

Re: [PATCH net-next] ibmvnic: Defer tx completion processing using a wait queue

2016-04-12 Thread John Allen
On 04/12/2016 03:12 PM, Eric Dumazet wrote: > On Tue, 2016-04-12 at 14:38 -0500, John Allen wrote: >> Moves tx completion processing out of interrupt context, deferring work >> using a wait queue. With this work now deferred, we must account for the >> possibility that skbs ca

[PATCH net-next] ibmvnic: Defer tx completion processing using a wait queue

2016-04-12 Thread John Allen
, ibmvnic_xmit will return NETDEV_TX_BUSY and stop the current tx queue. Subsequently, the queue will be restarted in ibmvnic_complete_tx when all pending tx completion requests have been cleared. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm

[PATCH net-next] ibmvnic: Enable use of multiple tx/rx scrqs

2016-04-06 Thread John Allen
requesting fewer scrqs. Signed-off-by: John Allen --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 21bccf6..6e9b91d 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -800,11 +800,12 @@ static int ibmvnic_xmit(struct