From patchwork Fri Dec 18 11:53:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bodong Wang X-Patchwork-Id: 7882521 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 01E11BEEE5 for ; Fri, 18 Dec 2015 11:53:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DD8F2049D for ; Fri, 18 Dec 2015 11:53:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F59D2049C for ; Fri, 18 Dec 2015 11:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752356AbbLRLxv (ORCPT ); Fri, 18 Dec 2015 06:53:51 -0500 Received: from [193.47.165.129] ([193.47.165.129]:44233 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752025AbbLRLxu (ORCPT ); Fri, 18 Dec 2015 06:53:50 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from bodong@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Dec 2015 13:53:28 +0200 Received: from x-vnc01.mtx.labs.mlnx (x-vnc01.mtx.labs.mlnx [10.12.150.16]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id tBIBrPWd008023; Fri, 18 Dec 2015 13:53:26 +0200 From: bodong@mellanox.com To: eli@mellanox.com Cc: linux-rdma@vger.kernel.org, dledford@redhat.com, moshel@mellanox.com, majd@mellanox.com, Bodong Wang Subject: [PATCH] IB/mlx5: report tx/rx checksum cap when query device Date: Fri, 18 Dec 2015 13:53:20 +0200 Message-Id: <1450439601-49989-1-git-send-email-bodong@mellanox.com> X-Mailer: git-send-email 1.7.1 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 From: Bodong Wang This patch will report the tx/rx checksum cap for raw qp Signed-off-by: Bodong Wang --- drivers/infiniband/hw/mlx5/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 38aa490..101c17a 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -499,6 +499,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, if (MLX5_CAP_GEN(mdev, block_lb_mc)) props->device_cap_flags |= IB_DEVICE_BLOCK_MULTICAST_LOOPBACK; + if (MLX5_CAP_GEN(dev->mdev, eth_net_offloads) && + (MLX5_CAP_ETH(dev->mdev, csum_cap))) + props->device_cap_flags |= IB_DEVICE_RAW_IP_CSUM; + props->vendor_part_id = mdev->pdev->device; props->hw_ver = mdev->pdev->revision;