[PATCH net] net/ibmvnic: Fix RTNL deadlock during device reset

2018-11-30 Thread Thomas Falcon
e the RTNL lock again. Fixes: a5681e20b541 ("net/ibmnvic: Fix deadlock problem in reset") Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet

[PATCH net-next 2/3] ibmvnic: Introduce driver limits for ring sizes

2018-09-28 Thread Thomas Falcon
Introduce driver-defined maximums for queue ring sizes. Devices available for IBM vNIC today will likely not allow this amount, but this should give us some leeway for future devices that may support larger ring sizes. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 1

[PATCH net-next 1/3] ibmvnic: Increase maximum queue size limit

2018-09-28 Thread Thomas Falcon
Increase queue size limit to 16. Devices available for IBM vNIC today will not allow this amount, but this should give us some leeway for future devices that may support more RX or TX queues. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 1 file changed, 1 insertion

[PATCH net-next 0/3] ibmvnic: Implement driver-defined queue limits

2018-09-28 Thread Thomas Falcon
it. With this in mind, define a private ethtool flag that toggles the use of driver-defined limits. These limits are currently more than what supported hardware will likely allow, so the driver will attempt to get as close as possible to the user request but may not fully succeed. Thomas Falcon (3

[PATCH net-next 3/3] ibmvnic: Add ethtool private flag for driver-defined queue limits

2018-09-28 Thread Thomas Falcon
partition. In this case, the driver requests as close as it can get to the desired amount until it succeeds. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 129 +++-- drivers/net/ethernet/ibm/ibmvnic.h | 6 ++ 2 files changed, 100 insertions

[PATCH net] ibmvnic: Include missing return code checks in reset function

2018-08-30 Thread Thomas Falcon
Check the return codes of these functions and halt reset in case of failure. The driver will remain in a dormant state until the next reset event, when device initialization will be re-attempted. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 12 +--- 1 file

Re: [PATCH net-next 2/2] ibmvnic: Update firmware error reporting with cause string

2018-08-06 Thread Thomas Falcon
On 08/06/2018 10:48 PM, Nathan Fontenot wrote: On 08/06/2018 09:39 PM, Thomas Falcon wrote: Print a string instead of the error code. Since there is a possibility that the driver can recover, classify it as a warning instead of an error. Signed-off-by: Thomas Falcon ---   drivers/net

[PATCH net-next 0/2] ibmvnic: Update firmware error reporting

2018-08-06 Thread Thomas Falcon
the message to print a string explainng the error cause instead of just the error code. Thomas Falcon (2): ibmvnic: Remove code to request error information ibmvnic: Update firmware error reporting with cause string drivers/net/ethernet/ibm/ibmvnic.c | 168

[PATCH net-next 2/2] ibmvnic: Update firmware error reporting with cause string

2018-08-06 Thread Thomas Falcon
Print a string instead of the error code. Since there is a possibility that the driver can recover, classify it as a warning instead of an error. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 34 ++ 1 file changed, 30 insertions(+), 4

[PATCH net-next 1/2] ibmvnic: Remove code to request error information

2018-08-06 Thread Thomas Falcon
request_error_information will never be called. Remove it. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 144 + drivers/net/ethernet/ibm/ibmvnic.h | 33 - 2 files changed, 1 insertion(+), 176 deletions(-) diff --git a/drivers/net

[PATCH net] ibmvnic: Revise RX/TX queue error messages

2018-07-13 Thread Thomas Falcon
-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 39 ++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index d0e196b..c5096368 100644 --- a/drivers/net/ethernet/ibm

[PATCH net] ibmvnic: Fix partial success login retries

2018-05-24 Thread Thomas Falcon
the course of operations, resulting in reallocation of resources but exits without sending the login attempt. Guard against this by introducing a boolean variable that will retain the state indicating that the driver needs to reattempt login with backing device firmware. Signed-off-by: Thomas

[PATCH net-next 6/8] ibmvnic: Create separate initialization routine for resets

2018-05-23 Thread Thomas Falcon
function to handle all possible scenarios. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 48 -- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drive

[PATCH net-next 4/8] ibmvnic: Return error code if init interrupted by transport event

2018-05-23 Thread Thomas Falcon
If device init is interrupted by a failover, set the init return code so that it can be checked and handled appropriately by the init routine. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 5 - 1 file changed, 4 insertions(+), 1 de

[PATCH net-next 8/8] ibmvnic: Introduce hard reset recovery

2018-05-23 Thread Thomas Falcon
a device reset, a flag is set which will trigger a new hard reset following the completionof the current reset event. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 101 +++-- drivers/net/ethernet/ibm/ibmvnic.h

[PATCH net-next 7/8] ibmvnic: Set resetting state at earliest possible point

2018-05-23 Thread Thomas Falcon
Set device resetting state at the earliest possible point: as soon as a reset is successfully scheduled. The reset state is toggled off when all resets have been processed to completion. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 3

[PATCH net-next 5/8] ibmvnic: Handle error case when setting link state

2018-05-23 Thread Thomas Falcon
If setting the link state is not successful, print a warning with the resulting return code and return it to be handled by the caller. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 4 1 file changed, 4 insertions(+) diff --git a/d

[PATCH net-next 3/8] ibmvnic: Check CRQ command return codes

2018-05-23 Thread Thomas Falcon
Check whether CRQ command is successful before awaiting a response from the management partition. If the command was not successful, the driver may hang waiting for a response that will never come. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibm

[PATCH net-next 1/8] ibmvnic: Mark NAPI flag as disabled when released

2018-05-23 Thread Thomas Falcon
Set adapter NAPI state as disabled if they are removed. This will allow them to be enabled again if reallocated in case of a hard reset. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d

[PATCH net-next 2/8] ibmvnic: Introduce active CRQ state

2018-05-23 Thread Thomas Falcon
ialization, any further commands other than the initialization handshake with the VIOS management partition will result in an invalid state error. Instead of sending a command that will be returned with an error, print a warning and return an error that will be handled by the caller. Signed-off-

[PATCH net-next 0/8] ibmvnic: Failover hardening

2018-05-23 Thread Thomas Falcon
to an operational state. Thomas Falcon (8): ibmvnic: Mark NAPI flag as disabled when released ibmvnic: Introduce active CRQ state ibmvnic: Check CRQ command return codes ibmvnic: Return error code if init interrupted by transport event ibmvnic: Handle error case when setting link state

Re: [PATCH 0/3] ibmvnic: Fix bugs and memory leaks

2018-05-16 Thread Thomas Falcon
On 05/16/2018 03:49 PM, Thomas Falcon wrote: > This is a small patch series fixing up some bugs and memory leaks > in the ibmvnic driver. The first fix frees up previously allocated > memory that should be freed in case of an error. The second fixes > a reset case that was failing

[PATCH 1/3] ibmvnic: Free coherent DMA memory if FW map failed

2018-05-16 Thread Thomas Falcon
If the firmware map fails for whatever reason, remember to free up the memory after. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/et

[PATCH 2/3] ibmvnic: Fix non-fatal firmware error reset

2018-05-16 Thread Thomas Falcon
It is not necessary to disable interrupt lines here during a reset to handle a non-fatal firmware error. Move that call within the code block that handles the other cases that do require interrupts to be disabled and re-enabled. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.

[PATCH 3/3] ibmvnic: Fix statistics buffers memory leak

2018-05-16 Thread Thomas Falcon
Move initialization of statistics buffers from ibmvnic_init function into ibmvnic_probe. In the current state, ibmvnic_init will be called again during a device reset, resulting in the allocation of new buffers without freeing the old ones. Signed-off-by: Thomas Falcon <tl

[PATCH 0/3] ibmvnic: Fix bugs and memory leaks

2018-05-16 Thread Thomas Falcon
enabled again. The final patch fixes incorrect reallocated of statistics buffers during a device reset, resulting in loss of statistics information and a memory leak. Thomas Falcon (3): ibmvnic: Free coherent DMA memory if FW map failed ibmvnic: Fix non-fatal firmware error reset ibmvnic: Fix

[PATCH net] ibmvnic: Clean actual number of RX or TX pools

2018-04-20 Thread Thomas Falcon
Avoid using value stored in the login response buffer when cleaning TX and RX buffer pools since these could be inconsistent depending on the device state. Instead use the field in the driver's private data that tracks the number of active pools. Signed-off-by: Thomas Falcon <tl

[PATCH] ibmvnic: Clear pending interrupt after device reset

2018-04-15 Thread Thomas Falcon
o continue operation. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index f84a920.

Re: [PATCH] ibmvnic: Clear pending interrupt after device reset

2018-04-15 Thread Thomas Falcon
On 04/15/2018 06:27 PM, Thomas Falcon wrote: > Due to a firmware bug, the hypervisor can send an interrupt to a > transmit or receive queue just prior to a partition migration, not > allowing the device enough time to handle it and send an EOI. When > the partition migrates, the inter

[PATCH] ibmvnic: Clear pending interrupt after device reset

2018-04-15 Thread Thomas Falcon
o continue operation. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index f84a920.

[PATCH net 3/5] ibmvnic: Fix reset scheduler error handling

2018-04-06 Thread Thomas Falcon
if the reset request does not get scheduled. Add some additional error handling code to exit the wait_for_completion if there is one in progress. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 39 --

[PATCH net 5/5] ibmvnic: Do not reset CRQ for Mobility driver resets

2018-04-06 Thread Thomas Falcon
zation/reset of the main CRQ had to be moved out of the ibmvnic_init routine and in to the ibmvnic_probe and do_reset routines. Signed-off-by: Nathan Fontenot <nf...@linux.vnet.ibm.com> Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/

[PATCH net 4/5] ibmvnic: Fix failover case for non-redundant configuration

2018-04-06 Thread Thomas Falcon
to wait until it receives a signal that the device is ready for resetting. A flag is introduced to track this intermediary state where the driver is waiting for an active device. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.

[PATCH net 1/5] ibmvnic: Fix DMA mapping mistakes

2018-04-06 Thread Thomas Falcon
with the wrong direction specified. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net 2/5] ibmvnic: Zero used TX descriptor counter on reset

