[PATCH net 1/2] ibmvnic: Handle all login error conditions

2018-04-11 Thread Nathan Fontenot
because the driver does a renegatiation of capabilities which sets the number of queus possible and allows the driver to attempt a login for possible value for the number of queues supported. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 55

[PATCH net 2/2] ibmvnic: Do not notify peers on parameter change resets

2018-04-11 Thread Nathan Fontenot
When attempting to change the driver parameters, such as the MTU value or number of queues, do not call netdev_notify_peers(). Doing so will deadlock on the rtnl_lock. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH net 0/2] ibmvnic: Fix parameter change request handling

2018-04-11 Thread Nathan Fontenot
parameter change reset. This patch set corrects both of these issues by updating the return code handling in ibmvnic_login() nand gaurding against calling netdev_notify_peers() for parameter change requests. -Nathan --- Nathan Fontenot (2): ibmvnic: Handle all login error conditions

Re: [PATCH net 1/2] ibmvnic: Handle all login error conditions

2018-04-11 Thread Nathan Fontenot
On 04/11/2018 10:07 AM, David Miller wrote: > From: Nathan Fontenot > Date: Wed, 11 Apr 2018 09:37:21 -0500 > >> There is a bug in handling the possible return codes from sending the >> login CRQ. The current code treats any non-success return value, >> minus fa

[PATCH v2 net 2/2] ibmvnic: Do not notify peers on parameter change resets

2018-04-11 Thread Nathan Fontenot
When attempting to change the driver parameters, such as the MTU value or number of queues, do not call netdev_notify_peers(). Doing so will deadlock on the rtnl_lock. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v2 net 0/2] ibmvnic: Fix parameter change request handling

2018-04-11 Thread Nathan Fontenot
parameter change reset. This patch set corrects both of these issues by updating the return code handling in ibmvnic_login() nand gaurding against calling netdev_notify_peers() for parameter change requests. -Nathan Updates for V2: Correct spelling mistakes in commit messages. --- Nathan Fontenot (2

[PATCH v2 net 1/2] ibmvnic: Handle all login error conditions

2018-04-11 Thread Nathan Fontenot
because the driver does a renegotiation of capabilities which sets the number of queues possible and allows the driver to attempt a login for possible value for the number of queues supported. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 55

[PATCH net-next] ibmvnic: Don't handle RX interrupts when not up.

2018-01-08 Thread Nathan Fontenot
] [c8009204] system_call+0x38/0xb4 At this poibnt the driver is not prepared to handle traffic and should not try to handle the interrupt. This patch adds a check to ensure the driver is up when handling RX interrupots. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |3

Re: [PATCH net-next] ibmvnic: Don't handle RX interrupts when not up.

2018-01-10 Thread Nathan Fontenot
On 01/09/2018 02:33 PM, Thomas Falcon wrote: > On 01/08/2018 10:09 AM, Nathan Fontenot wrote: >> Initiating a kdump via the command line can cause a pending interrupt >> to be handled by the ibmvnic driver when initializing the sub-CRQ >> irqs during driver init

[PATCH net-next v2] ibmvnic: Don't handle RX interrupts when not up.

2018-01-10 Thread Nathan Fontenot
] [c8009204] system_call+0x38/0xb4 At this point the driver is not prepared to handle traffic and should not try to handle the interrupt. This patch adds a check to ensure the driver is up when handling RX interrupts. Signed-off-by: Nathan Fontenot --- v2 updates: - Correct commit message typos

[PATCH net] ibmvnic: Only do H_EOI for mobility events

2018-05-22 Thread Nathan Fontenot
when enabling during a mobility event though. Doing so at other time could wrong and can produce extra driver output when IRQs are enabled when doing TX completion. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 15 +-- 1 file changed, 9 insertions(+), 6

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

2018-08-06 Thread Nathan Fontenot
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/ethernet/ibm/ibmvnic.c | 34 +++

[PATCH net-next] ibmvnic: Add vnic client data to login buffer

2017-11-08 Thread Nathan Fontenot
Update the login buffer to include client data for the vnic driver, this includes the OS name, LPAR name, and device name. This update alolows thius information to be available in the VIOS. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 68

