[ewg] [PATCH 01/10] pre-reserve MPTs for FC

Vu Pham vuhuong at mellanox.com
Fri Aug 6 15:49:42 PDT 2010


From: Yevgeny Petrilin <yevgenyp at mellanox.co.il>
Date: Sun, 16 Nov 2008 10:25:59 +0200
Subject: [PATCH] mlx4: Fibre Channel support

As we did with QPs, some of the MPTs are pre-reserved
(the MPTs that are mapped for FEXCHs, 2*64K of them).
So needed to split the operation of allocating an MPT to two:
        The allocation of a bit from the bitmap
        The actual creation of the entry (and it's MTT).
So, mr_alloc_reserved() is the second part, where you know which MPT 
number was allocated.
mr_alloc() is the one that allocates a number from the bitmap.
Normal users keep using the original mr_alloc().
For FEXCH, when we know the pre-reserved MPT entry, we call 
mr_alloc_reserved() directly.

Same with the mr_free() and corresponding mr_free_reserved().
The first will just put back the bit, the later will actually
destroy the entry, but will leave the bit set.

map_phys_fmr_fbo() is very much like the original map_phys_fmr()
 allows setting an FBO (First Byte Offset) for the MPT
 allows setting the data length for the MPT
 does not increase the higher bits of the key after every map.

Signed-off-by: Yevgeny Petrilin <yevgenyp at mellanox.co.il>
Signed-off-by: Oren Duer <oren at mellanox.co.il>
Signed-off-by: Vu Pham <vu at mellanx.com>

 drivers/net/mlx4/main.c     |    4 +-
 drivers/net/mlx4/mr.c       |  128 
+++++++++++++++++++++++++++++++++++++-----
 include/linux/mlx4/device.h |   21 +++++++-
 include/linux/mlx4/qp.h     |   11 +++-
 4 files changed, 144 insertions(+), 20 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlx4_fc_0001_prereserve_mpt_for_fc.patch
Type: text/x-patch
Size: 11596 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ewg/attachments/20100806/1acf68e0/attachment.bin>


More information about the ewg mailing list