Re: [PATCHv2] IB/srp: add change_queue_depth and change_queue_type support
On 08/28/2013 10:19 AM, Jack Wang wrote: Hi, Below patch is new version which address comments from Bart. Hi Roland, Could you included this in your tree or do you need me resend it? Best regards, Jack From 62d87b4d546066b251e44a3cb468b16783df7ee4 Mon Sep 17 00:00:00 2001 From: Jack Wang jinpu.w...@profitbricks.com Date: Mon, 26 Aug 2013 15:50:03 +0200 Subject: [PATCH] IB/srp: add change_queue_depth/change_queue_type support Currently, it's not possible to change queue depth for device behind SRP host. Sometimes, we need to adjust queue_depth for performance reason(eg storage busy, we need lower queue_depth to avoid running into SCSI error handler), so this patch add support for SRP driver. Signed-off-by: Jack Wang jinpu.w...@profitbricks.com --- drivers/infiniband/ulp/srp/ib_srp.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 06a3e4b..2713e02 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -47,6 +47,7 @@ #include scsi/scsi.h #include scsi/scsi_device.h #include scsi/scsi_dbg.h +#include scsi/scsi_tcq.h #include scsi/srp.h #include scsi/scsi_transport_srp.h @@ -1875,6 +1876,57 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) return 0; } +/** + * srp_change_queue_type - changing device queue tag type + * @sdev: scsi device struct + * @tag_type: requested tag type + * + * Returns queue tag type. + */ +static int +srp_change_queue_type(struct scsi_device *sdev, int tag_type) +{ + if (sdev-tagged_supported) { + scsi_set_tag_type(sdev, tag_type); + if (tag_type) + scsi_activate_tcq(sdev, sdev-queue_depth); + else + scsi_deactivate_tcq(sdev, sdev-queue_depth); + } else + tag_type = 0; + + return tag_type; +} + +/** + * srp_change_queue_depth - setting device queue depth + * @sdev: scsi device struct + * @qdepth: requested queue depth + * @reason: SCSI_QDEPTH_DEFAULT/SCSI_QDEPTH_QFULL/SCSI_QDEPTH_RAMP_UP + * (see include/scsi/scsi_host.h for definition) + * + * Returns queue depth. + */ +static int +srp_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) +{ + struct Scsi_Host *shost = sdev-host; + int max_depth; + if (reason == SCSI_QDEPTH_DEFAULT || reason == SCSI_QDEPTH_RAMP_UP) { + max_depth = shost-can_queue; + if (!sdev-tagged_supported) + max_depth = 1; + if (qdepth max_depth) + qdepth = max_depth; + scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); + } else if (reason == SCSI_QDEPTH_QFULL) + scsi_track_queue_full(sdev, qdepth); + else + return -EOPNOTSUPP; + + return sdev-queue_depth; +} + static int srp_send_tsk_mgmt(struct srp_target_port *target, u64 req_tag, unsigned int lun, u8 func) { @@ -2260,6 +2312,8 @@ static struct scsi_host_template srp_template = { .slave_configure= srp_slave_configure, .info = srp_target_info, .queuecommand = srp_queuecommand, + .change_queue_depth = srp_change_queue_depth, + .change_queue_type = srp_change_queue_type, .eh_abort_handler = srp_abort, .eh_device_reset_handler= srp_reset_device, .eh_host_reset_handler = srp_reset_host, -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/6] Simplify some mps and mrrs setting related code
This series simplify mps and mrrs setting related code in drivers. Export the pcie_set/get_mps() like pcie_set/get_readrq(). So drivers can use these interfaces to simplify code that set mps and mrrs. Patch 2 use pci_is_root_bus() instead of if (bus-parent) statement for better readability. Yijing Wang (6): PCI: Export pcie_set_mps() and pcie_get_mps() title/pci: use cached pci_dev-pcie_mpss to simplify code IB/qib: Use pci_is_root_bus() to check whether it is a root bus IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code staging/et131x: Use cached pci_dev-pcie_mpss and pcie_set_readrq() to simplif code radeon: Use pcie_get_readrq() and pcie_set_readrq() to simplify code arch/tile/kernel/pci.c |7 +-- drivers/gpu/drm/radeon/evergreen.c | 19 ++- drivers/infiniband/hw/qib/qib_pcie.c | 98 +++--- drivers/pci/pci.c|2 + drivers/staging/et131x/et131x.c | 14 + 5 files changed, 44 insertions(+), 96 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/6] staging/et131x: Use cached pci_dev-pcie_mpss and pcie_set_readrq() to simplif code
The PCI core caches the PCI-E Max Payload Size Supported in pci_dev-pcie_mpss, so use that instead of pcie_capability_read_dword(). Also use pcie_set_readrq() instead of pcie_capability_clear_and_set_word() to simplify code. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/staging/et131x/et131x.c | 14 +++--- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index f73e58f..876881d 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -3605,17 +3605,10 @@ static int et131x_pci_init(struct et131x_adapter *adapter, goto err_out; } - /* Let's set up the PORT LOGIC Register. First we need to know what -* the max_payload_size is -*/ - if (pcie_capability_read_word(pdev, PCI_EXP_DEVCAP, max_payload)) { - dev_err(pdev-dev, - Could not read PCI config space for Max Payload Size\n); - goto err_out; - } + /* Let's set up the PORT LOGIC Register. */ /* Program the Ack/Nak latency and replay timers */ - max_payload = 0x07; + max_payload = pdev-pcie_mpss; if (max_payload 2) { static const u16 acknak[2] = { 0x76, 0xD0 }; @@ -3645,8 +3638,7 @@ static int et131x_pci_init(struct et131x_adapter *adapter, } /* Change the max read size to 2k */ - if (pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL, - PCI_EXP_DEVCTL_READRQ, 0x4 12)) { + if (pcie_set_readrq(pdev, 2048)) { dev_err(pdev-dev, Couldn't change PCI config space for Max read size\n); goto err_out; -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/6] radeon: Use pcie_get_readrq() and pcie_set_readrq() to simplify code
Use pcie_get_readrq() and pcie_set_readrq() functions to simplify code. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/gpu/drm/radeon/evergreen.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index d5b49e3..b191f92 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -1169,23 +1169,16 @@ int evergreen_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk) void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev) { - u16 ctl, v; - int err; - - err = pcie_capability_read_word(rdev-pdev, PCI_EXP_DEVCTL, ctl); - if (err) - return; - - v = (ctl PCI_EXP_DEVCTL_READRQ) 12; + int readrq; + u16 v; + readrq = pcie_get_readrq(rdev-pdev); + v = ffs(readrq) - 8; /* if bios or OS sets MAX_READ_REQUEST_SIZE to an invalid value, fix it * to avoid hangs or perfomance issues */ - if ((v == 0) || (v == 6) || (v == 7)) { - ctl = ~PCI_EXP_DEVCTL_READRQ; - ctl |= (2 12); - pcie_capability_write_word(rdev-pdev, PCI_EXP_DEVCTL, ctl); - } + if ((v == 0) || (v == 6) || (v == 7)) + pcie_set_readrq(rdev-pdev, 512); } static bool dce4_is_in_vblank(struct radeon_device *rdev, int crtc) -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] title/pci: use cached pci_dev-pcie_mpss to simplify code
The PCI core caches the PCI-E Max Payload Size Supported in pci_dev-pcie_mpss, so use that instead of pcie_capability_read_dword(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/tile/kernel/pci.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 67237d3..692a799 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -246,15 +246,12 @@ static void fixup_read_and_payload_sizes(void) /* Scan for the smallest maximum payload size. */ for_each_pci_dev(dev) { u32 devcap; - int max_payload; if (!pci_is_pcie(dev)) continue; - pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, devcap); - max_payload = devcap PCI_EXP_DEVCAP_PAYLOAD; - if (max_payload smallest_max_payload) - smallest_max_payload = max_payload; + if (dev-pcie_mpss smallest_max_payload) + smallest_max_payload = dev-pcie_mpss; } /* Now, set the max_payload_size for all devices to that value. */ -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/6] PCI: Export pcie_set_mps() and pcie_get_mps()
Export pcie_get_mps() and pcie_set_mps() functions, so driver can use them to simplify code. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/pci.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b821a62..e35f7ec 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3972,6 +3972,7 @@ int pcie_get_mps(struct pci_dev *dev) return 128 ((ctl PCI_EXP_DEVCTL_PAYLOAD) 5); } +EXPORT_SYMBOL(pcie_get_mps); /** * pcie_set_mps - set PCI Express maximum payload size @@ -3996,6 +3997,7 @@ int pcie_set_mps(struct pci_dev *dev, int mps) return pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_PAYLOAD, v); } +EXPORT_SYMBOL(pcie_set_mps); /** * pci_select_bars - Make BAR mask from the type of resource -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] IB/qib: Use pci_is_root_bus() to check whether it is a root bus
Use pci_is_root_bus() instead of if (bus-parent) statement for better readability. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/infiniband/hw/qib/qib_pcie.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index c574ec7..3a5b99b 100644 --- a/drivers/infiniband/hw/qib/qib_pcie.c +++ b/drivers/infiniband/hw/qib/qib_pcie.c @@ -590,7 +590,7 @@ static int qib_tune_pcie_caps(struct qib_devdata *dd) /* Find out supported and configured values for parent (root) */ parent = dd-pcidev-bus-self; - if (parent-bus-parent) { + if (!pci_is_root_bus(parent-bus)) { qib_devinfo(dd-pcidev, Parent not root\n); goto bail; } -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[ANNOUNCE] libmlx5 1.0.0 released
Hi, I would like to announce the availability of libmlx5, the provider library for Mellanox Connect-IB devices. The library can be found here: www.openfabrics.org/downloads/mlx5/libmlx5-1.0.0.tar.gz Thanks, Eli -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] IB/srp: add change_queue_depth and change_queue_type support
On Mon, 2013-09-09 at 14:12 +0200, Jack Wang wrote: On 08/28/2013 10:19 AM, Jack Wang wrote: Hi, Below patch is new version which address comments from Bart. Hi Roland, Could you included this in your tree or do you need me resend it? Acked-by: David Dillow dillo...@ornl.gov I expect to get through Bart's patches later today. -- Dave Dillow National Center for Computational Science Oak Ridge National Laboratory (865) 241-6602 office -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 3/6] IB/qib: Use pci_is_root_bus() to check whether it is a root bus
Subject: [PATCH 3/6] IB/qib: Use pci_is_root_bus() to check whether it is a root bus Thanks for the patch! Acked-by: Mike Marciniszyn mike.marcinis...@intel.com -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code
Subject: [PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code Refactor qib_tune_pcie_caps() function, use pcie_set_mps() and pcie_get_mps() to simply code. Because pci core caches the PCI-E Max Payload Size Supported in pci_dev-pcie_mpss, so use that instead of pcie_capability_read_word(). Remove the unused val2fld() and fld2val(). I tested this patch as is and saw no issues. The only thing I would suggest is that the new use of pcie_get_readrq/pcie_set_readrq() be reflected in the comments with an appropriate adjustment in the subject. Mike -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/6] staging/et131x: Use cached pci_dev-pcie_mpss and pcie_set_readrq() to simplif code
On Mon, Sep 09, 2013 at 09:13:07PM +0800, Yijing Wang wrote: The PCI core caches the PCI-E Max Payload Size Supported in pci_dev-pcie_mpss, so use that instead of pcie_capability_read_dword(). Also use pcie_set_readrq() instead of pcie_capability_clear_and_set_word() to simplify code. Signed-off-by: Yijing Wang wangyij...@huawei.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: rtnl_lock deadlock on 3.10
On 9/6/2013 6:19 PM, Shawn Bohrer wrote: On Thu, Sep 05, 2013 at 10:14:51AM -0500, Steve Wise wrote: Roland, what do you think? As I've said, I think we should go ahead with using the rtnl lock in the core. Is there a complete patch available for review? looks like the original was a partial fix. I guess I should realize that when no one jumps at fixing my issues for me that they probably aren't simple to fix. The solution that Cong proposed was to acquire rtnl_lock() before acquiring the infiniband device_mutex, and his partial patch did that in ib_register_client(). The problem is that you would also need to do that in ib_unregister_client(), ib_register_device(), and ib_unregister_device(), and that brings us back to the original problem which was that cxgb3 was holding the rtnl_lock() when it called ib_register_device(). Thus with the proposed fix I believe cxgb3 would already be holding the rtnl_lock() and then call ib_register_device() which would try to acquire the rtnl_lock() again and deadlock for a different reason. Actually how does this currently work? ib_register_device() calls client-add() for each client in the list which should call ipoib_add_one() which calls register_netdev(). Shouldn't that also deadlock in the cxgb3 case? cxgb3 is an iWARP device and doesn't support IPoIB. Also while digging through this I think I see another bug which is that ipoib_dev_cleanup() can be called from ipoib_add_port() but in the current code ipoib_add_port() is not holding the rtnl_lock() which appears to be a requirement of ipoib_dev_cleanup(). Sigh... I'm going to stop looking at this for now and hopefully someone can propose a better solution to this issue. I can help with this, but I'm waiting for Roland to chime in. Steve. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Strange NFS client ACK behaviour
On Sun, Sep 8, 2013 at 11:24 AM, Markus Stockhausen stockhau...@collogia.de wrote: we observed a performance drop in our IPoIB NFS backup infrastructure since we switched to machines with newer kernels. Not sure how your backup infrastructure works but the symptoms seem to match with this discussion: http://www.spinics.net/lists/linux-nfs/msg38980.html If you know how to recompile nfs kmod, Trond's patch does worth a try. Or open an Ubuntu support ticket, let them build you a test kmod. -- Wendy -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code
On 2013/9/9 22:55, Marciniszyn, Mike wrote: Subject: [PATCH 4/6] IB/qib: Use pcie_set_mps() and pcie_get_mps() to simplify code Refactor qib_tune_pcie_caps() function, use pcie_set_mps() and pcie_get_mps() to simply code. Because pci core caches the PCI-E Max Payload Size Supported in pci_dev-pcie_mpss, so use that instead of pcie_capability_read_word(). Remove the unused val2fld() and fld2val(). I tested this patch as is and saw no issues. The only thing I would suggest is that the new use of pcie_get_readrq/pcie_set_readrq() be reflected in the comments with an appropriate adjustment in the subject. Hi Mike, Thanks for your tests very much! Ok, I will update the comments. Thanks! Yijing. Mike . -- Thanks! Yijing -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 8/8] IB/srp: Make queue size configurable
On Tue, 2013-08-20 at 14:50 +0200, Bart Van Assche wrote: @@ -2227,6 +2270,7 @@ static const match_table_t srp_opt_tokens = { { SRP_OPT_SG_TABLESIZE, sg_tablesize=%u }, { SRP_OPT_COMP_VECTOR, comp_vector=%u}, { SRP_OPT_TL_RETRY_COUNT, tl_retry_count=%u }, + { SRP_OPT_CAN_QUEUE,can_queue=%d }, I'm pretty much OK with the patch, but since we're stuck with it going forward, I'd like to have a better externally visible name here -- queue_depth? max_queue? queue_size? Otherwise, Acked-by: David Dillow dillo...@ornl.gov -- Dave Dillow National Center for Computational Science Oak Ridge National Laboratory (865) 241-6602 office -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/8] IB SRP initiator patches for kernel 3.12
On Tue, 2013-08-20 at 14:41 +0200, Bart Van Assche wrote: Changes since the previous patch series are: - Rewrote the srp_tmo_valid() to improve readability (requested by Dave Dillow). - The combination (reconnect_delay 0 fast_io_fail_tmo 0 dev_loss_tmo 0) is now rejected as requested by Dave Dillow. - Fixed a race between transport layer failure handling and device removal. This issue was reported by Vu Pham. For patches 1-6, Acked-by: David Dillow dillo...@ornl.gov -- Dave Dillow National Center for Computational Science Oak Ridge National Laboratory (865) 241-6602 office -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 0/4] Add driver for Cisco's VIC series adapters
usNIC is the kernel driver for userspace bypass networking on Cisco's VIC series adapters. usNIC devices are advertised as SRIOV VFs by the VIC adapters and these VFs are owned by usNIC. The driver works in conjuction with Cisco's ethernet driver, which owns the PFs, and does priviledged firmware operations via the PF driver. The Cisco driver patches - driver part 1,2, 3 below - depend on the following patches - in order - in the net-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git: 1) f13bbc2f9aba00c7a37b499d23060616b9a4ef9e 2) 92e2b4696202934b4cbf1d6b8fb8729e8d7202e1 3) 0b038566c0ea9f8daceae879bb7ad748ab8c95f0 4) d765bb41fde311b57de32bdc9d17965debe8b7af 5) 4a50ddfda72881d5d67a2b25f9b8a120b2765125 This patch is being partitioned to avoid 100KB vger.kernel.org limitation. Changes from previous V1: - Added comment describing ABI - Make event2str array const in *netdev_event_to_string - Used ARRAY_SIZE instead of sizeof in *netdev_event_to_string - Few white space changes - Bug fix: Work queue is destroyed at module unload time IB/core: Cisco VIC - usNIC rdma node and transport IB/usnic: Cisco VIC - driver part 1/3 IB/usnic: Cisco VIC - driver part 2/3 IB/usnic: Cisco VIC - driver part 3/3 drivers/infiniband/core/sysfs.c|1 drivers/infiniband/core/verbs.c|3 include/rdma/ib_verbs.h|6 drivers/infiniband/hw/usnic/usnic_abi.h| 56 ++ drivers/infiniband/hw/usnic/usnic_ib.h | 115 +++ drivers/infiniband/hw/usnic/usnic_ib_main.c| 598 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 541 +++ drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h | 97 +++ drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 351 ++ drivers/infiniband/hw/usnic/usnic_ib_sysfs.h | 29 + drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 734 drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 72 ++ drivers/infiniband/hw/usnic/usnic.h| 29 + drivers/infiniband/hw/usnic/usnic_common_pkt_hdr.h | 27 + drivers/infiniband/hw/usnic/usnic_common_util.h| 51 + drivers/infiniband/hw/usnic/usnic_debugfs.c| 71 ++ drivers/infiniband/hw/usnic/usnic_debugfs.h| 25 + drivers/infiniband/hw/usnic/usnic_fwd.c| 243 +++ drivers/infiniband/hw/usnic/usnic_fwd.h| 58 ++ drivers/infiniband/hw/usnic/usnic_log.h| 58 ++ drivers/infiniband/hw/usnic/usnic_transport.c | 125 +++ drivers/infiniband/hw/usnic/usnic_transport.h | 27 + drivers/infiniband/hw/usnic/usnic_uiom.c | 599 drivers/infiniband/hw/usnic/usnic_uiom.h | 80 ++ .../infiniband/hw/usnic/usnic_uiom_interval_tree.c | 237 ++ .../infiniband/hw/usnic/usnic_uiom_interval_tree.h | 74 ++ drivers/infiniband/hw/usnic/usnic_vnic.c | 473 + drivers/infiniband/hw/usnic/usnic_vnic.h | 105 +++ MAINTAINERS|5 drivers/infiniband/Kconfig |1 drivers/infiniband/Makefile|1 drivers/infiniband/hw/usnic/Kconfig| 11 drivers/infiniband/hw/usnic/Makefile | 15 33 files changed, 4916 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 1/4] IB/core: Cisco VIC - usNIC rdma node and transport
This patch adds new rdma node and new rdma transport, and supporting code used by Cisco's low latency driver called usNIC. usNIC uses its own transport, distinct from IB and iWARP. Signed-off-by: Upinder Malhi uma...@cisco.com Signed-off-by: Jeff Squyres jsquy...@cisco.com --- drivers/infiniband/core/sysfs.c | 1 + drivers/infiniband/core/verbs.c | 3 +++ include/rdma/ib_verbs.h | 6 -- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index cde1e7b..faad2ca 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -612,6 +612,7 @@ static ssize_t show_node_type(struct device *device, switch (dev-node_type) { case RDMA_NODE_IB_CA: return sprintf(buf, %d: CA\n, dev-node_type); case RDMA_NODE_RNIC: return sprintf(buf, %d: RNIC\n, dev-node_type); + case RDMA_NODE_USNIC: return sprintf(buf, %d: usNIC\n, dev-node_type); case RDMA_NODE_IB_SWITCH: return sprintf(buf, %d: switch\n, dev-node_type); case RDMA_NODE_IB_ROUTER: return sprintf(buf, %d: router\n, dev-node_type); default: return sprintf(buf, %d: unknown\n, dev-node_type); diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 22192de..84cef2e 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -114,6 +114,8 @@ rdma_node_get_transport(enum rdma_node_type node_type) return RDMA_TRANSPORT_IB; case RDMA_NODE_RNIC: return RDMA_TRANSPORT_IWARP; + case RDMA_NODE_USNIC: + return RDMA_TRANSPORT_USNIC; default: BUG(); return 0; @@ -130,6 +132,7 @@ enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, u8 port_ case RDMA_TRANSPORT_IB: return IB_LINK_LAYER_INFINIBAND; case RDMA_TRANSPORT_IWARP: + case RDMA_TRANSPORT_USNIC: return IB_LINK_LAYER_ETHERNET; default: return IB_LINK_LAYER_UNSPECIFIED; diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 645c3ce..880d83d 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -67,12 +67,14 @@ enum rdma_node_type { RDMA_NODE_IB_CA = 1, RDMA_NODE_IB_SWITCH, RDMA_NODE_IB_ROUTER, - RDMA_NODE_RNIC + RDMA_NODE_RNIC, + RDMA_NODE_USNIC, }; enum rdma_transport_type { RDMA_TRANSPORT_IB, - RDMA_TRANSPORT_IWARP + RDMA_TRANSPORT_IWARP, + RDMA_TRANSPORT_USNIC }; enum rdma_transport_type -- 1.8.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 4/4] IB/usnic: Cisco VIC - driver part 3/3
Signed-off-by: Upinder Malhi uma...@cisco.com --- MAINTAINERS | 5 + drivers/infiniband/Kconfig | 1 + drivers/infiniband/Makefile | 1 + drivers/infiniband/hw/usnic/Kconfig | 11 +++ drivers/infiniband/hw/usnic/Makefile | 15 +++ 5 files changed, 33 insertions(+) create mode 100644 drivers/infiniband/hw/usnic/Kconfig create mode 100644 drivers/infiniband/hw/usnic/Makefile diff --git a/MAINTAINERS b/MAINTAINERS index defc053..ff41f0d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2077,6 +2077,11 @@ M: Nishank Trivedi nistr...@cisco.com S: Supported F: drivers/net/ethernet/cisco/enic/ +CISCO VIC LOW LATENCY NIC DRIVER +M: Upinder Malhi uma...@cisco.com +S: Supported +F: drivers/infiniband/hw/usnic + CIRRUS LOGIC EP93XX ETHERNET DRIVER M: Hartley Sweeten hswee...@visionengravers.com L: net...@vger.kernel.org diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index 5ceda71..10219ee9 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -53,6 +53,7 @@ source drivers/infiniband/hw/mlx4/Kconfig source drivers/infiniband/hw/mlx5/Kconfig source drivers/infiniband/hw/nes/Kconfig source drivers/infiniband/hw/ocrdma/Kconfig +source drivers/infiniband/hw/usnic/Kconfig source drivers/infiniband/ulp/ipoib/Kconfig diff --git a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile index 1fe6988..bf508b5 100644 --- a/drivers/infiniband/Makefile +++ b/drivers/infiniband/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_MLX4_INFINIBAND) += hw/mlx4/ obj-$(CONFIG_MLX5_INFINIBAND) += hw/mlx5/ obj-$(CONFIG_INFINIBAND_NES) += hw/nes/ obj-$(CONFIG_INFINIBAND_OCRDMA)+= hw/ocrdma/ +obj-$(CONFIG_INFINIBAND_USNIC) += hw/usnic/ obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/ obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/ obj-$(CONFIG_INFINIBAND_SRPT) += ulp/srpt/ diff --git a/drivers/infiniband/hw/usnic/Kconfig b/drivers/infiniband/hw/usnic/Kconfig new file mode 100644 index 000..0f14b6d --- /dev/null +++ b/drivers/infiniband/hw/usnic/Kconfig @@ -0,0 +1,11 @@ +config INFINIBAND_USNIC + tristate Verbs support for Cisco VIC + depends on NETDEVICES ETHERNET PCI + select ENIC + select NET_VENDOR_CISCO + select PCI_IOV + select IOMMU_SUPPORT + select INFINIBAND_USER_ACCESS + ---help--- + This is a low-level driver for Cisco's Virtual Interface + Cards (VICs), including the VIC 1240 and 1280 cards. diff --git a/drivers/infiniband/hw/usnic/Makefile b/drivers/infiniband/hw/usnic/Makefile new file mode 100644 index 000..99fb2db --- /dev/null +++ b/drivers/infiniband/hw/usnic/Makefile @@ -0,0 +1,15 @@ +ccflags-y := -Idrivers/net/ethernet/cisco/enic + +obj-$(CONFIG_INFINIBAND_USNIC)+= usnic_verbs.o + +usnic_verbs-y=\ +usnic_fwd.o \ +usnic_transport.o \ +usnic_uiom.o \ +usnic_uiom_interval_tree.o \ +usnic_vnic.o \ +usnic_ib_main.o \ +usnic_ib_qp_grp.o \ +usnic_ib_sysfs.o \ +usnic_ib_verbs.o \ +usnic_debugfs.o \ -- 1.8.1 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html