From patchwork Tue Jul 31 16:27:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1261091 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1AD933FC71 for ; Tue, 31 Jul 2012 16:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755585Ab2GaQ1O (ORCPT ); Tue, 31 Jul 2012 12:27:14 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:48474 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755574Ab2GaQ1N (ORCPT ); Tue, 31 Jul 2012 12:27:13 -0400 Received: by vcbfk26 with SMTP id fk26so6001119vcb.19 for ; Tue, 31 Jul 2012 09:27:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=sNO4r3oh9J3QGJLEnTvSlJtAUwSacNtZdDYJ7CmTRY0=; b=JIVOVB6Ew9VnkguM9a3E9VVWXXVo/gn0BrceoJm/Kjqcdu+pGOOjz28CAacfs3NBzH D28vaZmMGzJVgIx12KmL7RVvvIpzdgoWLb6YRoyh4f0ANiPjoLoYhPZjz4thJeJkyeWz IEDWg+sspqz1JZUpUa/hQ99N1+3sOvzF4EFRufpdzAcxEclfH6SndKktNCU3Aqi8xzts KTuQfJXIr1bNSoRYcvbFJwBXuFszP6xHXajBm2o7jK2ULbS9+k5XLxUOJF7xxiMCdViC 3qA0X+nvc+gdEsRAZ207KozdVUeo7918Hx1Kc46XsH0OZLoxgiQCb0w2N2KIux5JzSDb G6DQ== Received: by 10.58.203.3 with SMTP id km3mr3043322vec.13.1343752032478; Tue, 31 Jul 2012 09:27:12 -0700 (PDT) Received: from [172.25.5.27] ([193.47.165.251]) by mx.google.com with ESMTPS id l9sm460678vdw.14.2012.07.31.09.27.10 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2012 09:27:11 -0700 (PDT) Message-ID: <5018075D.5030902@dev.mellanox.co.il> Date: Tue, 31 Jul 2012 12:27:09 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" , "Chu, Al" Subject: [PATCH] opensm/osm_congestion_control.c: Skip TID 0 on 32 bit wraparound X-Gm-Message-State: ALoCoQnuTfLdU3Kc3hyC8ocATs4ksvraMyKLXB6aaC5jz/9jHOAd5cWOY0rkuSUMAYJgFjV7IqO2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock --- -- 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/opensm/osm_congestion_control.c b/opensm/osm_congestion_control.c index 640f3fa..9a9dfcd 100644 --- a/opensm/osm_congestion_control.c +++ b/opensm/osm_congestion_control.c @@ -82,7 +82,12 @@ static void cc_mad_post(osm_congestion_control_t *p_cc, p_cc_mad->header.status = 0; p_cc_mad->header.class_spec = 0; p_cc_mad->header.trans_id = - cl_hton64((uint64_t) cl_atomic_inc(&p_cc->trans_id)); + cl_hton64((uint64_t) cl_atomic_inc(&p_cc->trans_id) & + (uint64_t) (0xFFFFFFFF)); + if (p_cc_mad->header.trans_id == 0) + p_cc_mad->header.trans_id = + cl_hton64((uint64_t) cl_atomic_inc(&p_cc->trans_id) & + (uint64_t) (0xFFFFFFFF)); p_cc_mad->header.attr_id = attr_id; p_cc_mad->header.resv = 0; p_cc_mad->header.attr_mod = attr_mod;