2018-04-06 Thread Thomas Falcon
descriptors will not be "removed", effectively reducing queue capacity. If the queue is over half full, it will cause the queue to stall if stopped. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH net 0/5] ibmvnic: Fix driver reset and DMA bugs

2018-04-06 Thread Thomas Falcon
to the reset handling routine for redundant backing VF failover and partition migration cases. Nathan Fontenot (1): ibmvnic: Do not reset CRQ for Mobility driver resets Thomas Falcon (4): ibmvnic: Fix DMA mapping mistakes ibmvnic: Zero used TX descriptor counter on reset ibmvnic: Fix reset

Re: [PATCH net-next] ibmvnic: Potential NULL dereference in clean_one_tx_pool()

2018-03-23 Thread Thomas Falcon
On 03/23/2018 06:36 AM, Dan Carpenter wrote: > There is an && vs || typo here, which potentially leads to a NULL > dereference. Thanks for catching that! > > Fixes: e9e1e97884b7 ("ibmvnic: Update TX pool cleaning routine") > Signed-off-by: Dan Carpenter > > diff --git

[PATCH net-next v5 1/8] ibmvnic: Generalize TX pool structure

2018-03-16 Thread Thomas Falcon
-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- v5: Remove TSO resources in a later patch when they are unused. --- drivers/net/ethernet/ibm/ibmvnic.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethern

