All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net v2] i40e: Fix adding ADq filter to TC0
@ 2022-04-29 12:27 Jedzej Jagielski
  2022-05-19 10:03 ` Sreenivas, Bharathi
  0 siblings, 1 reply; 2+ messages in thread
From: Jedzej Jagielski @ 2022-04-29 12:27 UTC (permalink / raw)
  To: intel-wired-lan

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

Procedure of configure tc flower filters erroneously allows to create
filters on TC0 where unfiltered packets are also directed by default.
Issue was caused by insufficient checks of hw_tc parameter specifying
the hardware traffic class to pass matching packets to.

Fix checking hw_tc parameter which blocks creation of filters on TC0.

Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
---
v2: fix commit msg
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 1e074a6462d4..a0d5d696cdc1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8537,6 +8537,11 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
 		return -EOPNOTSUPP;
 	}
 
+	if (!tc) {
+		dev_err(&pf->pdev->dev, "Unable to add filter because of invalid destination");
+		return -EINVAL;
+	}
+
 	if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) ||
 	    test_bit(__I40E_RESET_INTR_RECEIVED, pf->state))
 		return -EBUSY;
-- 
2.27.0


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

* [Intel-wired-lan] [PATCH net v2] i40e: Fix adding ADq filter to TC0
  2022-04-29 12:27 [Intel-wired-lan] [PATCH net v2] i40e: Fix adding ADq filter to TC0 Jedzej Jagielski
@ 2022-05-19 10:03 ` Sreenivas, Bharathi
  0 siblings, 0 replies; 2+ messages in thread
From: Sreenivas, Bharathi @ 2022-05-19 10:03 UTC (permalink / raw)
  To: intel-wired-lan



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jedzej Jagielski
> Sent: Friday, April 29, 2022 5:57 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Jagielski, Jedrzej <jedrzej.jagielski@intel.com>
> Subject: [Intel-wired-lan] [PATCH net v2] i40e: Fix adding ADq filter to TC0
> 
> From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> 
> Procedure of configure tc flower filters erroneously allows to create filters
> on TC0 where unfiltered packets are also directed by default.
> Issue was caused by insufficient checks of hw_tc parameter specifying the
> hardware traffic class to pass matching packets to.
> 
> Fix checking hw_tc parameter which blocks creation of filters on TC0.
> 
> Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---
> v2: fix commit msg
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
Tested-by: Bharathi Sreenivas<bharathi.sreenivas@intel.com>

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

end of thread, other threads:[~2022-05-19 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 12:27 [Intel-wired-lan] [PATCH net v2] i40e: Fix adding ADq filter to TC0 Jedzej Jagielski
2022-05-19 10:03 ` Sreenivas, Bharathi

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.