From patchwork Tue Apr 9 11:33:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin 'ldir' Darbyshire-Bryant X-Patchwork-Id: 1082166 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=darbyshire-bryant.me.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=darbyshire-bryant.me.uk header.i=@darbyshire-bryant.me.uk header.b="KX+fdoNV"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44dlYB1N07z9sSJ for ; Tue, 9 Apr 2019 21:33:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbfDILds (ORCPT ); Tue, 9 Apr 2019 07:33:48 -0400 Received: from mail-eopbgr20047.outbound.protection.outlook.com ([40.107.2.47]:48773 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726112AbfDILds (ORCPT ); Tue, 9 Apr 2019 07:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darbyshire-bryant.me.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HIwveWEllfpn1qXBFFtfDrjraBsD9gp5Vz/oUywlUGQ=; b=KX+fdoNVYBaLgcSH9/ExL9ZVZf1c4210nAtKrArr+yvCJ8KoWn1cLchhnuJ2zbjFdybBcqNFF5IkU7SWe3g1Z46LUf1BuRnX4t454C9ViHon9GzbGW3sE64t6lHeA5FvVsPfnpqy19ti6Qdf7vpqCTiqHLW0MljL0q4g1mWz98Q= Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com (10.171.105.143) by VI1PR0302MB3295.eurprd03.prod.outlook.com (52.134.12.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.18; Tue, 9 Apr 2019 11:33:44 +0000 Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::b584:8ced:9d52:d88e]) by VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::b584:8ced:9d52:d88e%5]) with mapi id 15.20.1771.016; Tue, 9 Apr 2019 11:33:44 +0000 From: Kevin 'ldir' Darbyshire-Bryant To: Kevin 'ldir' Darbyshire-Bryant CC: "jhs@mojatatu.com" , "jiri@resnulli.us" , "marcelo.leitner@gmail.com" , "netdev@vger.kernel.org" , "ozsh@mellanox.com" , "paulb@mellanox.com" , "xiyou.wangcong@gmail.com" Subject: [RFC net-next 0/1] net: sched: Introduce act_ctinfo action Thread-Topic: [RFC net-next 0/1] net: sched: Introduce act_ctinfo action Thread-Index: AQHU7sgWr8L0VElUq02rYTpQXokkZg== Date: Tue, 9 Apr 2019 11:33:44 +0000 Message-ID: <20190409113315.64132-1-ldir@darbyshire-bryant.me.uk> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0602CA0006.eurprd06.prod.outlook.com (2603:10a6:800:bc::16) To VI1PR0302MB2750.eurprd03.prod.outlook.com (2603:10a6:800:e2::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ldir@darbyshire-bryant.me.uk; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 (Apple Git-117) x-originating-ip: [2a02:c7f:1240:ee00::dc83] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f4ec3270-7bd0-48af-8612-08d6bcdf3880 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:VI1PR0302MB3295; x-ms-traffictypediagnostic: VI1PR0302MB3295: x-microsoft-antispam-prvs: x-forefront-prvs: 000227DA0C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(376002)(136003)(39830400003)(189003)(199004)(14454004)(53936002)(6512007)(102836004)(478600001)(6116002)(46003)(99286004)(97736004)(386003)(6506007)(305945005)(6862004)(54906003)(37006003)(186003)(14444005)(1076003)(4326008)(7736002)(316002)(74482002)(25786009)(256004)(5660300002)(446003)(11346002)(105586002)(6486002)(106356001)(486006)(6436002)(2616005)(476003)(2906002)(68736007)(8936002)(71200400001)(81156014)(81166006)(50226002)(86362001)(76176011)(52116002)(71190400001)(6200100001)(8676002)(36756003)(7049001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0302MB3295; H:VI1PR0302MB2750.eurprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: br+G+qoBCQn9YR0E8gyTd9GqwxrbYKIjfEhg/g8b0PM7GBDLHcwqeJsBBGKAis+HL3nRmQhy/lebC/HwKhO7V2RdHxYXNgyeR2xmDWkkqdaDp7urIlnzAb+nCu8aSNcP550nugyUH//LgqoHkv0BBZlJYuQ8kFSOOJOBY6ALZg4VnqGDzK+6DhBhieAkQ/tKuKyldBq4d9QHxrIxZUEJYbTR0xCUHmtaxi3qna+PJN7nl5xs5f0OVx4NkSap2jOKK1Q1phfb/Ew2AQpppE5DcFv+qkJ7qmCZto5cfFun8+RHPa40TzvkXhaV+PiZjVh/0K6rs2oC0pzVchosJzLdF4NcNRUtX7r6tP2rRWmYixX3FDZnGQ9t5C3PEHpx8v8LOLVHrjIhl+MShdLusC7ng8Wb9WDzf91hDxnjyCSBh6c= MIME-Version: 1.0 X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-Network-Message-Id: f4ec3270-7bd0-48af-8612-08d6bcdf3880 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2019 11:33:44.3580 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9151708b-c553-406f-8e56-694f435154a4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0302MB3295 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Cong & everyone. Another rename & some more tweaks. I'm not sure quite what version we're up to but on the basis of the name change (again) I'm assuming v1. Changes: Changed the netlink parameter passing to mostly indepedent flags/structures to hopefully facilitate easier future extension of this action/module. Sanity checks on userspace passed parameters now return with -EINVAL instead of silently nulling them out. RCU'ified the action update based on structure seen in act_csum. I hope to $DEITY I've done that right :-) Closer to perfection? Kevin Darbyshire-Bryant (1): net: sched: Introduce act_ctinfo action include/net/tc_act/tc_ctinfo.h | 24 ++ include/uapi/linux/pkt_cls.h | 1 + include/uapi/linux/tc_act/tc_ctinfo.h | 33 ++ net/sched/Kconfig | 13 + net/sched/Makefile | 1 + net/sched/act_ctinfo.c | 372 ++++++++++++++++++++++ tools/testing/selftests/tc-testing/config | 1 + 7 files changed, 445 insertions(+) create mode 100644 include/net/tc_act/tc_ctinfo.h create mode 100644 include/uapi/linux/tc_act/tc_ctinfo.h create mode 100644 net/sched/act_ctinfo.c