netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [stable request <= 3.11] net/mlx4_en: Fix BlueFlame race
@ 2014-10-18 21:14 Vinson Lee
  2014-10-21 23:15 ` Cong Wang
  2014-11-01  1:29 ` Ben Hutchings
  0 siblings, 2 replies; 11+ messages in thread
From: Vinson Lee @ 2014-10-18 21:14 UTC (permalink / raw)
  To: David S. Miller, Amir Vadai, Or Gerlitz, Jack Morgenstein,
	Eugenia Emantayev, Matan Barak
  Cc: netdev

Hi.

Please consider backporting upstream commit
2d4b646613d6b12175b017aca18113945af1faf3 "net/mlx4_en: Fix BlueFlame
race" to stable kernels <= 3.11.

commit 2d4b646613d6b12175b017aca18113945af1faf3
Author: Eugenia Emantayev <eugenia@mellanox.com>
Date:   Thu Jul 25 19:21:23 2013 +0300

    net/mlx4_en: Fix BlueFlame race

    Fix a race between BlueFlame flow and stamping in post send flow.
    Example:
        SW: Build WQE 0 on the TX buffer, except the ownership bit
        SW: Set ownership for WQE 0 on the TX buffer
        SW: Ring doorbell for WQE 0
        SW: Build WQE 1 on the TX buffer, except the ownership bit
        SW: Set ownership for WQE 1 on the TX buffer
        HW: Read WQE 0 and then WQE 1, before doorbell was rung/BF was
done for WQE 1
        HW: Produce CQEs for WQE 0 and WQE 1
        SW: Process the CQEs, and stamp WQE 0 and WQE 1 accordingly
(on the TX buffer)
        SW: Copy WQE 1 from the TX buffer to the BF register - ALREADY STAMPED!
        HW: CQE error with index 0xFFFF  - the BF WQE's control
segment is STAMPED,
                so the BF index is 0xFFFF. Error: Invalid Opcode.
    As a result QP enters the error state and no traffic can be sent.

    Solution:
    When stamping - do not stamp last completed wqe.

    Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
    Signed-off-by: Amir Vadai <amirv@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

This patch fixes Mellanox network card packet send failures on Linux
kernel 3.10.

Tested-by: Chris Suttles <csuttles@twitter.com>
Tested-by: David Mackey <tdmackey@twitter.com>
Tested-by: Matthew Mullins <mmullins@twopensource.com>
Tested-by: Vinson Lee <vlee@twitter.com>

Cheers,
Vinson

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

end of thread, other threads:[~2014-11-19  1:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-18 21:14 [stable request <= 3.11] net/mlx4_en: Fix BlueFlame race Vinson Lee
2014-10-21 23:15 ` Cong Wang
2014-10-22  4:17   ` Or Gerlitz
2014-10-22 11:15     ` Amir Vadai
2014-11-01  1:29 ` Ben Hutchings
2014-11-01 17:17   ` Cong Wang
2014-11-01 17:41     ` David Miller
2014-11-03 17:22       ` Cong Wang
2014-11-03 20:09         ` David Miller
2014-11-05 19:38           ` Vinson Lee
2014-11-19  1:44             ` Greg KH

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).