Message ID | 20230403223841.252583-4-witu@nvidia.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=KuTcCDp9; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pr5RP2Zvbz1yZf for <incoming@patchwork.ozlabs.org>; Tue, 4 Apr 2023 08:39:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1pjSpQ-0000CA-CE; Mon, 03 Apr 2023 22:39:08 +0000 Received: from mail-dm6nam12on2081.outbound.protection.outlook.com ([40.107.243.81] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <witu@nvidia.com>) id 1pjSpL-00008l-6w for kernel-team@lists.ubuntu.com; Mon, 03 Apr 2023 22:39:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nYBYiHyPMy+SgfAQqm7hBtQp1r/rThaLOvZI+heYUFS5vDGiAyaa2Uz8wLFXdZAlZLtQPVplVmsiael0TY1AN9+s5DOIGaKrPrqi4GimF7KFKFKzCVZ+y2115sIh9YIqV53TNLGYFbtggoFnVZhRfb2dDHT3+wPX37gZwBwPDu3MAUBM+2JSth3iUHy+q3wJcxOgVFwtfO42YqP/8xEY6A3lyWvYoG4sgAhJ0ZY0iLzh8ZKMr5q10suLo9QsbaAJEVaREKfZIoT4Scpkiwr9yoyfV3bDmhfpTuiv0iMIkcVk80r2TMADg7t0TOUBAUoeN/xe2GOyvbCCpzpNKNA/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mzl8xiTipS1yPWCZ7k3PkJbl1DTr5VGo/TzNEFdJrBA=; b=QecdOPd8jvT98/P5daGWZDDvCvFZOdRbtU+PBRKhSOvrP/93uXrAPuW/C1CKEj4xq+0TXD1Fm2dhn7xD9yTyMVvkfqOMZNOWflKsNf8VYY6ap0gwqx5Ra2C6HepVGYjkOchxmFXIFejaVK9cOnBSZLM0qWcrO8aXfFI3L+3VtkSGDcdosQP6R0iwC7EeTsZlmJijmCPC+To5MJ0Rfc9WGR/4N2K3sliLfTL3y7WKsl2B5Z9GviPy3PzhItvzpCn3YFIHKnWvp9Jhzdw+1GNCVkCB2moCxMFHLK2nxsw6SUY2/CiCZn1pKZaDfBDdfUSgwvUhjY3DyNIuUUVMIifDhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=canonical.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mzl8xiTipS1yPWCZ7k3PkJbl1DTr5VGo/TzNEFdJrBA=; b=KuTcCDp9RU4xU6PhQ5VLNKu/Y+p7bFrV9tEzch3uKY1hjsYNPyh3nrLefZaLfNj2ras8AqbgL1voyi6kh8YfBU9Hvo943WfGhnTnE8+Ofoj0Wwu2c0VUnLPoK9YkJWr/FhXQPgR0SOdQgGpu6B2W6o1JxojSEVPR/dWgoBq5LvIYF2DVeZpgrGSje98FGQ4wu6CCUAMkl1vakemgiGwC2HO1dbDz24kt2kYL0zBbMkR+wYe4/NOHa9h7WHsdPE17wT71+pnr8LZkuBnUq9ljF5yeFBAmfPvaI4kUW6tKnx9WxUkHYeys4TkcxxUlJ7TmgPx4EbK99hbP2dzFmGUcrQ== Received: from BN1PR14CA0007.namprd14.prod.outlook.com (2603:10b6:408:e3::12) by SA0PR12MB4495.namprd12.prod.outlook.com (2603:10b6:806:70::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Mon, 3 Apr 2023 22:39:00 +0000 Received: from BN8NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e3:cafe::b8) by BN1PR14CA0007.outlook.office365.com (2603:10b6:408:e3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Mon, 3 Apr 2023 22:39:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by BN8NAM11FT043.mail.protection.outlook.com (10.13.177.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.28 via Frontend Transport; Mon, 3 Apr 2023 22:39:00 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 3 Apr 2023 15:38:51 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 3 Apr 2023 15:38:50 -0700 Received: from mtl123.mtl.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37 via Frontend Transport; Mon, 3 Apr 2023 15:38:50 -0700 Received: from sw-mtx-002.mtx.labs.mlnx (sw-mtx-002.mtx.labs.mlnx [10.9.151.106]) by mtl123.mtl.labs.mlnx (8.14.4/8.14.4) with ESMTP id 333Mcggp026202; Tue, 4 Apr 2023 01:38:47 +0300 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][F:linux-bluefield][PATCH v1 3/3] sched: act_pedit: Implement stats_update callback Date: Tue, 4 Apr 2023 01:38:41 +0300 Message-ID: <20230403223841.252583-4-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230403223841.252583-1-witu@nvidia.com> References: <20230403223841.252583-1-witu@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT043:EE_|SA0PR12MB4495:EE_ X-MS-Office365-Filtering-Correlation-Id: fe5a6280-7857-46ca-f813-08db34943818 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1unRy9CHGDLeKSG8npW5vLeoqJXKAoJfCiDkR+lVfKoIan2InPIlHscl0RSLCEY/UMv0rQsQm8PBmCP8MsIX4Crwy/+olquEpDU4VYsbbty9cuIJieLBjw1MBTwfxQJMk8jo2cigo6SlU4dPw+ew5c9u8KV1CnbDAAShcTKVlldlc8oMIkaxfilZhGSSZvMDp3wS2XBy8N+Brig7hKToCcocXg2u/2BBehiFVRE1MR78OlE5SRdCgLil6j89maRyFiozQ4PW7Zsuqgt7LuSQFZuZFBpfH7zUQhyViNVyxNJ7ogbZ7n1ZLuGAtCTCwbbW/I3V2lFFV76Sk3Pp3jCW549jKxw1y4tr3OoCd92UNCKJUa57F1XP6gG8Ii02Gp5dmaY02DVlcxW/sQAunI3XfOj6J4mF06/6IWW6ESSNxdOUGTwZS14naX1rPHWieakvNxtuMMpullyNAsV6C57rUl46yQ/z4HTLkcY9T7ax8vV6BkVtRSczmxS+xclPmt1efUOPjcBavXrR6C3VmdW8qYxQkY3CvXCZ86VzCtvC1+X2NMEdLQRXdijI0xvSMrd3FFWu1i0nWG8skGhJReQF1+C8PIyZ1Bp3+7TvNTBqcAJJcUnPjxKqY4eVBE9wVjyYcFLAocc0IPux0K1PuKtzX5uWbIgQB0NkLYnQWwpmqJqFIc3FaiwcQCdvlnXguNv64gVRTjvWe1/+MYPdz1dNbVWheBJNT5rnM7RgsuLQneZVSI1iw437uyk885EPFzdxVEg8FN4EqcGWJCRzKbh9ZDFzFN0lAaGYP4OjCVu6KygNF9bd4UrmTg2qtSfAy9YA X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(376002)(136003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(40480700001)(478600001)(8676002)(40460700003)(70206006)(36860700001)(70586007)(4326008)(316002)(54906003)(8936002)(5660300002)(356005)(6916009)(82740400003)(7636003)(41300700001)(186003)(47076005)(83380400001)(336012)(2616005)(966005)(34020700004)(6666004)(107886003)(26005)(1076003)(86362001)(2906002)(82310400005)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 22:39:00.2146 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe5a6280-7857-46ca-f813-08db34943818 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4495 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Cc: bodong@nvidia.com, vlad@nvidia.com, paulb@nvidia.com, dann.frazier@canonical.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
Support hardware stats for tc actions
|
expand
|
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index b07a015b91ac..3224320549ad 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -429,6 +429,16 @@ static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a, return p->tcf_action; } +static void tcf_pedit_stats_update(struct tc_action *a, u64 bytes, u32 packets, + u64 lastuse, bool hw) +{ + struct tcf_pedit *d = to_pedit(a); + struct tcf_t *tm = &d->tcf_tm; + + tcf_action_update_stats(a, bytes, packets, false, hw); + tm->lastuse = max_t(u64, tm->lastuse, lastuse); +} + static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) { @@ -505,6 +515,7 @@ static struct tc_action_ops act_pedit_ops = { .id = TCA_ID_PEDIT, .owner = THIS_MODULE, .act = tcf_pedit_act, + .stats_update = tcf_pedit_stats_update, .dump = tcf_pedit_dump, .cleanup = tcf_pedit_cleanup, .init = tcf_pedit_init,