Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp622077pxb; Tue, 5 Apr 2022 16:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk59OeQ5iYBwPJNwCp1C4nGYX07DdMi61eJ6BYaJnb+9E2DKiHLI3J47Ev3n629mMXS3I0 X-Received: by 2002:a63:5759:0:b0:399:5816:6a80 with SMTP id h25-20020a635759000000b0039958166a80mr4808600pgm.253.1649200525131; Tue, 05 Apr 2022 16:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649200525; cv=none; d=google.com; s=arc-20160816; b=D+aNqRRbb1ZJgis2b0HxT+GjyNypRjmds+hdMC45wiHg5t5RvNX8ETGpWGHcr3vGLg WSlFstr3DW9kp5y0I94X3VrYeok0degG6vqDgTUaccqGoSIDVxn8oH/c0pVy5tesgEK5 v0uHctnAk9Lr6ZdHCd+G4ScW28ZIjlXBIiaYDZWLdGzNMIC8Uv2VkM5PyFArOFtSVyeR C0Yg0Ojh8u2KRvqBSr2lQYrD1a6SiCwuqwVBZd7Ca6imU75npuk3kq6o8lKIuplrINa3 lZrT5ObhIru/44LNFuHzRHbpf1VQZhG6n9Afwn7GTuikgQcDcnBF56HXJq3KukW0+6bq 5Eng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qHr8tbHn90cGTKqNdpTp7Q34Kdu2+uV2JbTkh4OxtU8=; b=XAo0+EZO9QzJpliCmA/yvFE3PEIpUODXnLEvnwfCCi7oIvUsVFTdbuutgsKMPOnIfn QjsStkbNdLtCMslIZ9t16XmzEhcgbVJ0chNAtZfazxTyFbVS/MfKgYMlBjCuhonvBHgO ViEvRTHY7l07pg6TaNB250Vcdumg3bZEz5G6rJnzp5kbdS9FSC0B1rdLSDLI6XdfKle9 DAFCAlcjKvcaxPjEejULxnVDywx8whoJSHytspeJkgBeeoBaJxJDt7+/a+pp6BlpN2gh 1p31NHZ0Ye2VvRwHYMkn37x5Q0JR9p9xlrFRbUKBFUu0P+ZlFmLmpW7vsSAY5Er/v9XQ OBvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cl34rQjV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id rj1-20020a17090b3e8100b001c74c9f028asi3670604pjb.34.2022.04.05.16.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:15:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cl34rQjV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C08DC21F76A; Tue, 5 Apr 2022 16:00:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240104AbiDENBb (ORCPT + 99 others); Tue, 5 Apr 2022 09:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242819AbiDEJIY (ORCPT ); Tue, 5 Apr 2022 05:08:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 630CB8931D; Tue, 5 Apr 2022 01:57:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A51ED61511; Tue, 5 Apr 2022 08:57:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1A60C385A1; Tue, 5 Apr 2022 08:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149040; bh=uUCyCdXvLdpZNjhvD5/H8FcoxNfveFCUJrqmtXQXbZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cl34rQjVw4/hlsOBqN2WxReGKSHebRm+t96rU+K82tQIpbKJKJUhset7oXZMi4dk2 j2Gthm51TC2QVhRKmoiGAbAPdievBoj+LZWJZ66iAL90Qs9X63kDQ2fdIZ5xoQe7in 4fORdTB6YZZ9ct3QgmmSW3jjaZYHbOpTO4fNshuo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dennis Dalessandro , Mike Marciniszyn , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.16 0572/1017] IB/hfi1: Allow larger MTU without AIP Date: Tue, 5 Apr 2022 09:24:45 +0200 Message-Id: <20220405070411.257894204@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Marciniszyn [ Upstream commit b135e324d7a2e7fa0a7ef925076136e799b79f44 ] The AIP code signals the phys_mtu in the following query_port() fragment: props->phys_mtu = HFI1_CAP_IS_KSET(AIP) ? hfi1_max_mtu : ib_mtu_enum_to_int(props->max_mtu); Using the largest MTU possible should not depend on AIP. Fix by unconditionally using the hfi1_max_mtu value. Fixes: 6d72344cf6c4 ("IB/ipoib: Increase ipoib Datagram mode MTU's upper limit") Link: https://lore.kernel.org/r/1644348309-174874-1-git-send-email-mike.marciniszyn@cornelisnetworks.com Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hfi1/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index dc9211f3a009..99d0743133ca 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -1397,8 +1397,7 @@ static int query_port(struct rvt_dev_info *rdi, u32 port_num, 4096 : hfi1_max_mtu), IB_MTU_4096); props->active_mtu = !valid_ib_mtu(ppd->ibmtu) ? props->max_mtu : mtu_to_enum(ppd->ibmtu, IB_MTU_4096); - props->phys_mtu = HFI1_CAP_IS_KSET(AIP) ? hfi1_max_mtu : - ib_mtu_enum_to_int(props->max_mtu); + props->phys_mtu = hfi1_max_mtu; return 0; } -- 2.34.1