[PATCH net-next v5 6/8] ibmvnic: Improve TX buffer accounting

2018-03-16 Thread Thomas Falcon
index and set the free map entry to its original value. This should also be done if the DMA map fails. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff

[PATCH net-next v5 3/8] ibmvnic: Update release TX pool routine

2018-03-16 Thread Thomas Falcon
Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 19 --- 1 file changed, 12 insertions(+), 7 del

[PATCH net-next v5 4/8] ibmvnic: Update TX pool initialization routine

2018-03-16 Thread Thomas Falcon
Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 90 -- 1 file chang

[PATCH net-next v5 8/8] ibmvnic: Remove unused TSO resources in TX pool structure

2018-03-16 Thread Thomas Falcon
Finally, remove the TSO-specific fields in the TX pool strcutures. These are no longer needed with the introduction of separate buffer pools for TSO transmissions. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.h | 2 -- 1 file chan

[PATCH net-next v5 5/8] ibmvnic: Update TX and TX completion routines

2018-03-16 Thread Thomas Falcon
to one if the packet uses the TSO pool. On completion, unset the bit and use the correlator index to release the buffer pool entry. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 55 +++--- drivers/net/ethern

[PATCH net-next v5 2/8] ibmvnic: Update and clean up reset TX pool routine

2018-03-16 Thread Thomas Falcon
Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.

