diff mbox

[libibverbs,5/9] kern-abi: remove unused qp_type union in struct ibv_kern_send_wr

Message ID 489f515ee8e477ed61fd690894d1954dd056ecd1.1412163687.git.ydroneaud@opteya.com (mailing list archive)
State Rejected
Headers show

Commit Message

Yann Droneaud Oct. 1, 2014, 11:49 a.m. UTC
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 <sean.hefty@intel.com>
Cc: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
 include/infiniband/kern-abi.h | 5 -----
 1 file changed, 5 deletions(-)
diff mbox

Patch

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 {