From patchwork Fri Aug 6 22:51:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vu Pham X-Patchwork-Id: 118083 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o76MtctQ027523 for ; Fri, 6 Aug 2010 22:55:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965830Ab0HFWzT (ORCPT ); Fri, 6 Aug 2010 18:55:19 -0400 Received: from p02c11o142.mxlogic.net ([208.65.144.75]:48204 "EHLO p02c11o142.mxlogic.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965846Ab0HFWzQ (ORCPT ); Fri, 6 Aug 2010 18:55:16 -0400 Received: from unknown [63.251.237.3] (EHLO p02c11o142.mxlogic.net) by p02c11o142.mxlogic.net(mxl_mta-6.7.0-0) with ESMTP id 4d29c5c4.670a9940.47498.00-584.113654.p02c11o142.mxlogic.net (envelope-from ); Fri, 06 Aug 2010 16:55:16 -0600 (MDT) X-MXL-Hash: 4c5c92d46c6026ca-c2cc17b440287f4d31ac08381c9c36454a328710 Received: from unknown [63.251.237.3] (EHLO mtiexch01.mti.com) by p02c11o142.mxlogic.net(mxl_mta-6.7.0-0) with ESMTP id ed19c5c4.0.47153.00-307.112933.p02c11o142.mxlogic.net (envelope-from ); Fri, 06 Aug 2010 16:51:11 -0600 (MDT) X-MXL-Hash: 4c5c91df5ecb40b1-db991bfd7a168b9da975973e73dced54f56894e9 Received: from vu-lt.mti.mtl.com ([10.2.1.17]) by mtiexch01.mti.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Aug 2010 15:55:26 -0700 Message-ID: <4C5C91DE.1080301@mellanox.com> Date: Fri, 06 Aug 2010 15:51:10 -0700 From: Vu Pham User-Agent: Thunderbird 2.0.0.23 (X11/20090812) MIME-Version: 1.0 To: Roland Dreier CC: Oren Duer , Linux RDMA , OpenFabrics EWG Subject: [PATCH 07/10] query the steer capabilities of mlx4 device X-OriginalArrivalTime: 06 Aug 2010 22:55:26.0421 (UTC) FILETIME=[75A64050:01CB35BA] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2010073001)] X-MAIL-FROM: X-SOURCE-IP: [63.251.237.3] X-AnalysisOut: [v=1.0 c=1 a=MuwZ5t60zUMA:10 a=VphdPIyG4kEA:10 a=xupnbh4h0Y] X-AnalysisOut: [LOHZnncC45HQ==:17 a=SeBm4QpjAAAA:8 a=giX3yXWFjb74GKsjaOQA:] X-AnalysisOut: [9 a=soCHqjd9BtJLzji-10jb66neO-MA:4 a=wPNLvfGTeEIA:10 a=T2c] X-AnalysisOut: [JKXzbRCYA:10 a=bBGD5SoHQgNueD5IZjIA:9 a=dMdOj2FPC_6oyr-4MC] X-AnalysisOut: [gzQTavEKkA:4 a=Sds42k1EgFZpRSDB:21 a=6OD_AhTjbO9MErfq:21] 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.3 (demeter.kernel.org [140.211.167.41]); Fri, 06 Aug 2010 22:55:39 +0000 (UTC) Add API to query the steer capabilities of mlx4 device Signed-off-by: Oren Duer Signed-off-by: Vu Pham diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 4408b96..1777965 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h @@ -396,6 +394,14 @@ struct mlx4_init_port_param { u64 si_guid; }; +static inline void mlx4_query_steer_cap(struct mlx4_dev *dev, int *log_mac, + int *log_vlan, int *log_prio) +{ + *log_mac = dev->caps.log_num_macs; + *log_vlan = dev->caps.log_num_vlans; + *log_prio = dev->caps.log_num_prios; +} + #define mlx4_foreach_port(port, dev, type) \ for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \