From patchwork Wed Oct 1 11:49:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Droneaud X-Patchwork-Id: 5011451 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6C1BEBEEA6 for ; Wed, 1 Oct 2014 11:57:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 972C320155 for ; Wed, 1 Oct 2014 11:57:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B70862014A for ; Wed, 1 Oct 2014 11:57:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751136AbaJAL5F (ORCPT ); Wed, 1 Oct 2014 07:57:05 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:51939 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbaJAL5E (ORCPT ); Wed, 1 Oct 2014 07:57:04 -0400 Received: from localhost.localdomain (unknown [37.163.159.60]) by smtp3-g21.free.fr (Postfix) with ESMTP id BCB76A6356; Wed, 1 Oct 2014 13:56:28 +0200 (CEST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.8/8.14.8) with ESMTP id s91Bshan013350; Wed, 1 Oct 2014 13:56:23 +0200 Received: (from ydroneaud@localhost) by localhost.localdomain (8.14.8/8.14.8/Submit) id s91BorHq013037; Wed, 1 Oct 2014 13:50:53 +0200 From: Yann Droneaud To: Roland Dreier Cc: linux-rdma@vger.kernel.org, Dotan Barak , Yann Droneaud , Sean Hefty , Yishai Hadas Subject: [PATCH libibverbs 5/9] kern-abi: remove unused qp_type union in struct ibv_kern_send_wr Date: Wed, 1 Oct 2014 13:49:35 +0200 Message-Id: <489f515ee8e477ed61fd690894d1954dd056ecd1.1412163687.git.ydroneaud@opteya.com> X-Mailer: git-send-email 1.9.3 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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Added by commit c7e3e61052dd ('Add support for XRC QPs') in struct ibv_kern_send_wr, qp_type union is not initialized in ibv_cmd_post_send(). Additionnaly, as reported by pahole, this field introduces padding in the end of struct ibv_kern_send_wr: struct ibv_kern_send_wr { /* ... */ union { struct { __u32 remote_srqn; /* 56 4 */ } xrc; /* 4 */ } qp_type; /* 56 4 */ /* size: 64, cachelines: 1, members: 7 */ /* padding: 4 */ }; This padding is not initialized too. Since this field is not used at all kernel side and not exposed to drivers, qp_type union in struct ibv_kern_send_wr could be removed from the structure. Link: http://marc.info/?i=cover.1412163687.git.ydroneaud@opteya.com Fixes: c7e3e61052dd ('Add support for XRC QPs') Cc: Sean Hefty Cc: Yishai Hadas Signed-off-by: Yann Droneaud --- include/infiniband/kern-abi.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h index 91b45d837239..7023a0294df2 100644 --- a/include/infiniband/kern-abi.h +++ b/include/infiniband/kern-abi.h @@ -676,11 +676,6 @@ struct ibv_kern_send_wr { __u32 reserved; } ud; } wr; - union { - struct { - __u32 remote_srqn; - } xrc; - } qp_type; }; struct ibv_kern_eth_filter {