From patchwork Fri Jan 24 09:25:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 232802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7735AC2D0DB for ; Fri, 24 Jan 2020 11:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49E5B206D4 for ; Fri, 24 Jan 2020 11:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579866204; bh=+tH/XPHTQ24ltfvmKgNUIgkxxg1P3lqLg9hnLypw3ts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rdt8y1tAVv+Z/Yl4J3aWKU16P4Ikh1Jrcrm0CJSYdLHHS+4nEwdg9bOU+8eWby7hj a6TD6SPW/eEjQr2XX0H2aJx61uhKfAPXWv0tJyQcwA6qP3dmovepXU+YBdjujTlqu/ EiCHvyImsqwFBujAbBlAIFK37jGI354byXfQUu1Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730974AbgAXLJG (ORCPT ); Fri, 24 Jan 2020 06:09:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:44592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730766AbgAXLJE (ORCPT ); Fri, 24 Jan 2020 06:09:04 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74F9E214AF; Fri, 24 Jan 2020 11:09:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579864144; bh=+tH/XPHTQ24ltfvmKgNUIgkxxg1P3lqLg9hnLypw3ts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yLzu7oUON2BB8FzZQP/BDWgIhmGtvi6RxsMwiberr/+jzS/U2PYXKplgLdl7UebLn q8Z+00nmsLrOAM2qVV3ILXymXA09OLoFVa/2galLRNcM27HNrHM5mp7Cq4skU0zEV+ mSQFAbqS0aRouvhaXQtTdXHhHPL7Q/VTi1SMRbOo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve Wise , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.19 184/639] iw_cxgb4: use tos when finding ipv6 routes Date: Fri, 24 Jan 2020 10:25:54 +0100 Message-Id: <20200124093110.195764116@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Steve Wise [ Upstream commit c8a7eb554a83214c3d8ee5cb322da8c72810d2dc ] When IPv6 support was added, the correct tos was not passed to cxgb_find_route6(). This potentially results in the wrong route entry. Fixes: 830662f6f032 ("RDMA/cxgb4: Add support for active and passive open connection with IPv6 address") Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/cxgb4/cm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 3c8b7eae918c5..16145b0a14583 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -2166,7 +2166,8 @@ static int c4iw_reconnect(struct c4iw_ep *ep) laddr6->sin6_addr.s6_addr, raddr6->sin6_addr.s6_addr, laddr6->sin6_port, - raddr6->sin6_port, 0, + raddr6->sin6_port, + ep->com.cm_id->tos, raddr6->sin6_scope_id); iptype = 6; ra = (__u8 *)&raddr6->sin6_addr; @@ -3326,7 +3327,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) laddr6->sin6_addr.s6_addr, raddr6->sin6_addr.s6_addr, laddr6->sin6_port, - raddr6->sin6_port, 0, + raddr6->sin6_port, cm_id->tos, raddr6->sin6_scope_id); } if (!ep->dst) {