Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3492120pxf; Mon, 29 Mar 2021 03:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8bshI66hQHY4gJk9cf5f5CaAey2J+TStdRpqAkBgdyd4Tlosx37gNaLi0filH3mwQkX6Y X-Received: by 2002:a17:906:3388:: with SMTP id v8mr28298906eja.278.1617015258142; Mon, 29 Mar 2021 03:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617015258; cv=none; d=google.com; s=arc-20160816; b=fwL7STm/K9kZX3Hgw6qhHuu3hWiLTrJmCYBuSp2vCagiLRYnukZeNPf4xcCQZtWyYM /krhJNGkRc9XtsQcRXh2DoF9wOM6M15/c0piHt0nmjpfRRIto4jMwguXTlDeko3ZkXjN tKBSty60g8qRKMgKfdF6e1AHVEqkh9ARXGN93s3C9bLCJQP6X26uznsqj361yGHtVqmS PxgMB/a9668wkqNABcTp3p4MrpX/TMe1lkD9OloFh/PJdQM1GoNn99eOSYFCXxLo7jul De9QLRugDZ/ZEnl7rZsymLBOflhnua3p42xALpG66/rd98RH0OOFPQCi/Hby7MifYpqn oKkw== 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=EauBFn42gl/v/T+OdU4B5XuxLM3XLnskDyPCbrRo38w=; b=bFLvSvX3+IgH+1kBRBK88I5RzicjzxIuomIPmKZHxNPCoMZVt53ZCGPN9m9oxTCc3d xIIrDNOD4fomtw/n3t+UmMCKXNMCFTRFz1+fcYW7euCCOszA5KhXWIt1Vv97XKwGHUhG wOiedrk18yy+m6ridReejsLNZo7gIoea1PelWejP5hIIR8CmvNjAu76hJadMeG/wL/8Q B/nN9UScFLw8WX9pn/lxNzZ1YassFfJHjWS7QjheuNdzKDgXYO0QRCpDwh4WQRxfudzG IPhGM5C/ODb+oeDkxTXY+jBwR96JFC/gZaFJ+GcrPq5X4obgFkiMtJvbhdzlQSYNwGW0 0JSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O2out5Yo; 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 r16si12771632edw.458.2021.03.29.03.53.55; Mon, 29 Mar 2021 03:54:18 -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=O2out5Yo; 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 S235397AbhC2Ims (ORCPT + 99 others); Mon, 29 Mar 2021 04:42:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:42698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232489AbhC2IYb (ORCPT ); Mon, 29 Mar 2021 04:24:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED92861601; Mon, 29 Mar 2021 08:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006271; bh=KPcYmxIsnUGx5m7FKjSmupJ5Uhrm65quTBUIhkOylzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O2out5YoqcGo47UJPHOAaKyx9q/5EuBNwEJ0LiPJt7VItWGyvTQnKLNhdssHpQ9Jm sxm7zOmFsiBVBtMmzpiRd1ddXRKt03+s3MlIK3st3ZhDwL118mAgBnN3bf+o1K95kG dF/CE8I4E+P0OXkh5wyxNhBAgCVE1R1axDwIHg6E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yinjun Zhang , Louis Peens , Simon Horman , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.10 145/221] netfilter: flowtable: Make sure GC works periodically in idle system Date: Mon, 29 Mar 2021 09:57:56 +0200 Message-Id: <20210329075634.014644035@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@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: Yinjun Zhang [ Upstream commit 740b486a8d1f966e68ac0666f1fd57441a7cda94 ] Currently flowtable's GC work is initialized as deferrable, which means GC cannot work on time when system is idle. So the hardware offloaded flow may be deleted for timeout, since its used time is not timely updated. Resolve it by initializing the GC work as delayed work instead of deferrable. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nf_flow_table_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c index 4a4acbba78ff..b03feb6e1226 100644 --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c @@ -506,7 +506,7 @@ int nf_flow_table_init(struct nf_flowtable *flowtable) { int err; - INIT_DEFERRABLE_WORK(&flowtable->gc_work, nf_flow_offload_work_gc); + INIT_DELAYED_WORK(&flowtable->gc_work, nf_flow_offload_work_gc); flow_block_init(&flowtable->flow_block); init_rwsem(&flowtable->flow_block_lock); -- 2.30.1