From patchwork Mon Apr 4 08:00:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 8738081 X-Patchwork-Delegate: ira.weiny@intel.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4C812C0553 for ; Mon, 4 Apr 2016 08:00:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 640E2201EF for ; Mon, 4 Apr 2016 08:00:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AE6F201EC for ; Mon, 4 Apr 2016 08:00:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753160AbcDDIAL (ORCPT ); Mon, 4 Apr 2016 04:00:11 -0400 Received: from mail-lb0-f193.google.com ([209.85.217.193]:34168 "EHLO mail-lb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbcDDIAK (ORCPT ); Mon, 4 Apr 2016 04:00:10 -0400 Received: by mail-lb0-f193.google.com with SMTP id vk4so20572037lbb.1 for ; Mon, 04 Apr 2016 01:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=wzWvztu1kLT+dgZt2iZ0/KOSV7wdqawSdj36HoDqGyA=; b=oi8C8dD/aNhv8DuowHCyAiHY25/CLS2vRqPJiml32tG9qjhprCW+dW7wlEm1O821OT UUTeSn3BdmmaqeT7qUtoWYOJayKwrdzwljpRobJQMHjoTG8CiJn7JX9FpL/xktFxas/U F1A1XaVEQx3e8aVBeXMSyGK6XE7MRtGLrWRHZgUXWSmk4wOYYmr5EKlgAeBFMRA1IxGp bAX+EnhAQp2juLhxBPzYeqosHbfadPvGwZ0RXXRD0iybPHCHuamQArrCT6WGdHrrJktf YMeFVrGBiYtOtNo8n1i0vuJP0X0Y8l6ivHQEa8nvIMdaKXQYq33wSr/bC/r3oH862+II mBnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=wzWvztu1kLT+dgZt2iZ0/KOSV7wdqawSdj36HoDqGyA=; b=FKCcVPkY/2flvpobmvX+ZHpLmRW218O+cSYKC5qiUvXa9d2cJVLF6U65EgFUYfdUz+ zVXMBH3OYZCkziegde4gzYlepx06UCTN09RKvowk09M9apKVv1y+21BGjiMh961IlASh Kmc9mVTNh+2eMenIIJo6bMIibGrbjnarPL/EDiqkKVQZmll/KemsZfnjsUtaGEXLlb6/ kZji9Q9ocAi52wCka8jsprgug3jHN+43hT833RK8wx/VJorHlPM1dLyaDHhk/Bcbk1+w 2S7k1KOLBdaH/vHMEXhX/FFdRaQU4qA/k7lEVWE9bt1Cl/I3WiwDFcgYVkIlKH8hYnbn RJFw== X-Gm-Message-State: AD7BkJLp8bzd0cFBhXJmuFvCpCsnCAuwdVQQ4Bxj3EXcCFztRor5BTcz1WbCDg8HWt8wXA== X-Received: by 10.28.98.137 with SMTP id w131mr10528150wmb.30.1459756808253; Mon, 04 Apr 2016 01:00:08 -0700 (PDT) Received: from [10.223.0.58] ([193.47.165.251]) by smtp.googlemail.com with ESMTPSA id p125sm12537631wmd.16.2016.04.04.01.00.07 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Apr 2016 01:00:07 -0700 (PDT) To: "Weiny, Ira" Cc: Dan Ben Yosef , "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCH infiniband-diags] saquery.c: Fix changing qos_class flag value to network order twice Message-ID: <57021F03.5030805@dev.mellanox.co.il> Date: Mon, 4 Apr 2016 04:00:03 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 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,