Message ID | 20230515192511.731277-5-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=mcCfsVCD; 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 4QKq8z1574z20dc for <incoming@patchwork.ozlabs.org>; Tue, 16 May 2023 05:25:55 +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 1pydpJ-0002Bb-Mh; Mon, 15 May 2023 19:25:45 +0000 Received: from mail-dm6nam04on2080.outbound.protection.outlook.com ([40.107.102.80] helo=NAM04-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 1pydpG-000299-Q7 for kernel-team@lists.ubuntu.com; Mon, 15 May 2023 19:25:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nScjwaVW9tPXC3NWofwxakHxYFOkrgWa+Qj4T+b88GEI11CyAPtNePL+iP8dfqOFrFLTRHumfAUH6c9Ca7uh5HmsBVzoI8MZc5hcwamM+z70KxjZohDLqMbosO4YTGnWc54kbdGJi4WRuYpqEZC76ZUcpEt2mULcCO7UakDbWIrsjaqsh55ZfSaAcIQMqBIIQpGeigBz/kziFLfrGxuh16b+o+v+ZQQsgYcdzNCeEeE1JerETAhgC1TwgYLBvTmw26tBkE3mG6XpfW9Dpj9BvpZr42XQx1mdGHxCQelo2v4iCgVSNaKH00+swh+9d2TAgUmCSsbYIl4kP1NMtcUkDg== 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=UH3cllK555q/7yh7Iu2quB0S8XxIkfZMSfYiTek3wkk=; b=QVOCuSSRVclgKN70VfX2Wla1boMH5nUZmX+o7KlisXctKSiufVWIbCFF0sIOZTutJth0ZcFhg3Sp21BYwY+3fgKaYlFnuJoJI9N7jvVdNeOqZwBhGCOiTPlkIjJuIipzpVkCrMeYUu6LD+bk2IQSTiFhfbAiAYu7YQWJoVVSXblX3yc6vqex0nuhTzIB20jwZBajRN5gWh1GA3mjL4kJbwW7qqaAePpbGvyXMn2IJzObJRkrrbq8d8gC9mWfcEOaljKxxcaqEtN/6DZuaJoLednetLcrScHJL01kCkO0mtbR5kuEPNfXABpNQonSpmY4SRvqEsGZ0utl7ucNXiP2Ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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=UH3cllK555q/7yh7Iu2quB0S8XxIkfZMSfYiTek3wkk=; b=mcCfsVCDvjV63fXwwNoE/j6C4duF3XsfFjfZwGAq5mrtrduVKPOFEuJp4x/erWahHLumOS9VrmMdLQ48KimyD5n9HZyJ6lraGfcSzEOaJiMLe/Njjs9hIa858P248MS5vq2QH7eIRWgqa64systHZHx0B20CArB1F1w5Vy/oN+zT5glLJd9BYG81ypir4wOi/rlkCIytAtTL5LOSoOBCePLyyIbP/gqKjtKhQg6Mj2FeuKcomQkDvnklfr6/X08Arl3yqShQeFfEG5qwpex4JRcrRQBTqiiS5FU1DVG0tgPcaNAKWIJQHfZIZc3Yau3lgTelFaAi5zUzeZUoPH/U6A== Received: from BN8PR15CA0011.namprd15.prod.outlook.com (2603:10b6:408:c0::24) by DM4PR12MB6397.namprd12.prod.outlook.com (2603:10b6:8:b4::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Mon, 15 May 2023 19:25:40 +0000 Received: from BN8NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:408:c0:cafe::7f) by BN8PR15CA0011.outlook.office365.com (2603:10b6:408:c0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.31 via Frontend Transport; Mon, 15 May 2023 19:25:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN8NAM11FT014.mail.protection.outlook.com (10.13.177.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.14 via Frontend Transport; Mon, 15 May 2023 19:25:38 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 15 May 2023 12:25:24 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 15 May 2023 12:25:23 -0700 Received: from mtl123.mtl.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.126.190.182) 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, 15 May 2023 12:25:23 -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 34FJPCGY018130; Mon, 15 May 2023 22:25:20 +0300 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v2 4/7] net/sched: flower: Support hardware miss to tc action Date: Mon, 15 May 2023 22:25:08 +0300 Message-ID: <20230515192511.731277-5-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230515192511.731277-1-witu@nvidia.com> References: <20230515192511.731277-1-witu@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT014:EE_|DM4PR12MB6397:EE_ X-MS-Office365-Filtering-Correlation-Id: e94f9e15-e573-4291-7c84-08db557a2a67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9JaHGlCPWBXbqpBR1xio21WhTMYIE2hzoQdhESNYIUCvshcRI+KGaOlvf9+a2JXPn2tHUWHuyeukQv+uu+7NUo8QaJ21dHzpfkIzqZkBxkPSuniz0W2PoYLh+vEU2lda2w6iiYuDWddzpUJetZ3ZUxAU2izXX7DnOh5YriHnWlzqM2gGJkDFl0osjZJR9+kzGzep/k8+PWr+FzpYPDTFE+kS9IsEY4DGdsvmMhAvStITU00UGfPNxdMXR7szJVQ/iHd4XOCIp4kiCSRgWtlQL2Nh/W19r4I5YwK9EiLL8ea971Bwz/+4D886Okp2VHmuXjnWR/zaXncULXEiPHezIPrZuaQofuGUVUEag53hJxUN6SnZqYQne9bXFlBk3K3EdjmpA8geZoliGPvblZ3f7KnNDZfnSOxRDoo05JaUPTJaOozNc2TvUgUbA4c903188olNg6tdgokUDTcV8Kz6FE5J+aksBit86yWtBxkjLaQkBKLntItMlDRuFquBObmq0sHNo6lu9UM+J/0qmfIW3gW9DIHxJv5oSOdsY0wzznqWPsTzuvNOR9wmxTLV7W8/+d/nBctEZKaXu/3tM6+BPqHZRpB1hNXjqJZPIiqQGZCDvTTpfuFIEHBazYVgU+nTMhOEFBYDo2nWgRd63S5P0vrKmzoE6s8x7IxYJVwkv4yxVhsqLWbkd9xkHI1iFyY3rIJdWhAFHmIQY1/JRWSTv1t6Q5nvs9c1RfbrCVnadUVF4XOJH1HRxDPUizSdmshzs0amK4YWZuw7A/Cx9L/XK7cyt5Ys0FWZUOfVK2qbwGY= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(376002)(136003)(346002)(396003)(451199021)(40470700004)(36840700001)(46966006)(83380400001)(40460700003)(336012)(2906002)(2616005)(36860700001)(966005)(47076005)(478600001)(70586007)(6666004)(70206006)(107886003)(8936002)(8676002)(54906003)(1076003)(26005)(186003)(41300700001)(4326008)(316002)(6916009)(5660300002)(40480700001)(82740400003)(86362001)(82310400005)(356005)(36756003)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2023 19:25:38.6666 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e94f9e15-e573-4291-7c84-08db557a2a67 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.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6397 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: dann.frazier@canonical.com, paulb@nvidia.com, vlad@nvidia.com, yifeid@nvidia.com, bodong@nvidia.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 miss to tc action
|
expand
|
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 54228e684f86..311637e9e875 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -535,6 +535,15 @@ static struct cls_fl_filter *__fl_get(struct cls_fl_head *head, u32 handle) return f; } +static struct tcf_exts *fl_get_exts(const struct tcf_proto *tp, u32 handle) +{ + struct cls_fl_head *head = rcu_dereference_bh(tp->root); + struct cls_fl_filter *f; + + f = idr_find(&head->handle_idr, handle); + return f ? &f->exts : NULL; +} + static int __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f, bool *last, bool rtnl_held, struct netlink_ext_ack *extack) @@ -2067,7 +2076,8 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, } fnew->handle = handle; - err = tcf_exts_init(&fnew->exts, net, TCA_FLOWER_ACT, 0); + err = tcf_exts_init_ex(&fnew->exts, net, TCA_FLOWER_ACT, 0, tp, handle, + !tc_skip_hw(fnew->flags)); if (err < 0) goto errout_idr; @@ -3237,6 +3247,7 @@ static struct tcf_proto_ops cls_fl_ops __read_mostly = { .tmplt_create = fl_tmplt_create, .tmplt_destroy = fl_tmplt_destroy, .tmplt_dump = fl_tmplt_dump, + .get_exts = fl_get_exts, .owner = THIS_MODULE, .flags = TCF_PROTO_OPS_DOIT_UNLOCKED, };