[PATCH net v3 1/2] ibmvnic: Ensure that SCRQ entry reads are correctly ordered

2020-12-01 Thread Thomas Falcon
the correct descriptor entry is checked and after reading the SCRQ descriptor to ensure the entire descriptor is read before processing. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 18

[PATCH net v3 0/2] ibmvnic: Bug fixes for queue descriptor processing

2020-12-01 Thread Thomas Falcon
by Michael Ellerman Thomas Falcon (2): ibmvnic: Ensure that SCRQ entry reads are correctly ordered ibmvnic: Fix TX completion error handling drivers/net/ethernet/ibm/ibmvnic.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) -- 1.8.3.1

[PATCH net v3 2/2] ibmvnic: Fix TX completion error handling

2020-12-01 Thread Thomas Falcon
TX completions received with an error return code are not being processed properly. When an error code is seen, do not proceed to the next completion before cleaning up the existing entry's data structures. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-

[PATCH net v2 2/2] ibmvnic: Fix TX completion error handling

2020-11-30 Thread Thomas Falcon
TX completions received with an error return code are not being processed properly. When an error code is seen, do not proceed to the next completion before cleaning up the existing entry's data structures. Fixes: 032c5e828 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Tho

[PATCH net v2 0/2] ibmvnic: Bug fixes for queue descriptor processing

2020-11-30 Thread Thomas Falcon
in the descriptor, in which case the respective socket buffer and other relevant data structures may not be freed or updated properly. v2: Provide more detailed comments explaining specifically what reads are being ordered, suggested by Michael Ellerman Thomas Falcon (2): ibmvnic: Ensure that SCRQ

[PATCH net v2 1/2] ibmvnic: Ensure that SCRQ entry reads are correctly ordered

2020-11-30 Thread Thomas Falcon
the correct descriptor entry is checked and after reading the SCRQ descriptor to ensure the entire descriptor is read before processing. Fixes: 032c5e828 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 18

Re: [PATCH net 1/2] ibmvnic: Ensure that SCRQ entry reads are correctly ordered

2020-11-25 Thread Thomas Falcon
On 11/24/20 11:43 PM, Michael Ellerman wrote: Thomas Falcon writes: Ensure that received Subordinate Command-Response Queue (SCRQ) entries are properly read in order by the driver. These queues are used in the ibmvnic device to process RX buffer and TX completion descriptors. dma_rmb barriers

[PATCH net 2/2] ibmvnic: Fix TX completion error handling

2020-11-24 Thread Thomas Falcon
TX completions received with an error return code are not being processed properly. When an error code is seen, do not proceed to the next completion before cleaning up the existing entry's data structures. Fixes: 032c5e828 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Tho

[PATCH net 1/2] ibmvnic: Ensure that SCRQ entry reads are correctly ordered

2020-11-24 Thread Thomas Falcon
the correct descriptor entry is checked and after reading the SCRQ descriptor to ensure the entire descriptor is read before processing. Fixes: 032c5e828 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 8 1 file

[PATCH net 0/2] ibmvnic: Bug fixes for queue descriptor processing

2020-11-24 Thread Thomas Falcon
in the descriptor, in which case the respective socket buffer and other relevant data structures may not be freed or updated properly. Thomas Falcon (2): ibmvnic: Ensure that SCRQ entry reads are correctly ordered ibmvnic: Fix TX completion error handling drivers/net/ethernet/ibm/ibmvnic.c | 12

Re: [PATCH net-next v2 9/9] ibmvnic: Do not replenish RX buffers after every polling loop

2020-11-19 Thread Thomas Falcon
On 11/19/20 2:38 PM, ljp wrote: On 2020-11-19 14:26, Thomas Falcon wrote: On 11/19/20 3:43 AM, ljp wrote: On 2020-11-18 19:12, Thomas Falcon wrote: From: "Dwip N. Banerjee" Reduce the amount of time spent replenishing RX buffers by only doing so once available buffers has fa

Re: [PATCH net-next v2 9/9] ibmvnic: Do not replenish RX buffers after every polling loop

