dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/net/ethernet
Or Gerlitz 08ff32352d mlx4: 64-byte CQE/EQE support
ConnectX-3 devices can use either 64- or 32-byte completion queue
entries (CQEs) and event queue entries (EQEs).  Using 64-byte
EQEs/CQEs performs better because each entry is aligned to a complete
cacheline.  This patch queries the HCA's capabilities, and if it
supports 64-byte CQEs and EQES the driver will configure the HW to
work in 64-byte mode.

The 32-byte vs 64-byte mode is global per HCA and not per CQ or EQ.

Since this mode is global, userspace (libmlx4) must be updated to work
with the configured CQE size, and guests using SR-IOV virtual
functions need to know both EQE and CQE size.

In case one of the 64-byte CQE/EQE capabilities is activated, the
patch makes sure that older guest drivers that use the QUERY_DEV_FUNC
command (e.g as done in mlx4_core of Linux 3.3..3.6) will notice that
they need an update to be able to work with the PPF. This is done by
changing the returned pf_context_behaviour not to be zero any more. In
case none of these capabilities is activated that value remains zero
and older guest drivers can run OK.

The SRIOV related flow is as follows

1. the PPF does the detection of the new capabilities using
   QUERY_DEV_CAP command.

2. the PPF activates the new capabilities using INIT_HCA.

3. the VF detects if the PPF activated the capabilities using
   QUERY_HCA, and if this is the case activates them for itself too.

Note that the VF detects that it must be aware to the new PF behaviour
using QUERY_FUNC_CAP.  Steps 1 and 2 apply also for native mode.

User space notification is done through a new field introduced in
struct mlx4_ib_ucontext which holds device capabilities for which user
space must take action. This changes the binary interface so the ABI
towards libmlx4 exposed through uverbs is bumped from 3 to 4 but only
when **needed** i.e. only when the driver does use 64-byte CQEs or
future device capabilities which must be in sync by user space. This
practice allows to work with unmodified libmlx4 on older devices (e.g
A0, B0) which don't support 64-byte CQEs.

In order to keep existing systems functional when they update to a
newer kernel that contains these changes in VF and userspace ABI, a
module parameter enable_64b_cqe_eqe must be set to enable 64-byte
mode; the default is currently false.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-11-26 10:19:17 -08:00
..
3com treewide: fix comment/printk/variable typos 2012-09-01 10:33:05 -07:00
8390 sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
adaptec sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
adi
aeroflex ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
alteon
amd drivers/net/ethernet/amd/au1000_eth.c: fix error return code 2012-10-07 14:37:11 -04:00
apple ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
atheros sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
broadcom net: bnx2x: Fix typo in bnx2x driver 2012-11-03 15:31:23 -04:00
brocade bna: Fix warning false positive. 2012-09-27 18:31:58 -04:00
cadence at91ether: return PTR_ERR if call to clk_get fails 2012-09-20 22:21:40 -04:00
calxeda net: remove skb recycling 2012-10-07 00:40:54 -04:00
chelsio cxgb4: Fix initialization of SGE_CONTROL register 2012-11-07 19:02:19 -05:00
cirrus cs89x0 : packet reception not working 2012-08-31 15:48:56 -04:00
cisco enic: remove unnecessary setting of skb->dev 2012-07-10 23:24:56 -07:00
davicom dm9000: some coldfire boards need this 2012-05-14 18:40:16 -04:00
dec drivers/net/ethernet/dec/tulip/dmfe.c: fix error return code 2012-10-07 14:37:04 -04:00
dlink sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
emulex be2net: Remove code that stops further access to BE NIC based on UE bits 2012-10-09 13:54:59 -04:00
faraday net: ftgmac100/ftmac100: dont pull too much data 2012-07-18 09:40:53 -07:00
freescale gianfar: ethernet vanishes after restoring from hibernation 2012-11-09 17:08:36 -05:00
fujitsu drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
hp ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
i825xx net: Make ZNET driver config depend on X86. 2012-09-22 18:11:32 -04:00
ibm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
icplus
intel ixgbe: PTP get_ts_info missing software support 2012-11-01 11:22:34 -04:00
marvell drivers/net: use tasklet_kill in device remove/close process 2012-11-03 15:10:15 -04:00
mellanox mlx4: 64-byte CQE/EQE support 2012-11-26 10:19:17 -08:00
micrel drivers/net: fix tasklet misuse issue 2012-11-14 21:50:10 -05:00
microchip
myricom myri10ge: Use PCI Express Capability accessors 2012-08-23 10:11:14 -06:00
natsemi drivers/net/ethernet/natsemi/xtsonic.c: fix error return code 2012-10-07 14:37:12 -04:00
neterion Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
nuvoton
nvidia forcedeth: prevent TX timeouts after reboot 2012-08-30 13:04:57 -04:00
nxp drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free 2012-11-02 21:36:06 -04:00
octeon Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-10-09 16:08:04 +09:00
oki-semi pch_gbe: fix error handling in pch_gbe_up() 2012-10-24 23:04:31 -04:00
packetengines
pasemi netdev: pasemi: fix return value check in pasemi_mac_phy_init() 2012-09-27 13:20:50 -04:00
qlogic qla3xxx: Ensure request/response queue addr writes to the registers 2012-10-22 15:16:07 -04:00
racal
rdc r6040: use module_pci_driver macro 2012-07-09 14:42:30 -07:00
realtek r8169: allow multicast packets on sub-8168f chipset. 2012-11-03 15:27:07 -04:00
renesas drivers/net/ethernet/renesas/sh_eth.c: fix error return code 2012-10-07 14:37:12 -04:00
seeq Merge branch 'cleanup/__iomem' into next/cleanup 2012-09-22 10:24:29 -07:00
sfc ptp: use list_move instead of list_del/list_add 2012-10-07 14:52:14 -04:00
sgi Merge tty-next into 3.6-rc1 2012-08-06 09:48:31 -07:00
silan
sis drivers/net/ethernet/sis/sis900.c: fix error return code 2012-10-07 14:37:10 -04:00
smsc net/smsc911x: Fix ready check in cases where WORD_SWAP is needed 2012-11-14 21:50:10 -05:00
stmicro net: remove skb recycling 2012-10-07 00:40:54 -04:00
sun drivers/net/ethernet/sun/sungem.c: fix error return code 2012-10-07 14:37:12 -04:00
tehuti drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
ti NET_VENDOR_TI: make available for am33xx as well 2012-10-24 23:07:36 -04:00
tile tilegx: request_irq with a non-null device name 2012-11-16 01:40:41 -05:00
toshiba drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
tundra drivers/net/ethernet/tundra/tsi108_eth.c: delete double assignment 2012-08-30 13:08:37 -04:00
via ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
wiznet w5300: using eth_hw_addr_random() for random MAC and set device flag 2012-08-24 13:30:27 -04:00
xilinx drivers/net: fix tasklet misuse issue 2012-11-14 21:50:10 -05:00
xircom
xscale ixp4xx_eth: fix ptp_ixp46x build failure 2012-08-06 13:30:01 -07:00
Kconfig net: mipsnet: Remove the MIPSsim Ethernet driver. 2012-09-24 16:47:23 -04:00
Makefile net: mipsnet: Remove the MIPSsim Ethernet driver. 2012-09-24 16:47:23 -04:00
dnet.c
dnet.h
ethoc.c ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
fealnx.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
jme.c drivers/net: fix tasklet misuse issue 2012-11-14 21:50:10 -05:00
jme.h
korina.c
lantiq_etop.c ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
netx-eth.c ARM: netx: move platform_data definitions 2012-09-14 11:17:36 +02:00
s6gmac.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00