From patchwork Sun Oct 18 21:31:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 298857 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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 0B197C433DF for ; Sun, 18 Oct 2020 21:32:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE4FE22267 for ; Sun, 18 Oct 2020 21:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603056724; bh=TanqdjBUf0rjKInxfQwL21fLYLSWFj3b+In8ojzGMdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kIGEdZor/mqPE12e3vaun/0e9tsF6f0fxBvkfavF9/xauvMK8TG3I3O4TBkj8wAX6 wW2NhltoJiCaJ8Z4bu67AOxv0+dZ4E2NqXD0feTn1ml2ZMVAHnwRCLbC3O8g6H3ojo uy3ZAI8no6daXz1a+xJoDNFkhsgXyh8LJaHfuZhI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728099AbgJRVcA (ORCPT ); Sun, 18 Oct 2020 17:32:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:46994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbgJRVb7 (ORCPT ); Sun, 18 Oct 2020 17:31:59 -0400 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F79C22280; Sun, 18 Oct 2020 21:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603056719; bh=TanqdjBUf0rjKInxfQwL21fLYLSWFj3b+In8ojzGMdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y5x9DMyoBPU8yk/sBSaneUzMwROZ32jPfWf0QXFvwYnE/H8rxMjdWazQSUqdww7Hz Lyyuf8MR3V+GCeSh3mNCteGlJDS5dtSh8Zqo/BhxYdz4zwOqPkJ+V7d4Vjk+qIcSAV FfdoEUL8EYGyCzNuEq53waIIp/azBOojQpSTlvxY= From: Jakub Kicinski To: mkubecek@suse.cz Cc: netdev@vger.kernel.org, kernel-team@fb.com, idosch@idosch.org, Jakub Kicinski Subject: [PATCH ethtool v3 1/7] update UAPI header copies Date: Sun, 18 Oct 2020 14:31:45 -0700 Message-Id: <20201018213151.3450437-2-kuba@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201018213151.3450437-1-kuba@kernel.org> References: <20201018213151.3450437-1-kuba@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Update to kernel commit 9453b2d4694c. Signed-off-by: Jakub Kicinski --- uapi/linux/genetlink.h | 11 +++++++++++ uapi/linux/netlink.h | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/uapi/linux/genetlink.h b/uapi/linux/genetlink.h index 7c6c390c48ee..9fa720ee87ae 100644 --- a/uapi/linux/genetlink.h +++ b/uapi/linux/genetlink.h @@ -64,6 +64,8 @@ enum { CTRL_ATTR_OPS, CTRL_ATTR_MCAST_GROUPS, CTRL_ATTR_POLICY, + CTRL_ATTR_OP_POLICY, + CTRL_ATTR_OP, __CTRL_ATTR_MAX, }; @@ -85,6 +87,15 @@ enum { __CTRL_ATTR_MCAST_GRP_MAX, }; +enum { + CTRL_ATTR_POLICY_UNSPEC, + CTRL_ATTR_POLICY_DO, + CTRL_ATTR_POLICY_DUMP, + + __CTRL_ATTR_POLICY_DUMP_MAX, + CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1 +}; + #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) diff --git a/uapi/linux/netlink.h b/uapi/linux/netlink.h index 695c88e3c29d..dfef006be9f9 100644 --- a/uapi/linux/netlink.h +++ b/uapi/linux/netlink.h @@ -129,6 +129,7 @@ struct nlmsgerr { * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to * be used - in the success case - to identify a created * object or operation or similar (binary) + * @NLMSGERR_ATTR_POLICY: policy for a rejected attribute * @__NLMSGERR_ATTR_MAX: number of attributes * @NLMSGERR_ATTR_MAX: highest attribute number */ @@ -137,6 +138,7 @@ enum nlmsgerr_attrs { NLMSGERR_ATTR_MSG, NLMSGERR_ATTR_OFFS, NLMSGERR_ATTR_COOKIE, + NLMSGERR_ATTR_POLICY, __NLMSGERR_ATTR_MAX, NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1 @@ -327,6 +329,7 @@ enum netlink_attribute_type { * the index, if limited inside the nesting (U32) * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the * bitfield32 type (U32) + * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64) * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment */ enum netlink_policy_type_attr { @@ -342,6 +345,7 @@ enum netlink_policy_type_attr { NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE, NL_POLICY_TYPE_ATTR_BITFIELD32_MASK, NL_POLICY_TYPE_ATTR_PAD, + NL_POLICY_TYPE_ATTR_MASK, /* keep last */ __NL_POLICY_TYPE_ATTR_MAX,