2020-11-19 Thread Thomas Falcon
On 11/19/20 3:43 AM, ljp wrote: On 2020-11-18 19:12, Thomas Falcon wrote: From: "Dwip N. Banerjee" Reduce the amount of time spent replenishing RX buffers by only doing so once available buffers has fallen under a certain threshold, in this case half of the total number

[PATCH net-next v2 9/9] ibmvnic: Do not replenish RX buffers after every polling loop

2020-11-18 Thread Thomas Falcon
From: "Dwip N. Banerjee" Reduce the amount of time spent replenishing RX buffers by only doing so once available buffers has fallen under a certain threshold, in this case half of the total number of buffers, or if the polling loop exits before the packets processed is less than its budget.

[PATCH net-next v2 7/9] ibmvnic: Correctly re-enable interrupts in NAPI polling routine

2020-11-18 Thread Thomas Falcon
From: "Dwip N. Banerjee" If the current NAPI polling loop exits without completing it's budget, only re-enable interrupts if there are no entries remaining in the queue and napi_complete_done is successful. If there are entries remaining on the queue that were missed, restart the polling loop.

[PATCH net-next v2 8/9] ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX buffers

2020-11-18 Thread Thomas Falcon
From: "Dwip N. Banerjee" Take advantage of the additional optimizations in netdev_alloc_skb when allocating socket buffers to be used for packet reception. Signed-off-by: Dwip N. Banerjee --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next v2 5/9] ibmvnic: Remove send_subcrq function

2020-11-18 Thread Thomas Falcon
It is not longer used, so remove it. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 2aace693559f..e9b0cb6dfd9d

[PATCH net-next v2 6/9] ibmvnic: Ensure that device queue memory is cache-line aligned

2020-11-18 Thread Thomas Falcon
From: "Dwip N. Banerjee" PCI bus slowdowns were observed on IBM VNIC devices as a result of partial cache line writes and non-cache aligned full cache line writes. Ensure that packet data buffers are cache-line aligned to avoid these slowdowns. Signed-off-by: Dwip N. Banerjee ---

[PATCH net-next v2 4/9] ibmvnic: Clean up TX code and TX buffer data structure

2020-11-18 Thread Thomas Falcon
Remove unused and superfluous code and members in existing TX implementation and data structures. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 31 +++--- drivers/net/ethernet/ibm/ibmvnic.h | 8 2 files changed, 11 insertions(+), 28

[PATCH net-next v2 3/9] ibmvnic: Introduce xmit_more support using batched subCRQ hcalls

2020-11-18 Thread Thomas Falcon
per TX descriptor. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 204 - 1 file changed, 139 insertions(+), 65 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 17ba6db6f5f9..650aaf100d65

[PATCH net-next v2 2/9] ibmvnic: Introduce batched RX buffer descriptor transmission

2020-11-18 Thread Thomas Falcon
-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 57 +++--- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 3884f8a683a7..17ba6db6f5f9 100644 --- a/drivers/net/ethernet

[PATCH net-next v2 1/9] ibmvnic: Introduce indirect subordinate Command Response Queue buffer

2020-11-18 Thread Thomas Falcon
This patch introduces the infrastructure to send batched subordinate Command Response Queue descriptors, which are used by the ibmvnic driver to send TX frame and RX buffer descriptors. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 23 +++ drivers/net

[PATCH net-next v2 0/9] ibmvnic: Performance improvements and other updates

2020-11-18 Thread Thomas Falcon
: Ensure that device queue memory is cache-line aligned ibmvnic: Correctly re-enable interrupts in NAPI polling routine ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX buffers ibmvnic: Do not replenish RX buffers after every polling loop Thomas Falcon (5): ibmvnic

Re: [PATCH net-next 04/12] ibmvnic: Introduce xmit_more support using batched subCRQ hcalls