Re: [PATCH] [net-next,v3] ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

2017-11-09 Thread Nathan Fontenot
On 11/09/2017 01:00 PM, Desnes Augusto Nunes do Rosario wrote: > This patch implements and enables VDP support for the ibmvnic driver. > Moreover, it includes the implementation of suitable structs, signal > transmission/handling and functions which allows the retrival of firmware > information f

Re: [PATCH] [net-next,v3] ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

2017-11-10 Thread Nathan Fontenot
On 11/10/2017 08:41 AM, Desnes Augusto Nunes do Rosário wrote: > > > On 11/09/2017 06:31 PM, Nathan Fontenot wrote: >> On 11/09/2017 01:00 PM, Desnes Augusto Nunes do Rosario wrote: >>> This patch implements and enables VDP support for the ibmvnic driver. >&

Re: [PATCH] [net-next,v3] ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

2017-11-13 Thread Nathan Fontenot
On 11/10/2017 01:13 PM, Desnes Augusto Nunes do Rosário wrote: > > > On 11/10/2017 12:54 PM, Nathan Fontenot wrote: >> On 11/10/2017 08:41 AM, Desnes Augusto Nunes do Rosário wrote: >>> >>> >>> On 11/09/2017 06:31 PM, Nathan Fontenot wrote: >>&g

[PATCH] ibmvnic: driver initialization for kdump/kexec

2017-06-15 Thread Nathan Fontenot
set of the driver as is normally done for a failover transport event. To correct this we catch driver resets while still in the 'probing' state and return EAGAIN. This results in the driver tearing down the main crq and calling ibmvnic_init() again. Signed-off-by: Nathan Fontenot ---

[PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe

2017-06-20 Thread Nathan Fontenot
should be to see if rc is non-zero and not equal to EAGAIN. Without this fix, the vNIC driver can return 0 (success) from its probe routine due to ibmvnic_init returning zero, but before completing the probe process and registering with the netdev layer. Signed-off-by: Nathan Fontenot --- drivers

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

2017-06-20 Thread Nathan Fontenot
> Signed-off-by: John Allen Reviewed-by: Nathan Fontenot > --- > diff --git a/drivers/net/ethernet/ibm/ibmvnic.c > b/drivers/net/ethernet/ibm/ibmvnic.c > index 722daf5..0135095 100644 > --- a/drivers/net/ethernet/ibm/ibmvnic.c > +++ b/drivers/net/ethernet/ibm/ibmvnic.

Re: [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe

2017-06-21 Thread Nathan Fontenot
On 06/21/2017 02:39 PM, David Miller wrote: > From: Nathan Fontenot > Date: Tue, 20 Jun 2017 17:21:54 -0400 > >> Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec) > > I'm incredibly curious where you got the idea to put the Fixes: tag > at the be

[PATCH net-next V2] ibmvnic: Correct return code checking for ibmvnic_init during probe

2017-06-21 Thread Nathan Fontenot
this fix, the vNIC driver can return 0 (success) from its probe routine due to ibmvnic_init returning zero, but before completing the probe process and registering with the netdev layer. Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec) Signed-off-by: Nathan Fontenot --- drivers

[PATCH net-next] ibmvnic: queue reset when CRQ gets closed during reset

2018-02-07 Thread Nathan Fontenot
driver. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 5caaa9033841..0f7e1d016207 100644 --- a/drivers/net/ethernet/ibm

[PATCH] ibmvnic: Remove skb->protocol checks in ibmvnic_xmit

