Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp639692pxv; Thu, 15 Jul 2021 12:11:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSeoRGvCMkRTDqgabO34OWkJ7I/oyeVWp+otQm3+sD9wbYhstCNnQC9ypM/3Fq/DJ8DEKo X-Received: by 2002:a50:cc91:: with SMTP id q17mr9242680edi.237.1626376291003; Thu, 15 Jul 2021 12:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376290; cv=none; d=google.com; s=arc-20160816; b=FVCpF+hoxV4GhRBKVOBQ82Ed221LW8a29NaugprlaPrQhNn2J4fY98M6XQjxWN7Ny3 jxuPGfDWRHUUl7f91pPMoV3Ay3CmcCKkR1lg7E3wt4eHlSqsMBx67UhkOlfpCVvtdYaX 6Jq5/p9vPNEM7DOGlzNUVHpfG14rp4vfeKrt+2lNeZ3fmoZp9FR9hNdkMgL2gMwOY1Ck y4UJ4+CFRAS47ukhSBwZVaeWYwKOlzzLX7Ys+kIcdWwreCinqsbcvthOi6nTDPzoOZ52 Qxl2vZoKQrKWcyGLsjlYguFS1otaTflcR4tL3giYijtFUUDhY7Uot20cp83sxewYr7vN 7Lbw== 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=TGBlCfjXHwFbM2qHxqntJcnqtd2RfFhiurnGb/h8FNNxovStCMeHpL34KDHsaqLgIu KnxqWjDzaFHlkoHCUj9KNLAeqkXol8M4Uab0B6N54ad2vW2LbgO5nbh95oFSBg+xeJNF y3Vr9hUQn6kcD4TxZJi4y1dxjnYxeCOKUIGemKIkXPmeJ7hSrB47IcxxZLlG5/c1iU1t Hj60zk1Cd3/zkZBo5JqItNlnIlwqA3PN/Im2xjeBBRIXtt/WoqBMTEwhnX7fzZbPkgpV QMwa3GeIBt+WUJb9mFQveOKKVdyRimWP05Pnpxpcywpau4VAijtdwbb99Zz53dDcDgn0 j5MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LRtyLVVq; 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 qa43si7133081ejc.484.2021.07.15.12.11.06; Thu, 15 Jul 2021 12:11:30 -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=LRtyLVVq; 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 S243168AbhGOTM3 (ORCPT + 99 others); Thu, 15 Jul 2021 15:12:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241484AbhGOTAY (ORCPT ); Thu, 15 Jul 2021 15:00:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B649610C7; Thu, 15 Jul 2021 18:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375449; bh=F8SCln3H5NJmbHRZxsNE5Xd1u4tOGt+zaQc9RTcTxI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LRtyLVVqwkjVqMj0IOWFHbLYHJDHWthQ6OyfTtLeDT7yUnrmnZrPGpsCQ4A1ej6nk tl0/JoyXdU9KjjzNq4dB/28+d3MiearoeDIgs2j35PluerRk7oM51gSIPwTM6Mc2fV n3hxMsmbzmQIdudzqsy3sUYWv2r8Bjdv+GK678dc= 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.12 092/242] net: hsr: dont check sequence number if tag removal is offloaded Date: Thu, 15 Jul 2021 20:37:34 +0200 Message-Id: <20210715182609.261915869@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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