2020-11-16 Thread Thomas Falcon
On 11/14/20 5:46 PM, Jakub Kicinski wrote: On Thu, 12 Nov 2020 13:09:59 -0600 Thomas Falcon wrote: Include support for the xmit_more feature utilizing the H_SEND_SUB_CRQ_INDIRECT hypervisor call which allows the sending of multiple subordinate Command Response Queue descriptors in one

Re: [PATCH net-next 01/12] ibmvnic: Ensure that subCRQ entry reads are ordered

2020-11-16 Thread Thomas Falcon
On 11/14/20 5:35 PM, Jakub Kicinski wrote: On Thu, 12 Nov 2020 13:09:56 -0600 Thomas Falcon wrote: Ensure that received Subordinate Command-Response Queue entries are properly read in order by the driver. Signed-off-by: Thomas Falcon Are you sure this is not a bug fix? Yes, I guess it does

Re: [PATCH net-next 02/12] ibmvnic: Introduce indirect subordinate Command Response Queue buffer

2020-11-16 Thread Thomas Falcon
On 11/14/20 5:35 PM, Jakub Kicinski wrote: On Thu, 12 Nov 2020 13:09:57 -0600 Thomas Falcon wrote: This patch introduces the infrastructure to send batched subordinate Command Response Queue descriptors, which are used by the ibmvnic driver to send TX frame and RX buffer descriptors. Signed

[PATCH net-next 12/12] ibmvnic: Do not replenish RX buffers after every polling loop

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" Reduce the amount of time spent replenishing RX buffers by only doing so once available buffers has fallen under a certain threshold, in this case half of the total number of buffers, or if the polling loop exits before the packets processed is less than its budget.

[PATCH net-next 11/12] ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX buffers

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" Take advantage of the additional optimizations in netdev_alloc_skb when allocating socket buffers to be used for packet reception. Signed-off-by: Dwip N. Banerjee --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next 10/12] ibmvnic: Correctly re-enable interrupts in NAPI polling routine

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" If the current NAPI polling loop exits without completing it's budget, only re-enable interrupts if there are no entries remaining in the queue and napi_complete_done is successful. If there are entries remaining on the queue that were missed, restart the polling loop.

[PATCH net-next 06/12] ibmvnic: Clean up TX code and TX buffer data structure

2020-11-12 Thread Thomas Falcon
Remove unused and superfluous code and members in existing TX implementation and data structures. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 31 +++--- drivers/net/ethernet/ibm/ibmvnic.h | 8 2 files changed, 11 insertions(+), 28

[PATCH net-next 09/12] ibmvnic: Ensure that device queue memory is cache-line aligned

2020-11-12 Thread Thomas Falcon
From: "Dwip N. Banerjee" PCI bus slowdowns were observed on IBM VNIC devices as a result of partial cache line writes and non-cache aligned full cache line writes. Ensure that packet data buffers are cache-line aligned to avoid these slowdowns. Signed-off-by: Dwip N. Banerjee ---

[PATCH net-next 04/12] ibmvnic: Introduce xmit_more support using batched subCRQ hcalls

2020-11-12 Thread Thomas Falcon
per TX descriptor. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 151 + 1 file changed, 91 insertions(+), 60 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 524020691ef8..0f6aba760d65

[PATCH net-next 02/12] ibmvnic: Introduce indirect subordinate Command Response Queue buffer

2020-11-12 Thread Thomas Falcon
This patch introduces the infrastructure to send batched subordinate Command Response Queue descriptors, which are used by the ibmvnic driver to send TX frame and RX buffer descriptors. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 19 +++ drivers/net

[PATCH net-next 01/12] ibmvnic: Ensure that subCRQ entry reads are ordered

2020-11-12 Thread Thomas Falcon
Ensure that received Subordinate Command-Response Queue entries are properly read in order by the driver. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm

[PATCH net-next 03/12] ibmvnic: Introduce batched RX buffer descriptor transmission

2020-11-12 Thread Thomas Falcon
-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 57 +++--- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index dd9ca06f355b..524020691ef8 100644 --- a/drivers/net/ethernet

[PATCH net-next 07/12] ibmvnic: Clean up TX error handling and statistics tracking