2018-02-09 Thread Nathan Fontenot
From: John Allen (jal...@linux.vnet.ibm.com> Having these checks in ibmvnic_xmit causes problems with VLAN tagging and balance-alb/tlb bonding modes. The restriction they imposed can be removed. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |5 + 1 file chan

Re: [PATCH] ibmvnic: Remove skb->protocol checks in ibmvnic_xmit

2018-02-09 Thread Nathan Fontenot
On 02/09/2018 01:32 PM, Jakub Kicinski wrote: > On Fri, 09 Feb 2018 13:09:34 -0600, Nathan Fontenot wrote: >> From: John Allen (jal...@linux.vnet.ibm.com> > > Nit: s/(/ >> Having these checks in ibmvnic_xmit causes problems with VLAN >> tagging and balance-alb/tlb

[PATCH net-next V2] ibmvnic: Remove skb->protocol checks in ibmvnic_xmit

2018-02-09 Thread Nathan Fontenot
From: John Allen Having these checks in ibmvnic_xmit causes problems with VLAN tagging and balance-alb/tlb bonding modes. The restriction they imposed can be removed. Signed-off-by: John Allen Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |5 + 1 file changed

[PATCH net-next 0/5] ibmvnic: Make driver resources dynamic

2018-02-17 Thread Nathan Fontenot
. With this change we can now release and init the sub crqs and napi (for rx sub crqs) when the number of sub crqs change. Lastly, the stats buffer allocation is updated to always allocate the maximum number of sub-crqs count of stats buffers. -Nathan --- Nathan Fontenot (5): ibmvnic: Rename

[PATCH net-next1/5] ibmvnic: Rename active queue count variables

2018-02-17 Thread Nathan Fontenot
Rename the tx/rx active pool variables to be tx/rx active scrq counts. The tx/rx pools are per sub-crq so this is a more appropriate name. This also is a preparatory step for using thiese variables for handling updates to sub-crqs and napi based on the active count. Signed-off-by: Nathan Fontenot

[PATCH net-next2/5] ibmvnic: Move active sub-crq count settings

2018-02-17 Thread Nathan Fontenot
Inpreparation for using the active scrq count to track more active resources, move the setting of the active count to after initialization occurs in initial driver init and during driver reset. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 17 +++-- 1

[PATCH net-next5/5] ibmvnic: Allocate max queues stats buffers

2018-02-17 Thread Nathan Fontenot
To avoid losing any stats when the number of sub-crqs change, allocate the max number of stats buffers so a stats buffer exists all possible sub-crqs. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH net-next3/5] ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change

2018-02-17 Thread Nathan Fontenot
x27;ed. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 69 ++-- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 9cfbb20b5ac1..a3079d5c07

[PATCH net-next4/5] ibmvnic: Make napi usage dynamic

2018-02-17 Thread Nathan Fontenot
In order to handle the number of rx sub crqs changing during a driver reset, the ibmvnic driver also needs to update the number of napi. To do this the code to init and free napi's is moved to their own routines so they can be called during the reset process. Signed-off-by: Nathan Fon

[PATCH V2 net-next 2/5] ibmvnic: Move active sub-crq count settings

2018-02-18 Thread Nathan Fontenot
In preparation for using the active scrq count to track more active resources, move the setting of the active count to after initialization occurs in initial driver init and during driver reset. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 17 +++-- 1

[PATCH V2 net-next 0/5] ibmvnic: Make driver resources dynamic

2018-02-18 Thread Nathan Fontenot
count when driver is in probed state for releasing sub crqs. Nathan Fontenot (5): ibmvnic: Rename active queue count variables ibmvnic: Move active sub-crq count settings ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change ibmvnic: Make napi usage dynamic

[PATCH V2 net-next 1/5] ibmvnic: Rename active queue count variables

2018-02-18 Thread Nathan Fontenot
Rename the tx/rx active pool variables to be tx/rx active scrq counts. The tx/rx pools are per sub-crq so this is a more appropriate name. This also is a preparatory step for using thiese variables for handling updates to sub-crqs and napi based on the active count. Signed-off-by: Nathan Fontenot

[PATCH V2 net-next 5/5] ibmvnic: Allocate max queues stats buffers

2018-02-18 Thread Nathan Fontenot
To avoid losing any stats when the number of sub-crqs change, allocate the max number of stats buffers so a stats buffer exists all possible sub-crqs. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH V2 net-next 4/5] ibmvnic: Make napi usage dynamic

2018-02-18 Thread Nathan Fontenot
In order to handle the number of rx sub crqs changing during a driver reset, the ibmvnic driver also needs to update the number of napi. To do this the code to init and free napi's is moved to their own routines so they can be called during the reset process. Signed-off-by: Nathan Fon

[PATCH V2 net-next 3/5] ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change

2018-02-18 Thread Nathan Fontenot
of main crq results in all of the sub crq's being free'ed. When updating sub-crq count in the reset path we do not want to h_free the sub-crqs, they are already free'ed. Signed-off-by: Nathan Fontenot --- Updates for V2: Use the correct scrq count for releasing scrqs when adapt

Re: [PATCH net-next3/5] ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change

2018-02-18 Thread Nathan Fontenot
On 02/17/2018 05:32 PM, Nathan Fontenot wrote: > When the driver resets it is possible that the number of tx/rx > sub-crqs can change. This patch handles this so that the driver does > not try to access non-existent sub-crqs. > > Additionally, a parameter is added to release_sub

[PATCH V3 net-next 0/5] ibmvnic: Make driver resources dynamic

2018-02-19 Thread Nathan Fontenot
parameter a bool Updates for V2: Patch 3/5 - Use correct queue count when driver is in probed state for releasing sub crqs. Nathan Fontenot (5): ibmvnic: Rename active queue count variables ibmvnic: Move active sub-crq count settings ibmvnic: Free and re-allocate scrqs when tx/rx

[PATCH V3 net-next 3/5] ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change

2018-02-19 Thread Nathan Fontenot
of main crq results in all of the sub crq's being free'ed. When updating sub-crq count in the reset path we do not want to h_free the sub-crqs, they are already free'ed. Signed-off-by: Nathan Fontenot --- Updates for V3: Change do_h_free parameter to bool Updates for V2: Use t

[PATCH V3 net-next 4/5] ibmvnic: Make napi usage dynamic

2018-02-19 Thread Nathan Fontenot
In order to handle the number of rx sub crqs changing during a driver reset, the ibmvnic driver also needs to update the number of napi. To do this the code to init and free napi's is moved to their own routines so they can be called during the reset process. Signed-off-by: Nathan Fon

[PATCH V3 net-next 1/5] ibmvnic: Rename active queue count variables

2018-02-19 Thread Nathan Fontenot
Rename the tx/rx active pool variables to be tx/rx active scrq counts. The tx/rx pools are per sub-crq so this is a more appropriate name. This also is a preparatory step for using thiese variables for handling updates to sub-crqs and napi based on the active count. Signed-off-by: Nathan Fontenot

[PATCH V3 net-next 2/5] ibmvnic: Move active sub-crq count settings

2018-02-19 Thread Nathan Fontenot
Inpreparation for using the active scrq count to track more active resources, move the setting of the active count to after initialization occurs in initial driver init and during driver reset. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 17 +++-- 1

Re: [PATCH V2 net-next 3/5] ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change

2018-02-19 Thread Nathan Fontenot
On 02/19/2018 01:16 PM, David Miller wrote: > From: Nathan Fontenot > Date: Sun, 18 Feb 2018 19:34:47 -0600 > >> @@ -2241,24 +2241,27 @@ static int reset_sub_crq_queues(struct >> ibmvnic_adapter *adapter) >> } >> >> static void release_sub_cr

