From patchwork Sun Dec 14 19:18:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 5491551 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 400609F30B for ; Mon, 15 Dec 2014 09:25:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 61C46209CD for ; Mon, 15 Dec 2014 09:25:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3299C209F5 for ; Mon, 15 Dec 2014 09:25:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751339AbaLOJZZ (ORCPT ); Mon, 15 Dec 2014 04:25:25 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:36336 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbaLOJZY (ORCPT ); Mon, 15 Dec 2014 04:25:24 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sBF9PN7O001495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Dec 2014 09:25:24 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id sBF9PMeO005599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 15 Dec 2014 09:25:23 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sBF9PMJ2024632 for ; Mon, 15 Dec 2014 09:25:22 GMT Received: from yuval-net-srv-ca.us.oracle.com (/10.211.3.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 15 Dec 2014 01:25:22 -0800 From: Yuval Shaia To: yuval.shaia@oracle.com, linux-rdma@vger.kernel.org Subject: [PATCH] mlx4_core: Enhance device capabilities flags debug printouts Date: Sun, 14 Dec 2014 11:18:53 -0800 Message-Id: <1418584733-6601-1-git-send-email-yuval.shaia@oracle.com> X-Mailer: git-send-email 1.7.1 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DATE_IN_PAST_12_24, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 1. Add indication whether feature is supported or not. 2. Add descriptions of all features. Without this fix there is no way to tell if feature is not supported or that description is not exist. Signed-off-by: Yuval Shaia --- drivers/net/ethernet/mellanox/mlx4/fw.c | 36 +++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 2e88a23..4fd00e4 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -91,7 +91,10 @@ static void dump_dev_cap_flags(struct mlx4_dev *dev, u64 flags) [ 8] = "P_Key violation counter", [ 9] = "Q_Key violation counter", [10] = "VMM", + [11] = "Fibre Channel Protocol On Ethernet Ports support", [12] = "Dual Port Different Protocol (DPDP) support", + [13] = "Raw Ethertype support", + [14] = "Raw IPv6 support", [15] = "Big LSO headers", [16] = "MW support", [17] = "APM support", @@ -99,18 +102,41 @@ static void dump_dev_cap_flags(struct mlx4_dev *dev, u64 flags) [19] = "Raw multicast support", [20] = "Address vector port checking support", [21] = "UD multicast support", + [22] = "UD IPv4 Multicast support", [24] = "Demand paging support", [25] = "Router support", + [26] = "L2 Ethernet Multicast support", + [28] = "Software parsing support for UD transport", + [29] = "TCP checksum off-load support", [30] = "IBoE support", + [31] = "FCoE T11 frame format support", [32] = "Unicast loopback support", + [33] = "Multicast loopback support", [34] = "FCS header control", + [35] = "Address Path ud_force_mgid support", + [36] = "Header-Data Split support", + [37] = "Wake On LAN support on port 1", + [38] = "Wake On LAN support on port 2", + [39] = "Fatal Warning Event upon a thermal warning condition", [38] = "Wake On LAN support", [40] = "UDP RSS support", [41] = "Unicast VEP steering support", [42] = "Multicast VEP steering support", + [43] = "VLAN Steering mechanism support", + [44] = "Steering according to EtherType support", + [45] = "WQE format version 1 support", + [46] = "Keep Alive Validiation support", + [47] = "PTP1588 support", [48] = "Counters support", + [49] = "Advanced Counters support", + [50] = "Force Ethernet user priority from QPC support", + [51] = "RX Port Num check disabled", + [52] = "RSS on fragmented IP datagram support", [53] = "Port ETS Scheduler support", [55] = "Port link type sensing support", + [56] = "Reliable Multicast support", + [57] = "Fast Drop support", + [58] = "Protected FMR support", [59] = "Port management change event support", [61] = "64 byte EQE support", [62] = "64 byte CQE support", @@ -119,8 +145,9 @@ static void dump_dev_cap_flags(struct mlx4_dev *dev, u64 flags) mlx4_dbg(dev, "DEV_CAP flags:\n"); for (i = 0; i < ARRAY_SIZE(fname); ++i) - if (fname[i] && (flags & (1LL << i))) - mlx4_dbg(dev, " %s\n", fname[i]); + if (fname[i]) + mlx4_dbg(dev, " (%c) %s\n", (flags & (1LL << i)) ? + '*' : ' ', fname[i]); } static void dump_dev_cap_flags2(struct mlx4_dev *dev, u64 flags) @@ -144,8 +171,9 @@ static void dump_dev_cap_flags2(struct mlx4_dev *dev, u64 flags) int i; for (i = 0; i < ARRAY_SIZE(fname); ++i) - if (fname[i] && (flags & (1LL << i))) - mlx4_dbg(dev, " %s\n", fname[i]); + if (fname[i]) + mlx4_dbg(dev, " (%c) %s\n", (flags & (1LL << i)) ? + '*' : ' ', fname[i]); } int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg)