Received: by 10.213.65.68 with SMTP id h4csp1856774imn; Mon, 19 Mar 2018 15:23:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELvXew8m0z4OwIviegIhng+ck6ngt8vLvCSywWg2sHKfxjNvFGJxt0FMJWaIucO9qJ0b3H5j X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr2437948plb.140.1521498200530; Mon, 19 Mar 2018 15:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498200; cv=none; d=google.com; s=arc-20160816; b=Qr7zEOKD4iNkRvSadzSEX8sCwFeFGFdhcK6S/VyAeVdL4hmlI8BFmFp9OzbD4Cz1JQ FgD0utmM0DCbwq/eXarPkumdyrUCyGAKIoXDGJ1ATIQA4JaRqnQ7reJAnDnCON7L/Aly I8CflPKYgajjx/nxM3We2/LKoqIABYAmrZglj7pGNC3dVBViB5BpFnoFl5QixB5cELAj cxa384nIGQnM6TcWo3192rHJto2fQVAn+LrylUBZrTMC85nnOpEaMq8NseOnKUk58Ld3 4fJDMbN9k1hrWf1Ae3qj6gW/HX6ioT8OF9wRqqZKvqn9fNQw+qmtoaXnbWMvzQT+yv9a psSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=GCX0g9omGqMdl3E3DC8aAFMlbEV7b5vNfrY4PjyxHHM=; b=LwaYkTi+dn9+1DRBepG352LI4WBIcds54o2rKk5cskofrKVfxY3k0b3dhmFskRBoAC jEF61PwnUoISES20DrpeFm7QlNyDnNHBeGyucIBUdLKb4zcuq1e+CDlGwEimw17fMllV VqHLl3Hx7JaGorJ7NT4ZkamdQ5m7qzhHLVDeLT0d4OD+Qkgi8FZEVr1TzQdCTLvfsb4f nUVkdDc1SJKiQfUKimR45XLjP1FFAX4jZkOx7vsJ35XivbHNXd01TI1H93nr/MRfH6OS QEOpcfLfMtfF/MpTcmZaOel1YW3Vr7QyfIx+Jb+PhLOVt5XaK244tTwEceg6f1aqeiJg MNhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=BRDibYXM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12-v6si136749pll.498.2018.03.19.15.23.06; Mon, 19 Mar 2018 15:23:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=BRDibYXM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032484AbeCSWUf (ORCPT + 99 others); Mon, 19 Mar 2018 18:20:35 -0400 Received: from mail-sn1nam01on0122.outbound.protection.outlook.com ([104.47.32.122]:60759 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933937AbeCSPtT (ORCPT ); Mon, 19 Mar 2018 11:49:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GCX0g9omGqMdl3E3DC8aAFMlbEV7b5vNfrY4PjyxHHM=; b=BRDibYXMVDub5qU4F4tS5o12D6mKarvPKU7lrf8TEVc45JJzBXyCR2XRlybyGX0hX6x4hgTTyCPTFT20qpmlXWH9iMi44TL9w746C2Y4AsDQXzQmV/MmKqKvEH+YIY/fUpYbNtNqHjfEr1NqNkEpfN5ROgD86Ari35YJUzica2k= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0981.namprd21.prod.outlook.com (52.132.133.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:49:06 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:49:06 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Feras Daoud , Saeed Mahameed , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 090/124] net/mlx5e: IPoIB, Use correct timestamp in child receive flow Thread-Topic: [PATCH AUTOSEL for 4.15 090/124] net/mlx5e: IPoIB, Use correct timestamp in child receive flow Thread-Index: AQHTv5nAelRmdTUWzU+Y/+hVMa2srQ== Date: Mon, 19 Mar 2018 15:48:39 +0000 Message-ID: <20180319154645.11350-90-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0981;7:+5TtkrWMtP7nmF/O8wBl+p39m0qjTrFqAIYsQshFA6POryrseaFo7Dovl8LU9L92Q82S7UDr9duYnNbig1VuXEVBPFO+U2WzukGBlxoX/lCllflIpsBNgOqJGQR035SuDZu3/LwVynWnxtPBMQxQnMbuElHVWUJbV4/pH6idowlYlwat04INe3jI6ufY3e6qWS8NzmHhvRrL+gDxmgqgGyOS5xJz7zou/1q/ZHeCT9Cq3H4shH+xFaoS0EXLJIGN;20:4/tNtc8HmWuSslAEfO3Ybvzdes5tdkpH+bKuNtegtJWtBiKgJ5Cd4Xn99s98Uu9ujmokhtVvRkLm781UZp2DTsveoZmRlHZuQpMN8gh/cEhXV0YjTG+EN6tVNhDs6raBut+aaSJQy7uTfJri6msWonooKqx4tUu546iJKzm7UPc= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5ea79f42-6ac9-4098-7123-08d58db0f257 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0981; x-ms-traffictypediagnostic: DM5PR2101MB0981: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0981;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0981; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(39860400002)(39380400002)(189003)(199004)(66066001)(6486002)(26005)(110136005)(5660300001)(54906003)(3280700002)(6512007)(68736007)(102836004)(6436002)(107886003)(10290500003)(53936002)(186003)(59450400001)(72206003)(14454004)(36756003)(6666003)(2950100002)(316002)(6506007)(22452003)(478600001)(10090500001)(106356001)(105586002)(99286004)(7736002)(3660700001)(86362001)(76176011)(305945005)(86612001)(2501003)(97736004)(5250100002)(4326008)(3846002)(6116002)(1076002)(8936002)(25786009)(81156014)(81166006)(8676002)(2900100001)(2906002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0981;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: t7PX9g/SR2efI9eBv6NC/PsIKUC7eLmzGiEcmK4qoLWkhSdkCLfbUehWrOwGg7snhwpxMmD6DnT0i8VpdeaRjo8CK7FHwsSscY2JjoPsNxSujHVsaWSwes6oHOnWaaFdzKYFZY3LUIHYL+IDHbzuVJbqVwghNwSPZ7g8rE+UzcSpilblsOLy+KOFbxlWE5IaVcKAdLOKFpaomCZxcYZZyNQnn3ujUhVgZh9dOGYgOme/3Fqb4B8PEFHaHM76EVRzyje9L+5z/NGD/n6woKvbKS8usMZDJrwA6jN2zzRJDuTNtdmBaqYeIDviYG9iXZIr7JRn0WenUCt5/QOK1VTQNQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ea79f42-6ac9-4098-7123-08d58db0f257 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:39.7995 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0981 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Feras Daoud [ Upstream commit 36e564b76f1862914ad32c35bab433e07da2ebf8 ] The current implementation takes the child timestamp object from the parent since the rq in mlx5i_complete_rx_cqe belongs to the parent. This change fixes the issue by taking the correct timestamp. Fixes: 7e7f4780c340 ("net/mlx5e: IPoIB, Use hash-table to map between QPN t= o child netdev") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/= ethernet/mellanox/mlx5/core/en_rx.c index 36611b64a91c..f7d9aab2b3b6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1196,7 +1196,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, u32 cqe_bcnt, struct sk_buff *skb) { + struct hwtstamp_config *tstamp; struct net_device *netdev; + struct mlx5e_priv *priv; char *pseudo_header; u32 qpn; u8 *dgid; @@ -1215,6 +1217,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, return; } =20 + priv =3D mlx5i_epriv(netdev); + tstamp =3D &priv->tstamp; + g =3D (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3; dgid =3D skb->data + MLX5_IB_GRH_DGID_OFFSET; if ((!g) || dgid[0] !=3D 0xff) @@ -1235,7 +1240,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, skb->ip_summed =3D CHECKSUM_COMPLETE; skb->csum =3D csum_unfold((__force __sum16)cqe->check_sum); =20 - if (unlikely(mlx5e_rx_hw_stamp(rq->tstamp))) + if (unlikely(mlx5e_rx_hw_stamp(tstamp))) skb_hwtstamps(skb)->hwtstamp =3D mlx5_timecounter_cyc2time(rq->clock, get_cqe_ts(cqe)); =20 --=20 2.14.1