2020-11-12 Thread Thomas Falcon
Update error handling code in ibmvnic_xmit to be more readable and remove unused statistics counters. Also record statistics when TX completions are received to improve accuracy. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 38 ++ drivers/net

[PATCH net-next 05/12] ibmvnic: Fix TX completion error handling

2020-11-12 Thread Thomas Falcon
VNIC protocol") Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 0f6aba760d65..c9437b2d1aa8 100644 --- a/drivers/net/et

[PATCH net-next 00/12] ibmvnic: Performance improvements and other updates

2020-11-12 Thread Thomas Falcon
ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX buffers ibmvnic: Do not replenish RX buffers after every polling loop Thomas Falcon (8): ibmvnic: Ensure that subCRQ entry reads are ordered ibmvnic: Introduce indirect subordinate Command Response Queue buffer ibmvnic

[PATCH net-next 08/12] ibmvnic: Remove send_subcrq function

2020-11-12 Thread Thomas Falcon
It is not longer used, so remove it. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 2c24d4774457..b2ca34e94078

Re: [PATCH net] ibmvnic: Fix IRQ mapping disposal in error path

2020-07-29 Thread Thomas Falcon
On 7/29/20 5:28 PM, Jakub Kicinski wrote: On Wed, 29 Jul 2020 16:36:32 -0500 Thomas Falcon wrote: RX queue IRQ mappings are disposed in both the TX IRQ and RX IRQ error paths. Fix this and dispose of TX IRQ mappings correctly in case of an error. Signed-off-by: Thomas Falcon Thomas, please

[PATCH net] ibmvnic: Fix IRQ mapping disposal in error path

