From patchwork Thu Mar 23 13:55:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9641125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43A3F6020B for ; Thu, 23 Mar 2017 13:55:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 333242766D for ; Thu, 23 Mar 2017 13:55:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27AFB28433; Thu, 23 Mar 2017 13:55:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81B512766D for ; Thu, 23 Mar 2017 13:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964974AbdCWNzs (ORCPT ); Thu, 23 Mar 2017 09:55:48 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:53996 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964976AbdCWNzr (ORCPT ); Thu, 23 Mar 2017 09:55:47 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 23 Mar 2017 15:55:40 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v2NDte0A008283; Thu, 23 Mar 2017 15:55:40 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v2NDteVw008800; Thu, 23 Mar 2017 15:55:40 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v2NDtevg008799; Thu, 23 Mar 2017 15:55:40 +0200 From: Yishai Hadas To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, yishaih@mellanox.com, bodong@mellanox.com, majd@mellanox.com, jgunthorpe@obsidianresearch.com Subject: [PATCH V2 rdma-core 1/6] mlx5: Explicitly align mlx5 query device response to 64 bit Date: Thu, 23 Mar 2017 15:55:24 +0200 Message-Id: <1490277329-8738-2-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1490277329-8738-1-git-send-email-yishaih@mellanox.com> References: <1490277329-8738-1-git-send-email-yishaih@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bodong Wang Explicitly align packet pacing response to 64 bit so that further capabilities that going to be read will match to mlx5 kernel response. Signed-off-by: Bodong Wang Reviewed-by: Yishai Hadas --- providers/mlx5/mlx5-abi.h | 7 ++++++- providers/mlx5/verbs.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h index e6ea428..dde46b9 100644 --- a/providers/mlx5/mlx5-abi.h +++ b/providers/mlx5/mlx5-abi.h @@ -264,6 +264,11 @@ struct mlx5_rss_caps { __u8 reserved[7]; }; +struct mlx5_packet_pacing_caps { + struct ibv_packet_pacing_caps caps; + __u32 reserved; +}; + struct mlx5_query_device_ex_resp { struct ibv_query_device_resp_ex ibv_resp; __u32 comp_mask; @@ -271,7 +276,7 @@ struct mlx5_query_device_ex_resp { struct ibv_tso_caps tso_caps; struct mlx5_rss_caps rss_caps; /* vendor data channel */ __u64 reserved_cqe_comp; - struct ibv_packet_pacing_caps packet_pacing_caps; + struct mlx5_packet_pacing_caps packet_pacing_caps; }; #endif /* MLX5_ABI_H */ diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c index 67f9748..aba1631 100644 --- a/providers/mlx5/verbs.c +++ b/providers/mlx5/verbs.c @@ -1922,7 +1922,7 @@ int mlx5_query_device_ex(struct ibv_context *context, attr->tso_caps = resp.tso_caps; attr->rss_caps.rx_hash_fields_mask = resp.rss_caps.rx_hash_fields_mask; attr->rss_caps.rx_hash_function = resp.rss_caps.rx_hash_function; - attr->packet_pacing_caps = resp.packet_pacing_caps; + attr->packet_pacing_caps = resp.packet_pacing_caps.caps; major = (raw_fw_ver >> 32) & 0xffff; minor = (raw_fw_ver >> 16) & 0xffff;