All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features
@ 2021-06-04 16:48 Tony Nguyen
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf Tony Nguyen
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Nicholas Nunley <nicholas.d.nunley@intel.com>

If the driver has lost contact with the PF then it enters a disabled state
and frees adapter->vf_res. However, ndo_fix_features can still be called on
the interface, so we need to check for this condition first. Since we have
no information on the features at this time simply leave them unmodified
and return.

Fixes: c4445aedfe09 ("i40evf: Fix VLAN features")
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index fb4e3fe5cd1b..ad3f804f0e14 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -3437,7 +3437,8 @@ static netdev_features_t iavf_fix_features(struct net_device *netdev,
 {
 	struct iavf_adapter *adapter = netdev_priv(netdev);
 
-	if (!(adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+	if (adapter->vf_res &&
+	    !(adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
 		features &= ~(NETIF_F_HW_VLAN_CTAG_TX |
 			      NETIF_F_HW_VLAN_CTAG_RX |
 			      NETIF_F_HW_VLAN_CTAG_FILTER);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
@ 2021-06-04 16:48 ` Tony Nguyen
  2021-11-01 23:04   ` Brelinski, Tony
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't hold Tony Nguyen
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Nicholas Nunley <nicholas.d.nunley@intel.com>

iavf_free_queues() clears adapter->num_active_queues, which
iavf_free_q_vectors() relies on, so swap the order of these two function
calls in iavf_disable_vf(). This resolves a panic encountered when the
interface is disabled and then later brought up again after PF
communication is restored.

Fixes: 65c7006f234c ("i40evf: assign num_active_queues inside i40evf_alloc_queues")
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index ad3f804f0e14..989de52658dc 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2067,8 +2067,8 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)
 
 	iavf_free_misc_irq(adapter);
 	iavf_reset_interrupt_capability(adapter);
-	iavf_free_queues(adapter);
 	iavf_free_q_vectors(adapter);
+	iavf_free_queues(adapter);
 	memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE);
 	iavf_shutdown_adminq(&adapter->hw);
 	adapter->netdev->flags &= ~IFF_UP;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't hold
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf Tony Nguyen
@ 2021-06-04 16:48 ` Tony Nguyen
  2021-11-01 23:03   ` Brelinski, Tony
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last all-multicast mode Tony Nguyen
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Nicholas Nunley <nicholas.d.nunley@intel.com>

In iavf_configure_clsflower() the function will bail out if it is unable
to obtain the crit_section lock in a reasonable time. However, it will
clear the lock when exiting, so fix this.

Fixes: 640a8af5841f ("i40evf: Reorder configure_clsflower to avoid deadlock on error")
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 989de52658dc..58624be64010 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -3027,8 +3027,10 @@ static int iavf_configure_clsflower(struct iavf_adapter *adapter,
 
 	while (test_and_set_bit(__IAVF_IN_CRITICAL_TASK,
 				&adapter->crit_section)) {
-		if (--count == 0)
-			goto err;
+		if (--count == 0) {
+			kfree(filter);
+			return err;
+		}
 		udelay(1);
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last all-multicast mode
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf Tony Nguyen
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't hold Tony Nguyen
@ 2021-06-04 16:48 ` Tony Nguyen
  2021-11-01 23:03   ` Brelinski, Tony
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of filter structure Tony Nguyen
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Piotr Marczak <piotr.marczak@intel.com>

The driver could only quit allmulti when allmulti and promisc modes are
turn on at the same time. If promisc had been off there was no way to turn
off allmulti mode.
The patch corrects this behavior. Switching allmulti does not depends on
promisc state mode anymore

Fixes: f42a5c74da99 ("i40e: Add allmulti support for the VF")
Signed-off-by: Piotr Marczak <piotr.marczak@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 58624be64010..ffffb6e0a6c1 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1613,8 +1613,7 @@ static int iavf_process_aq_command(struct iavf_adapter *adapter)
 		iavf_set_promiscuous(adapter, FLAG_VF_MULTICAST_PROMISC);
 		return 0;
 	}
-
-	if ((adapter->aq_required & IAVF_FLAG_AQ_RELEASE_PROMISC) &&
+	if ((adapter->aq_required & IAVF_FLAG_AQ_RELEASE_PROMISC) ||
 	    (adapter->aq_required & IAVF_FLAG_AQ_RELEASE_ALLMULTI)) {
 		iavf_set_promiscuous(adapter, 0);
 		return 0;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of filter structure
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
                   ` (2 preceding siblings ...)
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last all-multicast mode Tony Nguyen
@ 2021-06-04 16:48 ` Tony Nguyen
  2021-11-01 23:02   ` Brelinski, Tony
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers Tony Nguyen
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Jacob Keller <jacob.e.keller@intel.com>

In iavf_config_clsflower, the filter structure could be accidentally
released at the end, if iavf_parse_cls_flower or iavf_handle_tclass ever
return a non-zero but positive value.

In this case, the function continues through to the end, and will call
kfree() on the filter structure even though it has been added to the
linked list.

This can actually happen because iavf_parse_cls_flower will return
a positive IAVF_ERR_CONFIG value instead of the traditional negative
error codes.

Fix this by ensuring that the kfree() check and error checks are
similar. Use the more idiomatic "if (err)" to catch all non-zero error
codes.

Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index ffffb6e0a6c1..bb533e9781ee 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -3040,11 +3040,11 @@ static int iavf_configure_clsflower(struct iavf_adapter *adapter,
 	/* start out with flow type and eth type IPv4 to begin with */
 	filter->f.flow_type = VIRTCHNL_TCP_V4_FLOW;
 	err = iavf_parse_cls_flower(adapter, cls_flower, filter);
-	if (err < 0)
+	if (err)
 		goto err;
 
 	err = iavf_handle_tclass(adapter, tc, filter);
-	if (err < 0)
+	if (err)
 		goto err;
 
 	/* add filter to the list */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
                   ` (3 preceding siblings ...)
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of filter structure Tony Nguyen
@ 2021-06-04 16:48 ` Tony Nguyen
  2021-11-01 23:02   ` Brelinski, Tony
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset Tony Nguyen
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Mitch Williams <mitch.a.williams@intel.com>

In some cases, the ethtool get_rxfh handler may be called with a null
key or indir parameter. So check these pointers, or you will have a very
bad day.

Fixes: 43a3d9ba34c9 ("i40evf: Allow PF driver to configure RSS")
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
index 0d22a5275218..77a8a15c5410 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
@@ -1853,14 +1853,13 @@ static int iavf_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
 
 	if (hfunc)
 		*hfunc = ETH_RSS_HASH_TOP;
-	if (!indir)
-		return 0;
-
-	memcpy(key, adapter->rss_key, adapter->rss_key_size);
+	if (key)
+		memcpy(key, adapter->rss_key, adapter->rss_key_size);
 
-	/* Each 32 bits pointed by 'indir' is stored with a lut entry */
-	for (i = 0; i < adapter->rss_lut_size; i++)
-		indir[i] = (u32)adapter->rss_lut[i];
+	if (indir)
+		/* Each 32 bits pointed by 'indir' is stored with a lut entry */
+		for (i = 0; i < adapter->rss_lut_size; i++)
+			indir[i] = (u32)adapter->rss_lut[i];
 
 	return 0;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
                   ` (4 preceding siblings ...)
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers Tony Nguyen
@ 2021-06-04 16:48 ` Tony Nguyen
  2021-11-01 23:05   ` Brelinski, Tony
  2021-06-04 16:49 ` [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0 Tony Nguyen
  2021-11-01 23:04 ` [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Brelinski, Tony
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:48 UTC (permalink / raw)
  To: intel-wired-lan

From: Surabhi Boob <surabhi.boob@intel.com>

While issuing VF Reset from the guest OS, the VF driver prints
logs about critical / Overflow error detection. This is not an
actual error since the VF_MBX_ARQLEN register is set to all FF's
for a short period of time and the VF would catch the bits set if
it was reading the register during that spike of time.
This patch introduces an additional check to ignore this condition
since the VF is in reset.

Fixes: 19b73d8efaa4 ("i40evf: Add additional check for reset")
Signed-off-by: Surabhi Boob <surabhi.boob@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index bb533e9781ee..2b1f034ca5fc 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2340,7 +2340,7 @@ static void iavf_adminq_task(struct work_struct *work)
 
 	/* check for error indications */
 	val = rd32(hw, hw->aq.arq.len);
-	if (val == 0xdeadbeef) /* indicates device in reset */
+	if (val == 0xdeadbeef || val == 0xffffffff) /* device in reset */
 		goto freedom;
 	oldval = val;
 	if (val & IAVF_VF_ARQLEN1_ARQVFE_MASK) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
                   ` (5 preceding siblings ...)
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset Tony Nguyen
@ 2021-06-04 16:49 ` Tony Nguyen
  2021-11-01 23:01   ` Brelinski, Tony
  2021-11-01 23:04 ` [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Brelinski, Tony
  7 siblings, 1 reply; 16+ messages in thread
From: Tony Nguyen @ 2021-06-04 16:49 UTC (permalink / raw)
  To: intel-wired-lan

From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>

Now setting combine to 0 will be rejected with the
appropriate error code.
This has been implemented by adding a condition that checks
the value of combine equal to zero.
Without this patch, when the user requested it, no error was
returned and combine was set to the default value for VF.

Fixes: 5520deb15326 ("iavf: Enable support for up to 16 queues")
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
index 77a8a15c5410..0885fb0f0d4b 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
@@ -1781,7 +1781,7 @@ static int iavf_set_channels(struct net_device *netdev,
 	/* All of these should have already been checked by ethtool before this
 	 * even gets to us, but just to be sure.
 	 */
-	if (num_req > adapter->vsi_res->num_queue_pairs)
+	if (num_req == 0 || num_req > adapter->vsi_res->num_queue_pairs)
 		return -EINVAL;
 
 	if (num_req == adapter->num_active_queues)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0
  2021-06-04 16:49 ` [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0 Tony Nguyen
@ 2021-11-01 23:01   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:01 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0
> 
> From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> 
> Now setting combine to 0 will be rejected with the appropriate error code.
> This has been implemented by adding a condition that checks the value of
> combine equal to zero.
> Without this patch, when the user requested it, no error was returned and
> combine was set to the default value for VF.
> 
> Fixes: 5520deb15326 ("iavf: Enable support for up to 16 queues")
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers Tony Nguyen
@ 2021-11-01 23:02   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:02 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> In some cases, the ethtool get_rxfh handler may be called with a null key or
> indir parameter. So check these pointers, or you will have a very bad day.
> 
> Fixes: 43a3d9ba34c9 ("i40evf: Allow PF driver to configure RSS")
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of filter structure
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of filter structure Tony Nguyen
@ 2021-11-01 23:02   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:02 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of
> filter structure
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> In iavf_config_clsflower, the filter structure could be accidentally released at
> the end, if iavf_parse_cls_flower or iavf_handle_tclass ever return a non-
> zero but positive value.
> 
> In this case, the function continues through to the end, and will call
> kfree() on the filter structure even though it has been added to the linked
> list.
> 
> This can actually happen because iavf_parse_cls_flower will return a positive
> IAVF_ERR_CONFIG value instead of the traditional negative error codes.
> 
> Fix this by ensuring that the kfree() check and error checks are similar. Use
> the more idiomatic "if (err)" to catch all non-zero error codes.
> 
> Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last all-multicast mode
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last all-multicast mode Tony Nguyen
@ 2021-11-01 23:03   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:03 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last
> all-multicast mode
> 
> From: Piotr Marczak <piotr.marczak@intel.com>
> 
> The driver could only quit allmulti when allmulti and promisc modes are turn
> on at the same time. If promisc had been off there was no way to turn off
> allmulti mode.
> The patch corrects this behavior. Switching allmulti does not depends on
> promisc state mode anymore
> 
> Fixes: f42a5c74da99 ("i40e: Add allmulti support for the VF")
> Signed-off-by: Piotr Marczak <piotr.marczak@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't hold
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't hold Tony Nguyen
@ 2021-11-01 23:03   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:03 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't
> hold
> 
> From: Nicholas Nunley <nicholas.d.nunley@intel.com>
> 
> In iavf_configure_clsflower() the function will bail out if it is unable to obtain
> the crit_section lock in a reasonable time. However, it will clear the lock when
> exiting, so fix this.
> 
> Fixes: 640a8af5841f ("i40evf: Reorder configure_clsflower to avoid deadlock
> on error")
> Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf Tony Nguyen
@ 2021-11-01 23:04   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:04 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before
> queues in iavf_disable_vf
> 
> From: Nicholas Nunley <nicholas.d.nunley@intel.com>
> 
> iavf_free_queues() clears adapter->num_active_queues, which
> iavf_free_q_vectors() relies on, so swap the order of these two function calls
> in iavf_disable_vf(). This resolves a panic encountered when the interface is
> disabled and then later brought up again after PF communication is restored.
> 
> Fixes: 65c7006f234c ("i40evf: assign num_active_queues inside
> i40evf_alloc_queues")
> Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features
  2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
                   ` (6 preceding siblings ...)
  2021-06-04 16:49 ` [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0 Tony Nguyen
@ 2021-11-01 23:04 ` Brelinski, Tony
  7 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:04 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in
> iavf_fix_features
> 
> From: Nicholas Nunley <nicholas.d.nunley@intel.com>
> 
> If the driver has lost contact with the PF then it enters a disabled state and
> frees adapter->vf_res. However, ndo_fix_features can still be called on the
> interface, so we need to check for this condition first. Since we have no
> information on the features at this time simply leave them unmodified and
> return.
> 
> Fixes: c4445aedfe09 ("i40evf: Fix VLAN features")
> Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset
  2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset Tony Nguyen
@ 2021-11-01 23:05   ` Brelinski, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Brelinski, Tony @ 2021-11-01 23:05 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Nguyen, Anthony L
> Sent: Friday, June 4, 2021 9:49 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive
> ASQ/ARQ errors while issuing VF reset
> 
> From: Surabhi Boob <surabhi.boob@intel.com>
> 
> While issuing VF Reset from the guest OS, the VF driver prints logs about
> critical / Overflow error detection. This is not an actual error since the
> VF_MBX_ARQLEN register is set to all FF's for a short period of time and the
> VF would catch the bits set if it was reading the register during that spike of
> time.
> This patch introduces an additional check to ignore this condition since the VF
> is in reset.
> 
> Fixes: 19b73d8efaa4 ("i40evf: Add additional check for reset")
> Signed-off-by: Surabhi Boob <surabhi.boob@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-11-01 23:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 16:48 [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Tony Nguyen
2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 2/8] iavf: free q_vectors before queues in iavf_disable_vf Tony Nguyen
2021-11-01 23:04   ` Brelinski, Tony
2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 3/8] iavf: don't clear a lock we don't hold Tony Nguyen
2021-11-01 23:03   ` Brelinski, Tony
2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 4/8] iavf: Fix failure to exit out from last all-multicast mode Tony Nguyen
2021-11-01 23:03   ` Brelinski, Tony
2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 5/8] iavf: prevent accidental free of filter structure Tony Nguyen
2021-11-01 23:02   ` Brelinski, Tony
2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 6/8] iavf: validate pointers Tony Nguyen
2021-11-01 23:02   ` Brelinski, Tony
2021-06-04 16:48 ` [Intel-wired-lan] [PATCH net 7/8] iavf: Fix for the false positive ASQ/ARQ errors while issuing VF reset Tony Nguyen
2021-11-01 23:05   ` Brelinski, Tony
2021-06-04 16:49 ` [Intel-wired-lan] [PATCH net 8/8] iavf: Fix for setting queues to 0 Tony Nguyen
2021-11-01 23:01   ` Brelinski, Tony
2021-11-01 23:04 ` [Intel-wired-lan] [PATCH net 1/8] iavf: check for null in iavf_fix_features Brelinski, Tony

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.