* [PATCH 1/2 v2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63
@ 2013-12-24 16:12 Ethan Zhao
2013-12-27 9:02 ` Jeff Kirsher
0 siblings, 1 reply; 4+ messages in thread
From: Ethan Zhao @ 2013-12-24 16:12 UTC (permalink / raw)
To: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
carolyn.wyborny, davem
Cc: e1000-devel, netdev, linux-kernel, Ethan Zhao
Because ixgbe driver limit the max number of VF functions could be enabled
to 63, so define one macro IXGBE_MAX_VFS_DRV_LIMIT and cleanup the const 63
in code.
v2: fix a typo.
Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++--
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 5 +++++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 0ade0cd..47e9b44 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4818,7 +4818,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
#ifdef CONFIG_PCI_IOV
/* assign number of SR-IOV VFs */
if (hw->mac.type != ixgbe_mac_82598EB)
- adapter->num_vfs = (max_vfs > 63) ? 0 : max_vfs;
+ adapter->num_vfs = (max_vfs > IXGBE_MAX_VFS_DRV_LIMIT) ? 0 : max_vfs;
#endif
/* enable itr by default in dynamic mode */
@@ -7640,7 +7640,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
ixgbe_init_mbx_params_pf(hw);
memcpy(&hw->mbx.ops, ii->mbx_ops, sizeof(hw->mbx.ops));
ixgbe_enable_sriov(adapter);
- pci_sriov_set_totalvfs(pdev, 63);
+ pci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT);
skip_sriov:
#endif
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 276d7b1..6925979 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -152,7 +152,8 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter)
* physical function. If the user requests greater thn
* 63 VFs then it is an error - reset to default of zero.
*/
- adapter->num_vfs = min_t(unsigned int, adapter->num_vfs, 63);
+ adapter->num_vfs = min_t(unsigned int,
+ adapter->num_vfs, IXGBE_MAX_VFS_DRV_LIMIT);
err = pci_enable_sriov(adapter->pdev, adapter->num_vfs);
if (err) {
@@ -259,7 +260,7 @@ static int ixgbe_pci_sriov_enable(struct pci_dev *dev, int num_vfs)
* PF. The PCI bus driver already checks for other values out of
* range.
*/
- if (num_vfs > 63) {
+ if (num_vfs > IXGBE_MAX_VFS_DRV_LIMIT) {
err = -EPERM;
goto err_out;
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
index 4713f9f..2593666 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
@@ -28,6 +28,11 @@
#ifndef _IXGBE_SRIOV_H_
#define _IXGBE_SRIOV_H_
+/* ixgbe driver limit the max number of VFs could be enabled to
+ * 63 (IXGBE_MAX_VF_FUNCTIONS-1)
+ */
+#define IXGBE_MAX_VFS_DRV_LIMIT (IXGBE_MAX_VF_FUNCTIONS-1)
+
void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter);
void ixgbe_msg_task(struct ixgbe_adapter *adapter);
int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask);
--
1.8.3.4 (Apple Git-47)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2 v2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63
2013-12-24 16:12 [PATCH 1/2 v2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63 Ethan Zhao
@ 2013-12-27 9:02 ` Jeff Kirsher
2014-01-15 3:46 ` Brown, Aaron F
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2013-12-27 9:02 UTC (permalink / raw)
To: Ethan Zhao
Cc: e1000-devel, netdev, bruce.w.allan, jesse.brandeburg,
linux-kernel, davem
[-- Attachment #1.1: Type: text/plain, Size: 589 bytes --]
On Wed, 2013-12-25 at 00:12 +0800, Ethan Zhao wrote:
> Because ixgbe driver limit the max number of VF functions could be
> enabled
> to 63, so define one macro IXGBE_MAX_VFS_DRV_LIMIT and cleanup the
> const 63
> in code.
>
> v2: fix a typo.
>
> Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 5 +++++
> 3 files changed, 10 insertions(+), 4 deletions(-)
Added to my queue, thanks Ethan!
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 455 bytes --]
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2 v2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63
2013-12-27 9:02 ` Jeff Kirsher
@ 2014-01-15 3:46 ` Brown, Aaron F
2014-01-15 13:05 ` Ethan Zhao
0 siblings, 1 reply; 4+ messages in thread
From: Brown, Aaron F @ 2014-01-15 3:46 UTC (permalink / raw)
To: Kirsher, Jeffrey T
Cc: Brandeburg, Jesse, Allan, Bruce W, Wyborny, Carolyn,
ethan.kernel@gmail.com, davem@davemloft.net,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
On Fri, 2013-12-27 at 01:02 -0800, Jeff Kirsher wrote:
> On Wed, 2013-12-25 at 00:12 +0800, Ethan Zhao wrote:
> > Because ixgbe driver limit the max number of VF functions could be
> > enabled
> > to 63, so define one macro IXGBE_MAX_VFS_DRV_LIMIT and cleanup the
> > const 63
> > in code.
> >
> > v2: fix a typo.
> >
> > Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
> > ---
> > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
> > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++--
> > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 5 +++++
> > 3 files changed, 10 insertions(+), 4 deletions(-)
>
> Added to my queue, thanks Ethan!
Hi Ethan,
Did Jeff contact you about this failing to compile? I'm currently
providing vacation covering for him and we found this was failing to
compile just before he left. We captured the failure in our notes for
this but there is no comment on if you were contacted or not.
Regardless, when I apply this patch (with or without 2-2) we get the
following error on a compilation attempt: Here's the error:
--------------------------------------------------------
Here's the error:
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function
"ixgbe_sw_init":
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: stray "\357"
in program
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: stray "\274"
in program
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: stray "\215"
in program
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: expected ")"
before numeric constant
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function
"ixgbe_probe":
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: stray "\357"
in program
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: stray "\274"
in program
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: stray "\215"
in program
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: expected ")"
before numeric constant
make[5]: *** [drivers/net/ethernet/intel/ixgbe/ixgbe_main.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [drivers/net/ethernet/intel/ixgbe] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [drivers/net/ethernet/intel] Error 2
make[2]: *** [drivers/net/ethernet] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
--------------------------------------------------------
Thanks,
Aaron
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2 v2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63
2014-01-15 3:46 ` Brown, Aaron F
@ 2014-01-15 13:05 ` Ethan Zhao
0 siblings, 0 replies; 4+ messages in thread
From: Ethan Zhao @ 2014-01-15 13:05 UTC (permalink / raw)
To: Brown, Aaron F
Cc: Kirsher, Jeffrey T, Brandeburg, Jesse, Allan, Bruce W,
Wyborny, Carolyn, davem@davemloft.net,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Aaron,
I will check the patch and make it pass the building, seems encoding issue.
Thanks,
Ethan
On Wed, Jan 15, 2014 at 11:46 AM, Brown, Aaron F
<aaron.f.brown@intel.com> wrote:
> On Fri, 2013-12-27 at 01:02 -0800, Jeff Kirsher wrote:
>> On Wed, 2013-12-25 at 00:12 +0800, Ethan Zhao wrote:
>> > Because ixgbe driver limit the max number of VF functions could be
>> > enabled
>> > to 63, so define one macro IXGBE_MAX_VFS_DRV_LIMIT and cleanup the
>> > const 63
>> > in code.
>> >
>> > v2: fix a typo.
>> >
>> > Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
>> > ---
>> > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
>> > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++--
>> > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 5 +++++
>> > 3 files changed, 10 insertions(+), 4 deletions(-)
>>
>> Added to my queue, thanks Ethan!
>
> Hi Ethan,
>
> Did Jeff contact you about this failing to compile? I'm currently
> providing vacation covering for him and we found this was failing to
> compile just before he left. We captured the failure in our notes for
> this but there is no comment on if you were contacted or not.
>
> Regardless, when I apply this patch (with or without 2-2) we get the
> following error on a compilation attempt: Here's the error:
> --------------------------------------------------------
> Here's the error:
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function
> "ixgbe_sw_init":
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: stray "\357"
> in program
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: stray "\274"
> in program
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: stray "\215"
> in program
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:5033: error: expected ")"
> before numeric constant
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function
> "ixgbe_probe":
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: stray "\357"
> in program
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: stray "\274"
> in program
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: stray "\215"
> in program
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7977: error: expected ")"
> before numeric constant
> make[5]: *** [drivers/net/ethernet/intel/ixgbe/ixgbe_main.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> make[4]: *** [drivers/net/ethernet/intel/ixgbe] Error 2
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [drivers/net/ethernet/intel] Error 2
> make[2]: *** [drivers/net/ethernet] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
> --------------------------------------------------------
>
> Thanks,
> Aaron
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-15 13:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-24 16:12 [PATCH 1/2 v2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63 Ethan Zhao
2013-12-27 9:02 ` Jeff Kirsher
2014-01-15 3:46 ` Brown, Aaron F
2014-01-15 13:05 ` Ethan Zhao
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).