From patchwork Tue Sep 22 20:18:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bodong Wang X-Patchwork-Id: 7245331 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 43A7ABEEC1 for ; Tue, 22 Sep 2015 20:18:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C00620A29 for ; Tue, 22 Sep 2015 20:18:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B12D20A30 for ; Tue, 22 Sep 2015 20:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbbIVUSn (ORCPT ); Tue, 22 Sep 2015 16:18:43 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:36118 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756770AbbIVUSn (ORCPT ); Tue, 22 Sep 2015 16:18:43 -0400 Received: by oibi136 with SMTP id i136so12470772oib.3 for ; Tue, 22 Sep 2015 13:18:42 -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; bh=qgxfCE2KSQ+L6MssL4C572n6bmdZUUF1sJimtsN/6W0=; b=0cjkGQAsPmXRP8bhXh/q9sWgH0iVm9HZ3T4aEkeflyBQbVTycG40RrDgDOQxyf2AaD y7QkV2+q4Yz471zcaw7yeDXjFC9bAMcZ8pd28YkBXl+zIfGzDdouD5fmDmZcI6Le2o6i x62f/GkH2tJLryZTISKFjLDcBWtMunw8ktil5JWV7qjvwKuNGZewZhBpcC3L80G0bhUX s75UL81XOYIgIFJA5KrABSjpY3UceTOV99Ukad70fqxQLlRTOIF6MPX6l10K+pNc8R+/ OsqdWDQ1T6hjhL2tiGy93mXG/4VjatI0H72cYCvUUgVZgsk6kk6EOGivyAbEJrXLi6cI Jldw== X-Received: by 10.202.98.2 with SMTP id w2mr8701096oib.83.1442953122461; Tue, 22 Sep 2015 13:18:42 -0700 (PDT) Received: from localhost.localdomain ([207.140.101.5]) by smtp.gmail.com with ESMTPSA id mj1sm1622269obc.25.2015.09.22.13.18.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 13:18:41 -0700 (PDT) From: wbd2905@gmail.com X-Google-Original-From: bodong@mellanox.com To: dledford@redhat.com Cc: ogerlitz@mellanox.com, bodong@mellanox.com, moshel@mellanox.com, haggaie@mellanox.com, matanb@mellanox.com, linux-rdma@vger.kernel.org Subject: [v1 1/2] IB/core: Add support of checksum capability reporting for RC and RAW Date: Tue, 22 Sep 2015 23:18:10 +0300 Message-Id: <1442953091-102103-2-git-send-email-bodong@mellanox.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1442953091-102103-1-git-send-email-bodong@mellanox.com> References: <1442953091-102103-1-git-send-email-bodong@mellanox.com> 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, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Two enum members IB_DEVICE_RC_IP_CSUM and IB_DEVICE_RAW_IP_CSUM are added to ib_device_cap_flags. Device should set these two flags if they support insertion of UDP and TCP checksum on outgoing IPv4 messages and can verify the validity of checksum for incoming IPv4 messages, for RC IPoIB and RAW over Ethernet respectively. They are similar to IB_DEVICE_UD_IP_CSUM. Signed-off-by: Bodong Wang --- include/rdma/ib_verbs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index b0f898e..091894a 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -130,6 +130,8 @@ enum ib_device_cap_flags { IB_DEVICE_BLOCK_MULTICAST_LOOPBACK = (1<<22), IB_DEVICE_MEM_WINDOW_TYPE_2A = (1<<23), IB_DEVICE_MEM_WINDOW_TYPE_2B = (1<<24), + IB_DEVICE_RC_IP_CSUM = (1<<25), + IB_DEVICE_RAW_IP_CSUM = (1<<26), IB_DEVICE_MANAGED_FLOW_STEERING = (1<<29), IB_DEVICE_SIGNATURE_HANDOVER = (1<<30), IB_DEVICE_ON_DEMAND_PAGING = (1<<31), @@ -868,7 +870,6 @@ enum ib_qp_create_flags { IB_QP_CREATE_RESERVED_END = 1 << 31, }; - /* * Note: users may not call ib_close_qp or ib_destroy_qp from the event_handler * callback to destroy the passed in QP.