From patchwork Tue Feb 8 09:46:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 12738507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3A0FC433F5 for ; Tue, 8 Feb 2022 11:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243292AbiBHL3q (ORCPT ); Tue, 8 Feb 2022 06:29:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355719AbiBHJwq (ORCPT ); Tue, 8 Feb 2022 04:52:46 -0500 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94DE4C03FEC3; Tue, 8 Feb 2022 01:52:44 -0800 (PST) Received: by codeconstruct.com.au (Postfix, from userid 10000) id 203522029C; Tue, 8 Feb 2022 17:46:33 +0800 (AWST) From: Jeremy Kerr To: netdev@vger.kernel.org Cc: Matt Johnston , "David S. Miller" , Jakub Kicinski , Jonathan Corbet , Steven Rostedt , Ingo Molnar , linux-doc@vger.kernel.org Subject: [PATCH net-next 0/5] MCTP tag control interface Date: Tue, 8 Feb 2022 17:46:12 +0800 Message-Id: <20220208094617.3675511-1-jk@codeconstruct.com.au> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This series implements a small interface for userspace-controlled message tag allocation for the MCTP protocol. Rather than leaving the kernel to allocate per-message tag values, userspace can explicitly allocate (and release) message tags through two new ioctls: SIOCMCTPALLOCTAG and SIOCMCTPDROPTAG. In order to do this, we first introduce some minor changes to the tag handling, including a couple of new tests for the route input paths. As always, any comments/queries/etc are most welcome. Cheers, Jeremy --- Jeremy Kerr (4): mctp: tests: Rename FL_T macro to FL_TO mctp: tests: Add key state tests mctp: Add helper for address match checking mctp: Allow keys matching any local address Matt Johnston (1): mctp: Add SIOCMCTP{ALLOC,DROP}TAG ioctls for tag control Documentation/networking/mctp.rst | 48 ++++++++ include/net/mctp.h | 16 ++- include/trace/events/mctp.h | 5 +- include/uapi/linux/mctp.h | 18 +++ net/mctp/af_mctp.c | 185 +++++++++++++++++++++++++----- net/mctp/route.c | 124 ++++++++++++++------ net/mctp/test/route-test.c | 158 ++++++++++++++++++++++++- 7 files changed, 486 insertions(+), 68 deletions(-)