[PATCH V3 net-next 5/5] ibmvnic: Allocate max queues stats buffers

2018-02-19 Thread Nathan Fontenot
To avoid losing any stats when the number of sub-crqs change, allocate the max number of stats buffers so a stats buffer exists all possible sub-crqs. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH net-next ] ibmvnic: Correct goto target for tx irq initialization failure

2018-02-20 Thread Nathan Fontenot
When a failure occurs during initialization of the tx sub crq irqs, we should branch to the cleanup of the tx irqs. The current code branches to the rx irq cleanup and attempts to cleanup the rx irqs which have not been initialized. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm

[PATCH net-next] ibmvnic: Split counters for scrq/pools/napi

2018-02-21 Thread Nathan Fontenot
patch simplifies this by having a counter for tx and rx sub-crqs, pools, and napi. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 38 drivers/net/ethernet/ibm/ibmvnic.h |7 +-- 2 files changed, 22 insertions(+), 23 deletions

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

2018-01-19 Thread Nathan Fontenot
so perform the necessary re-allocations. > > Signed-off-by: John Allen Reviewed-by: Nathan Fontenot > --- > v2: Added the line to free the long term buff in reset rx pools which > caused me to hit a couple of other problems. On a failover, the number > of queues can also change whi

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

2018-01-19 Thread Nathan Fontenot
ed-off-by: John Allen Reviewed-by: Nathan Fontenot > --- > diff --git a/drivers/net/ethernet/ibm/ibmvnic.c > b/drivers/net/ethernet/ibm/ibmvnic.c > index f8f1396..bb56460 100644 > --- a/drivers/net/ethernet/ibm/ibmvnic.c > +++ b/drivers/net/ethernet/ibm/ibmvnic.c > @@ -3608,7

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

