From patchwork Thu Jul 28 21:04:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 1017872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6SL59oU017502 for ; Thu, 28 Jul 2011 21:05:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754740Ab1G1VFH (ORCPT ); Thu, 28 Jul 2011 17:05:07 -0400 Received: from na3sys010aog105.obsmtp.com ([74.125.245.78]:39966 "HELO na3sys010aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754678Ab1G1VFG (ORCPT ); Thu, 28 Jul 2011 17:05:06 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]) (using TLSv1) by na3sys010aob105.postini.com ([74.125.244.12]) with SMTP ID DSNKTjHPAW9tsHqVp7OoYxEuD8uWMbx2VRKy@postini.com; Thu, 28 Jul 2011 14:05:06 PDT Received: by gyg8 with SMTP id 8so3039802gyg.18 for ; Thu, 28 Jul 2011 14:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=8ZycYGwublk1H/W+xvm7v+RkgG0stmN2iWeVqrNGQsE=; b=WEKMNZB48JKf2dVz3WVCg2+B2639F2/Q0ws+PdtoUmm5vLf7mFa+624IhHVinqvWCx a1LxeT2Ad5iv4RFm3fHfTy0ZNLqinYgmwkzEgx6m4avBpMNOj1ETPpEQh83zWQSCSRX/ 7koaOPgLDreazq1ufu3S8lZ8977VKeFODZ3E4= Received: by 10.68.8.231 with SMTP id u7mr949989pba.390.1311887104387; Thu, 28 Jul 2011 14:05:04 -0700 (PDT) Received: from localhost.localdomain ([216.200.155.2]) by mx.google.com with ESMTPS id d3sm1358329pbh.53.2011.07.28.14.05.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jul 2011 14:05:03 -0700 (PDT) From: Roland Dreier To: Yevgeny Petrilin Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: "mlx4_en: Enabling new steering" brokenness Date: Thu, 28 Jul 2011 14:04:59 -0700 Message-Id: <1311887099-14339-1-git-send-email-roland@kernel.org> X-Mailer: git-send-email 1.7.5.4 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 28 Jul 2011 21:05:09 +0000 (UTC) Hi Yevgeny! So I have a system with an mlx4_en device with pretty old FW (version 2.7.700), old enough that the firmware doesn't have the capability MLX4_DEV_CAP_FLAG_VEP_UC_STEER set. And it looks like mlx4_en is completely broken in this case, at least since your commit 1679200f91da ("mlx4_en: Enabling new steering"). If I try to bring up the interface, I just see: mlx4_en: eth1: Failed to allocate RSS indirection QP And this is failing because the QPN in 0. The problem is in drivers/net/mlx4/port.c:mlx4_register_mac(): if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER)) *qpn = info->base_qpn + free; but absolutely nothing ever initializes info->base_qpn. It looks like the intention of the code is to initialize this in mlx4_init_port_info(); however even the below hack doesn't seem to fix things completely -- I still seem to have problems on the RX side unless I enable promiscuous mode by running tcpdump: Could you take a look at getting this working? (Or update the driver so it immediately fails with an informative message if you want to rely on certain FW versions; and then strip out the old broken compatibility code) Thanks! Roland --- 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/net/mlx4/main.c b/drivers/net/mlx4/main.c index c94b342..38092c7 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -1125,6 +1125,13 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port) info->port_attr.store = set_port_type; sysfs_attr_init(&info->port_attr.attr); + err = mlx4_qp_reserve_range(dev, 1, 1, &info->base_qpn); + if (err) { + mlx4_err(dev, "Failed to reserve QP range for port %d\n", port); + info->port = -1; + return err; + } + err = device_create_file(&dev->pdev->dev, &info->port_attr); if (err) { mlx4_err(dev, "Failed to create file for port %d\n", port);