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
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
..
appletalk net: Use PTR_RET rather than if(IS_ERR(.. [1] 2012-08-06 13:30:02 -07:00
arcnet
bonding bonding: fix second off-by-one error 2012-11-01 11:53:44 -04:00
caif caif: fix NULL pointer check 2012-07-24 13:54:16 -07:00
can can: sja1000: fix/add miniPCIe/cPCI PC/104Plus PCI/104e PEAK-System boards 2012-10-24 10:53:49 +02:00
cris cris: fix eth_v10.c build error 2012-08-03 20:32:31 -07:00
dsa
ethernet mlx4: 64-byte CQE/EQE support 2012-11-26 10:19:17 -08:00
fddi fddi: 64 bit bug in smt_add_para() 2012-09-01 22:44:13 -04:00
hamradio sections: fix section conflicts in drivers/net/hamradio 2012-10-06 03:04:43 +09:00
hippi
hyperv hyperv: Add buffer for extended info after the RNDIS response message. 2012-10-02 14:39:31 -04:00
ieee802154 workqueue: avoid using deprecated functions 2012-10-02 16:01:31 -07:00
irda drivers/net/irda/sh_sir.c: fix error return code 2012-10-07 14:37:11 -04:00
phy Revert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free" 2012-11-14 22:32:15 -05:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-09-28 14:40:49 -04:00
slip
team team: set qdisc_tx_busylock to avoid LOCKDEP splat 2012-10-04 15:53:48 -04:00
usb net: cdc_ncm: add Huawei devices 2012-11-13 14:33:28 -05:00
vmxnet3 vmxnet3: must split too big fragments 2012-11-02 21:58:09 -04:00
wan farsync: fix support for over 30 cards 2012-10-09 13:54:59 -04:00
wimax wimax/i2400m: use is_zero_ether_addr() instead of memcmp() 2012-08-24 13:30:26 -04:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-11-16 12:59:13 -05:00
xen-netback xen: netback: handle compound page fragments on transmit. 2012-10-10 22:50:45 -04:00
Kconfig vxlan: Depend on CONFIG_INET 2012-10-02 14:37:31 -04:00
LICENSE.SRC
Makefile vxlan: virtual extensible lan 2012-10-01 18:39:45 -04:00
Space.c
dummy.c net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
eql.c
ifb.c
loopback.c net: loopback: set default mtu to 64K 2012-09-24 16:23:53 -04:00
macvlan.c netlink: add attributes to fdb interface 2012-10-01 18:39:44 -04:00
macvtap.c macvtap: rcu_dereference outside read-lock section 2012-08-12 13:40:48 -07:00
mdio.c
mii.c
netconsole.c netconsole: remove a redundant netconsole_target_put() 2012-08-20 02:59:49 -07:00
rionet.c rapidio/rionet: rework to support multiple RIO master ports 2012-10-06 03:05:23 +09:00
sb1000.c
sungem_phy.c
tun.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-10-02 11:11:09 -07:00
veth.c veth: Allow to create peer link with given ifindex 2012-08-09 16:18:07 -07:00
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
vxlan.c vxlan: Update hard_header_len based on lowerdev when instantiating VXLAN 2012-11-13 18:19:50 -05:00
xen-netfront.c Features: 2012-10-07 07:13:01 +09:00