[PATCH net-next v5 7/8] ibmvnic: Update TX pool cleaning routine

2018-03-16 Thread Thomas Falcon
Update routine that cleans up any outstanding transmits that have not received completions when the device needs to close. Introduces a helper function that cleans one TX pool to make code more readable. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethern

[PATCH net-next v5 0/8] ibmvnic: Update TX pool and TX routines

2018-03-16 Thread Thomas Falcon
of buffers instead of the respective field in the tx pool data structure v3: Forgot to update TX pool cleaning function to handle new data structures. Included 7th patch for that. v2: Fix typo in 3/6 commit subject line Thomas Falcon (8): ibmvnic: Generalize TX pool structure ibmvnic

Re: [PATCH net-next v3 1/7] ibmvnic: Generalize TX pool structure

2018-03-16 Thread Thomas Falcon
On 03/16/2018 11:52 AM, David Miller wrote: > From: Thomas Falcon <tlfal...@linux.vnet.ibm.com> > Date: Thu, 15 Mar 2018 11:02:37 -0500 > >> Remove some unused fields in the structure and include values >> describing the individual buffer size and number of buffers in &

[PATCH net-next v4 2/7] ibmvnic: Update and clean up reset TX pool routine

2018-03-15 Thread Thomas Falcon
Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.

[PATCH net-next v4 6/7] ibmvnic: Improve TX buffer accounting

2018-03-15 Thread Thomas Falcon
index and set the free map entry to its original value. This should also be done if the DMA map fails. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff

[PATCH net-next v4 4/7] ibmvnic: Update TX pool initialization routine

2018-03-15 Thread Thomas Falcon
Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 90 -- 1 file chang

[PATCH net-next v4 5/7] ibmvnic: Update TX and TX completion routines

2018-03-15 Thread Thomas Falcon
to one if the packet uses the TSO pool. On completion, unset the bit and use the correlator index to release the buffer pool entry. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 55 +++--- drivers/net/ethern

[PATCH net-next v4 7/7] ibmvnic: Update TX pool cleaning routine

2018-03-15 Thread Thomas Falcon
Update routine that cleans up any outstanding transmits that have not received completions when the device needs to close. Introduces a helper function that cleans one TX pool to make code more readable. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- v4: Update to use the

[PATCH net-next v4 0/7] ibmvnic: Update TX pool and TX routines

2018-03-15 Thread Thomas Falcon
to handle new data structures. Included 7th patch for that. v2: Fix typo in 3/6 commit subject line Thomas Falcon (7): ibmvnic: Generalize TX pool structure ibmvnic: Update and clean up reset TX pool routine ibmvnic: Update release TX pool routine ibmvnic: Update TX pool initialization

[PATCH net-next v4 3/7] ibmvnic: Update release TX pool routine

2018-03-15 Thread Thomas Falcon
Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 19 --- 1 file changed, 12 insertions(+), 7 del

[PATCH net-next v4 1/7] ibmvnic: Generalize TX pool structure

2018-03-15 Thread Thomas Falcon
TX pool array for TSO. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h index 099c89

Re: [PATCH net-next v3 0/7] ibmvnic: Update TX pool and TX routines

2018-03-15 Thread Thomas Falcon
On 03/15/2018 11:02 AM, Thomas Falcon wrote: > This patch restructures the TX pool data structure and provides a > separate TX pool array for TSO transmissions. This is already used > in some way due to our unique DMA situation, namely that we cannot > use single DMA mappings for

[PATCH net-next v3 6/7] ibmvnic: Improve TX buffer accounting

