netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] igb: warn if max_vfs limit is exceeded
@ 2011-02-24 11:02 Stefan Assmann
  2011-02-24 11:23 ` Jeff Kirsher
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Assmann @ 2011-02-24 11:02 UTC (permalink / raw)
  To: netdev; +Cc: e1000-devel

From: Stefan Assmann <sassmann@redhat.com>

Currently there's no warning printed when max_vfs > 7 is specified with
igb and the maximum of 7 is silently enforced. This patch prints a
warning and informs the user of the actions taken.

Signed-off-by: Stefan Assmann <sassmann@redhat.com>
---
 drivers/net/igb/igb_main.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index cb6bf7b..abeb2a6 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2290,7 +2290,12 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
 	switch (hw->mac.type) {
 	case e1000_82576:
 	case e1000_i350:
-		adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs;
+		if (max_vfs > 7) {
+			dev_warn(&pdev->dev,
+				 "Maximum of 7 VFs per PF, using max\n");
+			adapter->vfs_allocated_count = 7;
+		} else
+			adapter->vfs_allocated_count = max_vfs;
 		break;
 	default:
 		break;
-- 
1.7.3.4


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

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

* Re: [PATCH] igb: warn if max_vfs limit is exceeded
  2011-02-24 11:02 [PATCH] igb: warn if max_vfs limit is exceeded Stefan Assmann
@ 2011-02-24 11:23 ` Jeff Kirsher
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2011-02-24 11:23 UTC (permalink / raw)
  To: Stefan Assmann; +Cc: netdev, e1000-devel@lists.sourceforge.net

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

On Thu, 2011-02-24 at 03:02 -0800, Stefan Assmann wrote:
> From: Stefan Assmann <sassmann@redhat.com>
> 
> Currently there's no warning printed when max_vfs > 7 is specified
> with
> igb and the maximum of 7 is silently enforced. This patch prints a
> warning and informs the user of the actions taken.
> 
> Signed-off-by: Stefan Assmann <sassmann@redhat.com>
> ---
>  drivers/net/igb/igb_main.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-) 

Thanks for the patch Stefan.  I have added the patch to my igb queue of
patches.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2011-02-24 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 11:02 [PATCH] igb: warn if max_vfs limit is exceeded Stefan Assmann
2011-02-24 11:23 ` Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).