2020-07-29 Thread Thomas Falcon
RX queue IRQ mappings are disposed in both the TX IRQ and RX IRQ error paths. Fix this and dispose of TX IRQ mappings correctly in case of an error. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Thomas Falcon
On 7/15/20 8:29 PM, David Miller wrote: From: Jakub Kicinski Date: Wed, 15 Jul 2020 17:06:32 -0700 On Wed, 15 Jul 2020 18:51:55 -0500 Thomas Falcon wrote: free_netdev(netdev); dev_set_drvdata(>dev, NULL); + netdev_info(netdev, "VNIC client device has been succ

[PATCH net-next] ibmvnic: Increase driver logging

2020-07-15 Thread Thomas Falcon
Improve the ibmvnic driver's logging capabilities by providing more informational messages to track driver operations, facilitating first-pass debug. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 76 -- 1 file changed, 62 insertions(+), 14

[PATCH net v2] ibmveth: Fix max MTU limit

2020-06-18 Thread Thomas Falcon
. Signed-off-by: Thomas Falcon Fixes: d894be57ca92 ("ethernet: use net core MTU range checking in more drivers") Fixes: 110447f8269a ("ethernet: fix min/max MTU typos") --- v2: Include Fixes tags suggested by Jakub Kicisnki --- drivers/net/ethernet/ibm/ibmveth.c | 2 +- 1 file

Re: [PATCH net] ibmveth: Fix max MTU limit

2020-06-18 Thread Thomas Falcon
On 6/18/20 10:57 AM, Jakub Kicinski wrote: On Thu, 18 Jun 2020 10:43:46 -0500 Thomas Falcon wrote: The max MTU limit defined for ibmveth is not accounting for virtual ethernet buffer overhead, which is twenty-two additional bytes set aside for the ethernet header and eight additional bytes

[PATCH net] ibmveth: Fix max MTU limit

2020-06-18 Thread Thomas Falcon
. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmveth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index 96d36ae5049e..c5c732601e35 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b

[PATCH net v2] ibmvnic: Harden device login requests

2020-06-15 Thread Thomas Falcon
may abort the request. In such cases, the driver should reattempt the login command sequence. In case of a device error, the number of retries is bounded. Signed-off-by: Thomas Falcon --- v2: declare variables in Reverse Christmas tree format --- drivers/net/ethernet/ibm/ibmv

Re: [PATCH net] ibmvnic: Harden device login requests

2020-06-15 Thread Thomas Falcon
On 6/12/20 4:10 PM, David Miller wrote: From: Thomas Falcon Date: Fri, 12 Jun 2020 13:31:39 -0500 @@ -841,13 +841,14 @@ static int ibmvnic_login(struct net_device *netdev) { struct ibmvnic_adapter *adapter = netdev_priv(netdev); unsigned long timeout = msecs_to_jiffies(3

[PATCH net] ibmvnic: Flush existing work items before device removal

2020-06-12 Thread Thomas Falcon
Ensure that all scheduled work items have completed before continuing with device removal and after further event scheduling has been halted. This patch fixes a bug where a scheduled driver reset event is processed following device removal. Signed-off-by: Thomas Falcon --- drivers/net/ethernet

[PATCH net] ibmvnic: Harden device login requests

2020-06-12 Thread Thomas Falcon
may abort the request. In such cases, the driver should reattempt the login command sequence. In case of a device error, the number of retries is bounded. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 21 + 1 file changed, 17 insertions(+), 4 deletion

[PATCH net] drivers/net/ibmvnic: Update VNIC protocol version reporting

2020-05-28 Thread Thomas Falcon
VNIC protocol version is reported in big-endian format, but it is not byteswapped before logging. Fix that, and remove version comparison as only one protocol version exists at this time. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 8 +++- 1 file changed, 3

Re: [PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-30 Thread Thomas Falcon
On 4/29/20 1:38 PM, Jay Vosburgh wrote: Thomas Falcon wrote: The following behavior has been observed when testing logical partition migration of LACP-bonded VNIC devices in a PowerVM pseries environment. 1. When performing the migration, the bond master detects that a slave has lost

Re: [PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-29 Thread Thomas Falcon
On 4/29/20 1:38 PM, Jay Vosburgh wrote: Thomas Falcon wrote: The following behavior has been observed when testing logical partition migration of LACP-bonded VNIC devices in a PowerVM pseries environment. 1. When performing the migration, the bond master detects that a slave has lost

[PATCH] net/bonding: Do not transition down slave after speed/duplex check

2020-04-29 Thread Thomas Falcon
devices are therefore not utilized in the aggregation though they are operational. The simplest way to fix this seems to be to restrict the link state change to devices that are currently up and running. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek Signed-off-by: Thomas Falcon

Re: [PATCH net] ibmvnic: Fall back to 16 H_SEND_SUB_CRQ_INDIRECT entries with old FW

2020-04-28 Thread Thomas Falcon
On 4/27/20 12:33 PM, Juliet Kim wrote: The maximum entries for H_SEND_SUB_CRQ_INDIRECT has increased on some platforms from 16 to 128. If Live Partition Mobility is used to migrate a running OS image from a newer source platform to an older target platform, then H_SEND_SUB_CRQ_INDIRECT will fail

Re: [PATCH net v2] net/ibmvnic: Fix typo in retry check

2019-12-16 Thread Thomas Falcon
On 12/13/19 7:27 PM, Jakub Kicinski wrote: On Wed, 11 Dec 2019 09:38:39 -0600, Thomas Falcon wrote: This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by:

[PATCH net v2] net/ibmvnic: Fix typo in retry check

2019-12-11 Thread Thomas Falcon
This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1

Re: [PATCH] net/ibmvnic: Fix typo in retry check

2019-12-11 Thread Thomas Falcon
On 12/11/19 9:32 AM, Thomas Falcon wrote: This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon --- Excuse me,

[PATCH] net/ibmvnic: Fix typo in retry check

2019-12-11 Thread Thomas Falcon
This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1

[PATCH net v2 3/4] ibmvnic: Bound waits for device queries

2019-11-25 Thread Thomas Falcon
Create a wrapper for wait_for_completion calls with additional driver checks to ensure that the driver does not wait on a disabled device. In those cases or if the device does not respond in an extended amount of time, this will allow the driver an opportunity to recover. Signed-off-by: Thomas

[PATCH net v2 4/4] ibmvnic: Serialize device queries

2019-11-25 Thread Thomas Falcon
Provide some serialization for device CRQ commands and queries to ensure that the shared variable used for storing return codes is properly synchronized. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 54 ++ drivers/net/ethernet/ibm

[PATCH net v2 1/4] ibmvnic: Fix completion structure initialization

2019-11-25 Thread Thomas Falcon
Fix multiple calls to init_completion for device completion structures. Instead, initialize them during device probe and reinitialize them later as needed. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions

[PATCH net v2 2/4] ibmvnic: Terminate waiting device threads after loss of service

2019-11-25 Thread Thomas Falcon
If we receive a notification that the device has been deactivated or removed, force a completion of all waiting threads. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers

[PATCH net v2 0/4] ibmvnic: Harden device commands and queries

2019-11-25 Thread Thomas Falcon
in milliseconds instead of jiffies - timeout calculations cleaned up and completed before wait loop - included missing mutex_destroy calls, suggested by Jakub - included comment before mutex declaration Thomas Falcon (4): ibmvnic: Fix completion structure initialization ibmvnic: Terminate

Re: [PATCH net 0/4] ibmvnic: Harden device commands and queries

2019-11-25 Thread Thomas Falcon
On 11/23/19 7:49 PM, Jakub Kicinski wrote: On Fri, 22 Nov 2019 13:41:42 -0600, Thomas Falcon wrote: This patch series fixes some shortcomings with the current VNIC device command implementation. The first patch fixes the initialization of driver completion structures used for device commands

[PATCH net 4/4] ibmvnic: Serialize device queries

2019-11-22 Thread Thomas Falcon
Provide some serialization for device CRQ commands and queries to ensure that the shared variable used for storing return codes is properly synchronized. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 51 ++ drivers/net/ethernet/ibm

[PATCH net 3/4] ibmvnic: Bound waits for device queries

2019-11-22 Thread Thomas Falcon
Create a wrapper for wait_for_completion calls with additional driver checks to ensure that the driver does not wait on a disabled device. In those cases or if the device does not respond in an extended amount of time, this will allow the driver an opportunity to recover. Signed-off-by: Thomas

[PATCH net 1/4] ibmvnic: Fix completion structure initialization

2019-11-22 Thread Thomas Falcon
Fix multiple calls to init_completion for device completion structures. Instead, initialize them during device probe and reinitialize them later as needed. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions

[PATCH net 0/4] ibmvnic: Harden device commands and queries

2019-11-22 Thread Thomas Falcon
not respond or becomes inoperable. Finally, serialize queries to retain the integrity of device return codes. Thomas Falcon (4): ibmvnic: Fix completion structure initialization ibmvnic: Terminate waiting device threads after loss of service ibmvnic: Bound waits for device queries ibmvnic

[PATCH net 2/4] ibmvnic: Terminate waiting device threads after loss of service

2019-11-22 Thread Thomas Falcon
If we receive a notification that the device has been deactivated or removed, force a completion of all waiting threads. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers

Re: [RFC PATCH] powerpc/pseries/mobility: notify network peers after migration

2019-11-07 Thread Thomas Falcon
On 11/6/19 4:14 PM, Nathan Lynch wrote: Hi Tom, Thomas Falcon writes: After a migration, it is necessary to send a gratuitous ARP from all running interfaces so that the rest of the network is aware of its new location. However, some supported network devices are unaware that they have been

Re: [RFC PATCH] powerpc/pseries/mobility: notify network peers after migration

2019-11-07 Thread Thomas Falcon
On 11/6/19 7:33 PM, Michael Ellerman wrote: Hi Thomas, Thomas Falcon writes: After a migration, it is necessary to send a gratuitous ARP from all running interfaces so that the rest of the network is aware of its new location. However, some supported network devices are unaware

[RFC PATCH v2] powerpc/pseries/mobility: notify network peers after migration

2019-11-06 Thread Thomas Falcon
a GARP on all valid, running interfaces as part of the post_mobility_fixup routine. Signed-off-by: Thomas Falcon --- v2: fix missing brackets caught by Russell Currey --- arch/powerpc/platforms/pseries/mobility.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch

Re: [RFC PATCH] powerpc/pseries/mobility: notify network peers after migration

2019-11-05 Thread Thomas Falcon
On 11/5/19 10:13 PM, Russell Currey wrote: On Tue, 2019-11-05 at 18:06 -0600, Thomas Falcon wrote: After a migration, it is necessary to send a gratuitous ARP from all running interfaces so that the rest of the network is aware of its new location. However, some supported network devices

[RFC PATCH] powerpc/pseries/mobility: notify network peers after migration

2019-11-05 Thread Thomas Falcon
a GARP on all valid, running interfaces as part of the post_mobility_fixup routine. Signed-off-by: Thomas Falcon --- arch/powerpc/platforms/pseries/mobility.c | 20 1 file changed, 20 insertions(+) diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc

Re: [PATCH 0/9] Fixes and Enablement of ibm,drc-info property

2019-11-05 Thread Thomas Falcon
On 11/5/19 9:24 AM, Tyrel Datwyler wrote: Hi, just pointing out a few typos... There was a previous effort to add support for the PAPR architected ibm,drc-info property. This property provides a more memory compact representation of a paritions Dynamic Reconfig s/paritions/partition's

Re: [PATCH 3/9] powerpc/pseries: Add cpu DLPAR support for drc-info property

2019-11-05 Thread Thomas Falcon
On 11/5/19 9:24 AM, Tyrel Datwyler wrote: From: Tyrel Datwyler Older firmwares provided information about Dynamic Reconfig Connectors (DRC) through several device tree properties, namely ibm,drc-types, ibm,drc-indexes, ibm,drc-names, and ibm,drc-power-domains. New firmwares have the ability

Re: [PATCH] net/ibmvnic: Fix EOI when running in XIVE mode.

2019-10-11 Thread Thomas Falcon
On 10/11/19 12:52 AM, C├ędric Le Goater wrote: pSeries machines on POWER9 processors can run with the XICS (legacy) interrupt mode or with the XIVE exploitation interrupt mode. These interrupt contollers have different interfaces for interrupt management : XICS uses hcalls and XIVE loads and

[PATCH net] ibmvnic: Do not process reset during or after device removal

2019-08-27 Thread Thomas Falcon
, resulting in an oops. Fix this by checking the device state before processing a queued reset event. Reported-by: Abdul Haleem Tested-by: Abdul Haleem Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH net-next v2] ibmveth: Allow users to update reported speed and duplex

2019-08-06 Thread Thomas Falcon
, such as LACP. This patch is based on the implementation in virtio_net. Signed-off-by: Thomas Falcon --- v2: Updated default driver speed/duplex settings to avoid breaking existing setups --- drivers/net/ethernet/ibm/ibmveth.c | 83 -- drivers/net/ethernet

Re: [PATCH net-next] ibmveth: Allow users to update reported speed and duplex

2019-08-06 Thread Thomas Falcon
On 8/6/19 5:25 AM, Michael Ellerman wrote: Thomas Falcon writes: Reported ethtool link settings for the ibmveth driver are currently hardcoded and no longer reflect the actual capabilities of supported hardware. There is no interface designed for retrieving this information from device

[PATCH net-next] ibmveth: Allow users to update reported speed and duplex

2019-08-05 Thread Thomas Falcon
, such as LACP. This patch is based on the implementation in virtio_net. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmveth.c | 83 -- drivers/net/ethernet/ibm/ibmveth.h | 3 ++ 2 files changed, 64 insertions(+), 22 deletions(-) diff --git a/drivers

Re: [PATCH net] net/ibmvnic: Report last valid speed and duplex values to ethtool

2019-06-27 Thread Thomas Falcon
On 6/27/19 12:57 PM, Andrew Lunn wrote: On Thu, Jun 27, 2019 at 12:09:13PM -0500, Thomas Falcon wrote: This patch resolves an issue with sensitive bonding modes that require valid speed and duplex settings to function properly. Currently, the adapter will report that device speed and duplex

[PATCH net] net/ibmvnic: Report last valid speed and duplex values to ethtool

2019-06-27 Thread Thomas Falcon
evice has never been activated. In that case or when the hypervisor gives invalid values, continue to report unknown speed or duplex to ethtool. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/etherne

[PATCH net 0/3] ibmvnic: Fixes for device reset handling

2019-06-07 Thread Thomas Falcon
reset. The final patch fixes mishandling of memory allocation failures during device initialization, which caused a kernel oops. Thomas Falcon (3): ibmvnic: Do not close unopened driver during reset ibmvnic: Refresh device multicast list after reset ibmvnic: Fix unchecked return codes of memory

[PATCH net 3/3] ibmvnic: Fix unchecked return codes of memory allocations

2019-06-07 Thread Thomas Falcon
The return values for these memory allocations are unchecked, which may cause an oops if the driver does not handle them after a failure. Fix by checking the function's return code. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 13 +++-- 1 file changed, 7

[PATCH net 1/3] ibmvnic: Do not close unopened driver during reset

2019-06-07 Thread Thomas Falcon
Check driver state before halting it during a reset. If the driver is not running, do nothing. Otherwise, a request to deactivate a down link can cause an error and the reset will fail. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 3 ++- 1 file changed, 2 insertions

[PATCH net 2/3] ibmvnic: Refresh device multicast list after reset

2019-06-07 Thread Thomas Falcon
It was observed that multicast packets were no longer received after a device reset. The fix is to resend the current multicast list to the backing device after recovery. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH net 2/2] ibmvnic: Fix non-atomic memory allocation in IRQ context

2018-12-10 Thread Thomas Falcon
] [c01444e8] process_one_work+0x238/0x710 [c003f3967d20] [c0144a48] worker_thread+0x88/0x4e0 [c003f3967db0] [c014e3a8] kthread+0x178/0x1c0 [c003f3967e20] [c000bfd0] ret_from_kernel_thread+0x5c/0x6c Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm

[PATCH net 1/2] ibmvnic: Convert reset work item mutex to spin lock

2018-12-10 Thread Thomas Falcon
0] [c0a5e728] linkwatch_event+0x48/0x60 [c003f3f87c50] [c01444e8] process_one_work+0x238/0x710 [c003f3f87d20] [c0144a48] worker_thread+0x88/0x4e0 [c003f3f87db0] [c014e3a8] kthread+0x178/0x1c0 [c003f3f87e20] [c000bfd0] ret_from_kernel_thread+0x5c/0x6c S

[PATCH net 0/2] net/ibmvnic: Fix reset work item locking bugs

2018-12-10 Thread Thomas Falcon
This patch set fixes issues with scheduling reset work items in a tasklet context. Since ibmvnic_reset can called in an interrupt, it should not use a mutex or allocate memory non-atomically. Thomas Falcon (2): ibmvnic: Convert reset work item mutex to spin lock ibmvnic: Fix non-atomic memory

[PATCH net 0/2] ibmvnic: Fix queue and buffer accounting errors

2018-11-21 Thread Thomas Falcon
This series includes two small fixes. The first resolves a typo bug in the code to clean up unused RX buffers during device queue removal. The second ensures that device queue memory is updated to reflect new supported queue ring sizes after migration to other backing hardware. Thomas Falcon (2

[PATCH net 2/2] ibmvnic: Update driver queues after change in ring size support

2018-11-21 Thread Thomas Falcon
During device reset, queue memory is not being updated to accommodate changes in ring buffer sizes supported by backing hardware. Track any differences in ring buffer sizes following the reset and update queue memory when possible. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm

[PATCH net 1/2] ibmvnic: Fix RX queue buffer cleanup

2018-11-21 Thread Thomas Falcon
The wrong index is used when cleaning up RX buffer objects during release of RX queues. Update to use the correct index counter. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm

[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 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 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 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 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 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 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

  1   2   >