From patchwork Tue Apr 5 12:53:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 8751281 X-Patchwork-Delegate: ira.weiny@intel.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E88A89F36E for ; Tue, 5 Apr 2016 12:53:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0ADBC2034E for ; Tue, 5 Apr 2016 12:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2AA52010E for ; Tue, 5 Apr 2016 12:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbcDEMxK (ORCPT ); Tue, 5 Apr 2016 08:53:10 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35380 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbcDEMxJ (ORCPT ); Tue, 5 Apr 2016 08:53:09 -0400 Received: by mail-wm0-f66.google.com with SMTP id a140so4026347wma.2 for ; Tue, 05 Apr 2016 05:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=subject:references:to:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=wzWvztu1kLT+dgZt2iZ0/KOSV7wdqawSdj36HoDqGyA=; b=XhdKxs7CZyzVvleju5jKZifXxZyFLamhmhI/oySCFvF49qKSennZ8qOwI3BOl3akAs 9Abbc9BNBbkJvP7RzhFfsmKhscxSOSV4JKRAcmOlhAw+nv/3E4265w7+3tKO4a0L3lI3 a1vkaS9ZVVhhpLfi79a6yCESkpfkoUYps3yeOD3K3G68J9jFVCfqKdqJi0aE3M6Zuhrd uhHovL8cNSkgY9m/TAcvZRRbzRS3mlX13FhtOJScKNVlIR9Lb0EKG0BibACzbgoVC+lp aFw1lxJud5reO+fJHGugGf0G3uToI+vfvzcTX4qPDlOi/3740AtdiId80qLMokzdy2yd zC9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=wzWvztu1kLT+dgZt2iZ0/KOSV7wdqawSdj36HoDqGyA=; b=IEkYoL6Z2AOfQ2K0ysoXkdGE87NUJ2NYOwG1tenx23mMrRR7UtQpXUIAilqtM3eG2c owbznoUtVI8UkeZbe+QgK2/lamZyZFyqlns6ooBNqtxCE8tRcL1tDrPm93V4uq4trUXF 0jgB8ueWOtDuazh/85B6/1exTNmehuB/cs/IXN8TukleWbB4UrrXg9J9F8UVks8fWQhm apS+5S43WqvgnhvbpWISqe4vQHX2jqhqUr+1lIv53HWHP755rAOo0FwdQyr0MZu/KzrY ZmOVG9Msgclugwu498oxGys2Y15vREkgojPUQPLvTyCaSimbsbSWr6ZZnWvGa3RqTIyK feQg== X-Gm-Message-State: AD7BkJLVYWpEHAu39TaVbCWnwlMZlawxL0FU6KXfh20HayNwtkASOVXbO3MAFHRw/HawXg== X-Received: by 10.28.3.138 with SMTP id 132mr17697568wmd.20.1459860787399; Tue, 05 Apr 2016 05:53:07 -0700 (PDT) Received: from [10.223.0.58] ([193.47.165.251]) by smtp.googlemail.com with ESMTPSA id u16sm19477571wmd.5.2016.04.05.05.53.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Apr 2016 05:53:06 -0700 (PDT) Subject: [PATCH RESEND infiniband-diags] saquery.c: Fix changing qos_class flag value to network order twice References: <57021F03.5030805@dev.mellanox.co.il> To: "Weiny, Ira" Cc: Dan Ben Yosef , "linux-rdma@vger.kernel.org" From: Hal Rosenstock X-Forwarded-Message-Id: <57021F03.5030805@dev.mellanox.co.il> Message-ID: <5703B531.3000505@dev.mellanox.co.il> Date: Tue, 5 Apr 2016 08:53:05 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <57021F03.5030805@dev.mellanox.co.il> 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 From: Dan Ben Yosef Fix the qos_class flag value from being converted to network order twice. The first time is in "CHECK_AND_SET_VAL" and the second is inside "ib_path_rec_set_qos_class". Signed-off-by: Dan Ben Yosef Signed-off-by: Hal Rosenstock --- src/saquery.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/saquery.c b/src/saquery.c index c0f42e8..ea946a1 100644 --- a/src/saquery.c +++ b/src/saquery.c @@ -1065,8 +1065,9 @@ static int query_path_records(const struct query_cmd *q, struct sa_handle * h, pr.num_path |= reversible << 7; CHECK_AND_SET_VAL(p->pkey, 16, 0, pr.pkey, PR, PKEY); CHECK_AND_SET_VAL(p->sl, 16, -1, pr.qos_class_sl, PR, SL); - CHECK_AND_SET_VAL(p->qos_class, 16, -1, qos_class, PR, QOS_CLASS); - ib_path_rec_set_qos_class(&pr, qos_class); + CHECK_AND_SET_VAL((p->qos_class << 4), 16, -1, qos_class, PR, QOS_CLASS); + pr.qos_class_sl = (pr.qos_class_sl & CL_HTON16(IB_PATH_REC_SL_MASK)) | + qos_class; CHECK_AND_SET_VAL_AND_SEL(p->mtu, pr.mtu, PR, MTU, SELEC); CHECK_AND_SET_VAL_AND_SEL(p->rate, pr.rate, PR, RATE, SELEC); CHECK_AND_SET_VAL_AND_SEL(p->pkt_life, pr.pkt_life, PR, PKTLIFETIME,