Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp713240pxv; Thu, 15 Jul 2021 14:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi90dyNYjlcbCLa1VFd5mJ1gtnGVfTrZss3UPG2VOLjz1W6zMIGMxEu1a84n1aZVVgGGMu X-Received: by 2002:a50:fe8d:: with SMTP id d13mr9846293edt.14.1626383529155; Thu, 15 Jul 2021 14:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383529; cv=none; d=google.com; s=arc-20160816; b=pdEV8JxtjbPZ6q2lR5sVEIo+w5zVUqH7Gu6j/B77j4WvUHPMJbhMkgOu7QM2jo8L0s 8an7zuSTlKeKX2u3jGwRWk/3Hkv0yepfuKbFEOObJknxOfE34Khf/wJlk+4b4FwNXVos 4EXBzAcDUIcn5pEO7mJ3tdIRDE9k1Md40Qe8xEx8I8ASBCD2T2zfAGoHUwVP+Qp0exyE pNuS77Mar9F6YZLN1BeB+mnQWlG6k1rubXdL1NnObj8xduHBEIqA0BpX7rKdCDuCNJtC 6MYecNRkn5tdheEKsS1jsSUUO/Jq+TuHObiAJ+K1oo/jqG12LoYeSl4eS7bVgamukkGV UHFQ== 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=9L6W5e5tWblRInTKcCwPnSWfdlhmjZUoSrA/aTkrwJc=; b=T/Gx1burfL0JA4u8CHDNyCJP75bytxKyUVDPmEfIQczSZNwUQ4pTVBEr+GaDET6L0i TR+5L4RrHurOw8a3j1PepjAF+IqW9zksIqcM3gXxOge/tVoJKWE4n2cG9LJgVM3P0zRv ge4DFIkos2r1PTJ1t6qLj7SUP81kWTenzeqozLyzM/JOv6yYi9WB2g3oSCuNt4b95SPq TPOYa4BYO1IC/DH2DYWdFYtkTC3ExAQey7tliKV9BqFO7cRMj3l3PTNARBbwucOK8iOb 0WT7vp9wK0IrHUpRIG2kyGSmFmhe2Dm9tWBMDBK/njfopEuPODmJTAOcd/YIQI4Zcbyy rYxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nVZTbIhh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 7si9160685ejh.116.2021.07.15.14.11.45; Thu, 15 Jul 2021 14:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nVZTbIhh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344872AbhGOTad (ORCPT + 99 others); Thu, 15 Jul 2021 15:30:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:46430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244024AbhGOTKd (ORCPT ); Thu, 15 Jul 2021 15:10:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE15C613D8; Thu, 15 Jul 2021 19:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376059; bh=F8SCln3H5NJmbHRZxsNE5Xd1u4tOGt+zaQc9RTcTxI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nVZTbIhhOPX2iFgxSx7BVntV5Hsxwc7XOV+xgxtZnk/6HqfnWHq2avkgiaGXzYGWa S1QW2LBaUmS3/VrG4WlLM5u59znCMMG8V1CDCTqYaV+aQBMXZQYNkp3cSC+MRY7+i9 h1lkcLiPezGL+KYofTdR1iFWXBTILZrqzkQ6Pw+0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, George McCollister , "David S. Miller" , Sasha Levin Subject: [PATCH 5.13 108/266] net: hsr: dont check sequence number if tag removal is offloaded Date: Thu, 15 Jul 2021 20:37:43 +0200 Message-Id: <20210715182632.955033997@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George McCollister [ Upstream commit c2ae34a7deaff463ecafb7db627b77faaca8e159 ] Don't check the sequence number when deciding when to update time_in in the node table if tag removal is offloaded since the sequence number is part of the tag. This fixes a problem where the times in the node table wouldn't update when 0 appeared to be before or equal to seq_out when tag removal was offloaded. Signed-off-by: George McCollister Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/hsr/hsr_framereg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c index bb1351c38397..e31949479305 100644 --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -397,7 +397,8 @@ void hsr_register_frame_in(struct hsr_node *node, struct hsr_port *port, * ensures entries of restarted nodes gets pruned so that they can * re-register and resume communications. */ - if (seq_nr_before(sequence_nr, node->seq_out[port->type])) + if (!(port->dev->features & NETIF_F_HW_HSR_TAG_RM) && + seq_nr_before(sequence_nr, node->seq_out[port->type])) return; node->time_in[port->type] = jiffies; -- 2.30.2