netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	mkubecek@suse.cz, johannes@sipsolutions.net, idosch@idosch.org,
	dsahern@gmail.com, stephen@networkplumber.org,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next v3 0/6] netlink: support reporting missing attributes
Date: Thu, 25 Aug 2022 20:09:29 -0700	[thread overview]
Message-ID: <20220826030935.2165661-1-kuba@kernel.org> (raw)

This series adds support for reporting missing attributes
in a structured way. We communicate the type of the missing
attribute and if it was missing inside a nest the offset
of that nest.

Example of (YAML-based) user space reporting ethtool header
missing:

 Kernel error: missing attribute: .header

I was tempted to integrate the check with the policy
but it seems tricky without doing a full scan, and there
may be a ton of attrs in the policy. So leaving that
for later.

v3:
 - update cover letter
 - minor (non-functional) adjustments to patches 1, 2, 6
v2:
 - add patch 1
 - remove the nest attr if the attr is missing in the root

Jakub Kicinski (6):
  netlink: factor out extack composition
  netlink: add support for ext_ack missing attributes
  netlink: add helpers for extack attr presence checking
  devlink: use missing attribute ext_ack
  ethtool: strset: report missing ETHTOOL_A_STRINGSET_ID via ext_ack
  ethtool: report missing header via ext_ack in the default handler

 Documentation/userspace-api/netlink/intro.rst |  7 +-
 include/linux/netlink.h                       | 24 +++++
 include/net/genetlink.h                       |  7 ++
 include/uapi/linux/netlink.h                  |  6 ++
 net/core/devlink.c                            | 41 ++++----
 net/ethtool/netlink.c                         |  3 +
 net/ethtool/strset.c                          |  2 +-
 net/netlink/af_netlink.c                      | 97 +++++++++++++------
 8 files changed, 133 insertions(+), 54 deletions(-)

-- 
2.37.2


             reply	other threads:[~2022-08-26  3:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  3:09 Jakub Kicinski [this message]
2022-08-26  3:09 ` [PATCH net-next v3 1/6] netlink: factor out extack composition Jakub Kicinski
2022-08-26  3:09 ` [PATCH net-next v3 2/6] netlink: add support for ext_ack missing attributes Jakub Kicinski
2022-08-26  3:09 ` [PATCH net-next v3 3/6] netlink: add helpers for extack attr presence checking Jakub Kicinski
2022-08-26  3:09 ` [PATCH net-next v3 4/6] devlink: use missing attribute ext_ack Jakub Kicinski
2022-08-26  3:09 ` [PATCH net-next v3 5/6] ethtool: strset: report missing ETHTOOL_A_STRINGSET_ID via ext_ack Jakub Kicinski
2022-08-26  3:09 ` [PATCH net-next v3 6/6] ethtool: report missing header via ext_ack in the default handler Jakub Kicinski
2022-08-30 10:40 ` [PATCH net-next v3 0/6] netlink: support reporting missing attributes patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220826030935.2165661-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=idosch@idosch.org \
    --cc=johannes@sipsolutions.net \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).