From patchwork Wed Feb 12 19:20:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3640161 X-Patchwork-Delegate: hal@mellanox.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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CF189BF13A for ; Wed, 12 Feb 2014 19:20:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06BFC2020E for ; Wed, 12 Feb 2014 19:20:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71A062020A for ; Wed, 12 Feb 2014 19:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928AbaBLTUY (ORCPT ); Wed, 12 Feb 2014 14:20:24 -0500 Received: from mail-ea0-f175.google.com ([209.85.215.175]:44108 "EHLO mail-ea0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753813AbaBLTUV (ORCPT ); Wed, 12 Feb 2014 14:20:21 -0500 Received: by mail-ea0-f175.google.com with SMTP id n15so1872516ead.20 for ; Wed, 12 Feb 2014 11:20:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=9JsaUKcBkwCIi+QLVZp7odmfrnTk7CGs29JJKHzm6y0=; b=EUJwxpoWUQBxQ53+TFVmJPRH8hQ6SDoUo5ZV1ITB3lexyZzSsYd76DKK3awdw5OcF7 1P6quN94kJyMhVvh1ZY5p8NMjuUCYDr+KetY1xnT6fOSU88TmwVICHpvb8Irp+b+bjVa XCZU6evN2Pay60oO94B6ETML8RazOXi7coEDFI0uNNklxe2C2jJoJ5OpBFVKPYruzSHs RqnZ6i4EZGHT/5i/JCdH0azjrsNuNnueTPu5R80iyWU5cDau4igYGd4cUOmzGJQIDN+t feY9WDliXGjAq88kn74Rs/W9uBa9nGvClN3Nb2tyP+v1CtUIBMoBT3KpSeRQCQln+ldP pdMg== X-Gm-Message-State: ALoCoQnbsI4HF0d3F3M/PyTPHfH6C1YvK6a4FUlsgeI44KFADRkLXvt3ieFGCFRbagBtRqkPuauv X-Received: by 10.14.3.72 with SMTP id 48mr6090942eeg.34.1392232820264; Wed, 12 Feb 2014 11:20:20 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id j41sm461464eey.15.2014.02.12.11.20.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 11:20:19 -0800 (PST) Message-ID: <52FBC971.3090203@dev.mellanox.co.il> Date: Wed, 12 Feb 2014 14:20:17 -0500 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: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH opensm] osm_ucast_mgr.c: Use LFT block of all port 0s to indicate resend 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 In set_lft_block, use LFT block set to port 0 rather than invalid port as a better way to detect that resending the LFT block is needed. 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_ucast_mgr.c b/opensm/osm_ucast_mgr.c index c8a7360..2329ea6 100644 --- a/opensm/osm_ucast_mgr.c +++ b/opensm/osm_ucast_mgr.c @@ -1006,7 +1006,7 @@ static int set_lft_block(IN osm_switch_t *p_sw, IN osm_ucast_mgr_t *p_mgr, * Zero the stored LFT block, so in case the MAD will end up * with error, we will resend it in the next sweep. */ - memset(p_sw->lft + block_id_ho * IB_SMP_DATA_SIZE, OSM_NO_PATH, + memset(p_sw->lft + block_id_ho * IB_SMP_DATA_SIZE, 0, IB_SMP_DATA_SIZE); OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,