2018-03-15 Thread Thomas Falcon
index and set the free map entry to its original value. This should also be done if the DMA map fails. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff

[PATCH net-next v3 3/7] ibmvnic: Update release TX pool routine

2018-03-15 Thread Thomas Falcon
Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 19 --- 1 file changed, 12 insertions(+), 7 del

[PATCH net-next v3 1/7] ibmvnic: Generalize TX pool structure

2018-03-15 Thread Thomas Falcon
TX pool array for TSO. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h index 099c89d..a2e21b3

[PATCH net-next v3 5/7] ibmvnic: Update TX and TX completion routines

2018-03-15 Thread Thomas Falcon
to one if the packet uses the TSO pool. On completion, unset the bit and use the correlator index to release the buffer pool entry. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 55 +++--- drivers/net/ethern

[PATCH net-next v3 7/7] ibmvnic: Update TX pool cleaning routine

2018-03-15 Thread Thomas Falcon
Update routine that cleans up any outstanding transmits that have not received completions when the device needs to close. Introduces a helper function that cleans one TX pool to make code more readable. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethern

[PATCH net-next v3 4/7] ibmvnic: Update TX pool initialization routine

2018-03-15 Thread Thomas Falcon
Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 90 -- 1 file chang

[PATCH net-next v3 0/7] ibmvnic: Update TX pool and TX routines

2018-03-15 Thread Thomas Falcon
buffers to prevent possible data corruption in case an invalid buffer entry is used. v3: Forgot to update TX pool cleaning function to handle new data structures. Included 7th patch for that. v2: Fix typo in 3/6 commit subject line Thomas Falcon (7): ibmvnic: Generalize TX pool structure ibmvnic

[PATCH net-next v3 2/7] ibmvnic: Update and clean up reset TX pool routine

2018-03-15 Thread Thomas Falcon
Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.

Re: [PATCH net-next 0/6] ibmvnic: Update TX pool and TX routines

2018-03-14 Thread Thomas Falcon
On 03/14/2018 01:03 PM, David Miller wrote: > From: Thomas Falcon <tlfal...@linux.vnet.ibm.com> > Date: Tue, 13 Mar 2018 19:34:17 -0500 > >> This patch restructures the TX pool data structure and provides a >> separate TX pool array for TSO transmissions. This is alre

[PATCH net-next 4/6] ibmvnic: Update TX pool initialization routine

2018-03-13 Thread Thomas Falcon
Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 90 -- 1 file chang

[PATCH net-next 1/6] ibmvnic: Generalize TX pool structure

2018-03-13 Thread Thomas Falcon
TX pool array for TSO. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h index 099c89d..a2e21b3

[PATCH net-next 5/6] ibmvnic: Update TX and TX completion routines

2018-03-13 Thread Thomas Falcon
to one if the packet uses the TSO pool. On completion, unset the bit and use the correlator index to release the buffer pool entry. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 55 +++--- drivers/net/ethern

[PATCH net-next 6/6] ibmvnic: Improve TX buffer accounting

2018-03-13 Thread Thomas Falcon
index and set the free map entry to its original value. This should also be done if the DMA map fails. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff

[PATCH net-next 3/6] ibmvnic: Update release RX pool routine

2018-03-13 Thread Thomas Falcon
Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 19 --- 1 file changed, 12 insertions(+), 7 del

[PATCH net-next 2/6] ibmvnic: Update and clean up reset TX pool routine

2018-03-13 Thread Thomas Falcon
Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.

[PATCH net-next 0/6] ibmvnic: Update TX pool and TX routines

2018-03-13 Thread Thomas Falcon
buffers to prevent possible data corruption in case an invalid buffer entry is used. Thomas Falcon (6): ibmvnic: Generalize TX pool structure ibmvnic: Update and clean up reset TX pool routine ibmvnic: Update release RX pool routine ibmvnic: Update TX pool initialization routine ibmvnic

[PATCH net-next] ibmvnic: Fix recent errata commit

2018-03-12 Thread Thomas Falcon
the workaround was not needed. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index e02d3b9..6

Re: [PATCH net-next v2 0/4] ibmvnic: Fix VLAN and other device errata

