All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bimmy Pujari <bimmy.pujari@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S40-V2 08/12] i40e: Don't notify client of VF reset during VF creation
Date: Wed, 27 Jul 2016 12:02:37 -0700	[thread overview]
Message-ID: <1469646161-30024-9-git-send-email-bimmy.pujari@intel.com> (raw)
In-Reply-To: <1469646161-30024-1-git-send-email-bimmy.pujari@intel.com>

From: Avinash Dayanand <avinash.dayanand@intel.com>

VF goes through reset path during VF creation which happens to also
have notification of VF reset to client. Adding conditional check to
avoid wrongly notifying VF reset during VF creation.

Also changing the call order of VF enable, calling it after VF creation
rather than before.

Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com>
Change-ID: I96eabd99deae746a2f0fc465194c886f196178ce
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 0fa050a..5ea659c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -991,7 +991,9 @@ complete_reset:
 		i40e_enable_vf_mappings(vf);
 		set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states);
 		clear_bit(I40E_VF_STAT_DISABLED, &vf->vf_states);
-		i40e_notify_client_of_vf_reset(pf, abs_vf_id);
+		/* Do not notify the client during VF init */
+		if (vf->pf->num_alloc_vfs)
+			i40e_notify_client_of_vf_reset(pf, abs_vf_id);
 		vf->num_vlan = 0;
 	}
 	/* tell the VF the reset is done */
@@ -1090,7 +1092,6 @@ int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs)
 			goto err_iov;
 		}
 	}
-	i40e_notify_client_of_vf_enable(pf, num_alloc_vfs);
 	/* allocate memory */
 	vfs = kcalloc(num_alloc_vfs, sizeof(struct i40e_vf), GFP_KERNEL);
 	if (!vfs) {
@@ -1114,6 +1115,8 @@ int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs)
 	}
 	pf->num_alloc_vfs = num_alloc_vfs;
 
+	i40e_notify_client_of_vf_enable(pf, num_alloc_vfs);
+
 err_alloc:
 	if (ret)
 		i40e_free_vfs(pf);
-- 
2.4.11


  parent reply	other threads:[~2016-07-27 19:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 19:02 [Intel-wired-lan] [next PATCH S40-V2 00/12] i40e/i40evf updates Bimmy Pujari
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 01/12] i40e: Fix a bug where a client close can be called before an open is complete Bimmy Pujari
2016-07-29 15:00   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 02/12] i40e/i40evf: Reset vlan filter count when resetting Bimmy Pujari
2016-07-29 15:18   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 03/12] i40e: reset RX csum error stat with other pf stats Bimmy Pujari
2016-07-29 16:03   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 04/12] i40evf: add missing rtnl_lock() around i40evf_set_interrupt_capability Bimmy Pujari
2016-07-29 16:10   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 05/12] i40e: Fix static analysis tool warning Bimmy Pujari
2016-07-29 16:21   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 06/12] i40e: don't allow reduction of channels below active FD rules Bimmy Pujari
2016-08-03 17:24   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 07/12] i40e: Force register writes to mitigate sync issues with iwarp VF driver Bimmy Pujari
2016-07-29 17:02   ` Bowers, AndrewX
2016-07-29 17:04   ` Bowers, AndrewX
2016-07-27 19:02 ` Bimmy Pujari [this message]
2016-08-01 14:10   ` [Intel-wired-lan] [next PATCH S40-V2 08/12] i40e: Don't notify client of VF reset during VF creation Bowers, AndrewX
2016-08-03 16:39   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 09/12] i40e: fix lookup table when RSS disabled/enabled Bimmy Pujari
2016-07-29 17:10   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 10/12] i40e: fix memory leak Bimmy Pujari
2016-07-29 17:17   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 11/12] i40e: Allow RSS Hash set with less than four parameters Bimmy Pujari
2016-07-29 17:26   ` Bowers, AndrewX
2016-07-27 19:02 ` [Intel-wired-lan] [next PATCH S40-V2 12/12] i40e/i40evf-Bump version from 1.6.11 to 1.6.12 Bimmy Pujari
2016-07-29 17:27   ` Bowers, AndrewX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469646161-30024-9-git-send-email-bimmy.pujari@intel.com \
    --to=bimmy.pujari@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.