Thread (10 messages) flat view 10 messages, 3 authors, 2017-09-26

Re: [PATCH net-next v3 3/6] rtnetlink: add helper to dump ifalias

From: Eric Dumazet <hidden>
Date: 2017-09-23 21:04:53

On Sat, 2017-09-23 at 21:26 +0200, Florian Westphal wrote:
quoted hunk ↗ jump to hunk
Reviewed-by: David Ahern <redacted>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 Changes since v3: don't add rtnl assertion, I placed the assertion
 in my working tree instead as a reminder.

 net/core/rtnetlink.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index c801212ee40e..47c17c3de79a 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1332,6 +1332,14 @@ static int nla_put_iflink(struct sk_buff *skb, const struct net_device *dev)
 	return nla_put_u32(skb, IFLA_LINK, ifindex);
 }
 
+static noinline int nla_put_ifalias(struct sk_buff *skb, struct net_device *dev)

Why noinline here ?

This function does not use stack at all (and that would call for
noinline_for_stack )
+{
+	if (dev->ifalias)
+		return nla_put_string(skb, IFLA_IFALIAS, dev->ifalias);
+
+	return 0;
+}
+
I really do not see the point of not making this RCU aware right away,
or at least make it in the same patch series...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help