From patchwork Sat Mar 19 17:03:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 12786246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C773C433EF for ; Sat, 19 Mar 2022 17:04:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243650AbiCSRFn (ORCPT ); Sat, 19 Mar 2022 13:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240827AbiCSRFm (ORCPT ); Sat, 19 Mar 2022 13:05:42 -0400 Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 241FA192362 for ; Sat, 19 Mar 2022 10:04:20 -0700 (PDT) IronPort-Data: A9a23:lTEkfKqVMkZypdaSWiAF1ciUG1NeBmInZxIvgKrLsJaIsI5as4F+vjRLCzyPM6neZGqkKdhyad+/pk4GucKEyNZlSAdv/iswQiMRo6IpJ/zDcB6oYHn6wu4v7a5fx5xHLIGGdajYd1eEzvuWGuWn/SkUOZ2gHOKmUraeYnkpHGeIdQ964f5ds79g6mJXqYjha++9kYuaT/z3YDdJ6RYtWo4nw/7rRCdUgRjHkGhwUmrSyhx8lAS2e3E9VPrzLEwqRpfyatE88uWSH44vwFwll1418SvBCvv9+lr6WkYMBLDPPwmSkWcQUK+n6vRAjnVqlP9la7xHMgEK49mKt4kZJNFlpJW2RhdvPLzklvkfUgVDDmd1OqguFLrveCLl4ZXLnxefG5fr67A0ZK0sBqUc9+FxKWJD7/oVLHYKdB/rr+C5z5q9VOhgh81lJ87uVKsbu3d93XTDAfMvaY7MTr+M5tJC2jo0wMdUEp7ji2AxAdZ0RE2YJUQRZRFMU9Rj9NpET0LXK1VwwG95b4Jui4QL8DFM7Q== IronPort-HdrOrdr: A9a23:3Nje2aoJKSbMRM0u0VSQTSwaV5oXeYIsimQD101hICG9E/bo8/xG+c536faaslgssQ4b8+xoVJPgfZq+z+8R3WByB8bAYOCOggLBQ72KhrGSoQEIdRefysdtkY9kc4VbTOb7FEVGi6/BizWQIpINx8am/cmT6dvj8w== X-IronPort-AV: E=Sophos;i="5.88,333,1635177600"; d="scan'208";a="122810821" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 20 Mar 2022 01:04:16 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 5BCAC4D16FCD; Sun, 20 Mar 2022 01:04:14 +0800 (CST) Received: from G08CNEXCHPEKD08.g08.fujitsu.local (10.167.33.83) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Sun, 20 Mar 2022 01:04:15 +0800 Received: from localhost.localdomain (10.167.215.54) by G08CNEXCHPEKD08.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Sun, 20 Mar 2022 01:03:53 +0800 From: Xiao Yang To: , CC: , Xiao Yang Subject: [PATCH 1/2] IB/uverbs: Move enum ib_raw_packet_caps to uapi Date: Sun, 20 Mar 2022 01:03:50 +0800 Message-ID: <20220319170351.336731-1-yangx.jy@fujitsu.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-yoursite-MailScanner-ID: 5BCAC4D16FCD.AA8ED X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org This enum are used by ibv_query_device_ex(3) so it should be defined in include/uapi/rdma/ib_user_verbs.h. Signed-off-by: Xiao Yang --- include/rdma/ib_verbs.h | 22 +++++++++++++++------- include/uapi/rdma/ib_user_verbs.h | 7 +++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 69d883f7fb41..e5455f6e0d82 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1620,20 +1620,28 @@ struct ib_srq { struct rdma_restrack_entry res; }; +/* This enum is shared with userspace */ enum ib_raw_packet_caps { - /* Strip cvlan from incoming packet and report it in the matching work + /* + * Strip cvlan from incoming packet and report it in the matching work * completion is supported. */ - IB_RAW_PACKET_CAP_CVLAN_STRIPPING = (1 << 0), - /* Scatter FCS field of an incoming packet to host memory is supported. + IB_RAW_PACKET_CAP_CVLAN_STRIPPING = + IB_UVERBS_RAW_PACKET_CAP_CVLAN_STRIPPING, + /* + * Scatter FCS field of an incoming packet to host memory is supported. */ - IB_RAW_PACKET_CAP_SCATTER_FCS = (1 << 1), + IB_RAW_PACKET_CAP_SCATTER_FCS = + IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS, /* Checksum offloads are supported (for both send and receive). */ - IB_RAW_PACKET_CAP_IP_CSUM = (1 << 2), - /* When a packet is received for an RQ with no receive WQEs, the + IB_RAW_PACKET_CAP_IP_CSUM = + IB_UVERBS_RAW_PACKET_CAP_IP_CSUM, + /* + * When a packet is received for an RQ with no receive WQEs, the * packet processing is delayed. */ - IB_RAW_PACKET_CAP_DELAY_DROP = (1 << 3), + IB_RAW_PACKET_CAP_DELAY_DROP = + IB_UVERBS_RAW_PACKET_CAP_DELAY_DROP, }; enum ib_wq_type { diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 7ee73a0652f1..0660405ca2cb 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h @@ -1298,4 +1298,11 @@ struct ib_uverbs_ex_modify_cq { #define IB_DEVICE_NAME_MAX 64 +enum ib_uverbs_raw_packet_caps { + IB_UVERBS_RAW_PACKET_CAP_CVLAN_STRIPPING = (1 << 0), + IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS = (1 << 1), + IB_UVERBS_RAW_PACKET_CAP_IP_CSUM = (1 << 2), + IB_UVERBS_RAW_PACKET_CAP_DELAY_DROP = (1 << 3), +}; + #endif /* IB_USER_VERBS_H */