2018-03-12 Thread Thomas Falcon
On 03/12/2018 07:59 PM, David Miller wrote: > From: Thomas Falcon <tlfal...@linux.vnet.ibm.com> > Date: Mon, 12 Mar 2018 17:07:38 -0500 > >> On 03/12/2018 11:56 AM, David Miller wrote: >>> From: Thomas Falcon <tlfal...@linux.vnet.ibm.com> >&

Re: [PATCH net-next v2 0/4] ibmvnic: Fix VLAN and other device errata

2018-03-12 Thread Thomas Falcon
On 03/12/2018 11:56 AM, David Miller wrote: > From: Thomas Falcon <tlfal...@linux.vnet.ibm.com> > Date: Mon, 12 Mar 2018 11:51:01 -0500 > >> This patch series contains fixes for VLAN and other backing hardware >> errata. The VLAN fixes are mostly to account for the ad

[PATCH net-next v2 2/4] ibmvnic: Account for VLAN header length in TX buffers

2018-03-12 Thread Thomas Falcon
The extra four bytes of a VLAN packet was throwing off TX buffer entry values used by the driver. Account for those bytes when in buffer size and buffer entry calculations Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file c

[PATCH net-next v2 1/4] ibmvnic: Account for VLAN tag in L2 Header descriptor

2018-03-12 Thread Thomas Falcon
If a VLAN tag is present in the Ethernet header, account for that when providing the L2 header to firmware. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH net-next v2 4/4] ibmvnic: Handle TSO backing device errata

2018-03-12 Thread Thomas Falcon
TSO packets with one segment or with an MSS less than 224 can cause errors on some backing devices, so disable GSO in those cases. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 18 ++ 1 file changed, 18 insertions(+)

[PATCH net-next v2 3/4] ibmvnic: Pad small packets to minimum MTU size

2018-03-12 Thread Thomas Falcon
Some backing devices cannot handle small packets well, so pad any small packets to avoid that. It was recommended that the VNIC driver should not send packets smaller than the minimum MTU value provided by firmware, so pad small packets to be at least that long. Signed-off-by: Thomas Falcon

[PATCH net-next v2 0/4] ibmvnic: Fix VLAN and other device errata

2018-03-12 Thread Thomas Falcon
error that can occur when some devices attempt to transmit small packets. The other fixes are GSO related. Some devices cannot handle a smaller MSS or a packet with a single segment, so disable GSO in those cases. v2: Fix style mistake (unneeded brackets) in patch 3/4 Thomas Falcon (4): ibmvnic

Re: [PATCH 3/4 net-next] ibmvnic: Pad small packets to minimum MTU size