2018-01-19 Thread Nathan Fontenot
ch moves the allocation of the VPD data to init_resources > so that it will be symmetrically freed during release resources. > > Signed-off-by: John Allen Reviewed-by: Nathan Fontenot > --- > diff --git a/drivers/net/ethernet/ibm/ibmvnic.c > b/drivers/net/ethernet/ibm/ibmv

[PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-07 Thread Nathan Fontenot
To ease debugging of the ibmvnic driver add a series of netdev_dbg() statements to track driver status, especially during initialization, removal, and resetting of the driver. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 78 +--- 1

Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
On 08/07/2017 10:29 AM, Joe Perches wrote: > On Mon, 2017-08-07 at 15:02 -0400, Nathan Fontenot wrote: >> To ease debugging of the ibmvnic driver add a series of netdev_dbg() >> statements to track driver status, especially during initialization, >> removal, and resetting of

[PATCH net-next] ibmvnic: Clean up resources on probe failure

2017-08-08 Thread Nathan Fontenot
Ensure that any resources allocated during probe are released if the probe of the driver fails. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/ibm

[PATCH v2 net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
To ease debugging of the ibmvnic driver add a series of netdev_dbg() statements to track driver status, especially during initialization, removal, and resetting of the driver. Signed-off-by: Nathan Fontenot --- v2: Removed several dbg statements where ftrace would already work for tracking

[PATCH v3 net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
To ease debugging of the ibmvnic driver add a series of netdev_dbg() statements to track driver status, especially during initialization, removal, and resetting of the driver. Signed-off-by: Nathan Fontenot --- v2: Removed several dbg statements where ftrace would already work for tracking

[PATCH net-next] ibmvnic: Correct 'unused variable' warning in build.

2017-08-08 Thread Nathan Fontenot
Commit a248878d7a1d ("ibmvnic: Check for transport event on driver resume") removed the loop to kick irqs on driver resume but didn't remove the now unused loop variable 'i'. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |1 - 1 file cha

Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
On 08/08/2017 11:27 AM, Stephen Hemminger wrote: > On Mon, 07 Aug 2017 15:02:58 -0400 > Nathan Fontenot wrote: > >> To ease debugging of the ibmvnic driver add a series of netdev_dbg() >> statements to track driver status, especially during initialization, >> removal,

Re: [PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread Nathan Fontenot
On 05/18/2017 10:24 AM, Wei Yongjun wrote: > From: Wei Yongjun > > Add the missing unlock before return from function __ibmvnic_reset() > in the error handling case. > > Fixes: ed651a10875f ("ibmvnic: Updated reset handling") > Signed-off-by: Wei Yongjun

[PATCH net-next 00/11] ibmvnic: Driver updates

2017-05-26 Thread Nathan Fontenot
: Handle failover after failed init crq ibmvnic: Send gratuitous arp on reset ibmvnic: Non-fatal error handling Nathan Fontenot (4): ibmvnic: Check adapter state during ibmvnic_poll ibmvnic: Reset the CRQ queue during driver reset ibmvnic: Reset tx/rx pools on driver

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

2017-05-26 Thread Nathan Fontenot
From: 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 Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm

[PATCH net-next 02/11] ibmvnic: Handle failover after failed init crq

2017-05-26 Thread Nathan Fontenot
From: John Allen Handle case where phyp sends a failover after failing to send the init crq. Signed-off-by: John Allen --- drivers/net/ethernet/ibm/ibmvnic.c | 11 ++- drivers/net/ethernet/ibm/ibmvnic.h |2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH net-next 04/11] ibmvnic: Fix cleanup of SKB's on driver close

2017-05-26 Thread Nathan Fontenot
From: Thomas Falcon A race condition occurs when closing the driver. Free'ing of skb's can race between the close routine and ibmvnic_tx_interrupt. To fix this we move the claenup of tx pools during close to after the sub-CRQ interrupts are disabled. Signed-off-by: Thomas Falcon --- drivers/ne

[PATCH net-next 03/11] ibmvnic: Send gratuitous arp on reset

2017-05-26 Thread Nathan Fontenot
From: John Allen Send gratuitous arp after any reset. Signed-off-by: John Allen --- drivers/net/ethernet/ibm/ibmvnic.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 1f7cf6f..465a8fa 100644 --- a/drivers/net

[PATCH net-next 05/11] ibmvnic: Non-fatal error handling

2017-05-26 Thread Nathan Fontenot
From: John Allen Handle non-fatal error conditions. The process to do this when resetting the driver is to just do __ibmvnic_close followed by __ibmvnic_open. Signed-off-by: John Allen --- drivers/net/ethernet/ibm/ibmvnic.c | 56 drivers/net/ethernet/ibm/

[PATCH net-next 06/11] ibmvnic: Halt TX and report carrier off on H_CLOSED return code

2017-05-26 Thread Nathan Fontenot
From: Thomas Falcon This patch disables transmissions and reports carrier off if xmit function returns that the hardware TX queue is closed. The driver can then await a signal from firmware to determine the correct reset method. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic

[PATCH net-next 07/11] ibmvnic: Deactivate RX pool buffer replenishment on H_CLOSED

2017-05-26 Thread Nathan Fontenot
From: Thomas Falcon If H_CLOSED is returned, halt RX buffer replenishment activity until firmware sends a notification that the driver can reset. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 21 + 1 file changed, 21 insertions(+) diff --git a/dri

[PATCH net-next 09/11] ibmvnic: Reset the CRQ queue during driver reset

2017-05-26 Thread Nathan Fontenot
When a driver reset operation occurs there is not a need to release the CRQ resources and re-allocate them. Instead a reset of the CRQ will suffice. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[PATCH net-next 11/11] ibmvnic: Reset sub-crqs during driver reset

2017-05-26 Thread Nathan Fontenot
When the ibmvnic driver is resetting, we can just reset the sub crqs instead of releasing all of their resources and re-allocting them. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 46 ++-- 1 file changed, 43 insertions(+), 3

[PATCH net-next 10/11] ibmvnic: Reset tx/rx pools on driver reset

2017-05-26 Thread Nathan Fontenot
When resetting the ibmvnic driver there is not a need to release and re-allocate the resources for the tx and rx pools. These resources can just be reset to avoid the re-allocations. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 71

[PATCH net-next 08/11] ibmvnic: Check adapter state during ibmvnic_poll

2017-05-26 Thread Nathan Fontenot
We do not want to process any receive frames if the ibmvnic_poll routine is invoked while a reset is in process. Also, before replenishing the rx pools in the ibmvnic_poll, we want to make sure the adapter is not in the process of closing. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet

Re: [PATCH net-next] ibmvnic: Client-initiated failover

2017-06-12 Thread Nathan Fontenot
acking device, > if one is available." > > To provide tools access to this functionality the vNIC driver creates a > sysfs file that, when written to, will send a request to pHyp to failover > to a different backing device. > > Signed-off-by: Thomas Falcon Reviewed-by

[PATCH net-next] ibmvnic: Remove netdev notify for failover resets

2017-06-12 Thread Nathan Fontenot
When handling a driver reset due to a failover of the backing server on the vios, doing the netdev_notify_peers() can cause network traffic to stall or halt. Remove the netdev notify call for failover resets. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |4 +++- 1

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

2017-10-24 Thread Nathan Fontenot
On 10/23/2017 11:33 AM, John Allen wrote: > 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 th

[PATCH net] ibmvnic: Remove debugfs support

2017-03-29 Thread Nathan Fontenot
. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 628 drivers/net/ethernet/ibm/ibmvnic.h | 30 -- 2 files changed, 658 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 3d73182

[PATCH net 1/7] ibmvnic: Update main crq initialization and release

2017-03-29 Thread Nathan Fontenot
Update the initialization and release routines for the crq queue so that we validate the crq queue. Additionally this updates the naming of the init and release routines for the crq queue to drop the ibmvnic prefix. This matches the naming for similar routines in the driver Signed-off-by: Nathan

[PATCH net 3/7] ibmvnic: Create init and release routines for the tx pool

2017-03-29 Thread Nathan Fontenot
Move the initialization and the release of the tx pool to their own routines, and update them to do validation. This also adds validation to the release of the long term buffer. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 134 +--- 1

[PATCH net 4/7] ibmvnic: Create init and release routines for the rx pool

2017-03-29 Thread Nathan Fontenot
Move the initialization and the release of the rx pool to their own routines, and update them to do validation. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 204 ++-- 1 file changed, 101 insertions(+), 103 deletions(-) diff --git a

[PATCH net 0/7] ibmvnic: Cleanup resource handling

2017-03-29 Thread Nathan Fontenot
--- Nathan Fontenot (7): ibmvnic: Update main crq initialization and release ibmvnic: Create init and release routines for the bounce buffer ibmvnic: Create init and release routines for the tx pool ibmvnic: Create init and release routines for the rx pool ibmvnic

[PATCH net 2/7] ibmvnic: Create init and release routines for the bounce buffer

2017-03-29 Thread Nathan Fontenot
Move the handling of initialization and releasing the bounce buffer to their own init and release routines. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 77 +++- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/drivers

[PATCH net 5/7] ibmvnic: Merge the two release_sub_crq_queue routines

2017-03-29 Thread Nathan Fontenot
Keeping two routines for releasing sub crqs, one for when irqs are not initialized and one for when they are, is a bit of overkill. Merge the two routines to a common release routine that will check for an irq and release it if needed. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm

[PATCH net 7/7] ibmvnic: Cleanup failure path in ibmvnic_open

2017-03-29 Thread Nathan Fontenot
to drop the ibmvnic prefix. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 51 +--- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a2f972d

[PATCH net 6/7] ibmvnic: Create init/release routines for stats token

2017-03-29 Thread Nathan Fontenot
Create an initialization and a release routine for the stats token used by the ibmvnic driver. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 46 +++- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 1/7] ibmvnic: Add is_up flag to avoid transmits when driver is down

2017-04-08 Thread Nathan Fontenot
times. Signed-off-by: Thomas Falcon Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 16 ++-- drivers/net/ethernet/ibm/ibmvnic.h |1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net

[PATCH net-next 0/7] ibmvnic: Assorted driver updates

2017-04-08 Thread Nathan Fontenot
free'ing them Patch 5/7: Fix up atomic API usage Patch 6/7: Don't disable irq after scheduling tasklet Patch 7/7: Remove inflight tracker -Nathan --- Nathan Fontenot (1): ibmvnic: Remove inflight list Thomas Falcon (2): ibmvnic: Add is_up flag to avoid transmits when driv

[PATCH net-next 2/7] ibmvnic: Report errors when failing to release sub-crqs

2017-04-08 Thread Nathan Fontenot
From: Thomas Falcon Add reporting of errors when releasing sub-crqs fails. Signed-off-by: Thomas Falcon Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net

[PATCH net-next 6/7] ibmvnic: Do not disable IRQ after scheduling tasklet

2017-04-08 Thread Nathan Fontenot
From: Brian King Since the primary CRQ is only used for service functions and not in the performance path, simplify the code a bit and avoid disabling the IRQ. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 25 ++--- 1

[PATCH net-next 3/7] ibmvnic: Fix ibmvnic_change_mac_addr struct format

2017-04-08 Thread Nathan Fontenot
x27;t successfully completed by the system firmware. Also changing the endianness of the debug message to make it easier to parse the CRQ content. Signed-off-by: Murilo Fossa Vicentini Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |5 +++-- drivers/net/etherne

[PATCH net-next 5/7] ibmvnic: Fixup atomic API usage

2017-04-08 Thread Nathan Fontenot
From: Brian King Replace a couple of modifications of an atomic followed by a read of the atomic, which is no longer atomic, to use atomic_XX_return variants to avoid race conditions. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 10

[PATCH net-next 4/7] ibmvnic: Unmap longer term buffer before free

2017-04-08 Thread Nathan Fontenot
From: Brian King Make sure we unregister long term buffers from the adapter prior to DMA unmapping it and freeing the buffer. Failure to do so could result in a DMA to a now invalid address. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next 7/7] ibmvnic: Remove inflight list

2017-04-08 Thread Nathan Fontenot
checking the error buffer list to ibmvnic_remove. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 98 +++- drivers/net/ethernet/ibm/ibmvnic.h |9 --- 2 files changed, 19 insertions(+), 88 deletions(-) diff --git a/drivers/net

[PATCH net-next] ibmvnic: Report errors when failing to release sub-crqs

2017-04-14 Thread Nathan Fontenot
From: Thomas Falcon Add reporting of errors when releasing sub-crqs fails. Signed-off-by: Thomas Falcon Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net

[PATCH net-next] ibmvnic: Fix ibmvnic_change_mac_addr struct format

2017-04-14 Thread Nathan Fontenot
x27;t successfully completed by the system firmware. Also changing the endianness of the debug message to make it easier to parse the CRQ content. Signed-off-by: Murilo Fossa Vicentini Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |5 +++-- drivers/net/etherne

[PATCH net-next] ibmvnic: Unmap longer term buffer before free

2017-04-14 Thread Nathan Fontenot
From: Brian King Make sure we unregister long term buffers from the adapter prior to DMA unmapping it and freeing the buffer. Failure to do so could result in a DMA to a now invalid address. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next] ibmvnic: Fixup atomic API usage

