From patchwork Wed Sep 16 15:56:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bodong Wang X-Patchwork-Id: 7196271 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 48163BEEC1 for ; Wed, 16 Sep 2015 15:56:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 692202088F for ; Wed, 16 Sep 2015 15:56:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7366920888 for ; Wed, 16 Sep 2015 15:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753768AbbIPP4h (ORCPT ); Wed, 16 Sep 2015 11:56:37 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]:33734 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753689AbbIPP4f (ORCPT ); Wed, 16 Sep 2015 11:56:35 -0400 Received: by obbbh8 with SMTP id bh8so152565778obb.0 for ; Wed, 16 Sep 2015 08:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=7wi0kkAQGSzyNhIfwA+Oum8ZNjC+Dchouxu2GbBeCA8=; b=ntVE35RB0oFcbboX7kIZP18yIQKFKsaWbHuVqRzIMeq77z9y8rh07zZHSJdiPRdGtb r8D+jU4ooMIv/vZqm0AZoIvq2REjBA7GKb81escLvgd0JTADwvRT52IMKlNIKwStQNWR CUvM3ia+W5Bcryo7ezWx5ksV1vppiDYYTpxxeIrnaIxU1HuI86+nLddso87/JIqq3FGM PffL7EXYgGsc4iFkdlIY83DZsL/Irana1DMCqkjjbQTpsSF+woyfM5VFUNGT9c5IWVy9 sH7HUXG+KvyTgwSHMzgkQzlZrrrDzS32hyKi9WtrIzvhaSt6YcGpz4x0TAcNfSpRjebI pY9Q== X-Received: by 10.182.19.228 with SMTP id i4mr24295303obe.82.1442418994750; Wed, 16 Sep 2015 08:56:34 -0700 (PDT) Received: from localhost.localdomain ([207.140.101.5]) by smtp.gmail.com with ESMTPSA id op6sm11332402obb.11.2015.09.16.08.56.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 08:56:33 -0700 (PDT) From: Bodong Wang X-Google-Original-From: Bodong Wang To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, bodong@mellanox.com, ogerlitz@mellanox.com, jgunthorpe@obsidianresearch.com, moshel@mellanox.com, haggaie@mellanox.com, matanb@mellanox.com Subject: [PATCH 3/3] IB/mlx4: Report checksum offload cap when query device Date: Wed, 16 Sep 2015 18:56:08 +0300 Message-Id: <68bea4df2c89e5457aaaccf914756bc309d742a7.1442413048.git.bodong@mellanox.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 Signed-off-by: Bodong Wang --- drivers/infiniband/hw/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 8be6db8..a70ca6a 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -217,6 +217,9 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, props->device_cap_flags |= IB_DEVICE_MANAGED_FLOW_STEERING; } + props->csum_cap.eth_csum_cap |= IB_CSUM_SUPPORT_RAW; + props->csum_cap.ib_csum_cap |= IB_CSUM_SUPPORT_UD; + props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & 0xffffff; props->vendor_part_id = dev->dev->persist->pdev->device;