* [Intel-wired-lan] [PATCH] i40e: fix incorrect assignment of I40E_FLAG_HW_ATR_EVICT_CAPABLE
@ 2017-05-04 20:54 Jacob Keller
2017-05-04 21:18 ` Jeff Kirsher
0 siblings, 1 reply; 2+ messages in thread
From: Jacob Keller @ 2017-05-04 20:54 UTC (permalink / raw)
To: intel-wired-lan
When attempting to setup I40E_FLAG_HW_ATR_EVICT_ENABLED, we accidentally
broke all PF flags because we directly assigned the value of
I40E_FLAG_HW_ATR_EVICT_CAPABLE.
This is incorrect, but the obvious fix of changing the assignment to an
|= is not correct either, since I40E_FLAG_HW_ATR_EVICT_CAPABLE is
already set in the feature list.
Instead, we intended to set the I40E_FLAG_HW_ATR_EVICT_ENABLED flag, but
only if I40E_FLAG_HW_ATR_EVICT_CAPABLE had already been set.
Without this patch we will have many problems including disabling MSI-X
support, and not having HW ATR eviction actually enabled.
Fixes: 47994c119a36 ("i40e: remove hw_disabled_flags in favor of using separate flag bits", 2017-04-19)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
The fix provided by Sridhar fixes the major problem but would result in
us not actually having HW_ATR_EVICT_ENABLED properly set. The whole
process of this series got messed up when we sent upstream, and I am
working on sorting it out.
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e4eb97832413..6200a9a55dc2 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8822,11 +8822,12 @@ static int i40e_sw_init(struct i40e_pf *pf)
(pf->hw.aq.api_min_ver > 4))) {
/* Supported in FW API version higher than 1.4 */
pf->flags |= I40E_FLAG_GENEVE_OFFLOAD_CAPABLE;
- pf->flags = I40E_FLAG_HW_ATR_EVICT_CAPABLE;
- } else {
- pf->flags = I40E_FLAG_HW_ATR_EVICT_CAPABLE;
}
+ /* Enable HW ATR eviction if possible */
+ if (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)
+ pf->flags |= I40E_FLAG_HW_ATR_EVICT_ENABLED;
+
pf->eeprom_version = 0xDEAD;
pf->lan_veb = I40E_NO_VEB;
pf->lan_vsi = I40E_NO_VSI;
--
2.13.0.rc0.317.gcc792a6cad5a
^ permalink raw reply related [flat|nested] 2+ messages in thread* [Intel-wired-lan] [PATCH] i40e: fix incorrect assignment of I40E_FLAG_HW_ATR_EVICT_CAPABLE
2017-05-04 20:54 [Intel-wired-lan] [PATCH] i40e: fix incorrect assignment of I40E_FLAG_HW_ATR_EVICT_CAPABLE Jacob Keller
@ 2017-05-04 21:18 ` Jeff Kirsher
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2017-05-04 21:18 UTC (permalink / raw)
To: intel-wired-lan
On Thu, 2017-05-04 at 13:54 -0700, Jacob Keller wrote:
> When attempting to setup I40E_FLAG_HW_ATR_EVICT_ENABLED, we
> accidentally
> broke all PF flags because we directly assigned the value of
> I40E_FLAG_HW_ATR_EVICT_CAPABLE.
>
> This is incorrect, but the obvious fix of changing the assignment to
> an
> > = is not correct either, since I40E_FLAG_HW_ATR_EVICT_CAPABLE is
>
> already set in the feature list.
>
> Instead, we intended to set the I40E_FLAG_HW_ATR_EVICT_ENABLED flag,
> but
> only if I40E_FLAG_HW_ATR_EVICT_CAPABLE had already been set.
>
> Without this patch we will have many problems including disabling
> MSI-X
> support, and not having HW ATR eviction actually enabled.
>
> Fixes: 47994c119a36 ("i40e: remove hw_disabled_flags in favor of
> using separate flag bits", 2017-04-19)
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> ?drivers/net/ethernet/intel/i40e/i40e_main.c | 7 ++++---
> ?1 file changed, 4 insertions(+), 3 deletions(-)
Grr... Patchwork is not picking patches up. I have sent an email to
Jeremy Kerr (patchwork admin for ozlabs.org).
I will apply Jake's updated version of the patch to my net-queue and
next-queue trees, but plan to push to Dave net tree.
Alex- can I assume your ACK still stands for this updated change?
Andrew- This has high priority and I would like to see testing
completed in the next day or so, please.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20170504/9a8231d6/attachment.asc>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-04 21:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-04 20:54 [Intel-wired-lan] [PATCH] i40e: fix incorrect assignment of I40E_FLAG_HW_ATR_EVICT_CAPABLE Jacob Keller
2017-05-04 21:18 ` Jeff Kirsher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox