From patchwork Fri Aug 5 23:29:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rolf Manderscheid X-Patchwork-Id: 1039592 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p75NTm90003060 for ; Fri, 5 Aug 2011 23:29:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752230Ab1HEX3o (ORCPT ); Fri, 5 Aug 2011 19:29:44 -0400 Received: from quartz.orcorp.ca ([139.142.54.143]:54070 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407Ab1HEX3o (ORCPT ); Fri, 5 Aug 2011 19:29:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=From:Subject:cc:To:Message-Id:Date; bh=EB0uX2POdHocB5xMTpmUAsjGrzIaSqLsajhXFtDAzz8=; b=BETgHRYxr7iGdBJ4FBrG+ldPp2L6xjYqHs6/nvTePEJ0l+V8e+Y0ByJmGy9a+DVwscOVERgMB4kdMXhJVJA8yngat+AgLls2NGd05GNJfUhXn+lSnptcu4HWadUhLzoEztKqHReSEJCUrV0dENG1Gaznc1NcBcFu7eQ4KEPMg8A=; Received: from [10.0.0.193] (helo=rvml.edm.orcorp.ca) by quartz.orcorp.ca with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QpTpl-0002yo-Tx; Fri, 05 Aug 2011 17:29:41 -0600 Received: from rvm by rvml.edm.orcorp.ca with local (Exim 4.72) (envelope-from ) id 1QpTpl-00026F-D6; Fri, 05 Aug 2011 17:29:41 -0600 Date: Fri, 05 Aug 2011 17:29:41 -0600 Message-Id: To: alexne@mellanox.com cc: linux-rdma@vger.kernel.org Subject: [PATCH] ibsim: fix size of slid/dlid fields in sim_request structure From: Rolf Manderscheid X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.193 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 05 Aug 2011 23:29:49 +0000 (UTC) The code treats them as 16-bit fields (by using htons), make the structure match. This also avoids the 32 bits of padding before the length field. Signed-off-by: Rolf Manderscheid --- include/ibsim.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ibsim.h b/include/ibsim.h index 15fc37c..b6b08bd 100644 --- a/include/ibsim.h +++ b/include/ibsim.h @@ -62,8 +62,8 @@ struct sim_port { #define SIM_CTL_MAX_DATA 64 struct sim_request { - uint32_t dlid; - uint32_t slid; + uint16_t dlid; + uint16_t slid; uint32_t dqp; uint32_t sqp; uint32_t status;