2018-03-12 Thread Thomas Falcon
On 03/11/2018 09:56 PM, David Miller wrote: > From: Thomas Falcon <tlfal...@linux.vnet.ibm.com> > Date: Fri, 9 Mar 2018 13:23:56 -0600 > >> +/* For some backing devices, mishandling of small packets >> + * can result in a loss of connection or TX stall. D

[PATCH 3/4 net-next] ibmvnic: Pad small packets to minimum MTU size

2018-03-09 Thread Thomas Falcon
Some backing devices cannot handle small packets well, so pad any small packets to avoid that. It was recommended that the VNIC driver should not send packets smaller than the minimum MTU value provided by firmware, so pad small packets to be at least that long. Signed-off-by: Thomas Falcon

[PATCH 4/4 net-next] ibmvnic: Handle TSO backing device errata

2018-03-09 Thread Thomas Falcon
TSO packets with one segment or with an MSS less than 224 can cause errors on some backing devices, so disable GSO in those cases. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 18 ++ 1 file changed, 18 insertions(+)

[PATCH 2/4 net-next] ibmvnic: Account for VLAN header length in TX buffers

2018-03-09 Thread Thomas Falcon
The extra four bytes of a VLAN packet was throwing off TX buffer entry values used by the driver. Account for those bytes when in buffer size and buffer entry calculations Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file c

[PATCH 0/4 net-next] ibmvnic: Fix VLAN and other device errata

2018-03-09 Thread Thomas Falcon
error that can occur when some devices attempt to transmit small packets. The other fixes are GSO related. Some devices cannot handle a smaller MSS or a packet with a single segment, so disable GSO in those cases. Thomas Falcon (4): ibmvnic: Account for VLAN tag in L2 Header descriptor ibmvnic

[PATCH 1/4 net-next] ibmvnic: Account for VLAN tag in L2 Header descriptor

2018-03-09 Thread Thomas Falcon
If a VLAN tag is present in the Ethernet header, account for that when providing the L2 header to firmware. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drive

[RESEND PATCH 0/3 net-next] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread Thomas Falcon
or partition migration, do not require this step. Since the device will not be initialized at this stage and its command-processing queue is closed, do not send the request to disable the device as it could result in an error or timeout disrupting the reset. Thomas Falcon (3): ibmvnic: Clean up device close

[RESEND PATCH 1/3 net-next] ibmvnic: Clean up device close

2018-03-07 Thread Thomas Falcon
the adapter structure. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 7

[RESEND PATCH 3/3 net-next] ibmvnic: Do not disable device during failover or partition migration

2018-03-07 Thread Thomas Falcon
. In these cases, just halt transmissions, clean up resources, and continue with reset. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvni

[RESEND PATCH 2/3 net-next] ibmvnic: Reorganize device close

2018-03-07 Thread Thomas Falcon
resources. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index fca0533..d

Re: [PATCH 0/3] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread Thomas Falcon
On 03/07/2018 05:41 PM, Thomas Falcon wrote: > This patch set cleans up and reorganizes the driver's net_device > close function and leverages that to fix up a bug that can occur > during some device resets. Some reset cases require the backing > adapter to be disabled before continuin

[PATCH 3/3] ibmvnic: Do not disable device during failover or partition migration

2018-03-07 Thread Thomas Falcon
. In these cases, just halt transmissions, clean up resources, and continue with reset. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvni

[PATCH 0/3] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread Thomas Falcon
or partition migration, do not require this step. Since the device will not be initialized at this stage and its command-processing queue is closed, do not send the request to disable the device as it could result in an error or timeout disrupting the reset. Thomas Falcon (3): ibmvnic: Clean up device close

[PATCH 2/3] ibmvnic: Reorganize device close

2018-03-07 Thread Thomas Falcon
resources. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index fca0533..d

[PATCH 1/3] ibmvnic: Clean up device close

2018-03-07 Thread Thomas Falcon
the adapter structure. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 7

[PATCH 4/5 net-next] ibmvnic: Report queue stops and restarts as debug output

2018-02-26 Thread Thomas Falcon
It's not necessary to report each time a queue is stopped and restarted as an informational message. Change that to be a debug message so that it can be observed if needed but not printed by default. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethern

[PATCH 5/5 net-next] ibmvnic: Do not attempt to login if RX or TX queues are not allocated

2018-02-26 Thread Thomas Falcon
there before enabling the device. In addition, return a value that can be checked in case of any errors to avoid waiting for a completion that will never come. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 21 +++-- 1 file c

[PATCH 0/5 net-next] ibmvnic: Miscellaneous driver fixes and enhancements

2018-02-26 Thread Thomas Falcon
. This resolves a panic that could occur if a user attempted to configure a device after a failed reset. Thanks for your attention. Thomas Falcon (5): ibmvnic: Fix TX descriptor tracking again ibmvnic: Allocate statistics buffers during probe ibmvnic: Harden TX/RX pool cleaning ibmvnic: Report

[PATCH 2/5 net-next] ibmvnic: Allocate statistics buffers during probe

2018-02-26 Thread Thomas Falcon
supported queues, of buffers, these can be allocated during device probe and freed when the device is hot-unplugged or the module is removed. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 21 +++-- 1 file changed, 11 inse

[PATCH 1/5 net-next] ibmvnic: Fix TX descriptor tracking again

2018-02-26 Thread Thomas Falcon
queue forever. Log the number of descriptors used by a transmit before sending. I stress tested the fix on two different systems running over the weekend without any issues. Signed-off-by: Thomas Falcon <tlfal...@linux.vnet.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 3 ++- 1 file c

  1   2   3   >