All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S2-V2 01/12] i40e: Queues are reserved despite "Invalid argument" error.
@ 2019-02-06 23:08 Alice Michael
  2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 02/12] i40e: Implement DDP support in i40e driver Alice Michael
                   ` (11 more replies)
  0 siblings, 12 replies; 26+ messages in thread
From: Alice Michael @ 2019-02-06 23:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Adam Ludkiewicz <adam.ludkiewicz@intel.com>

Added a new local variable in the i40e_setup_tc function named
old_queue_pairs so num_queue_pairs can be restored to the correct
value in case configuring queue channels fails. Additionally, moved
the exit label in the i40e_setup_tc function so the if (need_reset)
block can be executed.
Also, fixed data packing in the i40e_setup_tc function.

Signed-off-by: Adam Ludkiewicz <adam.ludkiewicz@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e53b7b89ef1d..9b315230a0d6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7290,10 +7290,12 @@ static int i40e_setup_tc(struct net_device *netdev, void *type_data)
 	struct i40e_pf *pf = vsi->back;
 	u8 enabled_tc = 0, num_tc, hw;
 	bool need_reset = false;
+	int old_queue_pairs;
 	int ret = -EINVAL;
 	u16 mode;
 	int i;
 
+	old_queue_pairs = vsi->num_queue_pairs;
 	num_tc = mqprio_qopt->qopt.num_tc;
 	hw = mqprio_qopt->qopt.hw;
 	mode = mqprio_qopt->mode;
@@ -7394,6 +7396,7 @@ static int i40e_setup_tc(struct net_device *netdev, void *type_data)
 		}
 		ret = i40e_configure_queue_channels(vsi);
 		if (ret) {
+			vsi->num_queue_pairs = old_queue_pairs;
 			netdev_info(netdev,
 				    "Failed configuring queue channels\n");
 			need_reset = true;
-- 
2.19.2


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

end of thread, other threads:[~2019-03-02  0:00 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06 23:08 [Intel-wired-lan] [next PATCH S2-V2 01/12] i40e: Queues are reserved despite "Invalid argument" error Alice Michael
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 02/12] i40e: Implement DDP support in i40e driver Alice Michael
2019-02-13 20:14   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 03/12] i40e: don't allow changes to HW vlan stripping on active port vlans Alice Michael
2019-03-02  0:00   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 04/12] i40e: save PTP time before a device reset Alice Michael
2019-02-12 19:51   ` Keller, Jacob E
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 05/12] i40e: Fix for 10G ports LED not blinking Alice Michael
2019-02-13 20:15   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 06/12] i40e: Update i40e_init_dcb to return correct error Alice Michael
2019-02-13 20:16   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 07/12] i40e: Remove misleading messages for untrusted VF Alice Michael
2019-02-13 20:16   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 08/12] i40e: Changed maximum supported FW API version to 1.8 Alice Michael
2019-02-13 20:17   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 09/12] i40e: The driver now prints the API version in error message Alice Michael
2019-02-12  9:41   ` Ludkiewicz, Adam
2019-02-13 20:17   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 10/12] i40e: Report advertised link modes on 40GBASE_SR4 Alice Michael
2019-02-12  9:41   ` Ludkiewicz, Adam
2019-02-13 20:21   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 11/12] i40e: Able to add up to 16 MAC filters on an untrusted VF Alice Michael
2019-02-13 20:24   ` Bowers, AndrewX
2019-02-06 23:08 ` [Intel-wired-lan] [next PATCH S2-V2 12/12] i40e: Fix misleading error message Alice Michael
2019-02-13 20:24   ` Bowers, AndrewX
2019-02-13 18:57 ` [Intel-wired-lan] [next PATCH S2-V2 01/12] i40e: Queues are reserved despite "Invalid argument" error Bowers, AndrewX

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.