From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 9ABB9C010A2 for ; Tue, 5 Nov 2019 10:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DFFE217F5 for ; Tue, 5 Nov 2019 10:22:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="XJQrOQRQ"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Oul57Ywc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388265AbfKEKWm (ORCPT ); Tue, 5 Nov 2019 05:22:42 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:50644 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730633AbfKEKWl (ORCPT ); Tue, 5 Nov 2019 05:22:41 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4178A61014; Tue, 5 Nov 2019 10:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1572949360; bh=9EbxZEZV9X0B6w/lwrKzu3C3DCe9ei1aKt4Yhbt4/zU=; h=Date:From:To:Subject:From; b=XJQrOQRQBYmNFS5AeAyF5sDzyr+EsUSTYNHJJB/7AkAM8fH9qRixtnbW2+Rv+p4m/ EjbDhpN7Xxpd9dZyniEJ73y0VuNbG1bkSJBEyai5O5NRjilKlD6QYJfOYiSuO3dqbg 8ndd27CfOPFAeh4B2hqu6N4/Y3Oe6F0/hszlW3fM= Received: from manojbm-linux.ap.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: manojbm@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 64AFC6022B for ; Tue, 5 Nov 2019 10:22:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1572949359; bh=9EbxZEZV9X0B6w/lwrKzu3C3DCe9ei1aKt4Yhbt4/zU=; h=Date:From:To:Subject:From; b=Oul57YwcTJGZF8F/K1wgwHhE8Y48EUWtNzZ9PfdiXZZ8YmTZpm72KORheNvwvUHXm A3lYnEO23/kTml0Er1XVhzYmawYsr7zhbIBfJ7J67g72L1F//DfIVNg8nX5lGNHG+e 0l6y+K6Y0bXc/Oy6PKTSuCO87y2hV6lpwssanoo4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 64AFC6022B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=manojbm@codeaurora.org Date: Tue, 5 Nov 2019 15:52:24 +0530 From: Manoj Basapathi To: netdev@vger.kernel.org Subject: [PATCH] netfilter: xtables: Add snapshot of hardidletimer target Message-ID: <20191105102210.GA18988@manojbm-linux.ap.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a snapshot of hardifletimer netfilter target as of msm-4.4 commit 469a150b7426 ("netfilter: xtables: hardidletimer target implementation") This patch implements a hardidletimer Xtables target that can be used to identify when interfaces have been idle for a certain period of time. Timers are identified by labels and are created when a rule is set with a new label. The rules also take a timeout value (in seconds) as an option. If more than one rule uses the same timer label, the timer will be restarted whenever any of the rules get a hit. One entry for each timer is created in sysfs. This attribute contains the timer remaining for the timer to expire. The attributes are located under the xt_idletimer class: /sys/class/xt_hardidletimer/timers/