From patchwork Thu Dec 24 16:09:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matan Barak X-Patchwork-Id: 7919311 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4FADBEEE5 for ; Thu, 24 Dec 2015 16:09:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3B8420605 for ; Thu, 24 Dec 2015 16:09:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD150205FF for ; Thu, 24 Dec 2015 16:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754371AbbLXQJD (ORCPT ); Thu, 24 Dec 2015 11:09:03 -0500 Received: from mail-oi0-f44.google.com ([209.85.218.44]:34143 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754307AbbLXQJB (ORCPT ); Thu, 24 Dec 2015 11:09:01 -0500 Received: by mail-oi0-f44.google.com with SMTP id o124so139929120oia.1 for ; Thu, 24 Dec 2015 08:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hQ0N1I+dVt/54EEpTvwpbLsNzrusi/gjS1uv/kZ59BE=; b=wxq5H9Gptw6vqTNMdq/apXlmKOq/AGNi9ZYrCcYgWMQp5jYtncC61Ft2XDSoaJIPoz gt8H3s3/7yJbNwv7M3LCaPgJIkNmoGJjTMgOawQ2FQuVxYoLsNgAnTcrdOfZksUkpJur ye9ncsBoe45m5P5NKgPw0/kqlZuxO0PBCbtDfEhfQFTuw0oIgMfez7L1MkoU9yQXlAaz Vas1t75tBM9d6qmZZ5Xn+1SQsUrBUUh4vbrv5akm8j2oRNeoreKtPVesKCCwb1+b+st1 t8RyXSiX8FA8YBMC47IpTS5nFjIhSJOBPkVhw4TIUKo/xREnr49CTbhGp2DROAuePsZI yDww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=hQ0N1I+dVt/54EEpTvwpbLsNzrusi/gjS1uv/kZ59BE=; b=T2PvPgVgvLs2QxYyhRnbOkJ47TR8P8PePwOPeFkNv/7sJUG8Ep+hJwCPIB/rea3EG3 BNVbeUZGTK4UR3f02qpYTlj03TLqFJ62fnG67YzBsH5C5VMxx9ucesuBoU8gRetjmpWr b+R9Bv4YxsAflizLNJI86OvNh/SCgAubKhUDyZyJloBTjZ4uqSaap3zD2ENfw9EzhVZk ZE4zVMpVuGVMPH4zxwoPOZc3+eobBXejmBv6vZ01n9XBbA8I6XsM88ggR+xfZFYCaEkC z6LZKaEa6JVTYlU1rZ8prO5CCm2x0zdH3mWlVceGH2NdzsmtEaUSEvkeHBvagTr71QqJ CVoA== X-Gm-Message-State: ALoCoQlB162uTKOcE3f0uX1jY1HV51diLK/bqBWA+W0rVT1kS+vcXDSjMZKC4kLZME/x3HJgu9z39Ef0yfBRHeMQ2rYn6cJK3Q== MIME-Version: 1.0 X-Received: by 10.202.231.193 with SMTP id e184mr19061295oih.106.1450973340802; Thu, 24 Dec 2015 08:09:00 -0800 (PST) Received: by 10.202.71.6 with HTTP; Thu, 24 Dec 2015 08:09:00 -0800 (PST) In-Reply-To: References: <1444909482-17113-1-git-send-email-eranbe@mellanox.com> <1444909482-17113-6-git-send-email-eranbe@mellanox.com> <567BC52B.4030801@dev.mellanox.co.il> <567BCA3F.7050502@mellanox.com> <567BCBF8.30006@dev.mellanox.co.il> <567BE756.9050005@mellanox.com> Date: Thu, 24 Dec 2015 18:09:00 +0200 Message-ID: Subject: Re: [PATCH v2 for-next 5/7] IB/mlx4: Add IB counters table From: Matan Barak To: Or Gerlitz Cc: Sagi Grimberg , Eran Ben Elisha , Doug Ledford , linux-rdma , Christoph Lameter Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Dec 24, 2015 at 4:07 PM, Matan Barak wrote: > On Thu, Dec 24, 2015 at 2:38 PM, Or Gerlitz wrote: >> On 12/24/2015 12:42 PM, Sagi Grimberg wrote: >>> >>> >>>>> This patch seems to generate a list corruption [1] when I test >>>>> with Doug's for-4.5 tree. Eran, care to take a look at this? >>>> >>>> >>>> This patch is part from a series that was introduced in 4.3-rc1 [1], >>> >>> >>> Then something else broke it. Can people check their patches on doug's >>> tree? At the moment it's unusable... >> > > Leon and I have checked Doug's tree with mlx4_ib disabled and we > didn't encounter any error. > We ran ucmatose over IB connection (in mlx5) and it worked flawlessly. > >> >> Yes, I checked the branch up to commit 882f3b3 "Merge branches >> '4.5/Or-cleanup' and '4.5/rdma-cq' into k.o/for-4.5" and it works (rping, >> ibv_rc_pingpong over top of mlx4 VPI) >> Regarding mlx4, Eran and I analyzed it. We didn't test that, but it seems like the bug is introduced in the 64bit counters test. Here's a proposal: >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 539040f..8da3c83 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -714,11 +714,12 @@ err: * Figure out which counter table to use depending on * the device capabilities. */ -static struct attribute_group *get_counter_table(struct ib_device *dev) +static struct attribute_group *get_counter_table(struct ib_device *dev, + int port_num) { struct ib_class_port_info cpi; - if (get_perf_mad(dev, 0, IB_PMA_CLASS_PORT_INFO, + if (get_perf_mad(dev, port_num, IB_PMA_CLASS_PORT_INFO, &cpi, 40, sizeof(cpi)) >= 0) { if (cpi.capability_mask && IB_PMA_CLASS_CAP_EXT_WIDTH) @@ -776,7 +777,7 @@ static int add_port(struct ib_device *device, int port_num, goto err_put; } - p->pma_table = get_counter_table(device); + p->pma_table = get_counter_table(device, port_num); ret = sysfs_create_group(&p->kobj, p->pma_table); if (ret) goto err_put_gid_attrs;