2017-04-14 Thread Nathan Fontenot
From: Brian King Replace a couple of modifications of an atomic followed by a read of the atomic, which is no longer atomic, to use atomic_XX_return variants to avoid race conditions. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 10

[PATCH net-next] ibmvnic: Do not disable IRQ after scheduling tasklet

2017-04-14 Thread Nathan Fontenot
From: Brian King Since the primary CRQ is only used for service functions and not in the performance path, simplify the code a bit and avoid disabling the IRQ. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 25 ++--- 1

[PATCH net-next 00/10] ibmvnic: Updates and bug fixes

2017-04-19 Thread Nathan Fontenot
scheduling tasklet ibmvnic: Disable irq prior to close Murilo Fossa Vicentini (1): ibmvnic: Fix ibmvnic_change_mac_addr struct format Nathan Fontenot (4): ibmvnic: Remove inflight list ibmvnic: Correct crq and resource releasing ibmvnic: Allocate zero-filled memory for

[PATCH net-next 01/10] ibmvnic: Report errors when failing to release sub-crqs

2017-04-19 Thread Nathan Fontenot
From: Thomas Falcon Add reporting of errors when releasing sub-crqs fails. Signed-off-by: Thomas Falcon Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net

[PATCH net-next 02/10] ibmvnic: Fix ibmvnic_change_mac_addr struct format

2017-04-19 Thread Nathan Fontenot
x27;t successfully completed by the system firmware. Also changing the endianness of the debug message to make it easier to parse the CRQ content. Signed-off-by: Murilo Fossa Vicentini Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c |5 +++-- drivers/net/etherne

[PATCH net-next 03/10] ibmvnic: Unmap longer term buffer before free

2017-04-19 Thread Nathan Fontenot
From: Brian King Make sure we unregister long term buffers from the adapter prior to DMA unmapping it and freeing the buffer. Failure to do so could result in a DMA to a now invalid address. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c

[PATCH net-next 06/10] ibmvnic: Remove inflight list

2017-04-19 Thread Nathan Fontenot
checking the error buffer list to ibmvnic_remove. Signed-off-by: Nathan Fontenot --- drivers/net/ethernet/ibm/ibmvnic.c | 98 +++- drivers/net/ethernet/ibm/ibmvnic.h |9 --- 2 files changed, 19 insertions(+), 88 deletions(-) diff --git a/drivers/net

  1   2   >