From: Jiri Pirko <jiri@resnulli.us>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
pablo@netfilter.org, Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Benc <jbenc@redhat.com>,
David Ahern <dsa@cumulusnetworks.com>,
Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH net-next v4 1/5] netlink: extended ACK reporting
Date: Tue, 11 Apr 2017 09:19:00 +0200 [thread overview]
Message-ID: <20170411071900.GC1976@nanopsycho> (raw)
In-Reply-To: <20170411065700.2623-2-johannes@sipsolutions.net>
Tue, Apr 11, 2017 at 08:56:56AM CEST, johannes@sipsolutions.net wrote:
>From: Johannes Berg <johannes.berg@intel.com>
>
>Add the base infrastructure and UAPI for netlink
>extended ACK reporting. All "manual" calls to
>netlink_ack() pass NULL for now and thus don't
>get extended ACK reporting.
>
>Big thanks goes to Pablo Neira Ayuso for not only
>bringing up the whole topic at netconf (again) but
>also coming up with the nlattr passing trick and
>various other ideads.
>
>Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>---
[...]
>+/**
>+ * enum nlmsgerr_attrs - nlmsgerr attributes
>+ * @NLMSGERR_ATTR_UNUSED: unused
>+ * @NLMSGERR_ATTR_MSG: error message string (string)
>+ * @NLMSGERR_ATTR_OFFS: offset of the invalid attribute in the original
>+ * message, counting from the beginning of the header (u32)
>+ * @NUM_NLMSGERR_ATTRS: number of attributes
>+ * @NLMSGERR_ATTR_MAX: highest attribute number
>+ */
>+enum nlmsgerr_attrs {
>+ NLMSGERR_ATTR_UNUSED,
>+ NLMSGERR_ATTR_MSG,
>+ NLMSGERR_ATTR_OFFS,
>+
>+ NUM_NLMSGERR_ATTRS,
According to the rest of the uapi, this should be rather named:
__NLMSGERR_ATTR_MAX
>+ NLMSGERR_ATTR_MAX = NUM_NLMSGERR_ATTRS - 1
> };
>
> #define NETLINK_ADD_MEMBERSHIP 1
>@@ -115,6 +146,7 @@ struct nlmsgerr {
> #define NETLINK_LISTEN_ALL_NSID 8
> #define NETLINK_LIST_MEMBERSHIPS 9
> #define NETLINK_CAP_ACK 10
>+#define NETLINK_EXT_ACK 11
>
> struct nl_pktinfo {
> __u32 group;
>diff --git a/kernel/audit.c b/kernel/audit.c
>index 2f4964cfde0b..d54bf5932374 100644
>--- a/kernel/audit.c
>+++ b/kernel/audit.c
>@@ -1402,7 +1402,7 @@ static void audit_receive_skb(struct sk_buff *skb)
> err = audit_receive_msg(skb, nlh);
> /* if err or if this message says it wants a response */
> if (err || (nlh->nlmsg_flags & NLM_F_ACK))
>- netlink_ack(skb, nlh, err);
>+ netlink_ack(skb, nlh, err, NULL);
Wouldn't it make sense to leave netlink_ack as is and add
netlink_ack_ext for those who need to pass non-null?
>
> nlh = nlmsg_next(nlh, &len);
> }
WARNING: multiple messages have this Message-ID (diff)
From: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
To: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org,
Jamal Hadi Salim <jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org>,
Jiri Benc <jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
David Ahern
<dsa-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>,
Johannes Berg
<johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH net-next v4 1/5] netlink: extended ACK reporting
Date: Tue, 11 Apr 2017 09:19:00 +0200 [thread overview]
Message-ID: <20170411071900.GC1976@nanopsycho> (raw)
In-Reply-To: <20170411065700.2623-2-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Tue, Apr 11, 2017 at 08:56:56AM CEST, johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org wrote:
>From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
>Add the base infrastructure and UAPI for netlink
>extended ACK reporting. All "manual" calls to
>netlink_ack() pass NULL for now and thus don't
>get extended ACK reporting.
>
>Big thanks goes to Pablo Neira Ayuso for not only
>bringing up the whole topic at netconf (again) but
>also coming up with the nlattr passing trick and
>various other ideads.
>
>Signed-off-by: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>---
[...]
>+/**
>+ * enum nlmsgerr_attrs - nlmsgerr attributes
>+ * @NLMSGERR_ATTR_UNUSED: unused
>+ * @NLMSGERR_ATTR_MSG: error message string (string)
>+ * @NLMSGERR_ATTR_OFFS: offset of the invalid attribute in the original
>+ * message, counting from the beginning of the header (u32)
>+ * @NUM_NLMSGERR_ATTRS: number of attributes
>+ * @NLMSGERR_ATTR_MAX: highest attribute number
>+ */
>+enum nlmsgerr_attrs {
>+ NLMSGERR_ATTR_UNUSED,
>+ NLMSGERR_ATTR_MSG,
>+ NLMSGERR_ATTR_OFFS,
>+
>+ NUM_NLMSGERR_ATTRS,
According to the rest of the uapi, this should be rather named:
__NLMSGERR_ATTR_MAX
>+ NLMSGERR_ATTR_MAX = NUM_NLMSGERR_ATTRS - 1
> };
>
> #define NETLINK_ADD_MEMBERSHIP 1
>@@ -115,6 +146,7 @@ struct nlmsgerr {
> #define NETLINK_LISTEN_ALL_NSID 8
> #define NETLINK_LIST_MEMBERSHIPS 9
> #define NETLINK_CAP_ACK 10
>+#define NETLINK_EXT_ACK 11
>
> struct nl_pktinfo {
> __u32 group;
>diff --git a/kernel/audit.c b/kernel/audit.c
>index 2f4964cfde0b..d54bf5932374 100644
>--- a/kernel/audit.c
>+++ b/kernel/audit.c
>@@ -1402,7 +1402,7 @@ static void audit_receive_skb(struct sk_buff *skb)
> err = audit_receive_msg(skb, nlh);
> /* if err or if this message says it wants a response */
> if (err || (nlh->nlmsg_flags & NLM_F_ACK))
>- netlink_ack(skb, nlh, err);
>+ netlink_ack(skb, nlh, err, NULL);
Wouldn't it make sense to leave netlink_ack as is and add
netlink_ack_ext for those who need to pass non-null?
>
> nlh = nlmsg_next(nlh, &len);
> }
next prev parent reply other threads:[~2017-04-11 7:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 6:56 [PATCH net-next v4 0/5] netlink extended ACK reporting Johannes Berg
2017-04-11 6:56 ` [PATCH net-next v4 1/5] netlink: " Johannes Berg
2017-04-11 7:08 ` Jiri Pirko
2017-04-11 7:19 ` Jiri Pirko [this message]
2017-04-11 7:19 ` Jiri Pirko
2017-04-11 7:29 ` Johannes Berg
2017-04-11 7:29 ` Johannes Berg
2017-04-11 8:13 ` Jiri Pirko
2017-04-11 8:29 ` Johannes Berg
2017-04-11 8:57 ` Jiri Pirko
2017-04-11 8:57 ` Jiri Pirko
2017-04-11 6:56 ` [PATCH net-next v4 2/5] genetlink: pass extended ACK report down Johannes Berg
2017-04-11 6:56 ` [PATCH net-next v4 3/5] netlink: allow sending extended ACK with cookie on success Johannes Berg
2017-04-11 6:56 ` [PATCH net-next v4 4/5] netlink: pass extended ACK struct to parsing functions Johannes Berg
2017-04-11 6:56 ` Johannes Berg
2017-04-11 6:57 ` [PATCH net-next v4 5/5] netlink: pass extended ACK struct where available Johannes Berg
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=20170411071900.GC1976@nanopsycho \
--to=jiri@resnulli.us \
--cc=dsa@cumulusnetworks.com \
--cc=jbenc@redhat.com \
--cc=jhs@mojatatu.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.